Diataxis Writer
Use Diataxis to align documentation with the reader's actual need. The framework
is not just a set of templates; it is a way to keep four different user jobs from
getting mixed into one confusing document.
Explaining Diataxis to Users
When the user asks what Diataxis is, why it matters, or why this framework is a
good fit, explain it briefly before applying it:
Diataxis is a documentation framework that separates docs by the reader's mode of
work: learning, doing, looking up facts, or understanding concepts. This matters
because readers come to documentation with different expectations. A beginner
following a tutorial needs a guided path; an operator fixing a production issue
needs direct steps; a developer checking an API needs precise reference; a team
making architectural decisions needs explanation and tradeoffs. Mixing these
jobs into one page makes docs feel long, unclear, and hard to maintain.
Use these benefits when recommending Diataxis:
- It clarifies what each document is for before writing begins.
- It reduces bloated "everything pages" by separating learning, task execution,
lookup, and conceptual understanding.
- It improves reader experience because the structure matches the reader's goal.
- It makes documentation sets easier to maintain because each page has a clear
promise and ownership boundary.
- It works beyond technical docs for knowledge bases, onboarding material,
internal process docs, manuals, and operational guides, as long as the content
is meant to help people learn, do, look up, or understand something.
Do not oversell Diataxis as universal. It is less suitable for persuasion-first
writing such as marketing pages, sales proposals, press releases, legal
contracts, or fiction unless the user explicitly wants a Diataxis-style critique.
Core Model
Classify the document by the reader's intent:
| Reader need |
Diataxis type |
Document promise |
| Learn by doing |
Tutorial |
"Follow this path and you will gain basic competence." |
| Complete a task |
How-to guide |
"Follow these steps to achieve this outcome." |
| Look up facts |
Reference |
"Find accurate, complete information quickly." |
| Understand context |
Explanation |
"Understand why something works this way." |
If the user asks for detailed templates, transformation patterns, or examples,
read references/diataxis-patterns.md.
Workflow
- Identify the reader's job. Decide whether the reader is trying to learn,
do, look up, or understand. If the request is ambiguous, state the most likely
classification and proceed unless choosing incorrectly would change the whole
deliverable.
- Define audience and scope. Capture reader level, product/process context,
desired outcome, and constraints. Keep these visible while writing.
- Choose one primary document type. Let the primary type control structure,
tone, and depth. Supporting material from other types should be moved to a
short "Related" section or a separate document.
- Write or restructure around the promise. Use the type-specific guidance
below. Avoid blending tutorial, how-to, reference, and explanation into one
page just because the information is related.
- Verify the result. Check that each section helps the primary reader job.
Remove or relocate sections that serve a different job.
- Polish the prose. Run this step only when the deliverable contains prose
you wrote or rewrote. Skip it for classification notes, outline reviews,
and rewrite plans that contain no rewritten text. Run it last: structure
first, prose second.
- If a skill named
humanizer is available in this session, invoke it on
the finished document and ask it to return only the final text, which
humanizer calls embedded mode. Tell it the Diataxis type so it keeps
that type's voice: guiding for a tutorial, imperative for a how-to,
neutral for reference, and weighing alternatives for an explanation.
Change prose only. Keep headings, section order, code, commands, tables,
and link targets unchanged.
- If it is not available, apply the Reader-First Prose rules and the
checklist in
references/ai-prose-tells.md. Then tell the user once per
conversation that they can install the full skill with
npx skills add blader/humanizer. Do not repeat the suggestion.
Reader-First Prose
Write for comprehension rather than formality or literary flow.
- Express one main idea per sentence.
- Prefer 8–20 words per prose sentence.
- Review every sentence longer than 25 words. Split it unless doing so would
weaken accuracy or obscure the relationship between ideas.
- Prefer simple sentences. Use a subordinate clause only when it communicates
a necessary condition, cause, contrast, or qualification more clearly than
two separate sentences.
- Avoid nested subordinate clauses and sentences containing more than two
clauses.
- Move secondary details into a new sentence, list, note, or linked document.
- Preserve technical terms, contracts, constraints, evidence, and important
exceptions. Concision must not remove required meaning.
- Do not apply sentence-length limits to code, commands, paths, tables,
headings, quotations, or generated identifiers.
- Vary sentence length naturally. Do not turn every sentence into the same
short pattern.
Treat word counts as review signals, not mechanical pass/fail rules. For
Vietnamese, count space-separated tokens consistently even though they do not
always correspond to lexical words. For languages without space-delimited
words, rely on the one-idea and clause-count rules instead.
Type Guidance
Tutorial
Use a tutorial when the reader needs a guided learning experience.
- Give the reader a safe, repeatable path from zero to a concrete result.
- Prefer one reliable route over a catalog of options.
- Include enough explanation to keep the learner oriented, but do not interrupt
the lesson with deep theory or exhaustive reference material.
- Make success visible with checkpoints, expected outputs, and recovery notes.
- Avoid assuming the reader can make expert decisions before the lesson teaches
the relevant concepts.
How-to Guide
Use a how-to guide when the reader already has context and wants a task done.
- Start with the outcome, prerequisites, and when to use the guide.
- Write action-oriented steps in the order the user should perform them.
- Include decision points, warnings, rollback/recovery guidance, and verification.
- Keep conceptual background brief; link to explanations when the "why" would
distract from completing the task.
- Avoid turning the guide into a beginner lesson.
Reference
Use reference when the reader needs accurate lookup material.
- Organize by the natural structure of the subject: commands, fields, endpoints,
options, states, errors, schemas, components, policies, or glossary terms.
- Be complete, consistent, and predictable. Reference users scan; they do not
want narrative buildup.
- Use tables, signatures, examples, defaults, limits, and cross-references.
- Keep interpretation minimal. If the reader needs rationale, link to an
explanation.
Explanation
Use explanation when the reader needs understanding, context, or rationale.
- Explain concepts, mental models, design decisions, tradeoffs, history, and
consequences.
- Prefer clear prose, diagrams, comparisons, and examples over procedural steps.
- Show why alternatives exist and why one choice was made.
- Do not promise task completion. If the reader needs steps, link to a how-to.
Mixed Documents
Real documentation sets often need all four types, but a single page should still
have one dominant job. When a page mixes types:
- Name the dominant reader need.
- Extract unrelated material into separate pages or clearly marked sections.
- Add links between the pages so readers can move from learning to doing, from
doing to lookup, or from lookup to understanding.
Useful split patterns:
- A long "getting started" page often becomes a tutorial plus a reference page.
- A troubleshooting article often becomes a how-to guide plus an explanation of
the underlying failure mode.
- A product overview often becomes an explanation plus task-specific how-to
guides.
- API docs often become reference pages with separate tutorials and how-to guides.
Helper Script
Use the classifier as a quick heuristic when reviewing an existing document. It
does not replace editorial judgment, but it can surface mixed signals quickly.
Run it from the skill directory:
bash ./scripts/classify-doc.sh path/to/doc.md
The script also accepts stdin:
cat path/to/doc.md | bash ./scripts/classify-doc.sh
Output Format
When writing a new document, return:
- A brief classification note: document type, reader job, and key assumption.
- The document itself.
- A short verification checklist if the task involves review, restructuring, or
a high-stakes knowledge base.
When reviewing an existing document, return:
- Current dominant Diataxis type.
- Mixed-type problems, with section-level examples.
- Recommended target structure.
- Concrete rewrite plan or rewritten sections, depending on the user's request.
If the humanizer skill ran, include only its final text inside the document.
Do not include its draft or its list of remaining patterns. The
classification note, document, and checklist stay as described above.
Quality Checklist
- The page has one primary reader job.
- The title and opening promise match that reader job.
- Tutorial content teaches through doing instead of explaining everything first.
- How-to content helps a competent reader finish a task without detours.
- Reference content is complete, scannable, and consistently structured.
- Explanation content develops understanding without pretending to be a procedure.
- Related-but-different material is linked or separated rather than blended.
- The output matches the user's language unless they request otherwise.
- Most prose sentences contain one main clause and one main idea.
- Sentences longer than 25 words have been reviewed and are necessary.
- No sentence contains nested qualifications that could be stated separately.
- Concision has not removed contracts, constraints, evidence, or exceptions.
- The prose has been checked for common AI writing tells, either with the
humanizer skill or with
references/ai-prose-tells.md.
1---2name: diataxis-writer3description: Write, restructure, classify, and review documentation with the Diataxis framework. Use when the user asks to create, improve, audit, or reorganize documentation of any kind: knowledge bases, help centers, onboarding guides, process docs, manuals, runbooks, product or API docs, tutorials, how-to guides, references, explanations. Also use when the user mentions Diataxis, docs taxonomy, or documentation architecture, or asks why a document feels confusing. Not for marketing, legal, sales, press, or fiction writing unless the user wants a Diataxis-style analysis.4---56# Diataxis Writer78Use Diataxis to align documentation with the reader's actual need. The framework9is not just a set of templates; it is a way to keep four different user jobs from10getting mixed into one confusing document.1112## Explaining Diataxis to Users1314When the user asks what Diataxis is, why it matters, or why this framework is a15good fit, explain it briefly before applying it:1617Diataxis is a documentation framework that separates docs by the reader's mode of18work: learning, doing, looking up facts, or understanding concepts. This matters19because readers come to documentation with different expectations. A beginner20following a tutorial needs a guided path; an operator fixing a production issue21needs direct steps; a developer checking an API needs precise reference; a team22making architectural decisions needs explanation and tradeoffs. Mixing these23jobs into one page makes docs feel long, unclear, and hard to maintain.2425Use these benefits when recommending Diataxis:2627- It clarifies what each document is for before writing begins.28- It reduces bloated "everything pages" by separating learning, task execution,29 lookup, and conceptual understanding.30- It improves reader experience because the structure matches the reader's goal.31- It makes documentation sets easier to maintain because each page has a clear32 promise and ownership boundary.33- It works beyond technical docs for knowledge bases, onboarding material,34 internal process docs, manuals, and operational guides, as long as the content35 is meant to help people learn, do, look up, or understand something.3637Do not oversell Diataxis as universal. It is less suitable for persuasion-first38writing such as marketing pages, sales proposals, press releases, legal39contracts, or fiction unless the user explicitly wants a Diataxis-style critique.4041## Core Model4243Classify the document by the reader's intent:4445| Reader need | Diataxis type | Document promise |46| --- | --- | --- |47| Learn by doing | Tutorial | "Follow this path and you will gain basic competence." |48| Complete a task | How-to guide | "Follow these steps to achieve this outcome." |49| Look up facts | Reference | "Find accurate, complete information quickly." |50| Understand context | Explanation | "Understand why something works this way." |5152If the user asks for detailed templates, transformation patterns, or examples,53read `references/diataxis-patterns.md`.5455## Workflow56571. **Identify the reader's job.** Decide whether the reader is trying to learn,58 do, look up, or understand. If the request is ambiguous, state the most likely59 classification and proceed unless choosing incorrectly would change the whole60 deliverable.612. **Define audience and scope.** Capture reader level, product/process context,62 desired outcome, and constraints. Keep these visible while writing.633. **Choose one primary document type.** Let the primary type control structure,64 tone, and depth. Supporting material from other types should be moved to a65 short "Related" section or a separate document.664. **Write or restructure around the promise.** Use the type-specific guidance67 below. Avoid blending tutorial, how-to, reference, and explanation into one68 page just because the information is related.695. **Verify the result.** Check that each section helps the primary reader job.70 Remove or relocate sections that serve a different job.716. **Polish the prose.** Run this step only when the deliverable contains prose72 you wrote or rewrote. Skip it for classification notes, outline reviews,73 and rewrite plans that contain no rewritten text. Run it last: structure74 first, prose second.75 - If a skill named `humanizer` is available in this session, invoke it on76 the finished document and ask it to return only the final text, which77 humanizer calls embedded mode. Tell it the Diataxis type so it keeps78 that type's voice: guiding for a tutorial, imperative for a how-to,79 neutral for reference, and weighing alternatives for an explanation.80 Change prose only. Keep headings, section order, code, commands, tables,81 and link targets unchanged.82 - If it is not available, apply the Reader-First Prose rules and the83 checklist in `references/ai-prose-tells.md`. Then tell the user once per84 conversation that they can install the full skill with85 `npx skills add blader/humanizer`. Do not repeat the suggestion.8687## Reader-First Prose8889Write for comprehension rather than formality or literary flow.9091- Express one main idea per sentence.92- Prefer 8–20 words per prose sentence.93- Review every sentence longer than 25 words. Split it unless doing so would94 weaken accuracy or obscure the relationship between ideas.95- Prefer simple sentences. Use a subordinate clause only when it communicates96 a necessary condition, cause, contrast, or qualification more clearly than97 two separate sentences.98- Avoid nested subordinate clauses and sentences containing more than two99 clauses.100- Move secondary details into a new sentence, list, note, or linked document.101- Preserve technical terms, contracts, constraints, evidence, and important102 exceptions. Concision must not remove required meaning.103- Do not apply sentence-length limits to code, commands, paths, tables,104 headings, quotations, or generated identifiers.105- Vary sentence length naturally. Do not turn every sentence into the same106 short pattern.107108Treat word counts as review signals, not mechanical pass/fail rules. For109Vietnamese, count space-separated tokens consistently even though they do not110always correspond to lexical words. For languages without space-delimited111words, rely on the one-idea and clause-count rules instead.112113## Type Guidance114115### Tutorial116117Use a tutorial when the reader needs a guided learning experience.118119- Give the reader a safe, repeatable path from zero to a concrete result.120- Prefer one reliable route over a catalog of options.121- Include enough explanation to keep the learner oriented, but do not interrupt122 the lesson with deep theory or exhaustive reference material.123- Make success visible with checkpoints, expected outputs, and recovery notes.124- Avoid assuming the reader can make expert decisions before the lesson teaches125 the relevant concepts.126127### How-to Guide128129Use a how-to guide when the reader already has context and wants a task done.130131- Start with the outcome, prerequisites, and when to use the guide.132- Write action-oriented steps in the order the user should perform them.133- Include decision points, warnings, rollback/recovery guidance, and verification.134- Keep conceptual background brief; link to explanations when the "why" would135 distract from completing the task.136- Avoid turning the guide into a beginner lesson.137138### Reference139140Use reference when the reader needs accurate lookup material.141142- Organize by the natural structure of the subject: commands, fields, endpoints,143 options, states, errors, schemas, components, policies, or glossary terms.144- Be complete, consistent, and predictable. Reference users scan; they do not145 want narrative buildup.146- Use tables, signatures, examples, defaults, limits, and cross-references.147- Keep interpretation minimal. If the reader needs rationale, link to an148 explanation.149150### Explanation151152Use explanation when the reader needs understanding, context, or rationale.153154- Explain concepts, mental models, design decisions, tradeoffs, history, and155 consequences.156- Prefer clear prose, diagrams, comparisons, and examples over procedural steps.157- Show why alternatives exist and why one choice was made.158- Do not promise task completion. If the reader needs steps, link to a how-to.159160## Mixed Documents161162Real documentation sets often need all four types, but a single page should still163have one dominant job. When a page mixes types:1641651. Name the dominant reader need.1662. Extract unrelated material into separate pages or clearly marked sections.1673. Add links between the pages so readers can move from learning to doing, from168 doing to lookup, or from lookup to understanding.169170Useful split patterns:171172- A long "getting started" page often becomes a tutorial plus a reference page.173- A troubleshooting article often becomes a how-to guide plus an explanation of174 the underlying failure mode.175- A product overview often becomes an explanation plus task-specific how-to176 guides.177- API docs often become reference pages with separate tutorials and how-to guides.178179## Helper Script180181Use the classifier as a quick heuristic when reviewing an existing document. It182does not replace editorial judgment, but it can surface mixed signals quickly.183184Run it from the skill directory:185186```bash187bash ./scripts/classify-doc.sh path/to/doc.md188```189190The script also accepts stdin:191192```bash193cat path/to/doc.md | bash ./scripts/classify-doc.sh194```195196## Output Format197198When writing a new document, return:1992001. A brief classification note: document type, reader job, and key assumption.2012. The document itself.2023. A short verification checklist if the task involves review, restructuring, or203 a high-stakes knowledge base.204205When reviewing an existing document, return:2062071. Current dominant Diataxis type.2082. Mixed-type problems, with section-level examples.2093. Recommended target structure.2104. Concrete rewrite plan or rewritten sections, depending on the user's request.211212If the humanizer skill ran, include only its final text inside the document.213Do not include its draft or its list of remaining patterns. The214classification note, document, and checklist stay as described above.215216## Quality Checklist217218- The page has one primary reader job.219- The title and opening promise match that reader job.220- Tutorial content teaches through doing instead of explaining everything first.221- How-to content helps a competent reader finish a task without detours.222- Reference content is complete, scannable, and consistently structured.223- Explanation content develops understanding without pretending to be a procedure.224- Related-but-different material is linked or separated rather than blended.225- The output matches the user's language unless they request otherwise.226- Most prose sentences contain one main clause and one main idea.227- Sentences longer than 25 words have been reviewed and are necessary.228- No sentence contains nested qualifications that could be stated separately.229- Concision has not removed contracts, constraints, evidence, or exceptions.230- The prose has been checked for common AI writing tells, either with the231 humanizer skill or with `references/ai-prose-tells.md`.