Tutorials & tips
Published:
24 Nov, 2026
Documentation best practices: how to structure, write, and maintain better docs

AI summary
Effective documentation starts with usersโ tasks, a predictable structure, and instructions readers can verify. Test whether people and AI agents can find and apply that content, connect updates to product workflows, and use real questions and feedback to guide improvements.
Good documentation helps someone answer a question or complete a task. Even when every page is accurate, readers can struggle to find the information they need or understand how to use it. They also need to trust that the instructions reflect how the product works today.
AI agents increasingly retrieve that same documentation to answer questions and perform tasks on someoneโs behalf. These seven practices will help you plan and maintain docs that both people and agents can use, whether youโre starting a new site or improving an existing one.
1. Identify your audiences and the tasks they need to complete
Before creating pages, list the people who rely on your documentation and what theyโre trying to achieve. Your productโs feature list describes what youโve built, but it wonโt necessarily tell you what users need help doing.
For example, imagine a software product called Northstar, which helps teams analyze data. Its documentation might serve several audiences:
Audience | Main task | Content needed |
New customer | Create their first report | Getting started tutorial |
Developer | Send data from another application | API quickstart and reference |
Administrator | Control access to company data | Permissions and security guides |
Existing user | Fix a failed data import | Troubleshooting instructions |
Create a similar table for your product. Start with three or four audiences and identify their two most important tasks. For each task, note what the reader needs beforehand, the action theyโll take, and what success looks like.
Compare this list with your existing docs. If a critical task has no clear starting page, youโve identified a content gap. If a task requires jumping between several unrelated pages, you may need a more complete guide.
Using GitBook: Organize related content into pages and groups, and use separate site sections when audiences need distinct entry points. Base those divisions on readersโ needs, even when different teams own the content.
2. Build your navigation around user goals and journeys
Use those tasks to plan your sidebar. Readers should be able to predict where information belongs without knowing how your company is organized internally.
For Northstar, a starting structure might look like this:
Getting started: Overview, set up your account, create your first report
Guides: Connect a data source, manage dashboards, invite teammates
Concepts: How data sync works, roles and permissions
API reference: Authentication, endpoints, webhooks
Troubleshooting: Import failures, common error messages

This structure separates learning a workflow from understanding a concept or looking up a technical detail. Someone creating their first report shouldnโt have to navigate API endpoint descriptions to find the next step.
To plan your own structure, write each important topic on a card or in a spreadsheet. Group topics by the readerโs goal, name each group using words your users recognize, and put the most common starting tasks near the top. Keep groups focused: if you notice that โGuidesโ is becoming a home for everything, divide it into meaningful task categories.
Our information architecture guide dives into more detail about choosing documentation categories, organizing pages, and applying frameworks such as Diรกtaxis. Itโs a great next step if youโre following the advice here.
Next, sketch the route from a visitorโs first page to a completed task. A getting-started page should link to the next action so readers can continue the task. Link to reference material when necessary, but donโt make readers reconstruct an entire workflow from reference pages.
Using GitBook: Create the hierarchy with pages and page groups. For larger sites, use site sections to separate substantial areas such as product guides and API documentation. Start with the simplest structure that works.
Mozilla.ai brought documentation for several separate open source projects into a single hub. Developers can more easily discover related tools and find the information they need.
Try it: Give someone unfamiliar with your product a goal, such as โCreate your first report.โ Ask them where theyโd click first. If their answer differs from what you expected, revisit the labels or grouping. You can run the same test with an agent, then ask how it completed the task, where it got stuck, and why it succeeded or failed.
3. Write instructions that lead to a verifiable result
A task-based page should take a reader from a known starting point to an outcome they can verify. Give individual tasks their own guides, with separate conceptual explanations and reference pages where needed.
Use this template:
Title and outcome: Use โConnect a PostgreSQL data sourceโ as the title, followed by one sentence explaining what the reader will accomplish.
Before you begin: List required access, credentials, supported versions, or other prerequisites.
Instructions: Give numbered actions in the order they must happen.
Verify the result: Explain what success looks like and how to confirm it.
Troubleshooting and next steps: Address likely failures and link to related tasks.
Make instructions specific enough to follow without guessing. โConfigure your connection settingsโ is vague. For our fictional Northstar product, a better example would be: โOpen Settings โ Data sources, select Add source, choose PostgreSQL, and enter your database host and credentials. Select Test connection before saving.โ
Use the precise labels in your product and show the expected success or error message. Where a step is complicated, add a focused screenshot or code sample directly beside it.

