AI and Human Documentation Style Guide
Purpose
This guide defines how to write documentation that people can use quickly and AI agents can retrieve and answer accurately. The instructions have been optimised for clarity and reliable retrieval, not minimum token count. This guide brings together good practice for documentation used by people and AI agents.
We also asked humans and LLMs for their views; their responses were very similar, with one small difference worth clarifying:
Optimising for minimum token count might mean replacing complete sentences with fragments, using unexplained abbreviations, removing examples and caveats, or leaving scope and assumptions implicit. Those choices can reduce prompt size, but they also make documents harder to scan, remove distinctions needed to apply guidance safely, and leave AI agents to infer missing context. That inference can lead to incomplete or incorrect answers, especially when a section is retrieved on its own. Compression is useful when context limits are strict or content is intended only for machine processing; for shared human-facing documentation, preserve the context needed to understand and act on the guidance accurately.
Non-Negotiable Rules
- Use a standard template or an approved variant for the document type.
- State the intended audience, scope, assumptions, and relevant product versions or environments.
- Give every document an owner, last-reviewed date, and next review date.
- Give sections enough local context to make sense on their own; link to the source of truth instead of duplicating its content.
- Use one canonical term per concept and list common aliases where they help readers find the document.
- Put the short answer before deep detail.
Writing Standards
- Use plain language and active voice.
- Keep sentences short and direct.
- Prefer numbered steps for procedures.
- Include expected result after each critical step.
- Define acronyms on first use.
- Use examples with realistic values.
- Label code fences with the language, explain placeholders, and show expected output where useful.
- Warn before destructive or irreversible actions and provide recovery or rollback steps when applicable.
- Use must, should, and may consistently to distinguish requirements from recommendations and options.
Structure Standards
- H1 is one topic only.
- Use H2 for major answer units.
- Keep each section focused on one question.
- Make sections coherent retrieval units with enough context; do not shorten or split them just to meet an arbitrary size.
- Include an FAQ when it answers recurring questions not already answered clearly elsewhere.
- Link related sections and documents, and make precedence clear when guidance conflicts.
AI Retrieval Standards
- Add metadata at the top of each document.
- Use stable document IDs and section titles.
- Keep high-value answers near the top.
- Include canonical terms and known alias terms.
- Avoid duplicated content across multiple sources.
- Mark deprecated content clearly and link replacement.
- Identify authoritative sources for important claims; include links and dates or versions when they affect accuracy.
- Make citations resolve to the relevant document and section, not just a generic homepage.
- If the documentation does not support an answer, an AI agent should say so or direct the reader to the owner rather than infer a policy or fact.
Accessibility Standards
- Use meaningful heading order.
- Use descriptive link text.
- Include alt text for images and diagrams.
- Write table headers that are explicit and unambiguous.
- Avoid colour-only meaning in diagrams.
- Keep language clear for non-native speakers.
Content Patterns
How-To Pattern
- Quick answer
- Scope, supported versions, and environments
- Prerequisites
- Procedure
- Validation
- Troubleshooting
- Recovery or rollback, when applicable
Policy Pattern
- What the policy is
- Who it applies to
- Effective date and authoritative owner
- Required actions
- Exceptions
- Escalation path
Troubleshooting Pattern
- Symptom
- Likely causes
- Step-by-step resolution
- Verification
- Escalation
Language Do and Do Not
Do:
- Use one clear verb per instruction.
- Use role names and system names consistently.
- Use concrete nouns and measurable outcomes.
- Label requirements, recommendations, and optional actions consistently.
Do not:
- Use vague references like above or below.
- Use unexplained abbreviations.
- Use long narrative paragraphs where lists work better.
Quality Gate Checklist
- Template completed
- Metadata complete
- Audience, scope, assumptions, versions, and environment are clear
- Owner assigned
- Last-reviewed and next-review dates set
- Important claims have authoritative sources where appropriate
- Procedures and code examples have been checked; risky actions include recovery guidance
- Links validated
- Accessibility checks passed
- Duplicate content check passed
- Deprecation markers added where needed
Review Cadence
- Critical operational docs: every 90 days.
- Standard docs: every 180 days.
- Review sooner after a relevant product, process, policy, or environment change.
- Archive or deprecate stale content immediately and link to its replacement.
Minimum Acceptance Criteria
A document is publish-ready only if:
- A new team member can follow it without verbal help.
- An AI agent can answer common questions with citations to the relevant source and section, and can recognise when the answer is not documented.
- The source of truth is unambiguous.