An agent reads documentation as text, quickly, and acts on what it finds. Documentation that is good for a new colleague is good for an agent, and the reverse mostly holds too.
Habits
- One topic per page, with a title that says the topic.
- Commands in code blocks, ready to copy, with the expected result.
- Examples that run, and are tested if possible.
- Link, do not copy. A copied fact becomes a stale fact.
- State the date and the version a page applies to.
- Say what is not supported, so no one guesses.
- Put the reason with the rule. An agent that knows why will not undo it.
Structure that works
# Title
One-sentence summary.
## When to use this
## Steps
## Check that it worked
## Common problemsKeep it true
Wrong documentation is worse than none. Give each page an owner, review pages when the code changes, and delete what no longer applies.
Knowledge that changes daily
Findings and failed attempts change too fast for documents. Keep them as records with a source and status. See why coding agents forget.