KHMS memory synthesis

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

Bounded synthesis

KHMS is a file-based long-term memory system around an external agent. Its central contribution is a connected route from recorded work to durable, reusable proposals, separately reviewed knowledge cards, and later selective recall. Background code owns progression and recovery state; models interpret evidence and propose content; reviewers authorize import; the enclosing agent owns the eventual answer or action. KHMS is not the enclosing agent scheduler. This account covers the whole shipped system in https://github.com/ksx-cz/khms-memory at commit f739eb976dab199fd4cd64e352192cc0b112c047, with an applicability cutoff of 2026-11-08. SRC-1 supplies inspected implementation, doctrine/design and attributed operational reports, but no acquired observed-run or causal-experiment layer. Neither the target nor its tests were executed for this analysis. See boundary and evidence and the Source register.

Recorded work becomes proposals before it becomes approved knowledge

The representative workflow is a foreground finding recorded as a journal MARK, processed by the nightly job, reviewed and imported, then made available to a later foreground task. This is an implementation-supported workflow, not a trace of successful execution. The foreground agent is instructed to record decisions, requirements, failures and solutions. Nightly code also prepares retained transcript and Git inputs, groups source chunks, invokes a generator, checks generated MARK-shaped lines and commits them before per-MARK evaluation. The current path is not simply the older sweep/consolidate narrative: current per-MARK decisions proceed to post-processing and carry without another consolidation call. See workflow account and RT-RTE-nightly-proposals.

Raw records, generated findings and card candidates have different evidential roles. Transcript preprocessing retains selected text, tool names and short error snippets rather than complete successful tool outputs or hidden reasoning. A generator then authors findings from selected passages. Software checks generated-line shape, source-span occurrence and duplication, but does not establish that a finding preserves the source's meaning. Imported packets are acquisition; generated findings and later card proposals have an indeterminate semantic relation to their inputs until actual input/output pairs are assessed. Located text is not evidence of source truth, entailment or a novel accepted claim. See MEM-OBJ-trace-material, MEM-OBJ-inbox and the epistemic authority-route ledger.

For each queued MARK, code builds a packet containing the event, nearby journal context, a source excerpt when available, related cards and selected earlier candidates from the same night. A fresh tool-less model call proposes a card, correction or coverage decision; parsing determines whether the proposal document changes. Earlier persisted candidates already influence later evaluation calls, before any approved-card import. This is a wired automatic trace-fed update and reuse mechanism, not merely passive log storage. Its demonstrated contribution is retained context for subsequent proposal judgments, not established improvement in those judgments. See RT-RTE-mark-evaluation and MEM-OBJ-inbox.

Working-context control is chiefly isolation and selective introduction. Generator groups and per-MARK calls resemble task frames: selected inputs enter, files or parsed results escape, and later calls reload selected retained results. Per-MARK packet trimming removes lower-ranked cards/candidates, then source-excerpt prefixes, then distant journal context while preserving the MARK itself. Mandatory content can exceed the packet target. The tool-less recipient cannot automatically recover omitted source; generator file tools can reach beyond prompt-listed inputs under external permissions. These mechanisms do not establish foreground conversation compaction or a total model-context bound. See the memory and workflow annotations on RT-RTE-mark-evaluation.

Checks, carry and import have different authority

Verification is not one universal fail-closed gate. Generated-line admission has concrete checks, but the optional per-MARK format checker can be disabled or fail open; failed repair can retain the original decision. Nightly quote and relation reports can tolerate failure, and relation preparation can be skipped after an upstream failure. Header normalization/quarantine and publication verification remain separate operations. Quote occurrence constrains provenance, not interpretation or truth. Thus an inbox proposal is not a claim that every check passed. See EPI-RTE-quote-check, RT-RTE-mark-evaluation and the workflow post-processing annotation.

Carry state makes completed work durable before publication. Later jobs can recognize already-published output, publish retained output without another model call, or resume unfinished work. Publication conflicts preserve the batch for manual reconciliation. Quota and deadline stops leave unresolved MARKs open. This supports resumability as an inspected design, not observed recovery success. Coverage records govern what is processed next; a zero OPEN count means tracked work was covered or dismissed, not that all useful knowledge was captured. See RT-RTE-nightly-proposals and MEM-OBJ-mark-ledger.

Review is a separate authority transition. A reviewer may edit or withhold proposals before invoking the importer. The importer checks structure and selected consistency properties, allocates K IDs, remaps references, writes cards, updates relations and records receipts before rebuilding views. It does not authenticate a human reviewer or demonstrate an evidence-consuming semantic acceptance decision. Background file tools are not path-confined by KHMS's command arguments; actual host restrictions are unavailable. Review therefore is a protocol with a checked import path, not a universal filesystem security boundary, and the evidence establishes neither a bypass nor exclusion of every unreviewed write. Cooperating host-local locks and atomic individual writes do not create an all-files or cross-host transaction. See RT-RTE-card-admission and RT-CLM-review-boundary.

