cass_memory_system synthesis

Type: agentic-system-analyses/types/agentic-system-synthesis.md

Bounded synthesis

From coding experience to later guidance

cass_memory_system (CM, invoked as cm or cass-memory) implements a durable route from coding-session records to guidance offered during later work. It also updates the standing of existing rules from feedback. These are source-wired contributions, not merely raw-log storage. Whether they improve future action remains unresolved: no execution trace, populated deployment corpus or causal comparison was supplied. The evidence is implementation and target-authored doctrine from https://github.com/Dicklesworthstone/cass_memory_system at commit 8aca3bbb6732321dca041b32c155617784687897, with applicability cutoff 2026-10-13. Tests were inspected, not run. The whole-system boundary includes shipped production, maintenance, admission and consumption paths, but not external cass indexing, model internals or enclosing-agent execution (boundary, SRC-1 Source register).

CM is a memory service for a coding agent, not that agent's task planner. Its CLI supplies retrieval, reflection and maintenance; an HTTP JSON-RPC server dispatches context and mutation tools; installed session-end hooks can initiate reflection. Code owns memory progression and selection. Models supply summaries, proposed changes and some judgments. The external caller owns the next coding action and may ignore returned rules (RT-RTE-http-tools, RT-RTE-reflection-update, RT-RTE-context-read; SRC-1 src/commands/serve.ts, src/orchestrator.ts, src/commands/context.ts).

The representative shipped workflow is cm reflect --session <transcript> --json, followed by a later context request. It connects acquisition, model handoffs, admission, durable delivery and recovery; it does not complete the original coding task. CM exports and sanitizes session content, persists a JSON diary, and supplies selected diary fields, existing rules and up to three related-history snippets to a reflector. Existing-rule and history strings receive separate 20,000-character prompt limits. The model returns structured deltas rather than an unrestricted modification of storage. Repeated proposal passes reuse the same formatted rule snapshot; they are not demonstrated criticism-and-revision rounds (workflow account, workflow annotation, MEM-OBJ-diary-entry; SRC-1 src/diary.ts, src/reflect.ts, src/llm.ts).

Admission is consequential but not universal validation

Some reflection additions encounter a real evidence-consuming decision. CM counts success/failure language in retrieved historical snippets and can request a model's support/contradiction judgment. The result can reject or permit an addition for reusable playbook guidance. An evidence-accepted addition that survives curation can retain its originating-session link and proposal reason, be saved, and enter later reflection or task context. This conditional checking, acceptance and lifecycle integration is implemented; absence of a run trace does not negate that architecture (EPI-RTE-evidence-check, EPI-RTE-validation-disposition; SRC-1 src/validate.ts, src/orchestrator.ts, src/curate.ts, src/playbook.ts).

The criterion is historical textual support, not independently verified rule-caused success. Non-add deltas, disabled validation and short additions bypass the gate; a draft with no success signal can pass without a validator call. Model-refined wording can replace an addition without an independent recheck. Curation rejects malformed additions and handles duplicates, but contradiction detection only warns. Contrary directives are excluded from duplicate matching rather than rejected. Therefore validity, saved content and warranted content are distinct, and the public claim of validation before every rule joins is too broad (EPI-CLM-scientific-validation, RT-RTE-reflection-update, MEM-RTE-rule-curation; SRC-1 README.md, src/validate.ts, src/curate.ts).

Other entry points make this distinction material. Onboarding delegates semantic extraction to the caller; ordinary additions have optional quality checks. Imports and starters can admit content and asserted standing without reflection's historical gate. Starting any of these workflows does not establish human approval of each item. Reflection admission is computational; the trauma initializer separately asks a human to approve a scanned batch. Generic add, mark, import and maintenance caller identity remains unresolved (RT-RTE-onboard-add, MEM-RTE-portable-admission, MEM-RTE-trauma-admission; SRC-1 src/commands/playbook.ts, src/commands/init.ts).

Durable delivery and selective reuse

Reflection serializes cooperating runs for a workspace, then reloads fresh playbooks under ordered merge locks before saving. Saves precede processed-session marking. Growth watermarks, partial proposal progress and failure cooldowns support incremental work and retry. They do not form a transaction across repository/global playbooks, processed logs and post-merge outcomes. A detached hook's PID means initiation, not durable delivery; even dry-run can persist a diary before returning proposed deltas. Delivery means saved changes are available to later readers, not that an agent used them successfully (RT-RTE-reflection-update, workflow account; SRC-1 src/orchestrator.ts, src/tracking.ts, src/commands/hook.ts).

