Documentation Best Practices Cheat Sheet

Technical documentation guide — README structure, API docs, tutorial vs how-to vs reference vs explanation, doc maintenance, and documentation-driven development.

Last Updated: May 1, 2025

Diátaxis Framework

ModePurposeReader AsksForm
TutorialLearning-oriented'How do I get started?'Step-by-step lesson
How-To GuideTask-oriented'How do I solve X?'Steps to complete a task
ReferenceInformation-oriented'What does X do?'Technical descriptions, API docs
ExplanationUnderstanding-oriented'Why is it designed this way?'Background, context, decisions

README Structure

ItemDescription
1. Title + BadgeProject name + build/pypi/npm/coverage badges — credibility signals
2. One-LinerOne sentence that describes what it does and why it exists
3. Screenshot/DemoShow, don't tell. GIF or image of working product
4. Quick Start5-minute setup: clone → install → run → see result. Copy-paste commands.
5. FeaturesBullet list of key capabilities. Not exhaustive, highlights.
6. Documentation LinkLink to full docs site. README is a gateway, not the whole manual.
7. ContributingHow to set up dev environment, run tests, submit PRs

API Documentation

ItemDescription
OverviewWhat the API does, authentication method, base URL, rate limits
EndpointsMethod, path, description, parameters (required/optional/types), request/response examples
AuthenticationAPI keys, OAuth flow, how to get credentials, token format
Error CodesList of error codes with descriptions and troubleshooting guidance
Code ExamplescURL, Python, JavaScript, Go — at minimum. Copy-paste ready.
SDK DocumentationIf SDK exists: installation, instantiation, key methods with examples

Maintenance

ItemDescription
Doc-as-CodeDocs in same repo as code. PR reviews include doc updates. Docs versioned with releases.
'Docs or It Didn't Happen'Every feature requires doc PR before merge. Part of definition of done.
Regular AuditsQuarterly: walk through docs as a new user. Fix broken links, outdated screenshots, stale info.
Doc AnalyticsTrack page views, search queries, bounce rate. Fix pages with high bounce / low time on page.
Pro Tip: The Diátaxis framework: separate documentation into 4 modes — Tutorials (learning), How-To Guides (tasks), Reference (technical), Explanation (understanding). Each has a distinct reader and purpose.