Writing Software Documentation a Teammate Can Use in Six Months

Most software documentation is written for the person who already understands the system. It lists flags, sketches an architecture, and assumes the reader can fill in the gaps. Six months later, that reader is often you, or a teammate who was not in the original conversation. I have started judging docs by a narrower test: can someone competent, who has never touched this repo, perform one real task without a hallway conversation?

A notebook beside a computer for drafting documentation
Image: peteoshea, CC BY 2.0

Document the task, not the inventory

A computer screen showing work being documented
Image: Lachlan Hardy, CC BY 2.0

A page titled “Overview of the billing service” is easy to write and easy to ignore. A page titled “How to replay a failed invoice without double-charging” is harder, and it is the one people open under pressure. I try to start with the job to be done, then add only the context required to do it safely. The inventory of modules can live further down, or in the code.

Examples should be copyable. A command with a placeholder that will destroy data if taken literally is worse than no example. I include the boring preconditions: which environment, which credentials, and what “done” looks like. That is the same instinct as testing a restore instead of admiring a backup log — proof beats description.

Write the why in one paragraph

People skip documentation that never explains why a constraint exists. “Do not run this migration twice” is an instruction. “The migration backfills a column and is not idempotent, so a second run will duplicate rows” is a reason a future teammate can respect. One short paragraph of why, placed next to the step, prevents a class of confident mistakes.

I also try to keep the tone plain. Clever asides age badly. The teammate in six months is not looking for a voice; they are looking for a safe path. If the system itself is unusual, say so early, then get back to the steps. This is close to how I think about choosing boring tools: the less the reader has to decode, the more likely the work will be done correctly.

Leave a trail that can be checked

Docs rot when nobody can tell whether they are still true. I put a date on the page and, where I can, a command whose output should match what the document claims. If the command fails, the doc is wrong, and that is useful information. A short “last verified” line is more honest than a wiki that pretends to be complete.

None of this requires a special platform. A Markdown file in the repository, next to the code it describes, is enough for most teams. The craft is in the restraint: fewer pages, written around real work, kept honest by use. The same restraint helps when you keep a home lab from turning into a second job — write down only what you would need to start again.