For cm context "<task>" --json, code reloads merged YAML playbooks, filters active workspace-applicable rules, ranks with lexical and optional embedding relevance plus feedback influence, and selects a compact briefing. The estimated token budget covers projected bullets, not warnings, history, the task or the enclosing model window; the first relevant bullet can exceed it. Semantic or cass failures can leave lexical or playbook-only context. Omitted rules remain stored for later requests. This is controlled supply of external context, not trimming of an agent's accumulated conversation (RT-RTE-context-read, MEM-OBJ-embedding-cache; SRC-1 src/commands/context.ts, src/semantic.ts).

The briefing contains rule words, IDs, standing and shortened reasoning, but not full feedback events, source-session arrays or embeddings. Additions can preserve reasons; replacements can leave them stale, merges use synthetic lineage, and the next reflector's existing-rule view omits them. Explicit why, resources and export paths offer different, sometimes fuller views. They bypass task-context selection guarantees. An exported agent instruction file affords later host guidance, but neither its actual loading nor its later read direction is established (MEM-OBJ-reasoning, MEM-RTE-provenance-read; SRC-1 src/reflect.ts, src/utils.ts, src/commands/why.ts, src/commands/project.ts). Requested context returns are pull; automatic supply of retained material to the reflector and fixed control consumers is a separate operation, not unsolicited rule injection into every coding session (profile verification).

Feedback, withdrawal and stronger control channels

Rule text and reliance can change independently. Direct labels and automatic session-outcome grading persist events that affect scores, maturity and active eligibility. A delivery log can backfill displayed rule IDs, but display does not prove use. Broad-harm safeguards and abstention limit grading policy without establishing causal helpfulness. Eligible harmful positive rules can be converted into avoidance text; this is a durable policy rewrite, not an explained finding that the converse works. Fast diary status also defaults to success without success/error indicators, an unsupported outcome conjecture rather than faithful extraction (RT-RTE-feedback-update, MEM-RTE-outcome-feedback, EPI-RTE-curator-inversion, EPI-RTE-diary-inference; SRC-1 src/outcome.ts, src/curate.ts, src/diary.ts).

Withdrawal can retain blocked content so loaders suppress exact or high-token-overlap copies under other IDs. Undo and support scrubbing change eligibility, not historical truth, and do not necessarily update exported files or every legacy blocklist. Trauma entries provide a different channel: active regexes drive generated host/Git checks, while their natural-language messages explain denial. The pre-tool route covers Bash commands, allows other tool names and malformed input, skips invalid regexes and fails open on storage errors. Effective prevention requires installation and host enforcement; it is not a universal sandbox. CLI context adds a separate nonblocking trauma warning not implemented by the shared HTTP context generator (MEM-RTE-rule-withdrawal, MEM-OBJ-blocked-entry, RT-RTE-trauma-guard, memory context annotation; SRC-1 src/playbook.ts, src/trauma_guard_script.ts, src/commands/context.ts).

Assessment at this boundary

For later coding guidance, CM provides connected automatic trace-to-rule and trace-to-standing paths with durable consumers. That establishes wired trace learning in the write-route sense, not improved capacity for future action. The inspected benchmark compares authored expected-ID ranking fixtures against a reconstructed incumbent; the learning-loop test uses stubbed proposals. Neither supplies observed improvement, generated-rule truth or component-level causal benefit (MEM-CLM-evaluation-limits, EPI-RTE-retrieval-benchmark; SRC-1 test/learning-loop.e2e.test.ts, test/context-retrieval-benchmark.test.ts).

The runtime's independent theory assessments remain: condition 1, localized content, is afforded through whole-rule addressability, with actual theory instances unsupplied; condition 2, content-dependent consumption, is claimed rather than demonstrated by delivery; condition 3, content-directed criticism, is claimed through rule-specific criticism requests without a claim/result/blame/revision trace; condition 4, retained criticism shaping another round, is uninspected. Criticism of a consumed theory improving future capacity is separately uninspected. Reflection has an implemented session/rule-feedback representation, update and return path; reflective revision of CM's own method and autonomous theory building remain uninspected. Computational admission alone does not establish every internal theory-building operation (RT-RTE-reflection-update; SRC-1 src/llm.ts, src/reflect.ts).

At the horizon of later CM invocations, retained guidance and standing can change CM's own proposal inputs and selection, rather than remaining solely external products. This supports a dispositional, improvement-directed self-change pathway toward more useful future guidance. Exercised self-improvement is not established: no subsequent operation trace shows causal dependence on a particular evidence-responsive update, and successful improvement needs separate outcomes. Reflection, automation and persistence do not close that link. CM changes data, not inspected executable methods or model weights; configured generation and embedding names do not pin immutable provider versions (RT-RTE-reflection-update, MEM-RTE-outcome-feedback, RT-CMP-generation-model, RT-CMP-embedding-model; SRC-1 src/orchestrator.ts, src/llm.ts, src/semantic.ts).

