Documentation Generation Skill
When creating or improving documentation, follow these guidelines:
When to Activate
- •User requests
/docsor/documentation - •Creating README, CHANGELOG, CONTRIBUTING files
- •Writing architecture documentation
- •API documentation requests
- •Any technical documentation needs
Core Principles
- •Treat documentation as code - Version control, review, CI/CD
- •Follow Diataxis framework - Tutorials, How-tos, Reference, Explanation
- •Write for humans - Clear, concise, actionable
- •Include diagrams - ASCII for CLI/Git, Mermaid for web
- •Use standard formats - CommonMark/GFM Markdown
File Naming Conventions
| Location | Convention | Example |
|---|---|---|
| Root level | UPPERCASE | README.md, CHANGELOG.md |
| docs/ folder | lowercase kebab-case | getting-started.md |
| ADRs | numbered | 0001-use-typescript.md |
ASCII Diagrams
- •Use box-drawing:
┌ ─ ┐ │ └ ┘ ├ ┤ ┬ ┴ ┼ - •Heavy boxes:
┏ ━ ┓ ┃ ┗ ┛ ┣ ┫ ┳ ┻ ╋ - •Double boxes:
╔ ═ ╗ ║ ╚ ╝ ╠ ╣ ╦ ╩ ╬ - •Arrows:
→ ← ↑ ↓ ↔ ▶ ◀ ▲ ▼ ──▶ ◀── - •Max width: 80-85 characters for terminal compatibility
- •Always include legends for complex diagrams
Diagram Types
- •Flowcharts: Decision diamonds, process boxes
- •Architecture: Three-tier, microservices layouts
- •Sequence: Vertical lifelines with arrows
- •ERD: Tables with PK/FK notation
- •State machines: States with transitions
Document Structure
- •Title with ASCII banner (for major docs)
- •Table of Contents
- •Visual diagram first (architecture overview)
- •Detailed explanation after
- •Code examples (copy-paste friendly)
- •References/links at end
Quality Checklist
- • Can a new developer get started in under 10 minutes?
- • Is the documentation structure intuitive?
- • Are code examples copy-paste friendly?
- • Is the documentation up to date with the code?
- • Are diagrams version-controlled as code?
References
See ASCII_DIAGRAMS.md for comprehensive diagram examples.
See TEMPLATES.md for document templates.
Industry Standards Followed
- •Google Developer Documentation Style Guide
- •Microsoft Writing Style Guide
- •Diataxis Documentation Framework
- •Keep a Changelog (v1.1.0)
- •Semantic Versioning (v2.0.0)
- •ADR (Architecture Decision Records)