Documentation standards and conventions based on Diataxis framework. Use this skill to learn project documentation conventions before creating, reviewing, or updating docs.
This skill provides the structure, policies, and quality standards for all project documentation. Any human or agent creating documentation must follow these standards.
Based on ISO/IEC/IEEE 26514:2022 and the Diataxis Framework.
Before applying these standards, check for project-specific customizations:
.claude/docs-management.md (project-specific, shared with team) - if it exists.claude/docs-management.local.md (user-specific, personal preferences) - if it existsApply standards in order: local overrides > project overrides > plugin defaults
Certain files belong in the project root for maximum visibility and tooling support:
| File | Location | Purpose |
|---|---|---|
README.md | / (root) | Project overview - GitHub/GitLab displays on homepage |
CHANGELOG.md | / (root) | Version history - tools like semantic-release expect this |
CONTRIBUTING.md | / (root) | Contribution guide - GitHub links in Community tab |
LICENSE | / (root) | License file - package managers detect automatically |
CODE_OF_CONDUCT.md | / (root) | Community standards - GitHub surfaces in health score |
SECURITY.md | / (root) | Security policy - GitHub displays security information |
standard-version and semantic-release expect CHANGELOG.md at rootLICENSE locationAll other documentation lives in /docs/:
/ # Project root
├── README.md # Project overview (GitHub displays)
├── CHANGELOG.md # Version history (single source of truth)
├── CONTRIBUTING.md # How to contribute
├── LICENSE # License file
│
└── docs/ # All documentation
├── README.md # Documentation index & navigation
│
├── getting-started/ # TUTORIALS (Learning-oriented)
│ ├── QUICK-START.md # First steps walkthrough
│ ├── SETUP-GUIDE.md # Environment setup
│ └── PREREQUISITES.md # Required knowledge/tools
│
├── guides/ # HOW-TO GUIDES (Task-oriented)
│ ├── user/ # End-user guides
│ └── developer/ # Developer guides
│ ├── CONTRIBUTING.md # Code contribution guide
│ ├── TESTING.md # How to run tests
│ └── DEPLOYMENT.md # Deployment procedures
│
├── reference/ # REFERENCE (Information-oriented)
│ ├── api/ # API documentation
│ │ ├── ENDPOINTS.md # Endpoint reference
│ │ ├── AUTHENTICATION.md # Auth methods
│ │ └── ERROR-CODES.md # Error reference
│ ├── CONFIGURATION.md # Config options reference
│ └── CLI-COMMANDS.md # Command line reference
│
├── architecture/ # EXPLANATION (Understanding-oriented)
│ ├── OVERVIEW.md # System architecture
│ ├── DESIGN-DECISIONS.md # ADRs (Architecture Decision Records)
│ ├── DATA-FLOW.md # How data moves through system
│ └── SECURITY.md # Security model explanation
│
├── technical/ # Technical specifications
│ ├── API-SPECIFICATION.md # Complete API spec with schemas
│ ├── DATA-MODELS.md # Data structures and relationships
│ └── DATABASE-SCHEMA.md # Database design
│
├── research/ # Discovery & research findings
│ ├── README.md # Research index
│ └── findings/ # Investigation results
│
└── assets/ # Supporting media
├── images/ # Screenshots, photos
└── diagrams/ # Architecture diagrams
Documentation is organized into four types based on user needs:
| Type | Purpose | User Need | Characteristics |
|---|---|---|---|
| Tutorials | Learning | "I want to learn" | Step-by-step, beginner-focused, works every time |
| How-to Guides | Goals | "I want to accomplish X" | Task-focused, assumes knowledge, practical |
| Reference | Information | "I need to look up Y" | Factual, complete, consistent structure |
| Explanation | Understanding | "I want to understand why" | Conceptual, discusses trade-offs, opinionated |
| Diataxis Type | Directory | Examples |
|---|---|---|
| Tutorials | getting-started/ | Quick-start, setup guides |
| How-to Guides | guides/ | Contributing, testing, deployment |
| Reference | reference/, technical/ | API docs, config options, data models |
| Explanation | architecture/ | Design decisions, data flow, security model |
| Document Type | Location | Example |
|---|---|---|
| Project overview | /README.md (root) | Main project description |
| Version history | /CHANGELOG.md (root) | Release notes |
| API specifications | docs/technical/ | API-SPECIFICATION.md |
| Data models | docs/technical/ | DATA-MODELS.md |
| Architecture explanations | docs/architecture/ | DESIGN-DECISIONS.md |
| Research findings | docs/research/ | Investigation results |
| Setup/getting started | docs/getting-started/ | QUICK-START.md |
| User guides | docs/guides/user/ | Feature guides |
| Developer guides | docs/guides/developer/ | Contributing, testing |
.claude/ directory/docs/ structure (except root-level files)docs/README.md index when adding new documents| Document | Priority | Location |
|---|---|---|
| Project README | Critical | /README.md |
| Quick start guide | Critical | docs/getting-started/QUICK-START.md |
| API reference (if applicable) | Critical | docs/reference/api/ |
| Architecture overview | High | docs/architecture/OVERVIEW.md |
| Contributing guide | High | /CONTRIBUTING.md or docs/guides/developer/ |
| CHANGELOG | High | /CHANGELOG.md |
| Convention | Example | Notes |
|---|---|---|
| UPPERCASE with hyphens | API-REFERENCE.md | Standard for docs/ |
| Descriptive names | AUTHENTICATION-FLOW.md | Not AUTH.md |
| Include version where relevant | MIGRATION-V2-TO-V3.md | For upgrade guides |
| Match directory patterns | See existing files | Consistency over preference |
| Convention | Example | Notes |
|---|---|---|
| lowercase with hyphens | getting-started/ | Never camelCase or PascalCase |
| Descriptive purpose | architecture/ | Not arch/ |
| Group by purpose | reference/api/ | Not by file format |
| Convention | Example | Notes |
|---|---|---|
| Sentence case | "Getting started" | Not "Getting Started" |
| Be specific | "Configure authentication" | Not "Configuration" |
| Action-oriented for guides | "Install dependencies" | Imperative mood |
| Element | Format | Example |
|---|---|---|
| Code inline | Backticks | npm install |
| Code blocks | Triple backticks + language | ```bash |
| File paths | Backticks | docs/README.md |
| Commands | Code blocks | $ npm run build |
| Key terms | Bold first use | Diataxis framework |
| Emphasis | Italics | not recommended |
| Warnings | > Warning: | Blockquote with bold prefix |
All technical documentation must be architecture-agnostic - it should work regardless of whether the implementation is a PWA, mobile app, desktop application, CLI, or any other platform.
| Topic | Example |
|---|---|
| What data is needed | "Player stats require: batting_average, on_base_percentage" |
| API mechanics | "Endpoint returns paginated results with has_next boolean" |
| Data dependencies | "Must fetch team_id before requesting roster" |
| Authentication requirements | "Requires API key in Authorization header" |
| Caching requirements | "Team data should be cached for 5 minutes" |
| Error handling requirements | "401 errors require re-authentication" |
| Business logic | "Season stats aggregate all games for selected year" |
| Topic | Why Not |
|---|---|
| UI component structure | Architecture-specific |
| Framework-specific code | Changes between implementations |
| Store/state implementation | Varies by framework |
| Component data binding | UI-specific |
| CSS/styling | Presentation layer |
| Route configuration | Framework-specific |
Ask: "Could a developer use this to build a CLI tool that does the same thing?"
| Frequency | Activity |
|---|---|
| Per-release | Update affected docs before deployment |
| Quarterly | Full documentation accuracy audit |
| Continuous | Accept doc updates with code changes |
| Event | Required Updates |
|---|---|
| New feature | Add to relevant guides, update reference |
| Bug fix | Update troubleshooting if user-facing |
| API change | Update all API references |
| Breaking change | Add migration guide, update CHANGELOG |
| Deprecation | Add deprecation notices with timeline |
# Good - relative links within docs/
See [API Specification](technical/API-SPECIFICATION.md) for details.
# Good - root-level files
See [CHANGELOG](/CHANGELOG.md) for version history.
# Bad - absolute filesystem paths
See /home/user/project/docs/technical/API-SPECIFICATION.md
When documenting versioned or time-sensitive information:
## Authentication Flow
*Last verified: 2025-01-15 against v2 API*
[Documentation content...]
Projects can customize these standards by creating configuration files:
Create .claude/docs-management.md for project-wide customizations that are shared with the team (committed to version control).
Create .claude/docs-management.local.md for personal preferences (should be gitignored).
These files can include:
Example:
# Project Documentation Config
## Additional Templates
- Use `docs/templates/runbook-template.md` for operational docs
## Project-Specific Rules
- All docs must include "Last reviewed: YYYY-MM-DD" header
- API docs require OpenAPI spec link
## Custom Checklist Items
- [ ] Checked by tech writer
- [ ] Added to docs index
This document is the single source of truth for documentation standards. When in doubt, follow these guidelines.