docs(plan): phase 4c memory recall plan r1, pass B gated

This commit is contained in:
bchanot committed 2026-11-04 20:19:43 +01:00
1 parent fb6cbf1e34
commit fe6f953553
2 files changed
+210

No files matched your search

@@ -30,6 +30,8 @@ Brainstorm answers `[gated 2026-11-04]` (user: "continue" to recommendations 0-1
10. Injection log in scope: last 200 injections per project `{at, session, channel, ids}` in the store, not displayed (4d reads it).
11. Proof: a bun harness importing the mod's own functions (no port), haiku through `claude -p`; 20 real prompts from 14 days of transcripts and the error replay; the controller labels relevance, the user checks the labels; bar ≥ 14/22; oracle written after the measurement; live: headless error half, interactive recall + digest after a real /compact by the user.
Pass B `[gated 2026-11-04]` (plan r1; user: "oui, tels quels" / "oui"): visible texts kept in English as written in the plan: `memory recall:` block, `memory: known <ID> …` line, `memory digest:` with `- open:` / `- todo:` / `- journal:` lines; the new suite is `lib/tests/session-digest.test.sh`; the `memory_pending` header `milestones (this session):` becomes `milestones:` with earlier-session lines marked `(earlier session)` (citers updated, BDR-100).
## ACCEPTANCE CRITERIA (seed, enriched at STEP 3 `[gated]`)
1. Intent recall: on the qualifying prompts (trigger decided at the brainstorm), the mod ranks live registry entries by BM25 over title + lesson + body, asks a small model to keep ≤ 3, bounded in time, and attaches them as context (ID + title + lesson line); any failure or timeout attaches nothing and passes the prompt through unchanged.
2. Tool-error match: a captured tool failure whose error line shares a 4-gram with a live BLK/LRN entry attaches that entry (ID + title + lesson line) as context; the common-phrase collision (ENOENT → LRN-056) no longer fires.