Skip to content

Memory

A harness that doesn't remember re-solves the same problem every week. The memory pillar makes lessons compound.

Learnings as git-native memory

Solved problems land in docs/learnings/ — one markdown file per lesson (symptom → root cause → fix with file:line or SHA → guard). Markdown in the repo, not a vector database: diffable, grep-able, already indexed, and it survives because it's committed. find-learnings and build-sprint read it during planning, so the next task starts from what the last one taught.

What counts as a learning

The bar is high — a learning has to earn its place. Worth capturing: a bug whose root cause was non-obvious, a fix that looks wrong but is right (a workaround and the constraint it dodges), a convention that emerged under pressure, a dead end worth signposting. Not worth capturing: routine CRUD, cosmetic changes, anything a good name or test already carries. A thin store that's all signal beats a fat one nobody trusts — "nothing to save" is a normal outcome.

Surface, then save

find-learnings never writes unprompted. It surfaces candidates — each with the trap, the root cause, and the guard that would stop a regression — and saves only the ones you confirm. Every saved learning names its guard; a learning with no guard is a story, not a lesson.

The graduation pipeline

Learnings are the on-ramp to rules. A learning that recurs graduates into .claude/rules/ or CLAUDE.md (via find-learnings --refresh), and its entry is marked graduated — kept as provenance, not deleted. Entries whose code is gone are archived. So memory has a lifecycle: capture → recall → graduate → archive. A rule is just a learning that earned its always-on slot.