2.0 KiB
Memory Graph Runtime
kontextual-engine owns the operational side of the Markitect memory graph
contracts. The engine imports Markitect-compatible graph/profile envelopes,
maps source contract ids to stable runtime ids, and stores graph nodes, edges,
and append-only events for later governed retrieval and lifecycle operations.
This repository does not redefine the Markitect syntax vocabulary. The first
runtime slice checks only schema compatibility, required ids, edge endpoint
integrity, and append-only event identity. Node and edge kind validation remains
with markitect-tool.
Implemented Slice
MemoryGraphImportResultmapsmarkitect.memory.graph.v1contracts into runtime records.MemoryProfileRecordmapsmarkitect.memory.profile.v1profiles without enforcing runtime policy, latency, retention, or compaction declarations yet.MemoryGraphRepositorydefines the storage port for profile, node, edge, and event records.InMemoryMemoryGraphRepositoryprovides deterministic local storage for tests and future service wiring.MemoryRuntimeService.import_markitect_graph()persists an imported graph and can attach an audit event when anOperationContextis supplied.MemoryRuntimeService.query_memory()retrieves graph nodes through a scope policy check plus per-node policy checks, returns source-grounded context items, preserves safe denied diagnostics, and emits an audit event in the result envelope.
Boundary
markitect-tool remains responsible for:
- profile and graph syntax validation
- graph selection compilation into context packages
- deterministic package summaries and source-span preservation
kontextual-engine is responsible for:
- runtime ids and persistence
- append-only event storage
- permission-aware retrieval and context assembly
- retention, refresh, compaction, review gates, and audit behavior
infospace-bench should consume these records and Markitect fixtures to measure
retrieval quality, latency, budget pressure, and regression behavior.