Repository navigation
feat(cognition): causal memory graph slice A — acts join the engram edge substrate (#447) - #2321
Merged
Merged
Conversation
…dge substrate (#447) Joel's overhaul ruling (2026-08-15): act memory is fundamental to every activity and room, and it was structurally broken — a citizen with 1,808 lifetime acts sees 1-2 of them, concludes she has nothing to contribute, and withdraws (the deprivation mechanism, measured live in the v4 round). The diagnosis is a design gap, not a budget bug: the receipt's 'because' clause is a causal edge serialized as prose, starving the char-budgeted archive. Every mature system converges on two pointers per node (trace/ span, correlation/causation, PROV, git parents); we had the thread pointer (Engram.context_id) and were missing the cause pointer — and EngramGraph, the substrate built for exactly this, had ZERO production callers. This slice gives it its first: - EdgeKind::{CausedBy, Produced} — the causal spine, joining BJG's epistemic kinds on the ONE graph (no parallel store). - AdmissionState owns the graph: link_engrams()/engram_neighbors(), wired at the site that KNOWS the relation, never inferred. - ActChain: the settle driver owns the turn's causal thread; apply_act links each admitted act CausedBy its predecessor. Chain dies with the turn — edges cannot cross turns or rooms by construction. - probe! engram.edge.caused_by at the link site (glass box). - Design doc: docs/cognition/CAUSAL-MEMORY-GRAPH.md (slices B-D: compact scope-first ledger, thread retrieval affordance, confab/L1 consumers). Freedom doctrine inherited from BJG §5: edges are facts about what happened; the graph never decides; retrieval is an affordance she invokes. Tests: a_settle_chain_links_each_act_caused_by_its_predecessor (+ serde round-trip rows for the new kinds); act_observe 37/37, engram_graph 16/16, admission_state 41/41 green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ce E (GraphViewState) The ts-rs drift gate caught the missing regenerated binding for the new EdgeKind variants. Also records slice E in the design doc per Joel: the positron GraphViewState — event-driven engram-graph rendering, one truth in Rust keyed (room_id, kind) per #408, her slice-C introspection walk IS the human's clicked view (one graph, one query, two observers). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The overhaul (Joel, 2026-08-15: act memory is 'completely broken… fundamental to every activity and room')
A citizen with 1,808 lifetime acts sees 1–2 of them, concludes she has nothing to contribute, and withdraws — measured live in round v4's first captures. The diagnosis is a design gap, not a budget bug: the receipt's
becauseclause is a causal edge serialized as prose, starving the char-budgeted archive. AndEngramGraph— the substrate built for exactly this — had zero production callers.What this slice does (general cognition, zero benchmark rigging)
EdgeKind::{CausedBy, Produced}— the causal/motor level of the ONE engram graph, joining BJG's epistemic kinds. No parallel store.AdmissionStateowns the graph:link_engrams()/engram_neighbors(), written at the site that KNOWS the relation, never inferred.ActChain: the settle driver owns the turn's causal thread;apply_actlinks each admitted actCausedByits predecessor. The chain dies with the turn — edges cannot cross turns or rooms by construction.probe!engram.edge.caused_byat the link site.docs/cognition/CAUSAL-MEMORY-GRAPH.md— the two-pointer convergence (trace/span, correlation/causation, PROV, git parents), views-as-queries (slices B–D: compact scope-first ledger, thread retrieval affordance, confab + L1 consumers), and the freedom doctrine inherited from BJG §5: edges are facts, the graph never decides.Tests
a_settle_chain_links_each_act_caused_by_its_predecessor(two acts, one chain → CausedBy edge; fresh chain starts empty) + serde round-trip rows for the new kinds. Suites: act_observe 38/38, engram_graph 16/16, admission_state 41/41.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo