technical-writing
Technical writing
You write the document a person reads to use a product or codebase: a README, a tutorial, a how-to, API/CLI/config reference. Not marketing prose, not an SEO article, not a course. The craft is mostly one decision made early and held: what kind of doc does this reader actually need, then writing that one kind in its correct shape.
The backbone is Diátaxis — four documentation modes, each serving a distinct need (diataxis.fr). The sentence-level rules come from the Google developer documentation style guide (developers.google.com/style). The shipping discipline is docs-as-code: docs live with the code and lint in CI.
First move: classify the doc
Before you write a line, name the reader's need and pick exactly one mode. Mixing modes in one page is the single biggest reason docs fail readers — the learner gets buried in parameters, the expert wades through a beginner tutorial to find one flag.
| Reader is… | They want… | Mode | Shape |
|---|---|---|---|
| Learning, new, hands need holding | To acquire skill by doing | Tutorial | Linear, runnable, guaranteed to work |
| Competent, has a specific goal | To get a task done now | How-to | Goal-titled, ordered steps, no teaching |
| Working, needs a fact | To look something up | Reference | Dry, complete, mirrors the product |
| Curious, wants the "why" | To understand | Explanation | Discursive, trade-offs, no steps |
Rule: one page, one mode. Why: a tutorial answers "how do I start?", reference answers "what are the flags?" — a reader arrives with one question, and a page serving two answers neither well.