orchestrata_ultimate.knowledge_graph

Reference › orchestrata_ultimate › knowledge_graph

Knowledge Graph module for Orchestrata.

The knowledge_graph package makes the codebase and its surrounding work a queryable graph: files contain classes, classes define methods, functions call each other, specs trace to code, and runtime events mention the code they touched. Everything it writes goes to the operational knowledge graph, the orchkg database on the orchgraph engine (a Memgraph fork), reached over Bolt. The neo4j driver names that remain are Bolt-client naming only, since Neo4j is retired. The separate shared semantic/RAG graph, the memgraph database, belongs to the semantic_graph package; only semantic_bridge reads from both. The conversation capture path writes to a third, dedicated conversation graph.

The parts, by role:

Source files enter through sync or synchronizer, land in orchkg under canonical ids, and are read back by query_engine, kg_context and the context injector when a volk starts a task. The one server entry point is the gRPC service in server. Start with canonical_schema, then sync, then context_injector; the story is on the knowledge_graph module page.

Curated narrative

The hand-written story of this package: orchestrata_ultimate.knowledge_graph.

55 modules, 21,436 lines of code.

Subpackages

Package Modules LOC
context_pack 6 1,348

Modules

Module Summary LOC
__init__ Knowledge Graph module for Orchestrata. 5
_sync_queries Read-side query mixin for GraphSyncer. 283
adr_parser Pure text -> dataclass parser for the ADR corpus (wave ontology-phase2). 505
anomaly_detector Anomaly detection and correction for the knowledge graph. 515
architecture_writer The converged architecture-ontology writer (RATIFIED, wave ontology-phase1). 1853
ast_analyzer AST analyzer for the knowledge graph. 121
canonical_schema Canonical Knowledge-Graph schema — the single DDL source (SPEC-106 FR-001). 1475
class_extractor Class extraction from Python AST. 151
code_parser Code parser using Python's ast module. 637
config Knowledge Graph runtime configuration. 106
constants Knowledge Graph configuration constants. 54
context_injector Knowledge Graph Context Injector — enriches CXP packets with graph context. 1568
context_validator_loop Validator feedback loop. 175
conversation_consumer Conversation-capture queue consumer (SPEC-021, US-021-007). 712
cxp_auditor Spike Auditor — graph audit trail for CXP packet routing. 291
dependency_analyzer Dependency analysis for the knowledge graph. 193
exceptions Knowledge Graph exception hierarchy. 59
file_watcher File watcher with debouncing for the knowledge graph. 270
function_extractor Function extraction from Python AST. 125
graph_client Graph client for the knowledge graph. 453
graph_context_validator Post-LLM response validator for graph context compliance. 427
graph_node_mixins Mixin classes for GraphClient node operations. 314
history Change history for the knowledge graph. 135
interfaces Knowledge Graph protocol interfaces. 144
kg_context Knowledge Graph code context provider. 906
kg_design Knowledge Graph design store for spike pipeline. 924
nodes Graph node wrappers for the knowledge graph. 164
ontology_mapping Graph → canonical-ontology mapping — full-fidelity, nothing discarded. 456
pam_integration PAM++ integration for the knowledge graph. 148
portfolio Portfolio management for the knowledge graph. 128
project_resolver Project identity resolution for knowledge-graph operations. 122
prolog_bridge Knowledge-specific Prolog bridge. 143
query_engine Query engine for the knowledge graph. 435
relationships Graph relationship wrappers for the knowledge graph. 109
requirement_resolution Canonical requirement identity resolution. 262
runtime_writer Runtime Tier-H signal writer. 391
schema Knowledge Graph schema definition. 435
search Search engine for the knowledge graph. 175
semantic_bridge Semantic-search bridge: Memgraph chunks → Neo4j file roots. 278
server Knowledge Graph gRPC server entry point. 76
signal_extraction Extract file paths and code entity references from runtime payloads. 75
sync GraphSyncer — sync serialized AST JSON into knowledge graph. 1640
synchronizer File synchronizer for the knowledge graph. 1085
temporal Temporal versioning for the knowledge graph. 172
test_results_store Store pytest results in the graph for impact analysis. 297
types Knowledge Graph type definitions. 398
types_enums Knowledge Graph enumeration types and UTC helper. 149
types_nodes Knowledge Graph node dataclass definitions. 418
versioning Entity versioning for the knowledge graph. 131

Dependency diagram

Package dependency diagram orchestrata_ultimate.knowledge_graph

Truncated: showing 40 of 48 modules/subpackages (most connected first) and 5 of 5 outside packages.