Before publishing, ask a teammate to perform the task with only that page open. Note every guess they make: an unexplained field, missing permission, ambiguous button, or unclear success condition. Revise the instructions wherever they have to guess.
Avoid mixing requirements, background explanations, and actions into one paragraph. Readers should be able to scan the numbered steps, then consult additional detail when they need it.
Using GitBook: Use headings, stepper blocks, code blocks, and hints to separate instructions from notes or warnings. GitBook Agent can help restructure a draft, but the product owner should verify every setting, command, and expected result.
4. Test whether people can find the right information
Check whether page titles, search terminology, and links between related articles help readers find your instructions. Start with titles that describe the task or question. โAuthenticationโ might be an appropriate reference category, but โSet up single sign-onโ is more useful for a person (or agent) trying to complete that task. Use the words customers use when asking for help, and define specialist terminology when you introduce it.
Then run a simple findability test. Give a colleague three realistic questions without showing them where the answers live. For Northstar, those might be โHow do I connect a database?โ, โWho can invite teammates?โ, and โWhy did my import fail?โ Ask them to find an answer using navigation or search, and watch where they hesitate.
If they search for โdatabase connectionโ but the relevant page is titled โExternal ingestion,โ consider changing the title or introducing the familiar term in the page. If the answer requires several steps, link the relevant pages in sequence.
Readers also need a clear route through the task. When we rebuilt GitBookโs own documentation, we reorganized content around user journeys rather than product features. We tested whether someone could follow a single section from start to finish without unnecessary detours, moving, merging, or removing pages that interrupted the journey. Apply the same test to your most important workflows.
Using GitBook: Published sites include search, and AI Assistant can offer another way to ask questions when enabled. Test both, but donโt rely on AI to compensate for missing content or unclear navigation.
5. Make your documentation useful to people and AI agents
The same information may now be read directly by a person or retrieved by an agent thatโs answering a question, writing code, or completing a workflow. In GitBookโs 2026 readership research, AI agents accounted for 51.8% of intentional documentation reads in the analyzed week across qualifying GitBook-hosted sites.
You donโt need to write two versions of every page. Start with accurate, well-structured content: descriptive headings, explicit prerequisites, clearly named settings, and examples that include expected outcomes. Avoid instructions that depend on visual context alone, such as โClick the button on the right.โ
In our recent experiment on documentation defects, missing steps caused AI agents to spend up to nearly 10x more tokens trying to complete a task, while incorrect values led them to confidently report incorrect results. Keeping your content accurate and complete is vital.
An agent may also need to know when to stop. If a task requires administrator approval, live credentials, or a potentially disruptive change, state that condition next to the relevant step. Make clear which instructions are safe in a test environment and which require human review.
Next, check that compatible tools can access the content. GitBook publishes Markdown versions of pages, llms.txt and llms-full.txt, and an MCP server for published docs. These give AI tools ways to retrieve your content. Accurate, clear instructions are still necessary for correct answers.
Test with three common user questions or tasks. Ask a connected agent to find the relevant page, explain the steps, and identify any prerequisites. Compare its answer with the source documentation. If the agent misses a condition, ask it why and investigate whether the page is ambiguous, the information is inaccessible, or retrieval failed.
Using GitBook: The published docs MCP server lets agents ask questions through AI Assistant (when enabled) and leave direct feedback about unclear or missing content. You can review AI Assistant questions, MCP searches, and agent feedback in GitBook, then use GitBook Agent to propose targeted fixes for review. Weโll cover how to act on these insights in section 7.
Verifone is already putting this into practice, using GitBookโs MCP integration to let partners connect their own AI agents to documentation, retrieve answers, and generate code for their integrations.
6. Give documentation updates a place in your existing workflow
Documentation becomes outdated when product changes happen without corresponding content changes. Assign responsibility for each documentation area and identify the events that should trigger an update.
Area | Responsible team | Review trigger |
API reference | Engineering | Endpoint or schema change |
Product guides | Product and docs | Feature or UI release |
Troubleshooting | Support and docs | Repeated support issue |
Access and security | Security or IT | Permission or policy change |
For example, when Northstar changes a permission setting, review the affected instructions, screenshots, and related troubleshooting pages. Before publishing, verify that someone can still follow the documented steps successfully.
Between releases, review high-impact pages such as onboarding, authentication, and frequently used workflows. Check that instructions still work, links resolve, examples are accurate, and screenshots match the product. Use each pageโs importance and usage to decide how often to review it.
Using GitBook: Contributors can propose edits through change requests for review. The Content gaps, Broken links, and Style guide features can surface issues; GitBook Agent can help prepare fixes. Review factual changes before merging, especially technical instructions. Some quality features require specific plans.
Our step-by-step documentation audit guide explains how to combine these tools into a repeatable process.
Tuum takes this further by generating its OpenAPI specifications from the codebase and automatically publishing updated API references through GitBook as part of its release process.
7. Use reader behavior to decide what to improve next
Once youโve published, watch where people and agents find answers and where they get stuck as they work through tasks.
Review signals such as searches with no results, unanswered AI Assistant questions, negative feedback, popular pages, and agent or MCP activity. Investigate whatโs behind each signal: frequent visits may mean a page is useful, and an agent may fail because it lacks permissions even when the instructions are sound.
For example, suppose human readers and agents repeatedly ask how to recover from an authentication error. The reference may list an error code without explaining its cause or recovery steps. Add a short troubleshooting procedure with a sample response, likely causes, and actions to try.
Then test the same question with a colleague and a connected agent. Can each find and use the new instructions? This is often faster to repeat with agents, but human task testing still reveals confusion agents might miss.
Using GitBook: Docs Insights shows human and agent traffic, MCP searches, and AI Assistant questions. Agents can also submit direct feedback about unclear or outdated information through published-docs tools. Use these signals to identify gaps, then ask GitBook Agent to suggest improvements for your team to review.
At Gantner, GitBookโs AI insights helped the documentation team identify a customer question that had also reached the product manager through support. The team found the content gap without waiting for someone to report it.
Set aside 30 minutes each month to review recurring problems and their consequences, then choose one or two improvements to test.
A checklist for improving your documentation
You donโt need to rebuild your entire docs site at once. Start with a critical user journey and work through these checks:
Identify the intended reader and their goal.
Make the starting page easy to find.
Write instructions with prerequisites and a verifiable outcome.
Test navigation, search, and agent access.
Assign an owner and a review trigger.
Use reader questions and feedback to choose your next improvement.
Keep revisiting important tasks as your product changes and new questions arise. Small improvements can make it easier for people and agents to get reliable answers.
How to structure documentation: Information architecture best practices
How to audit and improve your docs with GitBook Agent and MCP
Share
Read more
Tutorials & tips
Get the GitBook newsletter
Get the latest product news, useful resources and more in your inbox. 130k+ people read it every month.


