# Write documentation that coding agents can use

Canonical: [Write documentation that coding agents can use](https://contextingo.com/blog/documentation-coding-agents-can-use)

Locale: en

Purpose: Short pages, concrete commands, examples that run and links instead of copies. Documentation habits that help agents and humans find the answer.

Content updated: 2026-10-13

Source revision: content.ts 2026-10-13

Maintenance owner: the Contextingo site owner

[Topic map](https://contextingo.com/llm/topics/blog.md) · [Complete scoped map](https://contextingo.com/sitemap.md)

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 problems
```

## Keep 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](/blog/why-ai-coding-agents-forget).

## Questions

### Should I write documentation just for agents?

No. Write for a new teammate. Agents benefit from the same clarity.

### How do I know which pages are stale?

Put a date on each page and review the oldest ones first.
