How ke-uniliv/idea2 works
IDEA2 supports ontology engineers and domain experts in extracting competency questions (CQs) from schemas or other source material, reviewing them in Notion, and iteratively refining rejected questions. The main runtime orchestrator is idea2/runner.py; generation, model access, evaluation, provenance export, and Notion review are distinct stages. The graph also includes documented persona/user-story input and ontology-testing uses. Some subsystem links are documented in the README rather than demonstrated by sampled calls; unsampled implementations are represented only where the README or source index supports them.
Main entry points: runner.py Workflow runner · notion_utils.py Notion CQ operations · prompts.py Prompt design · cq_extraction.py CQ extraction
Components 21
Workflow orchestration
- Workflow runner
idea2/runner.py - Schema input
idea2/schema2cq.py - Persona stories
idea2/personas_user_stories.py
CQ generation
- Prompt design
idea2/prompts.py - CQ extraction
idea2/cq_extraction.py - LLM interface
idea2/interfaces.py - Generation settings
idea2/generation_utils.py
Review and refinement
- CQ reformulation
idea2/reformulate_cq.py - Notion workspace
- Notion CQ operations
idea2/notion_utils.py - CQ linkage
idea2/cq_linkage.py - Review metrics
idea2/notion_metrics.py
Evaluation and provenance
- Similarity analysis
idea2/cq_measures.py - CQ JSON-LD
idea2/cq_json_ld.py - Exports
idea2/exports.py - Output constraints
idea2/output_constraints.py - Ontology enrichment
idea2/ontology_enrichment.py - Iteration evaluation
idea2/iteration_evaluation.py
Other components
- Ontology engineer
- Domain experts
- Source documents
Connections 28
- Ontology engineer → Workflow runner: starts workflow
README.md - Source documents → Workflow runner: provides input
README.md - Workflow runner → Schema input: loads schemas
idea2/runner.py - Workflow runner → Persona stories: supports stories
README.md - Workflow runner → CQ extraction: runs extraction
idea2/runner.py - Schema input → Prompt design: uses prompts
idea2/schema2cq.py - CQ extraction → Prompt design: configures prompts
idea2/cq_extraction.py - CQ extraction → LLM interface: requests generation
idea2/cq_extraction.py - LLM interface → Source documents: generates responses
- Workflow runner → CQ reformulation: runs refinement
idea2/runner.py - CQ reformulation → Notion workspace: queries feedback
idea2/reformulate_cq.py - CQ reformulation → Prompt design: uses prompts
idea2/reformulate_cq.py - Workflow runner → Notion CQ operations: writes CQs
idea2/runner.py - Notion CQ operations → Notion workspace: reads and writes
README.md - Domain experts → Notion workspace: reviews CQs
README.md - Workflow runner → CQ linkage: links reformulations
idea2/runner.py - CQ linkage → Notion workspace: updates relations
idea2/cq_linkage.py - Workflow runner → Similarity analysis: checks similarity
idea2/runner.py - Workflow runner → CQ JSON-LD: exports provenance
idea2/runner.py - CQ JSON-LD → Notion CQ operations: reads iteration
idea2/cq_json_ld.py - CQ JSON-LD → Generation settings: gets generation
idea2/cq_json_ld.py - Workflow runner → Review metrics: uses review metrics
- Prompt design → Review metrics: imports metrics
idea2/prompts.py - Notion CQ operations → Review metrics: supports evaluation
- Workflow runner → Exports: offers exports
- Workflow runner → Output constraints: applies constraints
- Workflow runner → Ontology enrichment: supports ontology work
- Workflow runner → Iteration evaluation: evaluates iterations