diataxis
Diátaxis documentation skill
This skill is the entry point for a repository's public-facing documentation: the pages shipped to users, contributors, and integrators.
Internal working artifacts (plans, meeting notes, agent scratch) are outside its scope.
The guidance is layered so an agent loads only what it needs: two thin mode entries, three stages of work, and the underlying theory, loaded on demand.
The compass
Practical Theoretical
+----------------+------------------+
Study | TUTORIALS | EXPLANATION |
| (learning) | (understanding) |
+----------------+------------------+
Work | HOW-TO | REFERENCE |
| (problem) | (information) |
+----------------+------------------+Classification is two questions, asked at the level of the fact or sentence:
- Action or cognition? Steps to take, or knowledge to hold? The answer lands on
how-to/tutorialorreference/explanation. - Acquisition or application? For study (learning), or for work (getting something done)? The answer lands on
tutorial/explanationorhow-to/reference.
The lowercase forms in backticks (tutorial, how-to, reference, explanation) are the quadrant keys: directory names, tags, and frontmatter.
Prose and tables use the display names: Tutorial, How-to guide, Reference, Explanation.
Two axes crossed yield exactly four quadrants.
Every document serves one quadrant; a section that serves two is mixed content and must be split or merged.
When a classification is contested, read core.md: the compass is the decision tool for doubt.
Quadrant drift runs along neighbor pairs on the map: how-to ↔ tutorial, how-to ↔ reference, reference ↔ explanation, tutorial ↔ explanation.
Content tends to bleed into its neighbors.
Watch for it; split and link.
Hard rules
- One fact, one authoritative home. Link to it; never copy it. A copy is a defect and a drift source. Source citations follow the quadrant rule: code footnotes for reference and explanation, neighbour links for tutorial and how-to. verify.md owns the forms.
- One quadrant per document, one job. Split or merge instead of mixing.
- Not everything is documentation. When an input belongs in code, tests, a generated reference, a comment, or a commit message rather than prose, say so and write nothing.
- The lint checks own mechanics; you own voice. Deterministic checkers judge the writing when the repo provides them; structure and voice are judgment. Configured checks bind even before their tools arrive: read the configuration first, and gather every constraint (configurations, style guide, patterns) before a rewrite, not after.
- Run the deterministic checks in every stage. Analysis takes a read-only baseline, production runs the fast loop on changed targets, and validation runs the full tree; scripts/checks.sh runs the QC checks. No stage reports clean tooling without executed output.
- A documented change ships with its cause. When a code change alters documented behavior, the doc update rides the same commit.
- Expansion is a decision. New pages, moves, splits, and migrations are planned work; they do not belong in a passive edit.
Choose the mode
Both modes use the same craft.
Only the trigger differs.
- Passive: a code change invalidates behavior that an existing document describes; the correction rides that code change. Read passive.md.
- Active: deliberate prompting and guidance, or a change that introduces user-facing behavior with no existing documentation owner. Read active.md.
- No documentation impact: the change is internal, or it neither invalidates an existing page nor introduces user-facing behavior. Say so and write nothing.
When the trigger does not say which, ask.
A change that only invalidates existing documented behavior is passive.
A change that adds user-facing behavior is active, even when it arrives as a code diff and even when the contributor did not ask for documentation.
"No documented surface" is not evidence of no impact; for a new feature it is the reason to create the owner.
A change that does both is active, because the new documentation set is the larger job.
The work, in every mode
Every mode runs the same three stages, and every stage has the same roles:
| Stage | Roles | What it does |
| ---------- | ------------------------ | --------------------------------------- |
| Analysis | triage · audit · plan | reads, classifies, decides; no edits |
| Production | edit · create · convert | creates or restructures pages |
| Validation | verify · style | checks and fixes in place; every mode |
Stages are kinds of work that can feed one another.
Validation's fix loops re-enter the document; an audit report re-enters as triage; convert assesses its own source; a plan's roadmap is executed later as active work.
Validation is mandatory in every mode because both failure kinds occur: errors in understanding the code (verify catches them) and errors in understanding the documentation guidelines (style catches them).
Each role
