Semantic Graph

A semantic graph connects entities (functions, classes, agents, concepts) with typed relationships. It powers retrieval-augmented generation (RAG), GraphRAG, and cross-reference navigation.

Use Cases

Entity Types

Node Relationships
Function CALLS, IMPORTS, TESTED_BY
Class INHERITS_FROM, IMPLEMENTS, USES
Agent OWNS, BLOCKED_BY, DECIDED
Concept RELATES_TO, DEPENDS_ON
Session PRODUCED, HANDS_OFF_TO

Spec and Trace Enrichment

The orchestrata-ultimate semantic graph is enriched with specifications and code @traces annotations. This creates a requirement-aware layer:

Diagram concepts-semantic-graph-1

Run the enrichment:

python scripts/enrich_semantic_graph_specs.py

Current scale:

Node/Edge Count
Spec 61
Story 333
Requirement 4,924
CodeElement 5,129
IMPLEMENTS ~13,000

Example query:

MATCH (c:CodeElement)-[:IMPLEMENTS]->(r:Requirement {req_id: 'REQ-004-US-001-001'})
RETURN c.label, c.file_path, c.line_number

Backends