26 Nov, 2026
How to use AGENTS.md to build better AI documentation workflows (with examples and template)

Steve Ashby
Content Lead


18 Nov, 2026
How to audit and improve your docs with GitBook Agent and MCP

Steve Ashby
Content Lead

11 Nov, 2026
What is WebMCP? How it works and why it matters for AI agents

Steve Ashby
Content Lead
Accurate docs. Better answers.
Your docs are already feeding AI. Are users getting the right answers or the wrong ones?
Accurate docs. Better answers.
Your docs are already feeding AI. Are users getting the right answers or the wrong ones?
Accurate docs. Better answers.
Your docs are already feeding AI. Are users getting the right answers or the wrong ones?
Create & Publish
Solutions
Resources
ยฉ 2026 Copyright GitBook INC.
440 N Barranca Ave #7171, Covina, CA 91723, USA. EIN: 320502699
Get an AI summary

The State of Docs Report 2026
State of Docs brings together insights from documentation experts from across the industry

Create & Publish
Solutions
Resources
ยฉ 2026 Copyright GitBook INC.
440 N Barranca Ave #7171, Covina, CA 91723, USA. EIN: 320502699
Get an AI summary
The State of Docs Report 2026
State of Docs brings together insights from documentation experts from across the industry

Create & Publish
Solutions
Resources
ยฉ 2026 Copyright GitBook INC.
440 N Barranca Ave #7171, Covina, CA 91723, USA. EIN: 320502699
Get an AI summary
The State of Docs Report 2026
State of Docs brings together insights from documentation experts from across the industry

