orchestrata_ultimate.session.kg_sync
Reference › orchestrata_ultimate › session › kg_sync
Knowledge Graph Syncer — 8-stage sync pipeline.
This package pushes the project's state into the knowledge graph, so session work can be tied to code, specs and requirements. The syncer class combines the parts. Connection and Cypher helpers are in _base, the result record in _common, and tree helpers in _ast_helpers. The stages are: _stage_session (project and session nodes), _stage_folders (directories and files), _stage_code (classes and functions), _stage_specs_traces (specs and traceability) and _stage_docs (docstring flags, statistics). Data flows from the source tree and specs/ directory to the graph, one stage at a time, each returning a SyncStats. The entry point is KnowledgeGraphSyncer.sync_all, called from the sync CLI command; the read side is kg_context. Start with the package __init__.
9 modules, 1,972 lines of code.
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
Knowledge Graph Syncer — 8-stage sync pipeline. | 105 |
_ast_helpers |
Static AST helper methods for the KG syncer. | 51 |
_base |
Connection base for the Knowledge Graph Syncer. | 214 |
_common |
Shared constants and the SyncStats dataclass for the KG syncer. | 60 |
_stage_code |
Stage 3: Code — (:Class)/(:Function) nodes via AST + DEFINES. | 476 |
_stage_docs |
Stage 7: Docs + file-traceability enrichment + graph stats. | 132 |
_stage_folders |
Stage 2: Folders — (:Directory) tree + (:File) nodes. | 208 |
_stage_session |
Stages 0, 1, 6 + action logging: project, session, session-files. | 356 |
_stage_specs_traces |
Stages 4 & 5: Specs and Traces. | 370 |