Documentation Taxonomy
Where to put new documentation. Inspired by Diataxis but adapted for agentic engineering where both humans and AI agents consume docs.
Decision Tree
"I need to write something down."
β
βββ Does it tell someone HOW TO do a specific task?
β βββ YES β docs/guides/ [how-to]
β
βββ Does it describe WHAT something IS (APIs, interfaces, facts)?
β βββ YES β docs/references/ [reference]
β or β docs/ARCHITECTURE.md [reference]
β or β docs/delivery-specs/ [reference]
β
βββ Does it explain WHY a decision was made?
β βββ YES β docs/design-docs/ [explanation]
β or β vision/ [explanation]
β
βββ Does it validate WHETHER we should build something?
β βββ YES β docs/discovery/ [explanation]
β
βββ Is it a durable pattern extracted from work?
β βββ YES β docs/learnings/<category>.md [reference]
β
βββ Is it an idea, investigation, or scratchpad?
β βββ YES β docs/exploration/ [exploration]
β
βββ Is it tracking active work progress?
βββ YES β docs/exec-plans/ [how-to]
Directory Purpose Map
| Directory | Diataxis Type | Audience | Created By | Mutability |
|---|---|---|---|---|
docs/guides/ |
How-to | Humans + Agents | Manual or extracted | Stable |
docs/design-docs/ |
Explanation | Humans + Agents | design-doc skill |
Append-only (decisions are permanent) |
docs/discovery/ |
Explanation | Humans (agents read) | discovery skill |
Per-feature, stable once validated |
docs/delivery-specs/ |
Reference | Agents + Humans | delivery-spec skill |
Stable once approved |
docs/references/ |
Reference | Agents | Manual or generated | Updated as needed |
docs/learnings/ |
Reference | Agents + Humans | compound-engineer |
Append-only (budgeted) |
docs/exploration/ |
Exploration | Humans only | Manual | Ephemeral -- graduate or archive |
docs/exec-plans/ |
How-to | Humans (agents read) | Manual | Active then archived |
vision/ |
Explanation | Humans + Agents | strategy skill or manual |
Rare changes |
specs/ |
Reference | Agents | Autocode skills | Per-feature lifecycle |
Self-Organization Rules
- Start minimal. Don't create directories until you have content for them. Skills create directories on-demand.
- Graduate content. Exploration docs that prove durable should move to the appropriate permanent location (learnings, guides, references).
- One purpose per doc. If a document is doing two things (e.g., explaining WHY and telling HOW), split it.
- Agents navigate by maps. Keep
AGENTS.mdas a pure index. Keepdocs/README.mdas the docs index. Don't inline content in indexes. - Enforce mechanically. Use
DOCS_CONTRACT.jsonandopencode-ctx docs validateto prevent drift. Narrative instructions degrade with context length; lints apply everywhere.
Sources
- Diataxis -- Four-type documentation framework (Daniele Procida)
- Cynefin -- Complex vs. ordered domains inform when to prescribe vs. let emerge (Dave Snowden)
- OpenAI Harness Engineering -- "Give Codex a map, not a 1,000-page instruction manual"