Later consumption is selective and correction-aware, not complete rationale delivery

Approved card bodies are natural-language descriptions or normative guidance in Markdown files. Symbolic status, links and coverage fields have separate fixed-code consumers. Optional numerical card vectors support dense ranking without showing encoder-weight updates; neither encoder artifact versions nor configured headless-model versions are immutably pinned by the inspected loading/configuration paths. Computed belief and graph edges are access metadata, not truth authentication. See MEM-OBJ-card-content, MEM-OBJ-card-metadata, MEM-OBJ-embedding-index, RT-CMP-agent-model, RT-CMP-qwen and RT-CMP-bge.

Explicit recall pulls ranked summaries and links; it can also return separately labelled OPEN unreviewed findings. Hook events push selected context without a card request, subject to installed event wiring, thresholds, session state, cooldowns and budgets. SessionStart emits operational reminders, not ranked card search. Hook dense rescue augments lexical candidates, whereas explicit CLI hybrid ranking fuses channels. Ordinary hook delivery is mainly short first-line text with IDs, flags and bounded correction pointers, not complete evidence or rationale. Corrector construction can fail and drop a pointer; risky-command prechecks and correction pointers have explicit budget exceptions. Generated MEMORY.md carries search duties and navigation, not card bodies or the bootstrap-card body promised by older doctrine. See RT-RTE-recall-return and its memory annotations, MEM-RTE-pending-evidence, MEM-RTE-precheck-return and MEM-RTE-index-bootstrap.

These channels can inform or instruct a receiving model, but delivery does not establish reading, compliance or an improved answer. Tagged risky-action warnings are not action vetoes. Separate hook gates can deny certain tool attempts if honored by the host, but fail open; Agent/Task dispatch denial and Stop handling are not wired in the supplied example settings, and report handling never refuses reports. See RT-BAP-context-delivery and EPI-RTE-hook-gates.

Correction changes later visibility through several distinct routes. Supersession links can redirect default retrieval to a replacement; triage applies explicit verdicts under guards; errata replace a located claim while retaining retracted wording; archive removes cards from normal recall without necessarily reopening their historical MARK coverage. History mode exposes dead cards still loaded from know/, not archived files. Tombstone lookup separately affords access to retired claims and reasons, and retractions also feed lint admission criteria. These qualify unqualified card immutability without proving semantic correctness or successful restoration. Optional archive backups supplement, rather than replace, receipt reconciliation and external file-history recovery. See EPI-RTE-supersession-link, EPI-RTE-triage-verdict, MEM-OBJ-tombstones and MEM-RTE-retired-lookup.

What the mechanisms establish, and what would change the assessment

For cross-session availability, the source supports a substantial route: durable trace-derived proposals, separate reviewed import, correction/status machinery and both requested and automatic recall. For warranted new knowledge or better future decisions, that route is insufficient on its own. Validity checking reproduces commands and quoted output but does not establish complete subclaim decomposition or relevant command choice; a holds aggregate can coexist with offline uncertainty. Retrieval evaluation uses expected card IDs, not correct final answers, and its failure exit covers only a gated subset. Injection citation measurement is not causal benefit measurement. See EPI-RTE-validity-check, EPI-RTE-retrieval-eval and MEM-CLM-evaluation-scope.

The strongest learning-related result is the wired trace-fed production and reuse of proposals, including conversational and tool-trace inputs. This meets the analysis's trace-learning write-route criterion without weight training, semantic novelty or proven improvement. Improved capacity for future action remains unestablished. The weekly prompt goes further in intent: it requests cross-domain principles, discriminating tests and mechanism-based revisions after recurring mistakes. That supports a criticism-oriented proposal design, not evidence that criticism of a consumed theory improved future capacity. See MEM-OBJ-inbox, RT-RTE-mark-evaluation, EPI-CLM-synthesis-review and the profile verification.

The independent theory-builder questions remain separate. Condition 1, localized formulated guidance, is afforded by method/policy card bodies. Condition 2, decisions depending on what that guidance says, has an available model-mediated channel but no demonstrated compliant decision. Condition 3, content-directed criticism with blame and resulting revision or changed reliance, is requested but lacks a concrete instance. Condition 4, that criticism's result shaping another round, likewise lacks the retained criticism-to-next-decision trace. These are not an evidenced system-wide absence of theory building. See the epistemic bounded conclusion.

