# Proposal: Add the memory store and capture ## Why An agent runtime is stateless: anything it should remember about a repository must be written down and loaded again. Today lessons live in ad-hoc notes that nobody curates, so they bloat, go stale, and the same mistakes come back. The flywheel needs a small, structured, validated memory store and a consistent way to write to it. ## What Changes - A memory store in `.flywheel/memory/`: one Markdown file per entry with structured frontmatter (type, scope, status, sources, occurrences, last_verified, provenance, links). - A generated index `.flywheel/memory/MEMORY.md` (one line per active entry), always loaded through `CLAUDE.md`, with a size budget. - CLI commands: `check`, `index`, `status`, `new`, `add-source`, `set-status`. - The `capture-observation` skill and the `context-flywheel` orchestration skill. Out of scope: embeddings-based retrieval, shared team memory, automatic capture hooks. ## Capabilities ### New Capabilities - `memory-store`: entry format, lifecycle fields, index generation, and validation. - `capture`: how errors, pitfalls, corrections, and decisions become memory entries. ### Modified Capabilities ## Related knowledge - `flywheel-config-is-json` (decision made in this change). ## Impact New files under `.flywheel/` and `.claude/skills/`; `CLAUDE.md` imports the index.