Write good documentation

This section gives rules for docs that a reader can use with no help. A person or an AI agent can follow the rules step by step, and a tool can check most of them.

The rules come from the docs of ztcl and ztk, two projects that agents and people write together. Each page of the section uses text from those docs as its examples.

The pages

  1. The voice: the rules of a sentence, with the reason for each rule and a pair of examples.
  2. The page: the first sentence, the order of the sections, lists and tables, the four kinds of pages, and a template for each kind.
  3. Reference and examples: reference pages from data, examples that run in the build, and pictures that the build makes.
  4. Review a page: the checklist before a page goes out.
  5. Instructions for an agent: the files that an agent reads before it writes docs in a project.

Why these rules

A reader of docs wants to do a task. The reader reads fast, often in a second language, or is a program that gives the text to a model. Short sentences with one meaning help each of them. A rule that a tool can check stays true when many people and agents write the docs.

Next: The voice.