10x Documentation
Rules for producing clear, accurate, and maintainable documentation.
Style — Global Rules
These apply to all output: changelogs, READMEs, code comments, ADRs, API docs.
Never use:
- Em dashes (
—). Use a comma, a colon, or rewrite the sentence.
- Emojis anywhere.
- Numbered lists unless the order is strictly required (installation steps, migration sequences). Use plain bullet lists otherwise.
- Filler phrases: "successfully", "comprehensive", "seamlessly", "leverages", "robust", "cutting-edge".
- Passive voice when active is clearer.
- Hedge words without reason: "typically", "generally", "in most cases" — say what it does.
Always:
- Write in the same language as the surrounding text or comments.
- Use active voice and present tense.
- Keep sentences short. One idea per sentence.
- Say what something does before explaining how.
- Write for the reader's knowledge level, not to demonstrate thoroughness.
Changelog
Format: Keep a Changelog. Group under [Unreleased] by date.
Categories: Added, Changed, Fixed, Removed.
Good entry: Added rate limiting middleware to the API router
Bad entry: Successfully implemented a comprehensive rate limiting solution that seamlessly integrates with the existing API infrastructure
Code Comments
- Explain why, not what. The code shows what; the comment explains the reasoning.
- Document parameters, return values, and error conditions for all exported functions.
- Follow language conventions: GoDoc for Go, JSDoc for JavaScript, docstrings for Python.
- Include short, working code examples for non-obvious usage.
- Keep comments current when code changes. A stale comment is worse than no comment.
README and User Guides
Structure in this order:
- What the project does (one paragraph, no marketing language)
- Quick start (the minimum to get something running)
- Installation and setup
- Configuration options
- Component overview and how they interact
- Troubleshooting
- Links to detailed docs
Architecture Decision Records
File location: .claude/doc/ADR.md (single accumulated file, gitignored). Append new entries; do not create separate files.
Required sections: Status, Context, Decision, Consequences, Alternatives Considered.
Status values: Proposed | Accepted | Deprecated | Superseded by ADR-NNNN
Link related ADRs when the decision builds on or contradicts a previous one.
API Documentation
- Use OpenAPI/Swagger annotations on every handler tied to a route.
- Document all public interfaces and methods.
- For each endpoint: request shape, response shape, authentication requirements, possible error codes.
- Include a realistic example request and response, not a placeholder.
Special Annotations
When relevant, add a clearly marked note for:
- Version compatibility (which version this applies to)
- Deprecations (what replaces the deprecated feature)
- Security considerations
- Performance characteristics that affect usage decisions
1---2name: 10x-documentation3description: Rules for writing and updating documentation. Use for any non-trivial documentation task in README.md, markdown files, text files, and code comments.4---56# 10x Documentation78Rules for producing clear, accurate, and maintainable documentation.910## Style — Global Rules1112These apply to all output: changelogs, READMEs, code comments, ADRs, API docs.1314**Never use:**15- Em dashes (`—`). Use a comma, a colon, or rewrite the sentence.16- Emojis anywhere.17- Numbered lists unless the order is strictly required (installation steps, migration sequences). Use plain bullet lists otherwise.18- Filler phrases: "successfully", "comprehensive", "seamlessly", "leverages", "robust", "cutting-edge".19- Passive voice when active is clearer.20- Hedge words without reason: "typically", "generally", "in most cases" — say what it does.2122**Always:**23- Write in the same language as the surrounding text or comments.24- Use active voice and present tense.25- Keep sentences short. One idea per sentence.26- Say what something does before explaining how.27- Write for the reader's knowledge level, not to demonstrate thoroughness.2829---3031## Changelog3233Format: [Keep a Changelog](https://keepachangelog.com). Group under `[Unreleased]` by date.34Categories: `Added`, `Changed`, `Fixed`, `Removed`.3536Good entry: `Added rate limiting middleware to the API router`37Bad entry: `Successfully implemented a comprehensive rate limiting solution that seamlessly integrates with the existing API infrastructure`3839---4041## Code Comments4243- Explain *why*, not *what*. The code shows what; the comment explains the reasoning.44- Document parameters, return values, and error conditions for all exported functions.45- Follow language conventions: GoDoc for Go, JSDoc for JavaScript, docstrings for Python.46- Include short, working code examples for non-obvious usage.47- Keep comments current when code changes. A stale comment is worse than no comment.4849---5051## README and User Guides5253Structure in this order:54- What the project does (one paragraph, no marketing language)55- Quick start (the minimum to get something running)56- Installation and setup57- Configuration options58- Component overview and how they interact59- Troubleshooting60- Links to detailed docs6162---6364## Architecture Decision Records6566File location: `.claude/doc/ADR.md` (single accumulated file, gitignored). Append new entries; do not create separate files.6768Required sections: Status, Context, Decision, Consequences, Alternatives Considered.6970Status values: `Proposed` | `Accepted` | `Deprecated` | `Superseded by ADR-NNNN`7172Link related ADRs when the decision builds on or contradicts a previous one.7374---7576## API Documentation7778- Use OpenAPI/Swagger annotations on every handler tied to a route.79- Document all public interfaces and methods.80- For each endpoint: request shape, response shape, authentication requirements, possible error codes.81- Include a realistic example request and response, not a placeholder.8283---8485## Special Annotations8687When relevant, add a clearly marked note for:88- Version compatibility (which version this applies to)89- Deprecations (what replaces the deprecated feature)90- Security considerations91- Performance characteristics that affect usage decisions