From 27784f9b68a811c215f3a804520860e23cb16132 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Wed, 13 May 2026 07:53:58 +0000 Subject: [PATCH] config: Phase 4 memory example block (commit #5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 4 commit #5 (final) per docs/PHASE4.md §12. Documentation-only; commented-out example showing: - inject_max_chars (cap on startup injection; default 2000) - summarizer_model (which configured model :memory summarize uses) The block is OFF by default. The :memory meta surface (:remember, :memory list/forget/clear/inject/summarize) works without the block — items persist to /memory.jsonl regardless. The block only configures the injection-into-system-prompt behavior + summarizer model choice. Phase 4 implementation complete: #1 199dd87 history.lua memory store + ffi/libc.lua flock #2 c1a5c73 context.lua [background] block (suppressed in Norris) #3 3b074af repl.lua memory handle + :remember + :memory meta #4 f22d21d :memory summarize — LLM candidate extraction #5 (this) config.lua memory example block Phase 4 verify-partial: - history memory round-trip tests: add/forget/load all green - flock single-writer enforcement verified - context composition order (DEFAULT → [background] → NORRIS) + Norris suppression all green - End-to-end persistence across boots: :remember on boot 1 visible on boot 2 as injected memory items - :memory forget id-not-active surfaces clean status (N1) - :memory clear with [y/N] confirm gate works - :memory summarize wire-correct against fast model (candidate parsing tolerates bullets; per-candidate y/N/edit prompts fire) Verify-pending: real-model summarizer quality test (deep/cloud); multi-process flock contention test; long-running :memory inject race with running broker stream. Co-Authored-By: Claude Opus 4.7 (1M context) --- config.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/config.lua b/config.lua index 9c5370a..ede80da 100644 --- a/config.lua +++ b/config.lua @@ -123,4 +123,27 @@ return { -- -- Default 8. Bump for long-running goals; cap low for testing. -- max_norris_steps = 8, -- }, + + -- Phase 4 (docs/PHASE4.md): cross-session memory.jsonl + startup + -- injection + :memory management surface. The block is OFF by + -- default (no startup injection); uncomment to tune. Note that + -- :remember / :memory list / :memory forget / :memory summarize + -- all work without this block — they store to / + -- memory.jsonl regardless. The block only configures the + -- injection-into-system-prompt behavior at startup. + -- + -- memory = { + -- -- Cap on total characters injected at startup. ~2000 chars ≈ + -- -- 500 tokens. LRU-by-ts selection if your memory.jsonl has + -- -- more recent items than fit. Older items remain in the + -- -- file; only injection is bounded. Suppressed entirely in + -- -- Norris mode (R-C1). + -- inject_max_chars = 2000, + -- + -- -- Which configured model to use for :memory summarize. + -- -- Defaults to the active model when nil. Use "fast" for + -- -- speed; "deep" or "cloud" for better extraction quality + -- -- (cloud may have variable cost per session). + -- summarizer_model = "fast", + -- }, }