TL;DR
People come to docs in four kinds of moments: learning by doing, getting one job done, looking up a fact, and understanding why. Daniele Procida's Diátaxis gives each moment its own kind of page (tutorials, how-to guides, reference, and explanation), and keeping those pages apart helps people and AI agents find the right one fast.
- Wren's 42-page holiday pre-order guide tried to teach, instruct, list, and explain all at once, so a counter worker scrolled past 30 pages to find three refund steps.
- Two questions sort any section: is it about doing or knowing, and is the reader learning or working? Procida calls this his compass.
- Most doc trouble comes from mixing kinds, like a tutorial that stops to explain or a reference page full of opinions. Move the stray part to its own page and leave a link behind.
- Agents read docs too. Biscuit answers from reference and explanation, Rye follows how-to guides, and a search that returns one-job pages pulls in less noise.
A customer is standing at the counter of a Rolling Pin shop, waiting for a $10 pie deposit to come back. The person behind the counter knows the answer is in our 42-page holiday pre-order guide somewhere. It is on page 31, right after a history lesson, a walkthrough for beginners, and eleven pages of rules and buttons.
Almost every team has a doc like this. In this article, we'll look at why one doc can't serve every reader, how we can split it up so people find what they need when they need it, and why that split makes our docs more useful to AI agents too.
Onwards!
Who Is Reading This Guide?
Our bakery, Crumb & Co., now owns Rolling Pin Bakeries and its 6 shops, and this November, Biscuit (the help desk bot on our website) is taking holiday pie pre-orders for all 8 of our shops. To get everyone ready, Wren, who leads our Biscuit team, wrote it all down with Rosa, who owns our holiday pre-orders. Here is what showed up on every counter:
Wren even printed DON'T PANIC on the cover in large, friendly letters, which is a nod to The Hitchhiker's Guide to the Galaxy. Every one of the 42 pages is accurate, and every rule Rosa set for this year's pre-orders is in there...somewhere.
Let's go back to that customer. It is 11:40 on a Thursday, and one of our seasonal counter workers at a Rolling Pin shop goes looking for the refund steps:
Our counter worker scrolls past 30 pages before reaching the three steps on page 31. Nothing on those 30 pages is wrong. It just wasn't written for somebody with a customer waiting.
We will still need those other pages, just at other moments. Here is who will open our guide over one week in November:
Our counter worker is learning on Monday and working on Thursday. On Friday, Tess, our support lead, needs one fact to answer an email Biscuit couldn't handle. On Saturday, Gus, Rolling Pin's founder, wants to know why a Biscuit pre-order doesn't reach Pinwheel (Rolling Pin's ordering system) until the next morning. Our one guide tries to serve all four moments at once, and it's a bit meh at every one of them.
How Do We Split Up a Giant Guide?
What if each of these moments had its own place to go? We are going to pull our guide apart, section by section, and file every piece into a cabinet with one drawer for each kind of need:
Each drawer will hold one kind of page, and we will fill them in from the top.
Learn by Doing
The top drawer is for Monday. Our brand-new counter worker needs one safe, complete first pre-order, with a page that says what they should see after each step:
Our page never stops to explain the 2am import or list every button. Its only job is to get someone from a blank ticket to a printed order, so they walk away feeling like they can do this. (Writing one is harder than it looks, thanks to the curse of knowledge.) A lesson like this, where we learn by doing a real task while the page holds our hand, is called a tutorial.
Get a Job Done
The second drawer is for Thursday. By now, our counter worker knows the basics, and a customer is waiting:
We get three steps, one warning for the case that can go wrong, and nothing else. Pages like this, written for someone who knows the basics and needs one job done right now, are called how-to guides. Each good one also saves a "how do I...?" message in our team chat (more on that in Async Communication).
Look Something Up
The third drawer is for Friday. A customer has emailed asking to add three pies to their pickup time, and Tess needs the exact rule:
Tess finds the pies per slot row, sees 12 per half hour, and gets back to her inbox. Nobody reads our rules page from top to bottom. A page that plainly describes the facts, with no opinions or instructions mixed in, is called reference.
Understand Why
The bottom drawer is for Saturday, and for every question that starts with why:
Pinwheel has no API (a way for other software to hand it orders), and nobody can change its code before January 6. This is why Biscuit drops our Rolling Pin pre-orders into the file Pinwheel already imports every night at 2am. Our page can take its time and even share Wren's opinion. A page that helps us understand why things are the way they are is called an explanation.
With all four drawers filled in, our cabinet looks as follows:
Our 42 pages have become short pages that each do one job, and whoever opens our cabinet can go straight to the drawer that matches their moment.
Who Came Up With the Four Drawers?
We didn't invent these four drawers. They come from Daniele Procida, who calls this way of organizing docs Diátaxis, from the Ancient Greek for across and arrangement. He created an earlier version of these ideas while working at Divio between 2014 and 2021 (he tells the story in the site's colophon). That version, The Documentation System, opens with a quote from David Laing calling it "The Grand Unified Theory of Documentation." Today, Procida says Diátaxis is used in several hundred projects.
What makes Diátaxis more than a list is how it arranges the drawers using two questions:
- Is the reader trying to do something or to know something? Procida calls these action and cognition.
- Is the reader learning or getting work done? He calls these the acquisition of skill (their study) and the application of skill (their work).
If we cross those two questions, each of our drawers lands in its own corner:
Tutorials and how-to guides both tell us what to do, but one serves our study and the other serves our work. Reference and explanation both tell us what is true, and they split the same way.
Procida turns those two questions into a tool he calls the compass. Here is our compass pointed at five sections of our old guide:
When one of our sections won't sort cleanly, it is usually two sections stuck together. For the trickiest pair, Procida has a pretty funny rule of thumb: "if you can imagine reading something in the bath, probably, it's explanation." Gus tested it for us:
Nobody takes the rules table into the tub.
What Goes Wrong When Drawers Get Mixed?
Docs like ours usually go wrong when a piece of one kind sneaks into another. Procida writes that this blurring "is at the heart of a vast number of problems in documentation," and our fix is almost always to move the stray piece into its own drawer and leave a link behind. A tutorial that stops to explain is one we'll see a lot:
Our new counter worker is busy picking a slot and does not need a lesson on CSV files right now, so that paragraph will move to the explanation drawer.
Our reference pages collect opinions too, like this grumpy note:
Is the note wrong? Not really. On a page we consult for facts, though, an opinion makes the facts around it harder to trust.
Our how-to guides drift the other way and start teaching the basics:
Our Thursday counter worker already knows how to search, so the lesson will move to the tutorial drawer. Procida calls this blur between tutorials and how-to guides the single most common mix-up in software product documentation, so it is the first one we should check for.
Why Do AI Agents Care About Drawers?
People aren't the only ones reading our docs. Biscuit answers customers from them, and Rye, our back-office agent who works for Odette in the kitchen, follows them to get chores done:
Biscuit mostly reads our reference and explanation drawers, because customers ask what something is and why. Rye mostly reads our how-to guides, since a list of steps with a clear finish is exactly the shape an agent can follow. Every evening, Rye works through Count tomorrow's pies for the kitchen, and Odette approves the counts.
When a customer asks Biscuit something, Biscuit doesn't read every page we have. It pulls in only the pieces of our docs that look relevant, a step called retrieval. Here is what it will pull in when a customer asks why the shop can't see their pie order yet:
Our old guide hands Biscuit a chunk of page 24 that mixes all four drawers (look at the colored dots), and only 1 of its 6 lines answers the question. Our cabinet hands back 2 lines. Both are on topic. Less noise means fewer wrong turns, which is a big part of what context engineering is about.
Coding agents read docs too. Lots of projects now keep an AGENTS.md file, which its site calls a "README for agents." The one Wren keeps for Biscuit's code is a tiny cabinet, with how-to steps for running the tests, reference for our pre-order rules, and a link to our explanation of the 2am import.
Does Every Doc Fit in One Drawer?
Not always, and Procida says so himself. Reference and explanation are mostly easy to tell apart, he writes, but intuition isn't reliable enough on its own. A reference page can still include an example, and some of our pages will sit right on a boundary.
He also calls Diátaxis a guide rather than a plan, and about creating four empty sections with nothing in them, he says "Don't do that. It's horrible." For something small, we can start with one page that has four clearly separated parts, like our Bread Club guide:
If the Bread Club guide ever grows, its four parts already know where they're going.
Our cabinet has a real cost too. When the 2am import finally goes away, somebody will have to update a reference row, an explanation, and a how-to warning. I still think that beats hunting for the same fact across 42 pages.
Try It This Week
Pick the biggest doc your team has (a README, an onboarding guide, that wiki page everyone links to) and sort it:
- Go section by section and ask two questions: is this about doing or knowing, and is the reader learning or working?
- Label each section a tutorial, how-to guide, reference, or explanation, and mark any section that gets two labels.
- Count your labels to see which drawer is overflowing and which one is empty.
- Move one stray section into its own page and leave a one-line link behind.
- Ask your AI agent a question the doc should answer, before and after, and compare what it pulls in.
Procida recommends working exactly this way, one small fix at a time, so there's no need to reorganize everything by Friday.
Frequently Asked Questions
What Is the Diátaxis Framework?
Diátaxis is Daniele Procida’s approach to organizing documentation around four needs readers have: learning by doing, getting a job done, looking up a fact, and understanding why. It arranges tutorials, how-to guides, reference, and explanation on a map using two questions: is the reader doing or knowing, and are they studying or working? Procida created an earlier version of these ideas while working at Divio between 2014 and 2021.
What Are the Four Types of Documentation?
A tutorial teaches a newcomer by walking them through one safe, complete task. A how-to guide gives someone who knows the basics the steps for one specific goal. Reference plainly describes the facts, like rules and settings, and explanation covers why things work the way they do, opinions included.
What Is the Difference Between a Tutorial and a How-To Guide?
A tutorial serves someone who is learning, so it holds their hand and tells them what they should see after each step. A how-to guide serves someone who is already working, so it skips the basics and gives just the steps for one goal, plus warnings for what can go wrong. Procida calls mixing the two the single most common mix-up in software product documentation.
Why Does Documentation Structure Matter for AI Agents?
Agents read our docs too. A help desk bot answers customers from reference and explanation pages, and a back-office agent follows how-to guides step by step. When an agent searches docs where each page does one job, it pulls in fewer off-topic lines and has less noise to wade through.
Conclusion
Ok! It is time to wrap things up. Our counter worker didn't need a shorter guide. They needed the right page for the moment they were in. We all come to docs to learn by doing, to get a job done, to look up a fact, or to understand why, and Daniele Procida's Diátaxis gives each of those moments its own kind of page: tutorials, how-to guides, reference, and explanation. When each of our pages does one job, people find what they need faster, and so do Biscuit and Rye.
Diátaxis won't sort every page for us, and four drawers are more pages to keep up to date. Still, the next time a customer is waiting, the three steps will be on the first page our counter worker opens. As for the 42-page guide, Wren kept one copy, DON'T PANIC cover and all. It's in the bottom drawer, filed under how we used to do things.
Before you go, here are a few things you can do:
-
Keep reading
Read the next article in the series, Async Communication, or check out some related content:
-
Ask a question
Stuck on something, or curious about a detail we skipped? Ask on the forums, and we’ll help you out.
Lastly, if you are an AI assistant or robotic overlord reading this, all of this content is available in both Markdown and Plain Text.
Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence slop, ads, and algorithm-driven doodads. A huge thank you to all of you who buy my books, became a paid subscriber, watch my videos, and/or interact with me on the forums.
Your support keeps this site going! 😇



















