Repository navigation
v0.17.0
Two ADRs landing together to close the "long sessions re-anchor to early topics" symptom end-to-end.
Added
-
Memory entries gain a lifecycle (ADR-0031). Global Memory and Session Memory entries now carry a four-state machine —
fresh/active/dormant/archived— driven by a per-user-turn relevance decay. Decay multiplier, fresh window, state thresholds, and touch / consolidation Jaccard thresholds are tunable underMemory.Lifecycle.*in the JSON config. Entries lexically referenced by the user turn (or named in the extractor's newtouched|lines) reset to relevance 1.0; near-duplicate Add calls consolidate into the existing entry instead of appending. Eviction under cap pressure prefers archived → dormant → active → fresh. The sidebar Memory tab gains per-row state badges, a thin relevance bar, and aShow archived (N)disclosure. All state transitions log toapp.log. -
Context compaction v2 (ADR-0032). The conversation-tail summary is no longer a single block.
contextbuild.Buildnow produces a two-tier summary (far~5% of budget,near~15%) plus a verbatim anchor block rendered between the summaries and the raw records. Anchors are detected by lexical Jaccard againstdecision/preferenceGlobal Memory facts. Records lexically matching adormant/archivedSession Memory fact (with a live-clause safety net) are dropped from the summary input entirely and surfaced as a[N dead-topic turns suppressed]elision marker. The summary cache key is content-hashed: stable across turn additions that don't change a tier's input, invalidates when the ADR-0031 lifecycle changes the drop set. The summarizer prompt drops "Preserve key facts, decisions, and context" — the load-bearing source of early-anchor reinforcement — in favour of a topic-bullet format. Tunable underContextBudget.{FarSummaryShare, NearSummaryShare, AnchorJaccardThreshold, DeadTopicJaccardThreshold}.
Backward compatibility
- Legacy
global_memory.json/session_memory.jsonfiles load asactivewith relevance 1.0 and re-save with the new fields populated. - Legacy
summaries.jsoncache files load without error; their range-keyed entries are skipped by the v2 cache lookup and FIFO-cleaned over time.
Docs
- ADR-0031 (memory entry lifecycle)
- ADR-0032 (context compaction v2)
docs/{en,ja}/reference/memory-modelupdated with §7 and §10 reflecting both ADRs