Expand description
The Context Store: one access contract over the stores that already hold LeanCTX state. It is a logical layer, not another database.
| State | Authoritative store |
|---|---|
| decisions, plans, invocations, outcomes | execution ledger (core::execution_ledger) |
| what reached the model, under which policy | Decision Receipts (core::context_admission::receipt_store) |
| learned planner state | context_kernel::autopilot::learning_store |
| knowledge | core::knowledge (KnowledgeStore) |
| relations | core::property_graph |
| per-task runtime signals (bounce, expand, edit failure) | task_signals |
Search, graph and vector indexes are derived from these and rebuildable.
Modules here read and join; they never become a second copy of that state.
lean-ctx engine context-lineage and context-policy-evidence expose the
joins read-only (docs/contracts/engine-context-store-v1.md).
Modules§
- lineage
- Decision lineage of one task: what was planned, returned or prepared,
what it cost and which outcome followed — joined by
TaskIdfrom the execution ledger and the Context Gateway’s Decision Receipts. - task_
signals - Per-task runtime signals that say whether a compressed read served the model: a full re-read of the same file (bounce), an edit that failed after a compressed read, or an expansion of a file handle that was read compressed.
Functions§
- task_
scope - The tenant/project scope a task belongs to, as one opaque key. Task-keyed state (receipt indexes, learning) is always looked up under this scope, so equal task ids in different projects never meet.