Technical Documentation Guide
Comprehensive guide for writing, researching, deploying, and measuring technical documentation quality.
1. Documentation Writing Principles
Pre-Writing Checklist
Procedure Step Principles
| Principle |
Description |
| One action per step |
Include only a single action in each step |
| State system prerequisites |
Specify login requirements, execution environment, etc. |
| Minimize context switching |
Reduce transitions between document and UI/CLI |
| Provide completion verification |
State how to verify successful completion |
Document Structuring (F-Shaped Pattern)
Readers scan content in an 'F' pattern:
- Scan horizontally across the top two lines
- Scan vertically downward looking for headings
- Do not read every word on the page
Design documents accordingly:
- Write for scanning — help readers find information quickly
- Present most important information first
- Use consistent, predictable structure
Sample Code Guidelines
Always explain when writing sample code:
- Required library installations
- Required environment variables
- Language/version constraints
Code explanation must cover:
| Element |
Description |
| What it does |
Describe the code's functionality |
| Why it does it |
Provide context and background |
| Notable aspects |
Unusual naming conventions, unique methods, etc. |
Editing Checklist
Technical Accuracy
Completeness
Structure
Clarity and Conciseness
Writing Process
1. Plan: Define audience, purpose, content patterns
2. Draft: Outline → Write body
3. Edit: Technical Accuracy → Completeness → Structure → Clarity
4. Review: Peer review → Friction log testing
5. Publish: Set timeline → Release
2. User Research Methods
User Story Format
As a [user type], I want to [action] so that I can [goal].
- Keep user needs in mind during planning, writing, editing, publishing, and maintenance
- Select key areas and write multiple user stories for each
Friction Log
A friction log systematically records the friction (confusion, frustration, obstacles) users experience.
How to Write
- Record basic information: Scenario, environment info (OS, browser, SDK version), test date
- Record step-by-step experience: For each step, record feeling, time taken, issues found, and suggestions
- Self-check: After each step, evaluate intuitiveness, confidence, uncertainty, navigation, and frustration
Self-Check Questions
| Question |
Recording Points |
| Did it seem easy? |
Intuitiveness, clarity |
| Did I feel confident I was on the right path? |
Direction, trust |
| Was I uncertain? |
Ambiguity, uncertainty |
| Did I get lost? |
Navigation, structure issues |
| Was I frustrated? |
Usability issues, bugs |
User Personas
| Element |
Description |
| User type |
Developer, data scientist, DevOps engineer, etc. |
| Technical level |
Beginner, intermediate, advanced |
| Primary goals |
What they want to achieve |
| Pain points |
Difficulties or problems they face |
| Preferred formats |
Tutorials, API reference, sample code, etc. |
User Journey Map Components
- Stages: Major phases users go through
- Touchpoints: Points of contact at each stage
- Actions: Activities users perform
- Thoughts/Feelings: User experience at each stage
- Opportunities: Areas for improvement
Survey Design Principles
| Characteristic |
Description |
| One thing per question |
Avoid compound questions |
| Closed questions |
Limit possible answers (multiple choice, checkboxes) |
| Include optional questions |
Do not force answers to all questions |
| Neutrality |
Avoid leading questions; use unbiased language |
Tactics to improve response rate:
- Be clear about who you are and the research purpose
- State data collection purpose explicitly
- Write easy-to-answer, concise questions
- Avoid excessive demands on respondents
3. Documentation Deployment Process
Timeline Coordination
- Integrate documentation timeline into product release timeline
- Set timelines for all documentation releases including minor releases
- Developer documentation must be released alongside the software it describes
Timeline Template
| Stage |
Task |
Owner |
Deadline |
| T-14 |
Finalize documentation requirements |
PM |
- |
| T-10 |
Complete draft |
Tech Writer |
- |
| T-7 |
Complete peer review |
Dev Team |
- |
| T-5 |
Revisions and final draft |
Tech Writer |
- |
| T-3 |
Final approval |
Tech Lead |
- |
| T-0 |
Documentation deploy |
DevOps |
- |
Platform Selection Criteria
| Criterion |
Question |
| User needs |
What format do users prefer? |
| Search capability |
Is effective search available? |
| Version management |
Can multiple doc versions be managed? |
| Collaboration |
Can team members easily contribute? |
| Integration |
Does it integrate with existing dev workflows? |
| Cost |
Can it operate within budget? |
API Reference Automation Checklist
Rollback Procedure
- Identify problem: User report or internal discovery
- Assess impact: Number of affected users and severity
- Decide: Determine rollback necessity
- Execute: Restore previous version
- Notify: Apologize and inform users
- Rework: Fix issue and redeploy
Post-Deployment Monitoring
| Metric |
Measurement Method |
Target |
| Pageviews |
Analytics tools |
Understand traffic trends |
| Bounce rate |
Analytics tools |
< 50% |
| Search queries |
Internal search logs |
Understand user needs |
| 404 errors |
Log analysis |
0 occurrences |
| Doc sentiment |
Survey tools |
> 80% positive |
Documentation Maintenance Checklist
Product Updates
Regular Reviews
4. Quality Measurement and Improvement
Sentiment Measurement
Place a simple survey tool on pages:
Was this page helpful? [Yes] [No]
- Collect large numbers of responses for useful data
- For low-rated pages: analyze causes, apply improvements, measure impact
- For high-rated pages: analyze success factors, extract patterns, replicate success
Feedback Classification
Classify collected feedback using three questions:
| Question |
Description |
| 1. Is this issue valid? |
Confirm the problem actually exists |
| 2. Can this issue be resolved? |
Assess technical/resource feasibility |
| 3. How important is this issue? |
Determine user impact and priority |
Issue Priority System (P0-P3)
| Level |
Name |
Description |
Response Target |
| P0 |
Critical |
Core content wrong, security info missing, code causing fatal errors |
Within 24 hours |
| P1 |
High |
Frequently used feature docs incomplete, recurring user-reported issues |
Current sprint |
| P2 |
Medium |
Less-used feature improvement, readability enhancement |
Next sprint |
| P3 |
Low |
Minor typos, low-traffic page improvements |
Backlog |
Quality Metrics Dashboard
| Metric |
Formula |
Target |
| Sentiment Score |
(Yes responses / Total responses) x 100 |
> 80% |
| Response Rate |
(Responses / Pageviews) x 100 |
> 5% |
| Feedback Resolution Rate |
(Resolved feedback / Total feedback) x 100 |
> 90% |
| P0 Resolution Time |
Average time to resolve P0 issues |
< 24 hours |
PDCA Improvement Cycle
- Plan: Set goals, create improvement plan
- Do: Apply improvements
- Check: Review sentiment scores, feedback
- Act: Further improvements, standardization
5. Deployment Strategies
Immutable Infrastructure
| Management Style |
Characteristics |
Failure Response |
| Manual (mutable) |
Individually configure and manage servers |
Manual recovery, root cause analysis needed |
| Automated (immutable) |
Code-based infrastructure, servers are replaceable |
Auto-replacement, fast recovery |
Deployment Phase Structure
Preparation → Application → Cleanup
- Preparation: Upload new content, prepare DB schema changes (must not affect current version)
- Application: Version switch, traffic switch, health check
- Cleanup: Clean up old resources, collect logs
Rolling Deployment Procedure
- Set group to stop accepting new requests
- Wait for in-progress work to complete
- Apply code and configuration updates
- Verify all instances are healthy
- Re-enable group for new requests
- Repeat for next group
Canary Deployment Monitoring
| Item |
Check |
| Error logs |
Any increase? |
| Latency |
Any increase? |
| RAM usage |
Any increase? |
| Response time |
SLA compliance? |
Health Check Requirements
- Implement non-blocking health check endpoint for all applications
- Return meaningful status for downstream dependencies
- Include version and uptime information for debugging
- Use state changes to reject new requests while completing in-progress work
Further Reading
- Docs for Developers (Jared Bhatti et al.)
- Docs Like Code (Anne Gentle)
- Release It! Second Edition (Michael Nygard)
- Google Technical Writing Course
1---2name: technical-documentation3description: Technical documentation guide covering writing principles, user research, deployment process, and quality measurement. Use when writing or reviewing technical documentation.4license: MIT5---67# Technical Documentation Guide89Comprehensive guide for writing, researching, deploying, and measuring technical documentation quality.1011## 1. Documentation Writing Principles1213### Pre-Writing Checklist1415- [ ] Is there additional context or setup info the reader needs?16- [ ] Are there skipped or incompletely explained steps?17- [ ] Do the steps flow logically when read in sequence?1819### Procedure Step Principles2021| Principle | Description |22| --------- | ----------- |23| **One action per step** | Include only a single action in each step |24| **State system prerequisites** | Specify login requirements, execution environment, etc. |25| **Minimize context switching** | Reduce transitions between document and UI/CLI |26| **Provide completion verification** | State how to verify successful completion |2728### Document Structuring (F-Shaped Pattern)2930Readers scan content in an 'F' pattern:31321. Scan horizontally across the top two lines332. Scan vertically downward looking for headings343. Do not read every word on the page3536Design documents accordingly:3738- Write for scanning — help readers find information quickly39- Present most important information first40- Use consistent, predictable structure4142### Sample Code Guidelines4344Always explain when writing sample code:4546- Required library installations47- Required environment variables48- Language/version constraints4950Code explanation must cover:5152| Element | Description |53| ------- | ----------- |54| **What it does** | Describe the code's functionality |55| **Why it does it** | Provide context and background |56| **Notable aspects** | Unusual naming conventions, unique methods, etc. |5758### Editing Checklist5960#### Technical Accuracy6162- [ ] Does the code/command actually work?63- [ ] Are version, environment, platform differences specified?64- [ ] Are warning notices (outage risk, data loss, etc.) included?65- [ ] Is terminology used consistently?6667#### Completeness6869- [ ] Does the content include all information users need to succeed?70- [ ] Are all `[TODO]` or `[TBD]` items resolved?71- [ ] Are prerequisites, required permissions, dependencies stated?72- [ ] Are next steps/additional resources provided?7374#### Structure7576- [ ] Does the title clearly express the purpose?77- [ ] Are section headings arranged logically and consistently?78- [ ] Is the document's purpose explained in the first paragraph?79- [ ] Does the document follow the template structure (if applicable)?8081#### Clarity and Conciseness8283- [ ] Do all links work?84- [ ] Have you run spell and grammar check?85- [ ] Are graphics and images clear and useful?86- [ ] Has unnecessary content been removed?8788### Writing Process8990```text911. Plan: Define audience, purpose, content patterns922. Draft: Outline → Write body933. Edit: Technical Accuracy → Completeness → Structure → Clarity944. Review: Peer review → Friction log testing955. Publish: Set timeline → Release96```9798---99100## 2. User Research Methods101102### User Story Format103104```text105As a [user type], I want to [action] so that I can [goal].106```107108- Keep user needs in mind during planning, writing, editing, publishing, and maintenance109- Select key areas and write multiple user stories for each110111### Friction Log112113A friction log systematically records the friction (confusion, frustration, obstacles) users experience.114115#### How to Write1161171. **Record basic information**: Scenario, environment info (OS, browser, SDK version), test date1182. **Record step-by-step experience**: For each step, record feeling, time taken, issues found, and suggestions1193. **Self-check**: After each step, evaluate intuitiveness, confidence, uncertainty, navigation, and frustration120121#### Self-Check Questions122123| Question | Recording Points |124| -------- | ---------------- |125| Did it seem easy? | Intuitiveness, clarity |126| Did I feel confident I was on the right path? | Direction, trust |127| Was I uncertain? | Ambiguity, uncertainty |128| Did I get lost? | Navigation, structure issues |129| Was I frustrated? | Usability issues, bugs |130131### User Personas132133| Element | Description |134| ------- | ----------- |135| **User type** | Developer, data scientist, DevOps engineer, etc. |136| **Technical level** | Beginner, intermediate, advanced |137| **Primary goals** | What they want to achieve |138| **Pain points** | Difficulties or problems they face |139| **Preferred formats** | Tutorials, API reference, sample code, etc. |140141### User Journey Map Components1421431. **Stages**: Major phases users go through1442. **Touchpoints**: Points of contact at each stage1453. **Actions**: Activities users perform1464. **Thoughts/Feelings**: User experience at each stage1475. **Opportunities**: Areas for improvement148149### Survey Design Principles150151| Characteristic | Description |152| -------------- | ----------- |153| **One thing per question** | Avoid compound questions |154| **Closed questions** | Limit possible answers (multiple choice, checkboxes) |155| **Include optional questions** | Do not force answers to all questions |156| **Neutrality** | Avoid leading questions; use unbiased language |157158Tactics to improve response rate:159160- Be clear about who you are and the research purpose161- State data collection purpose explicitly162- Write easy-to-answer, concise questions163- Avoid excessive demands on respondents164165---166167## 3. Documentation Deployment Process168169### Timeline Coordination170171- Integrate documentation timeline into product release timeline172- Set timelines for all documentation releases including minor releases173- Developer documentation must be released alongside the software it describes174175#### Timeline Template176177| Stage | Task | Owner | Deadline |178| ----- | ---- | ----- | -------- |179| T-14 | Finalize documentation requirements | PM | - |180| T-10 | Complete draft | Tech Writer | - |181| T-7 | Complete peer review | Dev Team | - |182| T-5 | Revisions and final draft | Tech Writer | - |183| T-3 | Final approval | Tech Lead | - |184| T-0 | Documentation deploy | DevOps | - |185186### Platform Selection Criteria187188| Criterion | Question |189| --------- | -------- |190| **User needs** | What format do users prefer? |191| **Search capability** | Is effective search available? |192| **Version management** | Can multiple doc versions be managed? |193| **Collaboration** | Can team members easily contribute? |194| **Integration** | Does it integrate with existing dev workflows? |195| **Cost** | Can it operate within budget? |196197### API Reference Automation Checklist198199- [ ] Is the API spec file included in the code repository?200- [ ] Is doc generation automated in CI/CD pipeline?201- [ ] Are generated docs automatically deployed?202- [ ] Are changes version-controlled?203204### Rollback Procedure2052061. **Identify problem**: User report or internal discovery2072. **Assess impact**: Number of affected users and severity2083. **Decide**: Determine rollback necessity2094. **Execute**: Restore previous version2105. **Notify**: Apologize and inform users2116. **Rework**: Fix issue and redeploy212213### Post-Deployment Monitoring214215| Metric | Measurement Method | Target |216| ------ | ------------------ | ------ |217| **Pageviews** | Analytics tools | Understand traffic trends |218| **Bounce rate** | Analytics tools | < 50% |219| **Search queries** | Internal search logs | Understand user needs |220| **404 errors** | Log analysis | 0 occurrences |221| **Doc sentiment** | Survey tools | > 80% positive |222223### Documentation Maintenance Checklist224225#### Product Updates226227- [ ] Add documentation for new features228- [ ] Update documentation for changed features229- [ ] Remove or mark documentation for deprecated features230- [ ] Update screenshots/diagrams231232#### Regular Reviews233234- [ ] Validate links235- [ ] Verify code examples work236- [ ] Update version information237- [ ] Incorporate user feedback238239---240241## 4. Quality Measurement and Improvement242243### Sentiment Measurement244245Place a simple survey tool on pages:246247```text248Was this page helpful? [Yes] [No]249```250251- Collect large numbers of responses for useful data252- For low-rated pages: analyze causes, apply improvements, measure impact253- For high-rated pages: analyze success factors, extract patterns, replicate success254255### Feedback Classification256257Classify collected feedback using three questions:258259| Question | Description |260| -------- | ----------- |261| **1. Is this issue valid?** | Confirm the problem actually exists |262| **2. Can this issue be resolved?** | Assess technical/resource feasibility |263| **3. How important is this issue?** | Determine user impact and priority |264265### Issue Priority System (P0-P3)266267| Level | Name | Description | Response Target |268| ----- | ---- | ----------- | --------------- |269| **P0** | Critical | Core content wrong, security info missing, code causing fatal errors | Within 24 hours |270| **P1** | High | Frequently used feature docs incomplete, recurring user-reported issues | Current sprint |271| **P2** | Medium | Less-used feature improvement, readability enhancement | Next sprint |272| **P3** | Low | Minor typos, low-traffic page improvements | Backlog |273274### Quality Metrics Dashboard275276| Metric | Formula | Target |277| ------ | ------- | ------ |278| **Sentiment Score** | (Yes responses / Total responses) x 100 | > 80% |279| **Response Rate** | (Responses / Pageviews) x 100 | > 5% |280| **Feedback Resolution Rate** | (Resolved feedback / Total feedback) x 100 | > 90% |281| **P0 Resolution Time** | Average time to resolve P0 issues | < 24 hours |282283### PDCA Improvement Cycle2842851. **Plan**: Set goals, create improvement plan2862. **Do**: Apply improvements2873. **Check**: Review sentiment scores, feedback2884. **Act**: Further improvements, standardization289290---291292## 5. Deployment Strategies293294### Immutable Infrastructure295296| Management Style | Characteristics | Failure Response |297| ---------------- | --------------- | ---------------- |298| **Manual (mutable)** | Individually configure and manage servers | Manual recovery, root cause analysis needed |299| **Automated (immutable)** | Code-based infrastructure, servers are replaceable | Auto-replacement, fast recovery |300301### Deployment Phase Structure302303```text304Preparation → Application → Cleanup305```306307- **Preparation**: Upload new content, prepare DB schema changes (must not affect current version)308- **Application**: Version switch, traffic switch, health check309- **Cleanup**: Clean up old resources, collect logs310311### Rolling Deployment Procedure3123131. Set group to stop accepting new requests3142. Wait for in-progress work to complete3153. Apply code and configuration updates3164. Verify all instances are healthy3175. Re-enable group for new requests3186. Repeat for next group319320### Canary Deployment Monitoring321322| Item | Check |323| ---- | ----- |324| Error logs | Any increase? |325| Latency | Any increase? |326| RAM usage | Any increase? |327| Response time | SLA compliance? |328329### Health Check Requirements330331- Implement non-blocking health check endpoint for all applications332- Return meaningful status for downstream dependencies333- Include version and uptime information for debugging334- Use state changes to reject new requests while completing in-progress work335336---337338## Further Reading339340- Docs for Developers (Jared Bhatti et al.)341- Docs Like Code (Anne Gentle)342- Release It! Second Edition (Michael Nygard)343- Google Technical Writing Course