Per-domain pure-fold engine (D1 total fold + D2 map + D3 within-domain propagation)
Goal
Build the binding-agnostic pure-fold engine that replays the append-only event stream into PER-DOMAIN isolated cell sets: the total D1 grouped-render fold, the total D2 disposition->sub-cell map over §1.1’s 11 dispositions, and the D3 soft-demotion-vs-hard-close propagation SCOPED STRICTLY WITHIN A DOMAIN (never crosses domains). The engine reads entries it is fed; it resolves no backend (sibling to ledger_decay.py).
Implementation Sketch
ledger_matrix.py pure functions: (0) PARTITION events by domain into isolated sub-matrices (D7) — STRUCTURAL isolation: a per-domain fold receives ONLY that domain’s events, so cross-domain propagation is impossible by construction (not a test-only guarantee — opencode-F4); (1) D2 per-cycle disposition->sub-cell state (KEPT/REFINED->CURED, PARTIAL->PARTIAL, REVERTED/INERT/REJECTED->DEAD(evidence), PIVOTED/SUPERSEDED/DROPPED->DEAD(administrative), BLOCKED/DEFERRED->BLOCKED), latest-terminal-cycle-per-coordinate wins; (2) D1 7-rule total grouped-render fold over variant sub-cells (empty->OPEN, any PARTIAL->PARTIAL, CURED+OPEN->PARTIAL, any CURED->CURED, any OPEN->OPEN, any BLOCKED->BLOCKED, else DEAD); (3) D3 propagation: DEAD(evidence) soft-demotes same-(territory,mechanism_class) OPEN cells WITHIN the domain partition (territory = the declared §01 shape attribute) — structurally cannot reach another domain; hard-close ONLY via inference_scope+cell_closure_list with high-confidence coords; DEAD(administrative) zero propagation weight.
Spec References
Design v7 D1/D2/D3/D7. Round-1 review (opencode-F1 territory=shape-attribute, opencode-F4 structural-not-test-only). learning-ledger.md §1.1 dispositions, §3 teeth, §11.4 MAP-Elites (per-niche isolation), §13.3 TMS (rank-only, never flips fold-state).
Work Items
- Structural event partition by
domain: each per-domain fold receives only that domain’s events (cross-domain bleed impossible by construction); D2 disposition->sub-cell map total over the 11 §1.1 dispositions; evidence-DEAD vs administrative-DEAD split. - D1 7-rule total grouped-render fold; exhaustive test over all variant-state combinations (no gap, no vacuous-truth).
- D3 propagation scoped within (territory,mechanism_class) inside the domain partition (territory = declared §01 shape attribute): soft-demotion default; hard-close gated on inference_scope+cell_closure_list+high-confidence; administrative-DEAD zero weight; a cross-domain test CONFIRMS the structural zero-bleed.
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “ledger-matrix/s-1cf1f3d9” }, “generated_at”: “2026-06-29T16:53:48.572706+00:00”, “graph_state”: { “head_sha”: “6b4f84d0”, “last_code_import_at”: “2026-06-29T16:50:34.744Z”, “embedding_stale”: true, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:ledger-matrix/s-1cf1f3d9] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “constrained_symbols”: [ “validate_ledger_append_only”, “validate_evolution_append_only”, “assemble_corpus”, “read_ranked”, “_FORBIDDEN_REFERENCES” ], “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/ledger-matrix” } } }
(full dossier: projection-engine—s-1cf1f3d9.intel.json)