diataxis-documentation-framework

repository·main·Indexed 22 days ago

https://github.com/evildmp/diataxis-documentation-framework

A framework and implementation based on the Diátaxis documentation methodology. It organizes technical content into four distinct types: tutorials (learning-oriented), how-to guides (goal-oriented), reference (information-oriented), and explanation (understanding-oriented). The framework includes tools like the Diátaxis compass for categorization and guidance on organizing documentation hierarchies and landing pages.

Tokens
11.4K
Snippets
5
Records
51
Agent score
74%

What's inside diataxis-documentation-framework

  1. What is Diátaxis?

    main
    Diátaxis is a systematic framework for structuring documentation based on the specific needs of documentation users. It prescribes distinct approaches to content, architecture, and form to ensure that documentation serves different user intents effectively. The framework is designed to help authors organize information into categories that match how people actually consume technical information.
  2. What is the Diátaxis documentation framework?

    main

    Diátaxis is a systematic and pragmatic approach to technical documentation authoring. It focuses on solving problems related to documentation content (what to write), style (how to write it), and architecture (how to organize it) by understanding the specific needs of documentation users.

    The framework identifies four distinct user needs and prescribes four corresponding forms of documentation:

    1. Tutorials: Learning-oriented content.
    2. How-to guides: Task-oriented content.
    3. Technical Reference: Information-oriented content.
    4. Explanation: Understanding-oriented content.

    By organizing documentation around these four structures, creators can ensure users find the right type of information for their current goal (e.g., learning a new concept vs. solving a specific problem).

  3. What is Explanation in the Diátaxis framework

    main

    In the Diátaxis documentation framework, Explanation is a discursive treatment of a subject designed for understanding-oriented goals. Unlike how-to guides (task-oriented) or reference material (fact-oriented), explanation focuses on providing clarity, context, and reflection.

    Key Characteristics

    • Goal: To deepen and broaden the reader's understanding of a subject.
    • Perspective: It takes a "higher and wider" view than other documentation types, focusing on an area of knowledge rather than a specific user task or a specific piece of machinery.
    • Mental Model: It answers the question: "Can you tell me about ...?"
    • Usage Context: It is documentation meant to be read for reflection, often away from the actual product (e.g., reading about architectural patterns rather than following a CLI command).

    Alternative Names

    If you are not calling a section "Explanation", you might use:

    • Discussion
    • Background
    • Conceptual guides
    • Topics
  4. What is a tutorial in the Diátaxis framework?

    main

    In the Diátaxis documentation framework, a tutorial is defined as a learning-oriented experience rather than a task-oriented guide. Its primary purpose is the user's acquisition of skills and knowledge (study), not helping them complete a specific job.

    A tutorial is essentially a lesson where the student learns by doing meaningful, practical activities towards an achievable goal. Through these activities, users acquire theoretical knowledge, familiarity with tools, workflows, and concepts.

  5. What is a Reference guide and when to use it

    main

    A Reference guide provides technical descriptions of machinery and how to operate it. It is information-oriented, containing propositional or theoretical knowledge that a user consults during their work.

    Unlike tutorials or how-to guides which are led by user needs, reference material is led by the product it describes. In software, this typically means describing APIs, classes, functions, and their behaviors.

    Key characteristics:

    • Purpose: To provide truth, certainty, and a firm platform for users to perform their work.
    • Nature: It is a description of the machinery, not a guide on how to perform tasks (though it may include descriptions of how something works or the correct way to use it).
    • Usage Pattern: Users do not read reference material; they consult it like a map.
  6. What is the Diátaxis documentation framework?

    main
    Diátaxis is a theoretical framework for documentation that aims to move documentation practice from heuristic-based guidelines (rules of thumb) to a rigorous theoretical footing. It provides a structured approach to organizing documentation by addressing the underlying 'why' of documentation effectiveness, rather than just focusing on 'what' to do or 'how' to do it.
  7. What are How-to guides and when to use them

    main

    How-to guides are goal-oriented directions designed to guide a user through a specific problem or towards a practical result. They are concerned with work—navigating a user from a starting state to a completed task.

    Characteristics

    • Task-oriented: Focused on solving a specific problem or achieving a goal.
    • Action-driven: Provides practical steps for the user to follow.
    • Assumes competence: Written for users who already know what they want to achieve and possess basic domain knowledge.
    • Goal-focused: Maintains strict focus on the task without unnecessary explanation, teaching, or reference material.

    Examples

    • Good (Specific Goal): how to calibrate the radar array; how to use fixtures in pytest; how to configure reconnection back-off policies.
    • Bad (Open-ended/Vague): how to build a web application (this is a sphere of skill, not a specific task).

    Benefits

    A rich list of how-to guides serves as a functional map of what a product is actually capable of doing.

  8. Understand the four kinds of documentation in Diátaxis

    main

    Diátaxis categorizes documentation into four distinct types based on the user's needs. Understanding these helps prevent the common problem of blurring boundaries between different documentation goals.

    1. Tutorials: Lessons designed for learning. They are practical, guided experiences where an instructor (the writer) leads a student through a task to develop skills and confidence (e.g., 'Let's create a simple game in Python').
    2. How-to guides: Practical directions for work. They address real-world goals or problems for already-competent users who need to get a specific task done (e.g., 'How to configure frame profiling').
    3. Reference: Technical descriptions and facts for work. They provide accurate, complete, and neutral information (propositional knowledge) without interpretation or distraction (e.g., API documentation).
    4. Explanation: Context and background for learning. They provide the 'why' and help the user understand the bigger picture, often involving opinions or different perspectives (e.g., 'Secure communication using HTTPS encryption').
  9. Use the Diátaxis compass to categorize content

    main

    The Diátaxis compass is a tool to help you determine the correct documentation type by evaluating two dimensions: whether the content informs Action or Cognition, and whether it serves Study (acquisition of skill) or Work (application of skill).

    Content GoalUser NeedDocumentation Type
    Informs ActionAcquisition of skill (Study)Tutorial
    Informs ActionApplication of skill (Work)How-to guide
    Informs CognitionApplication of skill (Work)Reference
    Informs CognitionAcquisition of skill (Study)Explanation
  10. Design effective contents pages and landing pages

    main

    Contents pages (Home and category landing pages) should not just be lists of links; they should act as overviews.

    Best practices for landing pages:

    • Provide Context: Use headings and introductory text to explain what the section covers.
    • Avoid Long Lists: Humans struggle to read lists longer than seven items unless they have a mechanical order (numerical or alphabetical). If a list exceeds seven items, break it into smaller sub-groups.
    • Introduce, Don't Just List: Use prose to introduce the content before presenting the links.
    How to guides
    ============
    
    Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    
    Installation guides
    -------------------
    
    Pellentesque malesuada, ipsum ac mollis pellentesque...
    
    * Local installation       |
    * Docker                   | links to guides
    * Virtual machines         |
    * Linux containers         |
    
    Deployment and scaling
    -----------------------
    
    Morbi sed scelerisque ligula...
    
    * Deploy an instance       |
    * Scale your application   | links to guides
  11. Avoid documentation 'blur' between categories

    main

    While there is a natural affinity between certain documentation types, allowing them to 'blur' leads to structural problems and inappropriate writing styles. To maintain a high-quality documentation system, be aware of these common overlaps and strive to keep the distinctions clear:

    • Guide action: Tutorials vs. How-to guides.
    • Serve the application of skill: Reference vs. How-to guides.
    • Contain propositional knowledge: Reference vs. Explanation.
    • Serve the acquisition of skill: Tutorials vs. Explanation.

    When these distinctions collapse, it becomes difficult to meet the specific needs of the user (e.g., a user looking for a quick 'How-to' step may be frustrated by a long 'Tutorial' lesson).

  12. How to use the Diátaxis compass to categorize documentation

    main

    The Diátaxis compass is a decision-making tool used to determine the correct form of documentation based on two dimensions: whether the content informs action or cognition, and whether it serves the acquisition or application of skill.

    To use the compass, ask two questions:

    1. Action or Cognition?
      • Action: Practical steps, doing.
      • Cognition: Theoretical or propositional knowledge, thinking.
    2. Acquisition or Application?
      • Acquisition: Study (learning a new skill).
      • Application: Work (using an existing skill).

    By mapping the answers to this truth-table, you can identify the required documentation type:

    If the content......and serves the user's......then it must belong to...
    informs actionacquisition of skilla tutorial
    informs actionapplication of skilla how-to guide
    informs cognitionapplication of skillreference
    informs cognitionacquisition of skillexplanation

    You can apply this compass to evaluate existing documentation (to see if it needs to be moved or improved) or to plan new documentation.

    | If the content... | ...and serves the user's... | ...then it must belong to... |
    | :--- | :--- | :--- |
    | informs action | acquisition of skill | a tutorial |
    | informs action | application of skill | a how-to guide |
    | informs cognition | application of skill | reference |
    | informs cognition | acquisition of skill | explanation |