Appearance
Documentation is not a human artifact maintained after the fact β it's the persistence layer that lets knowledge survive context resets, and stale docs are production bugs.
Principle
Documentation is Agent Memory β
Why it exists
Humans accumulate. Agents reset. β
π€Human engineer
MONlearns auth quirkcarries
TUEdebugs race bugcarries
WEDremembers bothβ
Biological memory. Context accumulates across sessions. Docs are a supplement β the human already knows why.
π€Agent
RUN 1learns auth quirklost
RUN 2debugs race buglost
RUN 3blank slate againβ
No persistence. Every new session is a cold start. The only knowledge that survives is what was written to disk.
A human supplements memory with docs. An agent has no memory except docs.
The unique danger
Agents don't apply skepticism to authoritative sources. β
Stale docs don't fail loudly β they produce confidently wrong code.
CLAUDE.md
"6 test tiers"
written 3 months ago
β
Actual repo
7 tiers
added in PR #412
β
Agent ships
6-tier code
confidently wrong
A human reads stale docs and spots the drift.
An agent reads stale docs and builds to them with full confidence.
If docs are load-bearing, keeping them current isn't maintenance β it's production work.
The feedback loop
Documentation is a signal β not a byproduct. β
What the previous agent wrote is what the next agent reads. The SDLC closes through docs.
PLAN
describe what to build, why, how
AGENT_SYSTEM.md
β
BUILD
produce code + record what drifted
build-summary.md
β
OPERATE
update ADW scripts, hooks, rules
notes.md
Next agent reads the artifacts β builds with accumulated context.
The loop closes through written state, not shared memory.
A build-summary isn't a formality β it's the handoff signal.
What agent-shaped docs look like
Optimized for grep β not for browsing. β
Dense
Keyword-rich, not prose
β"We should think about updating auth soon"
β"validate_session_token middleware auth/"
Current
Stale is worse than absent
βdocs say 6 tiers, reality has 7
βabsent β agent asks. stale β agent lies.
Structured
XML, headers, explicit sections
βwall of paragraphs, implicit structure
β<constraint> / <example> / <rule>
Specific
Paths, names, function signatures
β"update the auth module"
βsrc/auth/middleware.py::validate_session_token()
Buried concepts don't get found β and what an agent can't grep, it can't use.
The subtle violation
Summarize compresses. Memory distills. β
Summary (compression)
"We made several changes to the authentication module today to address various issues discovered during testing."
β fewer tokens, same ambiguity. No load-bearing insight survives.
β
Crystallization (memory)
"validate_session_token() must reject unexpired-but-unsigned JWTs β we learned this the hard way when login_flow.py silently accepted them."
β the next agent can act on this without re-deriving it.
Summaries let the lesson rot. Memory is what you wish the next agent didn't have to relearn.
The discipline β
Documentation is production code.
In an agentic system, docs are the persistence layer β load-bearing whether you intended them to be or not. Stale docs are bugs. Writing them is a required phase of the SDLC, not optional cleanup.