Reflection has a designed route from own-operation records to proposed guidance and back through approved context; exercised causal closure is not established. Autonomous end-to-end theory building is not established by permitting strong-model review. For the own-mistake pathway, avoiding recurrent operational mistakes is an objective independent of any particular proposed measure. The architecture offers a dispositional self-change path within KHMS plus its agent consumer, but there is no particular evidence-responsive update traced into live subsequent behavior. Exercised self-improvement, and separately successful improvement, remain unestablished. The measurement-guided hook-change account is attributed reported operation, not independent causal identification. See EPI-CLM-synthesis-review, EPI-CLM-measured-injection and RT-RTE-operational-change.

A deployed trace linking source evidence, candidate, review decision, installed guidance, later selection and a consequential agent decision would change the operation assessment. An independently specified outcome comparison could establish benefit at the level actually varied; isolating a component would require varying that component independently. Authenticated review or path-scoped host write restrictions could strengthen the admission guarantee, while complete qualification delivery or verified full-card reads could strengthen claims about what consumers receive. Neither change is established at this pin.

Limitations

Limitation Affected SRC IDs and record citations Inspected boundary Conclusion prevented Evidence that would resolve it
Legacy lexical ledger repair is not separately characterized in the analyst inventory. SRC-1; MEM-OBJ-mark-ledger, EPI-OBJ-mark; carried from report verification Limits. Verification inspected tools/mark_ledger.py, cmd_recheck_carded: a narrow older unquoted already-carded subset is compared with distinctive card terms and can receive software-selected reopen events under explicit apply. No complete comparison of coverage-check/repair mechanisms or per-event human decision control. This is not semantic truth checking or direct card revision. Accepted records separately tracing that subset, selection, apply control and later queue consumer.
No deployed corpus, transcript-to-card-to-action trace or actual semantic review decision was acquired. SRC-1; MEM-OBJ-trace-material, MEM-OBJ-card-content, RT-RTE-card-admission, RT-BAP-context-delivery. Shipped source, templates and tests; raw capture is selective and admission records do not authenticate reviewer judgment. No capture-completeness, source-truth, accepted ampliative-instance, review-adherence, actual rationale-use or end-to-end success conclusion. Deployed source/output pairs, evidence-consuming review decisions with criterion/use/scope, and linked later consumer traces.
External host permissions, installation, propagation and provider internals remain unavailable. SRC-1; RT-RTE-nightly-proposals, RT-RTE-recall-return, EPI-RTE-hook-gates, RT-CMP-agent-model. KHMS command construction and example settings, not deployed runtime or providers. File-tool reachability beyond intended destinations is unresolved, not demonstrated misuse. No universal confinement, unavoidable hook coverage, real model compliance, provider fixity or exercised autonomous-loop guarantee. Deployed permission/configuration evidence, host event traces and model artifact/provider contracts at the relevant horizon.
Private guidance, initial content control and embedding provenance are unresolved alternatives. SRC-1; RT-RTE-operational-change, MEM-OBJ-card-content, MEM-OBJ-embedding-index, RT-CMP-qwen, RT-CMP-bge. Recorded rendering/loading interfaces and known derivations; no private extensions, initial corpus or exact deployed encoder artifacts. No complete lineage, admission-agency, semantic-curation or memory-alternative inventory; known automatic writes do not resolve all other writes. Versioned private inputs and admission records, initial corpus provenance and immutable deployed encoder identity.
Recovery and maintenance accounts are implementation designs, not demonstrated restores or exhaustive helper correctness. SRC-1; RT-RTE-card-admission, RT-RTE-maintenance-admission, MEM-OBJ-tombstones. Selected maintenance/application paths, host-local locks, per-file writes, receipts and optional archive copies; external version retention unavailable. No all-files/cross-host transaction, guaranteed rollback, actual recovery success or exhaustive maintenance-quality conclusion. Interrupted-operation and reconciliation traces, restoration checks and storage retention guarantees; fuller accepted records for unresolved material alternatives.
Outcome evidence and concrete criticism cycles are missing; evaluation has narrower targets. SRC-1; EPI-RTE-validity-check, EPI-RTE-retrieval-eval, MEM-CLM-evaluation-scope, EPI-CLM-synthesis-review, EPI-CLM-measured-injection. Reproduction/format checks, retrieval labels, weekly instructions and attributed measurement narrative; historical experiment internals not fully assessed and raw outcome evidence absent. No complete evaluator inventory, demonstrated improved capacity, jointly operated theory-builder conditions, exercised reflective closure, or exercised/successful self-improvement; no component causal attribution. Retained criticism/revision/next-decision chains and objective-linked subsequent operations, plus outcome comparisons whose design supports the attribution claimed.

No frozen-source reads were needed for synthesis; this account uses the supplied accepted members and their retained evidence. Report verification declares the legacy-repair limit above; profile verification declares no additional limits. No unresolved cross-report conflict is recorded in the supplied reconciliation.