Expand description
Graph layer: Reality Graph loading plus the System IR compilers (components, flows, invariants) and impact analysis.
Docs mapping: scc-graph + scc-system-ir + scc-flow.
Re-exports§
pub use trust::TrustedGraphView;pub use trust::TrustPolicy;
Modules§
- archetype
- Archetype detection (Ontology phase — the COMPILER-gap attack).
- boundaries
- Trust-boundary compiler (SCC-148): derives
crosses_boundaryrelationships from deployment units, component dependencies, and calls to external APIs. - clustering
- Semantic hierarchical clustering (generalization wave).
- cochange
- Git co-change signal (SCC-046): files that are frequently changed in the
same commit are a structural coupling signal.
cochange_pairsextracts the signal fromgit log --name-only;enrich_componentsannotates store components with acochangeattribute. - components
- Component Compiler (EPIC-040, docs/SYSTEM_DESIGN.md §7).
- flowgraph
- Canonical causal FlowGraph compiler (Wave 3, docs/SYSTEM_DESIGN.md §9).
- flows
- Flow Compiler (EPIC-050, docs/FLOW_COMPILER.md).
- impact
- Impact analysis (docs/API_AND_INTEGRATIONS.md §2
impact_context). - invariants
- Invariants and drift (EPIC-180, docs/SYSTEM_IR_SCHEMA.md §8/§10).
- lifecycle
- Lifecycle Compiler (EPIC-050, P1 “system semantics”, docs/EPICS_AND_TICKETS.md).
- state
- STATE & DATA AUTHORITY (Ontology phase): deterministic attribution of state ownership per component from the fact layer.
- trust
- TrustedGraphView (P0): the only way the Context Compiler may query the reality graph. Enforces the trust contract (docs/SYSTEM_DESIGN.md §5):
- workflow
- Workflow Compiler (EPIC-050, P1 “system semantics”, docs/EPICS_AND_TICKETS.md).
Structs§
- Affected
Closure - Map every symbol id to its component id via the component CONTAINS edges (shared by the flow graph compiler and flow projections). Affected closure for scoped recompilation (C1b): the set of derived entities that may have changed given source-file mutations. File -> owning component(s) via stored component CONTAINS file edges; component -> flows via flow participant edges. Conservative: unknown files map to the whole closure (None = full recompile required).
- Compilation
Pipeline - Staged derived compilation (P0, docs/SYSTEM_DESIGN.md §7): every stage writes its output, reloads the reality graph, and only then compiles the next stage, so drift and later stages can never be computed against a graph that predates freshly written facts. The derived model epoch is bumped before the first write so cached context packs are invalidated even if a stage fails mid-pipeline (fail closed — no stale trusted pack survives a partial recompile).
- Reality
Graph - In-memory view of the reality graph.
- Recompile
Report - Stage
Counts
Enums§
Functions§
- affected_
closure - affected_
closure_ with_ owners - recompile
- Recompile the entire derived layer (components, flows, invariants, drift)
from the reality graph. Idempotent; replaces derived tables in the store.
Equivalent to
CompilationPipeline::run(kept for callers that do not need stage control). - recompile_
scoped - Scoped recompile entry (C1b): derive the affected closure for the
changed files and recompile. When the closure is bounded, only the
affected components/flows are recorded in the report; the pipeline
itself still runs whole-repo until per-stage merge writes land — the
closure is the contract that merge work will consume.
complete=true(unbounded) always runs the full pipeline. Returns the closure alongside the report so callers can observe how tight the bound was. - recompile_
scoped_ with_ owners - symbol_
component_ map