Diátaxis Documentation Governance
This skill enforces the Diátaxis framework for documentation. Diátaxis identifies four distinct documentation types based on user needs: tutorials, how-to guides, reference, and explanation. Each serves a different purpose and must be written differently.
Operating Modes
This skill operates in one of the following modes:
- classify: Identify which quadrant content belongs to
- audit: Analyze a doc set for gaps, imbalances, and violations
- generate: Create new documentation in a specified quadrant
- restructure: Split or reorganize existing mixed-mode content
The mode must be inferred from the user request or explicitly stated. If the operating mode cannot be confidently inferred, ask for clarification before proceeding.
Refusal with explanation is a valid and successful outcome when quadrant purity cannot be maintained.
Generate Mode Policy
For generate mode, one of the following must be true before producing content:
- The user explicitly states the target quadrant ("write a How-to for X"), OR
- The agent classifies the request, presents reasoning with confidence+evidence, and receives user confirmation
The Diátaxis Compass
Use this decision tree to classify content into exactly ONE quadrant:
| If content... |
...and serves user's... |
...then it belongs to... |
| informs action |
acquisition (study) |
Tutorial |
| informs action |
application (work) |
How-to Guide |
| informs cognition |
application (work) |
Reference |
| informs cognition |
acquisition (study) |
Explanation |
Two questions to ask:
- Does this inform action (doing) or cognition (knowing)?
- Does this serve acquisition (learning/study) or application (working)?
Quadrant Summary
Tutorial (learning-oriented)
A lesson that takes the learner through a practical experience. The instructor is responsible for the learner's success. Focus on doing, not explaining. Deliver results early and often. Minimize explanation. No choices or alternatives.
- Form: Sequential lesson with concrete steps
- Language: "We will...", "First, do X", "You'll notice that..."
- Not: Teaching concepts, offering alternatives, explaining why
How-to Guide (goal-oriented)
Directions that guide an already-competent user through a real-world problem. Assumes the reader knows what they want to achieve. Focused on work, not study.
- Form: Series of steps addressing a specific goal
- Language: "To achieve X, do Y", "If you want...", conditional imperatives
- Not: Teaching beginners, explaining concepts, describing machinery
Reference (information-oriented)
Technical description of the machinery. Austere, neutral, accurate. Structure mirrors the thing being described. The user consults it, not reads it.
- Form: Structured descriptions, tables, specifications
- Language: "X is...", "The options are...", factual statements
- Not: Instructing, explaining why, narrative, opinions
Explanation (understanding-oriented)
Discursive treatment that provides context, background, and answers "why". Makes connections, admits opinion, circles around the subject.
- Form: Prose discussion of a topic
- Language: "The reason for X is...", "This is because...", "Consider..."
- Not: Step-by-step procedures, technical specifications, teaching tasks
Core Workflow
For Classification
- Read the content carefully
- Apply the compass: action/cognition × acquisition/application
- Identify the single quadrant
- Report with confidence and evidence
For Generation
- Confirm the target quadrant (stated or inferred with confirmation)
- Apply quadrant constraints strictly
- Refuse to blend quadrants; recommend splitting if needed
- Validate output against quadrant characteristics
For Audit
- Inventory all documentation
- Classify each document
- Identify gaps (missing quadrants)
- Flag violations (mixed-mode, wrong quadrant)
- Report imbalances (e.g., "reference-heavy, tutorial-poor")
For Restructure
- Classify the existing content
- Identify quadrant violations
- Propose splits (one document per quadrant)
- Present plan for user confirmation before changes
Output Requirements
When classifying or flagging violations, always provide:
- Quadrant: The identified type (Tutorial, How-to, Reference, Explanation)
- Confidence: high | medium | low
- Evidence: Specific phrases, structural patterns, or signals
Example:
Classified as How-to (high confidence).
Evidence: imperative verbs ("configure", "set up"), goal-oriented heading, absence of conceptual framing, assumes reader competence.
Violation Detection
Flag these anti-patterns:
- Tutorial with explanation: Lengthy "why" sections, conceptual digressions
- How-to that teaches: Beginner framing, "let's learn" language
- Reference with narrative: First-person voice, procedural instructions
- Explanation with procedures: Numbered steps, imperative commands
- Mixed-mode documents: Multiple quadrant signals in single document
For detailed detection patterns and remediation, see references/anti-patterns.md.
Non-Goals
This skill does not:
- Invent documentation strategy or information architecture
- Decide product architecture or feature scope
- Merge multiple Diátaxis quadrants into a single document
- Override repository-specific documentation rules or style guides
- Generate content without explicit quadrant classification
Additional Resources
- Detailed quadrant characteristics: references/quadrants.md
- Classification decision tree: references/compass.md
- Anti-patterns and fixes: references/anti-patterns.md
Attribution
Diátaxis is the work of Daniele Procida. This skill encodes the Diátaxis framework for use by AI agents. For the authoritative source and complete documentation, see diataxis.fr.
Licensed under CC-BY-SA 4.0. Citation metadata available at the Diátaxis GitHub repository.
1---2name: diataxis3description: Classify, validate, generate, and audit documentation using the Diátaxis framework. Enforces quadrant purity across tutorials, how-to guides, reference, and explanation. Use when creating documentation, reviewing docs, auditing doc sets, restructuring existing content, or when the user mentions Diátaxis, documentation structure, or doc quality.4license: CC-BY-SA-4.05---67# Diátaxis Documentation Governance89This skill enforces the Diátaxis framework for documentation. Diátaxis identifies four distinct documentation types based on user needs: **tutorials**, **how-to guides**, **reference**, and **explanation**. Each serves a different purpose and must be written differently.1011## Operating Modes1213This skill operates in one of the following modes:1415- **classify**: Identify which quadrant content belongs to16- **audit**: Analyze a doc set for gaps, imbalances, and violations17- **generate**: Create new documentation in a specified quadrant18- **restructure**: Split or reorganize existing mixed-mode content1920The mode must be inferred from the user request or explicitly stated. If the operating mode cannot be confidently inferred, ask for clarification before proceeding.2122Refusal with explanation is a valid and successful outcome when quadrant purity cannot be maintained.2324### Generate Mode Policy2526For generate mode, one of the following must be true before producing content:2728- The user explicitly states the target quadrant ("write a How-to for X"), OR29- The agent classifies the request, presents reasoning with confidence+evidence, and receives user confirmation3031## The Diátaxis Compass3233Use this decision tree to classify content into exactly ONE quadrant:3435| If content... | ...and serves user's... | ...then it belongs to... |36|-------------------|---------------------------|--------------------------|37| informs action | acquisition (study) | **Tutorial** |38| informs action | application (work) | **How-to Guide** |39| informs cognition | application (work) | **Reference** |40| informs cognition | acquisition (study) | **Explanation** |4142**Two questions to ask:**43441. Does this inform **action** (doing) or **cognition** (knowing)?452. Does this serve **acquisition** (learning/study) or **application** (working)?4647## Quadrant Summary4849### Tutorial (learning-oriented)5051A lesson that takes the learner through a practical experience. The instructor is responsible for the learner's success. Focus on doing, not explaining. Deliver results early and often. Minimize explanation. No choices or alternatives.5253- **Form**: Sequential lesson with concrete steps54- **Language**: "We will...", "First, do X", "You'll notice that..."55- **Not**: Teaching concepts, offering alternatives, explaining why5657### How-to Guide (goal-oriented)5859Directions that guide an already-competent user through a real-world problem. Assumes the reader knows what they want to achieve. Focused on work, not study.6061- **Form**: Series of steps addressing a specific goal62- **Language**: "To achieve X, do Y", "If you want...", conditional imperatives63- **Not**: Teaching beginners, explaining concepts, describing machinery6465### Reference (information-oriented)6667Technical description of the machinery. Austere, neutral, accurate. Structure mirrors the thing being described. The user consults it, not reads it.6869- **Form**: Structured descriptions, tables, specifications70- **Language**: "X is...", "The options are...", factual statements71- **Not**: Instructing, explaining why, narrative, opinions7273### Explanation (understanding-oriented)7475Discursive treatment that provides context, background, and answers "why". Makes connections, admits opinion, circles around the subject.7677- **Form**: Prose discussion of a topic78- **Language**: "The reason for X is...", "This is because...", "Consider..."79- **Not**: Step-by-step procedures, technical specifications, teaching tasks8081## Core Workflow8283### For Classification84851. Read the content carefully862. Apply the compass: action/cognition × acquisition/application873. Identify the single quadrant884. Report with confidence and evidence8990### For Generation91921. Confirm the target quadrant (stated or inferred with confirmation)932. Apply quadrant constraints strictly943. Refuse to blend quadrants; recommend splitting if needed954. Validate output against quadrant characteristics9697### For Audit98991. Inventory all documentation1002. Classify each document1013. Identify gaps (missing quadrants)1024. Flag violations (mixed-mode, wrong quadrant)1035. Report imbalances (e.g., "reference-heavy, tutorial-poor")104105### For Restructure1061071. Classify the existing content1082. Identify quadrant violations1093. Propose splits (one document per quadrant)1104. Present plan for user confirmation before changes111112## Output Requirements113114When classifying or flagging violations, always provide:115116- **Quadrant**: The identified type (Tutorial, How-to, Reference, Explanation)117- **Confidence**: high | medium | low118- **Evidence**: Specific phrases, structural patterns, or signals119120Example:121122> Classified as **How-to** (high confidence).123> Evidence: imperative verbs ("configure", "set up"), goal-oriented heading, absence of conceptual framing, assumes reader competence.124125## Violation Detection126127Flag these anti-patterns:128129- **Tutorial with explanation**: Lengthy "why" sections, conceptual digressions130- **How-to that teaches**: Beginner framing, "let's learn" language131- **Reference with narrative**: First-person voice, procedural instructions132- **Explanation with procedures**: Numbered steps, imperative commands133- **Mixed-mode documents**: Multiple quadrant signals in single document134135For detailed detection patterns and remediation, see [references/anti-patterns.md](references/anti-patterns.md).136137## Non-Goals138139This skill does not:140141- Invent documentation strategy or information architecture142- Decide product architecture or feature scope143- Merge multiple Diátaxis quadrants into a single document144- Override repository-specific documentation rules or style guides145- Generate content without explicit quadrant classification146147## Additional Resources148149- **Detailed quadrant characteristics**: [references/quadrants.md](references/quadrants.md)150- **Classification decision tree**: [references/compass.md](references/compass.md)151- **Anti-patterns and fixes**: [references/anti-patterns.md](references/anti-patterns.md)152153## Attribution154155Diátaxis is the work of Daniele Procida. This skill encodes the Diátaxis framework for use by AI agents. For the authoritative source and complete documentation, see [diataxis.fr](https://diataxis.fr).156157Licensed under CC-BY-SA 4.0. Citation metadata available at the [Diátaxis GitHub repository](https://github.com/evildmp/diataxis-documentation-framework).