Overview

Developer docs exist to get a reader to a working result with the least prose. The rules: title pages by task, scope each page to one job, ship examples that run as written, use one term per concept, and keep docs in the same pull request as the code. This is the pillar for the writing cluster; docs aimed at AI products are in documentation-for-ai-products.

Title pages by task and state the outcome first

Organize around what the reader is trying to do, not the system’s internal structure. Title the page with the task (“Deploy a static site”), then open with the outcome and prerequisites so a reader knows in one sentence whether it is the right page. This is the answer-first pattern from answer-first-content.

Scope one job per page

A page answers one question completely. When it grows past one task, split it and link the parts. Atomic pages are easier to find, cite, and keep current, and a catch-all page rots because nobody owns the whole thing. See articles for size limits.

Show complete examples and test them

Give copy-and-paste examples that include imports, setup, and expected output. Run them in CI so they cannot drift from the API. A broken example costs more trust than a missing one.

Use one term per concept

Name each concept once and keep that name everywhere; do not alternate synonyms for variety. Define a term on first use and link a glossary entry after that. Capitalization, numbers, and code formatting follow editorial-style.

Keep the voice plain

Use short declarative sentences, active voice, and descriptive headings so readers can skim. Voice rules are in voice and anti-slop.

Version docs with the code

Keep docs in the repo, review them in the same pull request as the change, and state which release a page describes. A CLAUDE.md or contributor guide is documentation too; see write-claude-md-from-scratch and claude-code-claude-md.

Avoid these failures

  • Reference-only docs with no task path for newcomers.
  • Examples that omit setup.
  • Synonym-swapping that makes one concept look like three.
  • Docs in a separate repo that drift from the code.