You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Memory Brain rewrite (revised Knox-MS theorem). Stored memory is unbounded (C_addr = sessions + facts + recipes, counted once). Each model call is a bounded context (C_use ≤ W of the routed model). Success is measured recall of relevant facts, not a bigger inject number. Retrieval stays local lexical (sqlite FTS, BM25, trigrams, rule synonyms, graph, tree) — no embeddings, vector index, or neural rerank. How to use it: Memory. Pairing: knox-memory-checkpoint.md. Math: KMS Unlimited Context Theorem.
Lossless store. Age, sleep, and five-tier archive + tombstone instead of DELETE. builtin_memory delete / forget / TTL is reversible via audit; command-palette wipe still hard-deletes after tombstones. Summaries are pointer nodes; original content stays.
Forgetting, Value, and tiers. Power-law R = (1 + F t/S)^(-c) with category S₀ (episodic 1d; fact / error_fix / code_pattern 14d; preference / workflow 30d; decision / project_context 60d). Utility U = (h + κ I₀)/(h + u + κ); Value = R · U. Default retrieve skips Value < 0.05 (archive, not delete). Tiers are Active / Hot (R ≥ 0.9) / Warm / Cold / Frozen / Deleted from R and Value, not clock knobs. FSRS strengthens only on cited+helpful or harmful use; retrieve and inject record inject_count and do not raise stability.
Attribution. Injected semantic, episodic, and recipe hints render [mem:type:id] cites. Cited + successful turn increments h; a user correction or recipe revert increments u. builtin_memoryattribute{ id, helpful } writes the same log. Recipe replay and cited hints share brain_attribution. Sleep refits channel weights w_s and copies calibrated θ into the live retrieval threshold.
Four-channel RRF. Fusion is reciprocal rank fusion (k₀=60) over lexical (BM25-then-trigram + synonyms), ripgrep (memory corpus + .knoxignore-allowed project files), hub-damped Personalized PageRank (α=0.15, no entity cap), and summary-tree beam (b=8, B=4; silent until ≥ 8 leaves). Score is rel · (1+η_U U) · (1+η_R R); importance and recency cannot resurrect rel=0. Top 50 fused candidates, then θ=0.35. Graph aliases merge (TS / TypeScript); superseded and expired facts stay out of the default call.
Inject against the routed window.W and W_out follow the routed model (never the leftover 10M storage ceiling). W_mem is the remainder after system, goal, recent turns, and output, capped locally at 4096. Sources compete with budgeted submodular selection (λ=0.5) and a start/end sandwich. Overflow injects a session/tree node and drops raw old turns from that call only; originals stay retrievable. Sensory buffer (M₁) flushes at the turn boundary; working memory (M₂) lasts the call/session — 250ms / 30s / 30K are no longer Knox-MS spec.
Recipes as M₅, checkpoints as pointers. Live recipes (or their linked workflow row, once) count in C_addr. Recall is FTS + fingerprint + memory_id, not a cap-1000 list. Eviction uses theorem Value (workflow S₀=30d); the 256MB blob pin stays a disk budget. Knowledge rewind snapshots are v3 (recipes, steps, outcomes, supersessions, attribution, summary tree) and relink a dangling memory_id. Workspace capture/pin upserts an episodic checkpoint_id=… leaf; restore does not dump snapshot JSON into the prompt. Leftover brain_procedures yield when a live recipe shares the fingerprint. Recipes stay off by default.
Measured recall. Scale bench publishes Rec, |C(q)|, and latency at N ∈ {1e3, 1e4, 1e5} with project scope so N_q = σ N. Horizon bench publishes H_0.85. Each run records σ, ε_B, ε_S (ε_B = n/a — flat FTS when the tree is silent; that is not a proof). npm run mc:self-improve reports Rec vs N, ε_S, false-inject, attribution coverage, and recipe wrongApplyRate; proposeThresholds fits θ and w_s; git history is commitChurn. Overview shows C_addr, C_use ≤ W, rolling Rec, and H_0.85 / σ / ε_* when published.
Changed
Memory Overview Addressable Memory. The card is a stored-vs-window hero (C_addr vs C_use / W) with Rec / H_0.85 / σ / ε_* chips, stored vs buffer layer bars, and an age-mix stack — not three equal tiles and a flat M₁–M₅ dump.
Memory Settings. Collapsed Revised theorem group exposes the live parameter table (power-law F/c, FSRS, RRF, channel weights, W_mem, tree beam). Opening a pre-rewrite brain.sqlite adds theorem columns plus brain_summary_tree and brain_attribution; older readers still open. Ebbinghaus access-boost keys stay as unused leftover.
Memory Brain disk default 1 GiB.knoxchat.memoryBrain.maxBytes (and KNOX_BRAIN_MAX_BYTES) default to 1 GiB, was 256 MB. Overview health, capacity score, and growth forecast (days_until_cap) use that valve. Tiers stay R/Value (R >= 0.9 is hot); leftover max_hot_memories=500 is unused, like the old clock knobs. Settings marks Max Hot Memories leftover.
Chat recipe chrome. Chat no longer shows a capture toast (Saved as candidate / Don't save / Memory → Recipes) or a “No verified recipe reused this turn” banner. Save and refuse stay on Memory → Recipes; chat still shows a card when a verified recipe is actually reused, previewed, or hinted.
Fixed
Pre-turn ripgrep corpus scan. The memory ripgrep channel dumped up to 12k recent Ω(q) rows to a temp file on every turn (an O(N_q) leftover, against Search(q) = O(log N_q)). Rec-vs-N pre-turn p95 on GitHub Actions was ~1.5 s (budget 750 ms). Corpus search now MATCH-then-JOIN Ω(q) for exact / regex / identifier needles and runs bundled rg on that hit list; conversational BM25 terms stay on the lexical channel.
Rec-vs-N leftover latency gate. The 750 ms p95 ceiling was a laptop searchSemantic SLO and failed GHA windows-2022 (~1.1 s p95) while Rec and the theorem floor held. The gate now catches an O(N) scan (p95/max ceilings plus growth vs N), not a machine-specific turn time.
Jev status bar. The editor status bar Jev chip is hidden while Jev harness judgments are off (Knox Settings toggle, YAML jev.enabled, or knoxchat.jev.enabled). It used to stay visible because it only read the VS Code setting, which stays on by default after the GUI toggle writes shared config.
False Critical on large brains. Overview treated every sqlite tier='hot' row as a 500-cap overflow and any file over 100 MB as a problem, so a ~150 MB brain with tens of thousands of never-reclassified turns looked Critical with grade A. Inserts classify from R/Value; Refresh/Consolidate recompute stale labels; heal no longer force-demotes by recency. The 0-1 health score is shown as 0-100.
Dangling summary-tree leaves after disk reclaim. When max_bytes dropped original rows, tree pointers stayed (Losslessness). Health, consolidate, and heal prune them. Under the cap, forgotten tombstones stay reversible; reclaim is oldest-first.
Project-scope lexical recall. FTS JOIN-filters to this project's sessions and retries MATCH when tombstones filled the first window, so live in-scope rows are not dropped.
Mismatch scar after the 7-day demote. The leftover 0.15 penalty no longer applies once mismatch_until has passed (it was about 10x one RRF channel).
Sleep and inject leftovers. Distill skips tombstones. LIKE fallback skips Value < θ_arch. φ₅ still links the summary tree when a turn extracted no new facts. Recipe capture uses project session ids for scope.
Pinning an editor. Transcript resize waits a frame so pinning a message does not trip ResizeObserver.
Removed
C_effective as the capacity headline. Overview no longer publishes Σ |Mᵢ|/rᵢ as unlimited context. Sensory buffer, working memory, graph entity count, and checkpoint blob bytes are not C_addr. Retrieve-time importance (I), Ebbinghaus access boosts, and the leftover 0.6 additive admission floor no longer score or admit rows — inject stays on calibrated θ and W-derived W_mem.