Skip to content

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.