CLAUDE.md and memory.md: the preloaded prompt and the running log
'CLAUDE.md is the knowledge always loaded — a sticky piece of text, a preloaded prompt. Memory.md is what has happened so far. Exit and come back, and together they tell the project status.'
The pair, precisely framed: CLAUDE.MD is NOT retrieval — 'it's not a RAG; think of it like a prompt always copied along with your information' — the place for project rules and behavioral guidance. His is seeded intelligently: Karpathy's Claude-coding notes, packaged by the community into a ready CLAUDE.md — 'behavioral guidelines to reduce common LLM coding mistakes... think before coding, simplicity first, surgical changes, goal-driven execution,' with the stated trade-off read aloud: 'these bias toward caution over speed — for trivial tasks, use judgment.' MEMORY.MD is the log: project overview, stack, completed/in-progress/pending steps, open questions, decisions — updated at his command ('update memory.md') at phase boundaries, so any fresh context or substitute agent resumes from artifacts, not recollection.
Scoping is a teaching decision made visible: both files LOCAL ('I teach multiple cohorts — I don't want this global; if you like it, make it global'), and the tablet rule for those drowning in global-vs-local confusion: 'you don't question the composition; the doctor prescribed it. Set it up as-is for now.'
The recovery chain stated as design: 'in case something goes wrong, I look at my memory and recover from there' — and if Claude itself fails, 'I have another agent' reading the same files.
It's the formalization of the whole corpus's md-file doctrine: the harness (CLAUDE.md) and the state (memory.md), separated by decay rate.
CLAUDE.md is documentation the agent consults when needed.
It's injected EVERY turn — which is why it must stay small, behavioral, and worth its permanent token cost.
CLAUDE.md is the knowledge always loaded — a sticky piece of text, a preloaded prompt.
The caution-over-speed trade-off note is worth copying into any behavioral file you write: name the bias you're installing.
Go deeper
In one line: CLAUDE.md = always-loaded behavioral/system prompt (seed from proven guideline sets; caution-biased); memory.md = command-updated project log (status, decisions, pending); both scoped deliberately (local per project unless a habit is universal); together they make sessions and agents disposable.
Seeding from Karpathy's guidelines is the shoulders-of-giants move applied to the harness itself ()
The preloaded-prompt framing kills the RAG misconception cleanly ()
agents.md/readme.md acknowledged as siblings; his setup uses exactly two files — minimalism as policy ()
Hermes' soul/user/memory (that sprint) and this CLAUDE.md/memory.md are the same architecture with different slicing
▶ Watch this taught:
Answer from memory first — the recall attempt is what makes it stick. Then reveal.
What goes in CLAUDE.md vs memory.md when you learn a new project convention?
If it's how the agent should BEHAVE from now on (rule), CLAUDE.md; if it's what HAPPENED or was decided (state), memory.md. Behavior vs state is the sorting test.






