Identify the audience. Determine who will read this document: their role (developer, operator, manager), their experience level (beginner, intermediate, expert), and their goal (learn a concept, complete a task, troubleshoot a problem). This determines vocabulary, detail level, and structure.
Audit existing documentation. Before writing new content, check what already exists. Is there a related guide that should be updated instead of duplicated? Are there existing conventions for headings, code examples, and terminology? What questions does the support team receive that documentation should answer?
Outline the structure. Create a heading outline before writing body content. Each heading should represent a single topic or step. The outline should follow a logical progression: overview first, then prerequisites, then step-by-step instructions, then reference details, then troubleshooting.
Draft the content. Write the first draft focused on completeness, not polish. Include every piece of information the reader needs. Use placeholder marks for code examples you need to test. Write in the shortest sentences that accurately convey the meaning.
Add code examples. Write code examples that are complete, runnable, and annotated. Every example should include necessary imports, setup, and context. Annotate non-obvious lines with inline comments. Test every example to verify it produces the documented output.
Verify accuracy. Follow your own documentation from start to finish on a clean environment. Every command should work. Every screenshot should match the current UI. Every API response should match the documented format. Fix any step that does not produce the expected result.
Optimize for scannability. Restructure long paragraphs into bullet lists. Add tables for comparison data. Use bold for key terms on first introduction. Add a table of contents for documents longer than 3 screens. Ensure every section has a heading that tells the reader what they will learn.
Review for consistency. Check terminology: is the same concept called the same thing everywhere? Check formatting: are code blocks, callouts, and lists styled consistently? Check voice: is the entire document in active voice and present tense?
Add navigation aids. Include cross-references to related documents. Add "Next steps" links at the end of guides. Create a glossary for project-specific terms. Ensure the document is reachable from the main documentation index.
Plan maintenance. Note the document owner, review schedule, and version of the software it documents. Add a "last verified" date that is updated when someone confirms the content is still accurate.