Three-File Memory
CLAUDE.md, PROGRESS.md, TASKS.md — the law, the narrative, and the queue. State that survives compaction and reloads cleanly.
A field-tested system for Claude Code and other agentic tools: memory architecture, quality gates, parallel sessions, and the discipline that compounds past 36,000 lines of production code.
Anthropic's own April 2026 postmortem traced a month of degraded Claude Code output to three separate changes before resolution in v2.1.116. Capability shifts under you — without notice. The 36K Engineer treats that as a given, and builds a control system around it.
"A single good pattern decays. Add a memory file but no gate, and the agent reloads its intent only to ship code that fails silently. Each pattern, in isolation, leaks at the seam where it meets the next gap."— Chapter 10, The Engineering System That Compounds
The perfect prompt that worked Tuesday stops working Thursday because a default changed upstream. You don't get a memo.
Compaction throws away the working memory your long task depends on — and the agent keeps going as if nothing happened.
"The tests pass" is a claim. A failing build is a fact. Without an oracle the agent can't argue with, quality is a hope, not a constraint.
Each pattern solves a real problem. None of them works alone. The value is in the relationships between them — closing one gap closes the others' escape routes.
CLAUDE.md, PROGRESS.md, TASKS.md — the law, the narrative, and the queue. State that survives compaction and reloads cleanly.
Tests, types, lint, build, custom oracles — mechanical checkpoints the agent cannot skip. A gate is an oracle, not an opinion.
Treat the context window as a budget, not a memory. Deliberate decisions about what to load, summarize, and externalize.
Multiple coordinated agents working concurrent fronts. Parallelism pays only when isolation is cheaper than coordination.
The unit of work is a context-window decision, not a calendar decision. Size to the gate; sequence to the dependency.
Gates prove execution; review proves intent. Diff-driven triage that targets your human attention at the high-risk surface.
This is the operating discipline the book teaches: define the task, preserve state, install gates, isolate risk, and review the diff before trusting the result.
Run this before any agentic coding task that touches production code, broad refactors, data paths, or user-facing behavior.
Define a bounded mandate, success criteria, files in scope, and the exact test, type, lint, or build gate that must pass.
Separate durable rules, current progress, and task queue so compaction cannot erase intent midstream.
Single session, parallel sessions, or handoff. Parallelism only pays when isolation is cheaper than coordination.
Require mechanical gates and real command output, not claims that tests pass or that the implementation is complete.
Use the diff, risk surface, and recovery plan to decide what needs human review before merge or deployment.
The book is not a prompt collection. It is a control system for shipping with agents when the tool itself keeps changing.
The most cited chapter in the book. A concrete, reproducible memory architecture — mapped to distinct responsibilities so the agent reloads intent, not noise, after every compaction.
Each maps to a different volatility and audience. Collapsing them into one is the failure mode the book spends a chapter dismantling.
After the context window rolls over, the agent resumes the task without you re-explaining the goal. That's the signal it's working.
Includes a worked bootstrap you can run in one session. You leave the chapter with the system live in your repo.
From the non-stationary tool problem through to the six relationships that hold the whole system together. Each chapter ends with a recap, a worked example or exercise, and the failure modes to watch for.
Your tool is a moving target — treat the workflow as a control system, not a recipe. The documented proof.
The window is a budget, not a memory. Model what the agent retains; externalize the rest.
CLAUDE.md, PROGRESS.md, TASKS.md — the law, the narrative, the queue. A reusable workflow from the book.
A gate is an oracle, not an opinion. The gate ladder; closing the evasion routes; shifting failure left.
Bounded mandates as the unit of concurrent work. When going wide pays — and when it multiplies chaos.
Size to the gate, sequence to the dependency. Signatures of a task that is too large.
Some prompts are artifacts (worth versioning, testing, revising); most are not. A sharp test for which is which.
Gates prove execution; review proves intent. Diff-driven triage; the contract, not the feeling.
Context corruption, silent gate evasion, runaway edits, degraded model behavior — and the protocols that contain each.
The six relationships. The decision matrix. The weekly maintenance routine. Your scorecard.
No DRM, no login wall, no subscription. Buy once and the book is yours — in every format you might want, now or later. Free updates for the life of the edition.
For Kindle, Apple Books, Kobo and any e-reader. Reflowable text tuned for the device in your hand.
The designed edition. Print-ready Letter layout with the full field-guide typography, illustrations and reference tables.
The complete single-file web edition. Searchable, copy-pasteable, and self-contained — ideal for a second monitor while you work.
Not a recipe that decays with the next update. A control system that compounds past 36,000 lines and stays standing while the tool underneath it shifts.
Get the book — $14.99 →