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/LEARNING/ is write-only: neither MemoryRetriever nor ContextSearch indexes it, so failure captures and harvested learnings are unrecallable #1776
MEMORY/LEARNING/ is a write-only corpus. Several shipped tools write into it on a regular cadence, but neither retrieval path — MemoryRetriever.ts (BM25) nor ContextSearch.ts — includes it in the set of things it indexes. Anything the system learns and files under LEARNING/ cannot be recalled by any built-in search; the only way to get it back is rg by hand.
What writes to MEMORY/LEARNING/
LIFEOS/TOOLS/FailureCapture.ts — LEARNING/FAILURES/<YYYY-MM>/<slug>/CONTEXT.md (plus siblings), and LEARNING/SIGNALS/ratings.jsonl
MemorySystem.md also routes content here on purpose: "Task logs, algorithm reflections, ISA checklists → WORK/ and LEARNING/, not KNOWLEDGE/". So this is the documented destination for a whole class of content, not an accident.
What indexes it
Nothing.
LIFEOS/TOOLS/MemoryRetriever.ts scores MEMORY/KNOWLEDGE/{People,Companies,Ideas,Research}/*.md (KNOWLEDGE_DIR + a fixed DOMAINS array), and getRelevantContext additionally folds in the two hot-layer files (USER/PRINCIPAL/PRINCIPAL_MEMORY.md, USER/DIGITAL_ASSISTANT/DA_MEMORY.md) as virtual notes. LEARNING/ is not in the corpus, and the CLI path errors out on KNOWLEDGE_DIR alone.
skills/ContextSearch/Tools/ContextSearch.ts searches five sources — MEMORY/STATE/work.json, MEMORY/STATE/session-names.json, MEMORY/WORK/ directory names, MEMORY/WORK/*/ISA.md bodies, and ~/.claude/projects/*.jsonl transcripts. The only MEMORY/ subtrees it touches are STATE/ and WORK/.
So a failure capture written on Monday is unreachable by memory search and unreachable by ContextSearch on Tuesday, even though the system wrote it specifically so the lesson would persist.
Why it matters
The failure-capture → synthesis → recurrence-ledger loop is one of the better ideas in the system, and its whole premise is that past failures inform future behavior. That only works if something can read the corpus back. Right now the synthesis tools read specific known files by path; there is no general retrieval over what has accumulated. The larger LEARNING/ grows, the more value is stranded.
This is the same shape as #1255 (MemoryRetriever indexing only top-level KNOWLEDGE files, subdirectories invisible) — a corpus that exists on disk but is outside the retriever's declared roots. That one was fixed by widening the walk.
Suggested direction
Not prescriptive about the design, but the cheap version looks like:
Give results a class/source tag so LEARNING/ hits are visibly historical rather than current-state facts, and can be weighted below KNOWLEDGE/ notes if that is the desired ranking.
Optionally add LEARNING/ as a sixth Source in ContextSearch.ts, which already has the ripgrep plumbing for body search (isa-body).
Files are markdown with pai-freshness-v1 frontmatter already, so there is no format work — it is a roots-and-ranking change.
Happy to send a PR if the maintainers agree on the direction.
Environment
LifeOS 7.28.3, Windows 11 + Bun. Verified by reading the two source files on this install; nothing here is Windows-specific.
Summary
MEMORY/LEARNING/is a write-only corpus. Several shipped tools write into it on a regular cadence, but neither retrieval path —MemoryRetriever.ts(BM25) norContextSearch.ts— includes it in the set of things it indexes. Anything the system learns and files underLEARNING/cannot be recalled by any built-in search; the only way to get it back isrgby hand.What writes to
MEMORY/LEARNING/LIFEOS/TOOLS/FailureCapture.ts—LEARNING/FAILURES/<YYYY-MM>/<slug>/CONTEXT.md(plus siblings), andLEARNING/SIGNALS/ratings.jsonlLIFEOS/TOOLS/SessionHarvester.ts—LEARNING/{ALGORITHM,SYSTEM}/<YYYY-MM>/LIFEOS/TOOLS/LearningPatternSynthesis.ts—LEARNING/SYNTHESIS/LIFEOS/TOOLS/Reflect.ts—LEARNING/REFLECTIONS/algorithm-reflections.jsonlLIFEOS/TOOLS/RecurrenceLedger.ts— readsLEARNING/FAILURES, writesLEARNING/PATCHESMemorySystem.mdalso routes content here on purpose: "Task logs, algorithm reflections, ISA checklists → WORK/ and LEARNING/, not KNOWLEDGE/". So this is the documented destination for a whole class of content, not an accident.What indexes it
Nothing.
LIFEOS/TOOLS/MemoryRetriever.tsscoresMEMORY/KNOWLEDGE/{People,Companies,Ideas,Research}/*.md(KNOWLEDGE_DIR+ a fixedDOMAINSarray), andgetRelevantContextadditionally folds in the two hot-layer files (USER/PRINCIPAL/PRINCIPAL_MEMORY.md,USER/DIGITAL_ASSISTANT/DA_MEMORY.md) as virtual notes.LEARNING/is not in the corpus, and the CLI path errors out onKNOWLEDGE_DIRalone.skills/ContextSearch/Tools/ContextSearch.tssearches five sources —MEMORY/STATE/work.json,MEMORY/STATE/session-names.json,MEMORY/WORK/directory names,MEMORY/WORK/*/ISA.mdbodies, and~/.claude/projects/*.jsonltranscripts. The onlyMEMORY/subtrees it touches areSTATE/andWORK/.So a failure capture written on Monday is unreachable by
memory searchand unreachable by ContextSearch on Tuesday, even though the system wrote it specifically so the lesson would persist.Why it matters
The failure-capture → synthesis → recurrence-ledger loop is one of the better ideas in the system, and its whole premise is that past failures inform future behavior. That only works if something can read the corpus back. Right now the synthesis tools read specific known files by path; there is no general retrieval over what has accumulated. The larger
LEARNING/grows, the more value is stranded.This is the same shape as #1255 (
MemoryRetrieverindexing only top-level KNOWLEDGE files, subdirectories invisible) — a corpus that exists on disk but is outside the retriever's declared roots. That one was fixed by widening the walk.Suggested direction
Not prescriptive about the design, but the cheap version looks like:
MEMORY/LEARNING/toMemoryRetriever.ts's corpus discovery as its own note class, so it participates in the existing BM25 scoring. The dated-subdirectory layout means the walk needs to be recursive (same fix shape as MemoryRetriever.ts indexes only top-level KNOWLEDGE files — subdirectories invisible #1255).LEARNING/hits are visibly historical rather than current-state facts, and can be weighted belowKNOWLEDGE/notes if that is the desired ranking.LEARNING/as a sixthSourceinContextSearch.ts, which already has the ripgrep plumbing for body search (isa-body).Files are markdown with
pai-freshness-v1frontmatter already, so there is no format work — it is a roots-and-ranking change.Happy to send a PR if the maintainers agree on the direction.
Environment
LifeOS 7.28.3, Windows 11 + Bun. Verified by reading the two source files on this install; nothing here is Windows-specific.