A candidate-to-verdict-to-save-to-read trace would establish exercised admission and reuse; a criticism episode retained and demonstrably shaping the next round would change the theory assessment. A controlled comparison of later task performance with independently varied updates would address useful learning at that comparison's granularity. An independent refinement recheck or a genuinely enforced contradiction gate would change admission guarantees, but neither is present in the inspected handoffs. Installed-host traces across named tools would resolve activation, not justify universal safety. All ten memory-profile axes retain partial coverage, so the local mechanisms above support no complete-value comparison or system-wide epistemic grade (report verification, profile verification). No additional source reads were made for this synthesis.

Limitations

Limitation Affected SRC IDs and record citations Inspected boundary Conclusion prevented Evidence that would resolve it
Diary status lacks a separate operative-part declaration; this carries the reconciliation conflict and report-verification limit. SRC-1; EPI-OBJ-session-diary, MEM-OBJ-diary-entry, EPI-RTE-diary-inference, report limits Combined diary records and classifier/consumer tracing in src/diary.ts, src/reflect.ts, src/outcome.ts, src/orchestrator.ts Complete independently addressable inventory of status, checks and authority; treating every diary field as linguistic extraction. Trace-to-guidance and trace-to-standing existence findings remain supported. A separate status declaration with its transformation, checks and actual consumer paths.
Validator counts/verdicts and linguistic reason/refinement remain combined; this carries the second reconciliation conflict and report-verification limit. SRC-1; EPI-OBJ-validation-result, EPI-RTE-validation-disposition, workflow annotation, report limits src/validate.ts and refinement/boolean handoff in src/orchestrator.ts Complete per-part inventory or equivalence of original-candidate acceptance with refined-text warrant. Conditional admission and integration remain supported. Separate linguistic-part declarations and an evidence-consuming recheck of substituted wording.
Source wiring is not supplied operation or benefit evidence. SRC-1; RT-RTE-reflection-update, MEM-CLM-evaluation-limits, EPI-RTE-retrieval-benchmark Shipped implementation and unexecuted test contracts Observed extraction, accepted ampliative instances, useful learning, exercised self-improvement, measured retrieval performance or causal component effects. Provenance-linked execution and later-consumer traces; outcome comparisons with an appropriate independent intervention.
External corpus, source truth, imported authorship and immutable model provenance are unresolved. SRC-1; RT-CMP-generation-model, RT-CMP-embedding-model, MEM-OBJ-embedding-cache, MEM-RTE-portable-admission, boundary CM adapters, configured names/endpoints and local retained files Exhaustive historical coverage, authenticated source warrant, immutable encoder lineage or guaranteed generated-lesson correctness. Frozen originating corpus and external index evidence, import provenance, immutable provider identities and inspectable responses.
Criticism persistence and content-dependent iteration are not demonstrated; reasons can be omitted or stale. SRC-1; RT-RTE-reflection-update, MEM-OBJ-reasoning, MEM-RTE-rule-curation Whole-rule IDs, fixed method prompt and later prompt/projection fields Exercised theory-builder conditions 2–4, reflective method revision, autonomous theory building or improved capacity attributable to criticism. Actual rule content, criticism with claim/result/blame, preserved result and demonstrated next-round dependence.
Recovery and withdrawal do not cover every durable copy as one transaction. SRC-1; RT-RTE-reflection-update, MEM-RTE-rule-withdrawal, MEM-RTE-provenance-read, workflow account Ordered file saves, retry state, selected blocklists and instruction exports Complete crash rollback, removal of every legacy/exported copy, zero-effect dry-run or automatic host snapshot refresh. Crash/recovery traces across each effect and explicit propagation or removal evidence for independent copies.
Safety enforcement and host adoption are conditional and unobserved. SRC-1; RT-RTE-trauma-guard, MEM-OBJ-trauma-entry, MEM-RTE-provenance-read Generated Bash/Git matcher, JavaScript pattern admission and afforded exported guidance Universal sandboxing, cross-engine regex equivalence, actual prevention, safety benefit or a known later-host read direction. Installed-host traces, named tool coverage, cross-engine checks and host loader/request evidence; safety outcomes assessed separately.
Available helper depth and opaque alternatives retain partial inventory coverage. SRC-1; memory coverage, epistemic coverage, profile verification Selected onboarding, init/reset/doctor, maintenance, evaluator, related-history and external-consumer paths Exhaustive admission/recovery/evaluator equivalence, complete memory-value comparisons, determined merge semantics or system-wide negatives about unsearched behavior. Targeted inspection and supporting records for each unresolved branch, including semantic input/output relations and actual selector/consumer conditions.