Diátaxis — classify, write, audit
Diátaxis's claim: documentation fails when one page serves two masters. Every
doc serves exactly ONE of four needs, derived from two axes — is the reader
acquiring skill (study) or applying it (work)? do they need action
(practical steps) or cognition (knowledge)? One doc, one quadrant, always;
other modes are LINKS, never inlined sections.
Provenance: the compass and the four contracts quote/paraphrase diataxis.fr
(Procida); the SMELLS lists, the entry template, the audit, and the writing
procedure are THIS SKILL's operationalization — useful, but do not cite them as
Diátaxis. (Diátaxis is the needs-grounded, iterative successor of the older
Divio four-types system.) Foundation the method stands on: documentation serves
USER NEEDS, not the machinery — the four types enumerate practitioner needs:
tutorials answer "can you teach me to…?", how-tos "how do I…?", reference "what
is…?", explanation "why…?".
The compass (two questions, one quadrant — a doubt-resolver, applicable to a whole doc OR a single sentence)
|
serves ACTION (practical) |
serves COGNITION (theoretical) |
| ACQUISITION (study — the reader is learning) |
Tutorial |
Explanation |
| APPLICATION (work — the reader is doing their job) |
How-to guide |
Reference |
The source's own use: reach for it "when you think you are doing one thing but
are troubled by doubt" — at document, section, or sentence level. If a doc can't
answer both questions, it has no single reader (splitting it is this skill's
procedure, not a source rule). Mixed modes blur toward map-NEIGHBOURS (tutorial↔
how-to, how-to↔reference, reference↔explanation, explanation↔tutorial) — the
sharpest mixed-mode predictor.
The four contracts (hard rules, per quadrant)
Tutorial — a lesson: the reader learns by DOING, and YOU own their success
- The reader is a beginner at THIS thing; you are the teacher and their success
is your responsibility. One concrete path, start to visible result.
- RULES: deliver visible results early and often; concrete and particular, not
general and abstract; "ignore options and alternatives" (source's words) — one
path, no branches; minimum necessary explanation, link to Explanation instead;
must work every time for every reader (our test method: run it cold);
first-person plural ("we are in this together"); keep a narrative of
expectations ("You will notice that…"); encourage and PERMIT repetition —
"sometimes it's the only teacher".
- SMELLS: paragraphs of why; configuration choices offered; "you may want to";
steps that assume prior setup the tutorial didn't do.
How-to guide — a recipe: a COMPETENT user has a GOAL, get them to it
- The reader already has the skill; they have a real-world task NOW.
- RULES: name it "How to " (the goal, not the tool); a
SEQUENCE of actions addressing the task, including its real-world variance
(unlike a tutorial, forks for real conditions are fine); assume competence —
no teaching, no concept-building; omit everything not needed for THIS task;
completeness is measured by the task, not the machinery.
- SMELLS: defining terms; explaining internals; covering every option "for
completeness"; starting from installation when the goal is elsewhere.
Reference — a map: austere, complete FACTS about the machinery
- The reader is working and needs to LOOK SOMETHING UP; certainty and
consistency are the product.
- RULES: describe, never instruct and never explain; structure mirrors the
structure of the PRODUCT (code-mirroring is the auto-generated special case);
consistent, standard patterns per entry (a uniform template like signature ·
description · constraints · examples is OUR operationalization); examples are
encouraged as illustration; "wholly authoritative — truth and certainty, firm
platforms on which to stand"; austere, neutral; auto-generation from source is
a powerful way to keep it faithful.
- SMELLS: "you should"; step sequences; design rationale; entries that exist
only for some exports; prose that varies format entry to entry.
Explanation — understanding: the WHY, read away from the keyboard
- The reader wants the bigger picture: design decisions, context, alternatives,
connections, history. The only quadrant where opinion and discussion belong.
- RULES: admit perspective ("the reason this is shaped so…"); make connections
(to other parts, to prior art, to rejected designs); no instructions, no
obligation to be complete; the source's test — the only docs it might make
sense to read IN THE BATH, away from the product. (Our house addition, not
Diátaxis: end at a real decision or trade-off — teaching without a point is a
tour.)
- SMELLS: step-by-steps; API tables; pretending neutrality about a choice the
project deliberately made.
The audit (executable — run over an existing doc set)
For each doc under the target path, as parallel checks (a Workflow fan-out for
large sets; direct reads for small ones):
- Classify: which quadrant does its title/frontmatter CLAIM? Which does
the compass actually assign? Mismatch = finding.
- Mixed-mode detection, by marker: instruction verbs + numbered steps in
Reference; rationale/"because"/design-history paragraphs in Tutorials and
How-tos; API signatures/exhaustive tables in Explanation; options and
branches in Tutorials. Each hit: quote the passage, name the quadrant it
belongs to, propose the split (extract + cross-link — never delete the
content).
- Coverage: for each major component in scope, which quadrants EXIST vs
are MISSING — grounded in the map's "cycle of interaction": users mature
from study to work and back, so reference-only fails newcomers and
tutorial-only fails practitioners. Report the grid; per the process rule
above, the grid PRIORITIZES, it does not mandate filling every cell.
- Disposition per Diátaxis's OWN process rule — the method "is not a plan":
improve organically, in small responsive iterations; never create empty
quadrant structures to fill later; every step in the right direction is
worth publishing immediately. So: fix the worst blur first, one doc at a
time; "recorded, next iteration" IS a valid disposition here (unlike code
review) — but silent acceptance still isn't. Docs are "always complete,
never finished".
Project overlay
Read .agency/diataxis.md if it exists: where each quadrant LIVES in this
project (paths, site sections, frontmatter conventions), plus any project rules.
Missing overlay → classify/audit generically and SAY so.
Writing procedure (every new doc)
- Run the compass; state the quadrant (frontmatter or the doc's one-liner).
- Write to that quadrant's contract; when another mode wants in, LINK to it.
- Self-audit against the quadrant's SMELLS list before declaring done.
1---2name: diataxis3description: Classify, write, and audit documentation per Diátaxis (diataxis.fr) — the four-quadrant method (tutorials · how-to guides · reference · explanation). Encodes the compass as a decision procedure, each quadrant's contract as hard rules, and an executable mixed-mode audit. Project-agnostic; per-repo doc-location mapping lives in .agency/diataxis.md. Use when writing any user-facing doc, structuring a docs site, or auditing existing docs for mixed modes.4---56# Diátaxis — classify, write, audit78Diátaxis's claim: documentation fails when one page serves two masters. Every9doc serves exactly ONE of four needs, derived from two axes — is the reader10**acquiring** skill (study) or **applying** it (work)? do they need **action**11(practical steps) or **cognition** (knowledge)? One doc, one quadrant, always;12other modes are LINKS, never inlined sections.1314**Provenance:** the compass and the four contracts quote/paraphrase diataxis.fr15(Procida); the SMELLS lists, the entry template, the audit, and the writing16procedure are THIS SKILL's operationalization — useful, but do not cite them as17Diátaxis. (Diátaxis is the needs-grounded, iterative successor of the older18Divio four-types system.) Foundation the method stands on: documentation serves19USER NEEDS, not the machinery — the four types enumerate practitioner needs:20tutorials answer "can you teach me to…?", how-tos "how do I…?", reference "what21is…?", explanation "why…?".2223## The compass (two questions, one quadrant — a doubt-resolver, applicable to a whole doc OR a single sentence)2425| | serves ACTION (practical) | serves COGNITION (theoretical) |26| --- | --- | --- |27| **ACQUISITION** (study — the reader is learning) | **Tutorial** | **Explanation** |28| **APPLICATION** (work — the reader is doing their job) | **How-to guide** | **Reference** |2930The source's own use: reach for it "when you think you are doing one thing but31are troubled by doubt" — at document, section, or sentence level. If a doc can't32answer both questions, it has no single reader (splitting it is this skill's33procedure, not a source rule). Mixed modes blur toward map-NEIGHBOURS (tutorial↔34how-to, how-to↔reference, reference↔explanation, explanation↔tutorial) — the35sharpest mixed-mode predictor.3637## The four contracts (hard rules, per quadrant)3839### Tutorial — a lesson: the reader learns by DOING, and YOU own their success40- The reader is a beginner at THIS thing; you are the teacher and their success41 is your responsibility. One concrete path, start to visible result.42- RULES: deliver visible results early and often; concrete and particular, not43 general and abstract; "ignore options and alternatives" (source's words) — one44 path, no branches; minimum necessary explanation, link to Explanation instead;45 must work every time for every reader (our test method: run it cold);46 first-person plural ("we are in this together"); keep a narrative of47 expectations ("You will notice that…"); encourage and PERMIT repetition —48 "sometimes it's the only teacher".49- SMELLS: paragraphs of why; configuration choices offered; "you may want to";50 steps that assume prior setup the tutorial didn't do.5152### How-to guide — a recipe: a COMPETENT user has a GOAL, get them to it53- The reader already has the skill; they have a real-world task NOW.54- RULES: name it "How to <achieve the goal>" (the goal, not the tool); a55 SEQUENCE of actions addressing the task, including its real-world variance56 (unlike a tutorial, forks for real conditions are fine); assume competence —57 no teaching, no concept-building; omit everything not needed for THIS task;58 completeness is measured by the task, not the machinery.59- SMELLS: defining terms; explaining internals; covering every option "for60 completeness"; starting from installation when the goal is elsewhere.6162### Reference — a map: austere, complete FACTS about the machinery63- The reader is working and needs to LOOK SOMETHING UP; certainty and64 consistency are the product.65- RULES: describe, never instruct and never explain; structure mirrors the66 structure of the PRODUCT (code-mirroring is the auto-generated special case);67 consistent, standard patterns per entry (a uniform template like signature ·68 description · constraints · examples is OUR operationalization); examples are69 encouraged as illustration; "wholly authoritative — truth and certainty, firm70 platforms on which to stand"; austere, neutral; auto-generation from source is71 a powerful way to keep it faithful.72- SMELLS: "you should"; step sequences; design rationale; entries that exist73 only for some exports; prose that varies format entry to entry.7475### Explanation — understanding: the WHY, read away from the keyboard76- The reader wants the bigger picture: design decisions, context, alternatives,77 connections, history. The only quadrant where opinion and discussion belong.78- RULES: admit perspective ("the reason this is shaped so…"); make connections79 (to other parts, to prior art, to rejected designs); no instructions, no80 obligation to be complete; the source's test — the only docs it might make81 sense to read IN THE BATH, away from the product. (Our house addition, not82 Diátaxis: end at a real decision or trade-off — teaching without a point is a83 tour.)84- SMELLS: step-by-steps; API tables; pretending neutrality about a choice the85 project deliberately made.8687## The audit (executable — run over an existing doc set)8889For each doc under the target path, as parallel checks (a Workflow fan-out for90large sets; direct reads for small ones):911. **Classify:** which quadrant does its title/frontmatter CLAIM? Which does92 the compass actually assign? Mismatch = finding.932. **Mixed-mode detection, by marker:** instruction verbs + numbered steps in94 Reference; rationale/"because"/design-history paragraphs in Tutorials and95 How-tos; API signatures/exhaustive tables in Explanation; options and96 branches in Tutorials. Each hit: quote the passage, name the quadrant it97 belongs to, propose the split (extract + cross-link — never delete the98 content).993. **Coverage:** for each major component in scope, which quadrants EXIST vs100 are MISSING — grounded in the map's "cycle of interaction": users mature101 from study to work and back, so reference-only fails newcomers and102 tutorial-only fails practitioners. Report the grid; per the process rule103 above, the grid PRIORITIZES, it does not mandate filling every cell.1044. Disposition per Diátaxis's OWN process rule — the method "is not a plan":105 improve organically, in small responsive iterations; never create empty106 quadrant structures to fill later; every step in the right direction is107 worth publishing immediately. So: fix the worst blur first, one doc at a108 time; "recorded, next iteration" IS a valid disposition here (unlike code109 review) — but silent acceptance still isn't. Docs are "always complete,110 never finished".111112## Project overlay113114Read **`.agency/diataxis.md`** if it exists: where each quadrant LIVES in this115project (paths, site sections, frontmatter conventions), plus any project rules.116Missing overlay → classify/audit generically and SAY so.117118## Writing procedure (every new doc)1191201. Run the compass; state the quadrant (frontmatter or the doc's one-liner).1212. Write to that quadrant's contract; when another mode wants in, LINK to it.1223. Self-audit against the quadrant's SMELLS list before declaring done.