forked from bots-garden/ori
| 🎉 Begin a project. | 1 | --- |
| 2 | name: diataxis-doc | |
| 3 | description: Document a project using the Diátaxis methodology (https://diataxis.fr). Organises documentation into four distinct quadrants — Tutorials (learning), How-to guides (solving a task), Reference (looking information up), Explanation (understanding) — along the two axes action/cognition and acquisition/application. Use when creating or restructuring a project's documentation in a rigorous, readable, user-needs-driven way. | |
| 4 | --- | |
| 5 | # Diátaxis Documentation Skill | |
| 6 | ||
| 7 | ## Description | |
| 8 | ||
| 9 | Guides the creation and restructuring of a project's documentation according to the | |
| 10 | **Diátaxis** methodology (Daniele Procida — https://diataxis.fr). Diátaxis is not a rigid | |
| 11 | template: it is a **compass** that guarantees every documentation page serves **exactly one | |
| 12 | clearly identified user need**, and that all four fundamental needs are covered. | |
| 13 | ||
| 14 | The strength of the method: it solves the three problems of any documentation — | |
| 15 | **content** (what to write), **style** (how to write it) and **architecture** | |
| 16 | (how to organise it) — by reducing them to two simple questions. | |
| 17 | ||
| 18 | ## When to Use | |
| 19 | ||
| 20 | - When a project has no documentation, or a "catch-all" documentation | |
| 21 | - When existing docs mix tutorials, recipes, reference and explanation in the same pages | |
| 22 | - When users "can't find" the information despite voluminous docs | |
| 23 | - When you want maintainable documentation that grows in small increments | |
| 24 | - After adding a feature, to document it in the right place without reorganising everything | |
| 25 | ||
| 26 | --- | |
| 27 | ||
| 28 | ## Core Principle: the two axes | |
| 29 | ||
| 30 | The whole method rests on **two orthogonal axes**. They do not merely cover the territory of | |
| 31 | documentation — they **define** it. This is why there are **necessarily four quadrants**, | |
| 32 | neither three nor five. | |
| 33 | ||
| 34 | ``` | |
| 35 | ACTION (practical know-how) | |
| 36 | ▲ | |
| 37 | │ | |
| 38 | TUTORIALS │ HOW-TO GUIDES | |
| 39 | (learning by doing) │ (achieving a goal) | |
| 40 | │ | |
| 41 | ACQUISITION ────────────────────┼──────────────────── APPLICATION | |
| 42 | (studying a skill) │ (applying a skill) | |
| 43 | │ | |
| 44 | EXPLANATION │ REFERENCE | |
| 45 | (understanding, thinking) │ (looking information up) | |
| 46 | │ | |
| 47 | ▼ | |
| 48 | COGNITION (theoretical knowledge) | |
| 49 | ``` | |
| 50 | ||
| 51 | | Quadrant | Action/cognition axis | Acquisition/application axis | The user's question | | |
| 52 | |----------|------------------------|-------------------------------|----------------------| | |
| 53 | | **Tutorial** | Action | Acquisition | "Teach me to get started" | | |
| 54 | | **How-to guide** | Action | Application | "How do I do X?" | | |
| 55 | | **Reference** | Cognition | Application | "What are the exact details of X?" | | |
| 56 | | **Explanation** | Cognition | Acquisition | "Can you explain why / the context?" | | |
| 57 | ||
| 58 | --- | |
| 59 | ||
| 60 | ## The four quadrants in detail | |
| 61 | ||
| 62 | ### 1. TUTORIALS — learning-oriented | |
| 63 | ||
| 64 | A tutorial is a **guided lesson**, an experience under a teacher's direction. Its goal is NOT | |
| 65 | to accomplish a real task, but to make the beginner **acquire a skill**. The teacher is | |
| 66 | responsible for the student's success. | |
| 67 | ||
| 68 | **Writing rules (mandatory):** | |
| 69 | - ✅ Announce the **destination** up front ("by the end, you will have built…"), not what will be "learned" | |
| 70 | - ✅ Produce a **visible result at every step**, however small | |
| 71 | - ✅ Guarantee **perfect reliability**: every command must work for everyone, every time | |
| 72 | - ✅ Show the **actual expected output** ("you should see: …") | |
| 73 | - ✅ Use **"we"** ("we will now…") and the direct imperative ("Type this") | |
| 74 | - ✅ Flag common mistakes at the point where they can occur | |
| 75 | - ❌ **Minimise explanation to the extreme** — a tutorial is NOT the place for explanation. Link to it instead. | |
| 76 | - ❌ **No alternatives, no options, no digressions** — a single path to success | |
| 77 | - ❌ Do not explain the "why" in detail (it breaks the learning flow) | |
| 78 | ||
| 79 | ### 2. HOW-TO GUIDES — task-oriented | |
| 80 | ||
| 81 | A how-to guide is a **recipe** for reaching a specific goal. It addresses an **already | |
| 82 | competent** user who knows what they want to do. "How do I deploy?", "How do I enable | |
| 83 | caching?". | |
| 84 | ||
| 85 | > ⚠️ Key distinction from a tutorial: *"Someone who expects a recipe and receives a cooking | |
| 86 | > lesson will be disappointed and annoyed."* Tutorial = lesson; guide = recipe. | |
| 87 | ||
| 88 | **Writing rules:** | |
| 89 | - ✅ Title = **the task**, stated clearly: "How to {do X}" | |
| 90 | - ✅ Start from a **real problem**, not from a feature of the tool | |
| 91 | - ✅ Contain **only the steps needed** for the task | |
| 92 | - ✅ Stay **adaptable to the real world** ("if you use Y, do this instead") — a guide covers variants | |
| 93 | - ✅ Assume the user **already knows** what they want to accomplish | |
| 94 | - ❌ Do not teach the basic concepts (that is the tutorial's job) | |
| 95 | - ❌ Do not drown the recipe in explanation (link to the explanation) | |
| 96 | ||
| 97 | ### 3. REFERENCE — information-oriented | |
| 98 | ||
| 99 | Reference is a **neutral, exhaustive technical description** of the machinery: the commands, | |
| 100 | options, parameters, structures. It is a **map of the territory**, austere and reliable, that | |
| 101 | you **consult** (you do not read it end to end). | |
| 102 | ||
| 103 | **Writing rules:** | |
| 104 | - ✅ **Describe**, do nothing else: no instruction, no explanation, no opinion | |
| 105 | - ✅ **Accuracy and completeness**: every parameter, default value, type, error | |
| 106 | - ✅ **Standard, predictable structure**: the same format for every entry (tables, lists) | |
| 107 | - ✅ **Mirror the product's structure**: the reference's organisation reflects that of the code | |
| 108 | - ✅ Include usage **examples**, without drifting into explanation | |
| 109 | - ❌ Do not teach, do not tell the "why" — link to tutorials and explanations | |
| 110 | ||
| 111 | > Mental model: a **nutrition label**. Factual, standardised, rigorous, with no recipe and no | |
| 112 | > marketing pitch. | |
| 113 | ||
| 114 | ### 4. EXPLANATION — understanding-oriented | |
| 115 | ||
| 116 | Explanation **steps back**. It answers "Can you tell me about…?". It connects concepts, gives | |
| 117 | context, history, design decisions, rejected alternatives. It is the documentation you read | |
| 118 | "in the bath", away from active work. | |
| 119 | ||
| 120 | **Writing rules:** | |
| 121 | - ✅ **Make connections** between topics, take a wider view | |
| 122 | - ✅ Give the **context**: history, decisions, constraints, rejected alternatives | |
| 123 | - ✅ Discuss the **why**, the trade-offs, the possibilities | |
| 124 | - ✅ **Allow opinion** and acknowledge multiple points of view | |
| 125 | - ✅ **Stay bounded** to one topic, so it does not absorb content that belongs elsewhere | |
| 126 | - ❌ Do not give step-by-step instructions (that is the guides'/tutorials' job) | |
| 127 | - ❌ Do not become a reference (no exhaustive parameter lists) | |
| 128 | ||
| 129 | --- | |
| 130 | ||
| 131 | ## The Compass — choosing the right quadrant | |
| 132 | ||
| 133 | When you do not know where a piece of content belongs (or when the writing "gets stuck"), | |
| 134 | answer **two questions**: | |
| 135 | ||
| 136 | ``` | |
| 137 | 1. Does the content inform ACTION or COGNITION? | |
| 138 | (practical steps ──vs── theoretical knowledge) | |
| 139 | ||
| 140 | 2. Does it serve the ACQUISITION or the APPLICATION of a skill? | |
| 141 | (the user is learning ──vs── the user is doing) | |
| 142 | ``` | |
| 143 | ||
| 144 | | If the content says… | …informs | …and serves | → then it is a | | |
| 145 | |----------------------|----------|-------------|-----------------| | |
| 146 | | "teach me by doing" | action | acquisition | **Tutorial** | | |
| 147 | | "help me do this" | action | application | **How-to guide** | | |
| 148 | | "give me the exact information" | cognition | application | **Reference** | | |
| 149 | | "help me understand" | cognition | acquisition | **Explanation** | | |
| 150 | ||
| 151 | **Symptom of a misfiling:** if a page forces you to mix two styles (e.g. explaining the *why* | |
| 152 | in the middle of a recipe), it contains two distinct pieces of content → **split it** and link | |
| 153 | the parts to each other. | |
| 154 | ||
| 155 | The compass applies at every scale: a whole document, a section, or even a single sentence. | |
| 156 | ||
| 157 | --- | |
| 158 | ||
| 159 | ## Recommended folder architecture | |
| 160 | ||
| 161 | Four folders, one per quadrant, plus an index: | |
| 162 | ||
| 163 | ``` | |
| 164 | docs/ (or ./new.docs, ./documentation, etc.) | |
| 165 | ├── README.md ← index: explains the structure and orients the reader | |
| 166 | ├── tutorials/ ← guided learning | |
| 167 | │ └── getting-started.md | |
| 168 | ├── how-to/ ← task-oriented recipes | |
| 169 | │ ├── do-x.md | |
| 170 | │ └── do-y.md | |
| 171 | ├── reference/ ← exhaustive technical description | |
| 172 | │ ├── cli.md | |
| 173 | │ └── configuration.md | |
| 174 | └── explanation/ ← understanding, context, decisions | |
| 175 | ├── architecture.md | |
| 176 | └── design-choices.md | |
| 177 | ``` | |
| 178 | ||
| 179 | **Architecture rules:** | |
| 180 | - ✅ **Folder names** make the quadrant obvious (tutorials / how-to / reference / explanation) | |
| 181 | - ✅ The **index** (`README.md`) briefly explains the four types and links to each | |
| 182 | - ✅ Documents **link to each other**: a tutorial links to the reference and the explanation rather than including them | |
| 183 | - ✅ Folders may be named in the documentation's own language (`tutoriels/`, `guides-pratiques/`, …) — stay consistent | |
| 184 | ||
| 185 | ### Bilingual architecture (the "Both" option) | |
| 186 | ||
| 187 | When the user wants both languages, use **one subfolder per language**, each containing its own | |
| 188 | complete four-quadrant structure. A root index acts as the language selector: | |
| 189 | ||
| 190 | ``` | |
| 191 | docs/ | |
| 192 | ├── README.md ← language selector (links to fr/ and en/) | |
| 193 | ├── fr/ | |
| 194 | │ ├── README.md ← French index | |
| 195 | │ ├── tutorials/ | |
| 196 | │ ├── how-to/ | |
| 197 | │ ├── reference/ | |
| 198 | │ └── explanation/ | |
| 199 | └── en/ | |
| 200 | ├── README.md ← English index | |
| 201 | ├── tutorials/ | |
| 202 | ├── how-to/ | |
| 203 | ├── reference/ | |
| 204 | └── explanation/ | |
| 205 | ``` | |
| 206 | ||
| 207 | **Bilingual rules:** | |
| 208 | - ✅ **Cross-links stay inside a single language** (a FR doc never links to an EN doc, and vice versa) | |
| 209 | - ✅ **Quadrant folder names are identical** in both languages (`tutorials/`, `how-to/`…) to keep a 1-to-1 symmetry | |
| 210 | - ✅ **File names may be translated** (`premiers-pas.md` ↔ `getting-started.md`) or kept identical — stay consistent | |
| 211 | - ✅ The **content** is translated, not merely copied: adapt the examples where necessary | |
| 212 | - ❌ Do not mix two languages in the same file | |
| 213 | - ❌ Do not duplicate only one of the two indexes — each language has its own | |
| 214 | ||
| 215 | > Acceptable alternative for small projects: a per-file language suffix | |
| 216 | > (`getting-started-en.md` / `premiers-pas-fr.md`) in a flat structure. Reserve this for cases | |
| 217 | > where creating subfolders would be disproportionate. | |
| 218 | ||
| 219 | --- | |
| 220 | ||
| 221 | ## Iterative workflow (the heart of the method) | |
| 222 | ||
| 223 | Diátaxis is **not** a grand plan to be executed in one go. It is an organic process: the | |
| 224 | structure emerges from within, "one cell at a time". The documentation must always be | |
| 225 | **"complete, not finished"** — useful and well-formed at every stage, while remaining open. | |
| 226 | ||
| 227 | **The loop, to be repeated indefinitely:** | |
| 228 | ||
| 229 | ``` | |
| 230 | 1. CHOOSE — take a small piece (a paragraph, a page) | |
| 231 | 2. ASSESS — does it serve one clear need? Is it in the right quadrant? | |
| 232 | 3. DECIDE — identify ONE concrete improvement | |
| 233 | 4. ACT — apply it and publish immediately | |
| 234 | ``` | |
| 235 | ||
| 236 | **Workflow rules:** | |
| 237 | - ✅ Work **small**: one improvement at a time, published right away | |
| 238 | - ✅ "Every step in the right direction deserves to be published immediately" | |
| 239 | - ❌ Do NOT create large empty sections "to be filled in later" | |
| 240 | - ❌ Do NOT tear everything down to rebuild it all at once | |
| 241 | ||
| 242 | --- | |
| 243 | ||
| 244 | ## Skill application phases | |
| 245 | ||
| 246 | ### Phase 1 — Gathering information | |
| 247 | ||
| 248 | **First question, MANDATORY — the language of the documentation.** | |
| 249 | Before anything else, ask the user which language(s) the documentation should be produced in, | |
| 250 | **via `AskUserQuestion`**, with exactly these three options: | |
| 251 | ||
| 252 | | Option | Effect on the output | | |
| 253 | |--------|-----------------------| | |
| 254 | | **French** | All documentation in French, at the root of the chosen location. | | |
| 255 | | **English** | All documentation in English, at the root of the chosen location. | | |
| 256 | | **Both** | Bilingual documentation: one subfolder per language (see "Bilingual architecture"). | | |
| 257 | ||
| 258 | This choice determines the **folder architecture** (mono- or bilingual) and the language of | |
| 259 | **every** document, title and link. Never infer it from the language the user is writing to | |
| 260 | you in, or from the language of the existing code and comments: ask. If documentation already | |
| 261 | exists in one language and the user wants "both", add the missing language without rewriting | |
| 262 | what is already there. | |
| 263 | ||
| 264 | > **Exception — invoked by another skill.** When this skill is invoked from another skill that | |
| 265 | > has already fixed the language, do not ask: use the language it specifies and go straight to | |
| 266 | > Phase 2. The `methodical-dev` skill always specifies **Both** (English + French), because it | |
| 267 | > requires bilingual documentation for every change. Asking again in that case is a redundant | |
| 268 | > prompt for a question that is already settled. | |
| 269 | ||
| 270 | Then ask (via AskUserQuestion where relevant): | |
| 271 | ||
| 272 | 1. **Documentation target**: which project / which scope should be documented? | |
| 273 | 2. **Audience**: beginners discovering the tool? advanced users? contributors? | |
| 274 | 3. **Location**: where should the docs be written? (`docs/`, `./new.docs`, etc.) Must existing content be preserved? | |
| 275 | 4. **Existing material**: is there already documentation to reuse / reorganise? | |
| 276 | ||
| 277 | ### Phase 2 — Mapping the subject matter | |
| 278 | ||
| 279 | Before writing, understand **factually** what is being documented: | |
| 280 | - Explore the code (entry point, commands, configuration, features) | |
| 281 | - List the user-facing features and the machinery (CLI, config, API…) | |
| 282 | - Spot the existing documentation so as not to reinvent it | |
| 283 | - Produce a list of **topics** to be filed into the four quadrants | |
| 284 | ||
| 285 | ### Phase 3 — Filing with the Compass | |
| 286 | ||
| 287 | For each identified topic, apply the compass and file it into a quadrant. Build a **plan** as a | |
| 288 | table: | |
| 289 | ||
| 290 | ``` | |
| 291 | | Topic | Quadrant | File | | |
| 292 | |-----------------------------|---------------|----------------------------------| | |
| 293 | | First steps | Tutorial | tutorials/getting-started.md | | |
| 294 | | Enabling feature X | How-to | how-to/enable-x.md | | |
| 295 | | Configuration options | Reference | reference/configuration.md | | |
| 296 | | Why this architecture | Explanation | explanation/architecture.md | | |
| 297 | ``` | |
| 298 | ||
| 299 | Present this plan to the user and have it approved before writing. | |
| 300 | ||
| 301 | ### Phase 4 — Writing quadrant by quadrant | |
| 302 | ||
| 303 | Write the documents while **strictly** respecting the writing rules of the corresponding | |
| 304 | quadrant (see the templates below). At the end of each document, apply the quadrant's checklist. | |
| 305 | ||
| 306 | ### Phase 5 — Index and cross-links | |
| 307 | ||
| 308 | - Create / update `README.md` (the index) explaining the Diátaxis structure and orienting the reader | |
| 309 | - Check that documents **link to each other** in the right direction (tutorial → reference/explanation, etc.) | |
| 310 | ||
| 311 | ### Phase 6 — Final validation | |
| 312 | ||
| 313 | Apply the global checklist (see below) and present the result. | |
| 314 | ||
| 315 | --- | |
| 316 | ||
| 317 | ## Templates | |
| 318 | ||
| 319 | ### Template — Tutorial | |
| 320 | ||
| 321 | ```markdown | |
| 322 | # Tutorial: {what the reader will have accomplished} | |
| 323 | ||
| 324 | By the end of this tutorial, you will have {concrete, visible result}. | |
| 325 | No prior knowledge of {X} is required. | |
| 326 | ||
| 327 | ## Prerequisites | |
| 328 | - {strictly what is required for EVERY step to work} | |
| 329 | ||
| 330 | ## Step 1 — {first concrete action} | |
| 331 | Type: | |
| 332 | \`\`\`bash | |
| 333 | {exact command} | |
| 334 | \`\`\` | |
| 335 | You should see: | |
| 336 | \`\`\` | |
| 337 | {actual expected output} | |
| 338 | \`\`\` | |
| 339 | We have just {result of the step, in one sentence}. | |
| 340 | ||
| 341 | ## Step 2 — {next action} | |
| 342 | ... | |
| 343 | ||
| 344 | ## What now? | |
| 345 | You have built {recap}. To go further: | |
| 346 | - To accomplish specific tasks → see the [how-to guides](../how-to/) | |
| 347 | - To understand how it works → see the [explanation](../explanation/) | |
| 348 | ``` | |
| 349 | ||
| 350 | ### Template — How-to guide | |
| 351 | ||
| 352 | ```markdown | |
| 353 | # How to {accomplish the task} | |
| 354 | ||
| 355 | This guide shows how to {task}. It assumes you {skill prerequisite}. | |
| 356 | ||
| 357 | ## Steps | |
| 358 | 1. {step} | |
| 359 | 2. {step} | |
| 360 | ||
| 361 | ## Variants | |
| 362 | - If you use {case A}, do {…} instead | |
| 363 | - For {case B}, add {…} | |
| 364 | ||
| 365 | ## See also | |
| 366 | - Options reference: [reference](../reference/…) | |
| 367 | - Why it works this way: [explanation](../explanation/…) | |
| 368 | ``` | |
| 369 | ||
| 370 | ### Template — Reference | |
| 371 | ||
| 372 | ```markdown | |
| 373 | # Reference: {component} | |
| 374 | ||
| 375 | > Neutral, exhaustive description of {component}. | |
| 376 | ||
| 377 | ## {Sub-component / command / section} | |
| 378 | ||
| 379 | | Field / Option | Type | Default | Description | | |
| 380 | |----------------|------|---------|-------------| | |
| 381 | | {name} | {type} | {default} | {factual description} | | |
| 382 | ||
| 383 | ### Example | |
| 384 | \`\`\`{lang} | |
| 385 | {minimal usage example} | |
| 386 | \`\`\` | |
| 387 | ||
| 388 | ### Errors | |
| 389 | | Error | Cause | | |
| 390 | |-------|-------| | |
| 391 | | {message} | {factual cause} | | |
| 392 | ``` | |
| 393 | ||
| 394 | ### Template — Explanation | |
| 395 | ||
| 396 | ```markdown | |
| 397 | # {Topic} — explanation | |
| 398 | ||
| 399 | ## What is this about? | |
| 400 | {framing of the topic, overview} | |
| 401 | ||
| 402 | ## Why it is designed this way | |
| 403 | {context, constraints, decisions} | |
| 404 | ||
| 405 | ## Rejected alternatives | |
| 406 | {what was considered and why it was rejected} | |
| 407 | ||
| 408 | ## How it relates to the rest | |
| 409 | {connections with the other parts of the system} | |
| 410 | ``` | |
| 411 | ||
| 412 | --- | |
| 413 | ||
| 414 | ## Checklists | |
| 415 | ||
| 416 | ### Per-quadrant checklist | |
| 417 | ||
| 418 | **Tutorial:** | |
| 419 | ``` | |
| 420 | □ Is the destination announced up front? | |
| 421 | □ Does every step produce a visible result? | |
| 422 | □ Do all commands work without fail (perfect reliability)? | |
| 423 | □ Is the actual expected output shown? | |
| 424 | □ No alternatives / options / digressions? | |
| 425 | □ Is explanation kept minimal (linked, not included)? | |
| 426 | ``` | |
| 427 | ||
| 428 | **How-to guide:** | |
| 429 | ``` | |
| 430 | □ Does the title state a concrete task ("How to…")? | |
| 431 | □ Does it start from a real problem, not a feature? | |
| 432 | □ Does it contain only the necessary steps? | |
| 433 | □ Does it cover real-world variants? | |
| 434 | □ Does it avoid teaching the basics (assumes competence)? | |
| 435 | ``` | |
| 436 | ||
| 437 | **Reference:** | |
| 438 | ``` | |
| 439 | □ Purely descriptive (no instruction, no explanation, no opinion)? | |
| 440 | □ Exhaustive (every parameter, default, type, error)? | |
| 441 | □ Standard, predictable format (same structure throughout)? | |
| 442 | □ Mirrors the product's structure? | |
| 443 | □ Contains examples without drifting into explanation? | |
| 444 | ``` | |
| 445 | ||
| 446 | **Explanation:** | |
| 447 | ``` | |
| 448 | □ Does it step back and make connections? | |
| 449 | □ Does it give the context (history, decisions, constraints)? | |
| 450 | □ Does it discuss the why and the rejected alternatives? | |
| 451 | □ Does it stay bounded (not absorbing reference/guide material)? | |
| 452 | □ Is it free of step-by-step instructions? | |
| 453 | ``` | |
| 454 | ||
| 455 | ### Global checklist (Phase 6) | |
| 456 | ||
| 457 | ``` | |
| 458 | □ Was the language (FR / EN / both) asked for — or taken from the invoking skill — and respected? | |
| 459 | □ If bilingual: one subfolder per language, cross-links internal to each language? | |
| 460 | □ Do all four quadrants exist (at least one document each)? | |
| 461 | □ Does every document serve exactly ONE clearly identified need? | |
| 462 | □ Do the folder names make the quadrant obvious? | |
| 463 | □ Does the index (README) explain the structure and orient the reader? | |
| 464 | □ Do documents link to each other (no duplication)? | |
| 465 | □ Are there no empty "to be filled in later" sections? | |
| 466 | □ Is every document "complete, not finished" (useful right now)? | |
| 467 | ``` | |
| 468 | ||
| 469 | --- | |
| 470 | ||
| 471 | ## Markdown formatting | |
| 472 | ||
| 473 | Write Markdown for readers who soft-wrap in their editor, not for a fixed column | |
| 474 | width. **Do not hard-wrap prose**: never insert a line break in the middle of a | |
| 475 | sentence or paragraph. | |
| 476 | ||
| 477 | - **One logical line per block.** A paragraph is a single line. A list item is a | |
| 478 | single line (its continuation text stays on the same line, not wrapped under | |
| 479 | the bullet). A blockquote paragraph is a single `>` line. | |
| 480 | - **Blank lines separate blocks** — keep exactly one blank line between | |
| 481 | paragraphs, list items groups, headings, and code fences. | |
| 482 | - **Leave code, tables, and headings alone.** Fenced code blocks keep their | |
| 483 | internal newlines verbatim; table rows stay one row per line; a heading is its | |
| 484 | own line. | |
| 485 | ||
| 486 | This keeps diffs meaningful (a reworded sentence changes one line, not a whole | |
| 487 | reflowed block) and matches how the rendered output looks anyway. If you are | |
| 488 | editing a file that was previously hard-wrapped, unwrap the blocks you touch. | |
| 489 | ||
| 490 | ## Strict Rules | |
| 491 | ||
| 492 | **You must NEVER:** | |
| 493 | - ❌ Mix two quadrants in the same document (recipe + explanation, reference + tutorial…) | |
| 494 | - ❌ Put detailed explanation into a tutorial or a how-to guide | |
| 495 | - ❌ Put step-by-step instructions into a reference or an explanation | |
| 496 | - ❌ Create empty folders / sections in anticipation | |
| 497 | - ❌ Brutally reorganise all the existing documentation at once (work in increments) | |
| 498 | - ❌ Duplicate content across quadrants instead of linking | |
| 499 | - ❌ Hard-wrap prose — no line break in the middle of a sentence or paragraph (see "Markdown formatting") | |
| 500 | ||
| 501 | **You must ALWAYS:** | |
| 502 | - ✅ File every piece of content with the compass (action/cognition × acquisition/application) | |
| 503 | - ✅ Respect the writing rules specific to the quadrant | |
| 504 | - ✅ Guarantee absolute reliability in tutorials (every command mentally tested) | |
| 505 | - ✅ Keep the reference neutral, exhaustive and structured | |
| 506 | - ✅ Link documents to each other rather than merging them | |
| 507 | - ✅ Work in small publishable increments ("complete, not finished") | |
| 508 | - ✅ Write each paragraph, list item, and blockquote as a single unwrapped line | |
| 509 | ||
| 510 | --- | |
| 511 | ||
| 512 | ## Notes | |
| 513 | ||
| 514 | Diátaxis imposes no technology (Markdown, Sphinx, MkDocs, Docusaurus… it does not matter). What | |
| 515 | counts is the **clean separation of the four needs**. Documentation that respects this | |
| 516 | separation is easier to write, to maintain and — above all — to use: every reader immediately | |
| 517 | knows where to go depending on whether they want to **learn**, **do**, **look up** or | |
| 518 | **understand**. | |
| 519 | ||
| 520 | Canonical reference: https://diataxis.fr |