documentation
Documentation
Documentation is a product. Treat it with the same care as code: version it, review it, test it, maintain it.
Context
Documentation is a cross-cutting concern that applies at every lifecycle phase. Good documentation reduces onboarding time, prevents knowledge loss, and enables async collaboration. The Diataxis framework provides a useful structure.
In the phase matrix, documentation is always a must_consider concern. It only becomes a must_produce obligation when the change creates durable knowledge another person or later phase must rely on. Approved intake_mode=fast-track work may waive routine documentation updates, but it does not waive durable docs when the change would otherwise leave important knowledge implicit.
Diataxis Framework
Organize documentation into four types:
| Type | Purpose | Oriented to |
|---|---|---|
| Tutorial | Learning-oriented | Getting started, step-by-step |
| How-to Guide | Task-oriented | Solving specific problems |
| Reference | Information-oriented | Technical descriptions (API docs) |
| Explanation | Understanding-oriented | Background, context, decisions |
Inputs
None required. This skill can begin from the project context alone.
Process
Step 1: Identify the Need
What documentation is needed? Common triggers:
- New feature shipped (how-to guide for users)
- Architecture decision made (ADR for future developers)
- Incident resolved (runbook to prevent recurrence)
- New team member joining (onboarding tutorial)
Before writing, classify the need explicitly:
must_consideronly: verify that no durable doc update is needed and record that decision in the surrounding artifact or handoffmust_produce: create or update the durable doc because downstream work, operators, or users would otherwise lose contextskip_when_fast_track: only use the waiver when the route is explicitly fast-tracked and the change does not create durable knowledge debt
Step 2: Write for Your Audience
- Developers: Code examples, API reference, architecture docs
- Operators: Runbooks, deployment guides, monitoring dashboards
- Users: Tutorials, how-to guides, FAQs
- Stakeholders: Architecture Decision Records, design docs
Step 3: Keep Docs Close to Code
- Use docs-as-code: Markdown in the repository, versioned alongside code
- Auto-generate API docs from code annotations (OpenAPI, JSDoc, docstrings)
- README.md in every significant directory explaining its purpose
- Architecture Decision Records in
docs/adr/
Step 4: Review and Maintain
- Documentation reviews as part of PR process (if docs were changed)
- Quarterly documentation audit: remove outdated content
- Track documentation debt alongside tech debt
Outputs
- documentation-artifact -- produced by this skill
Quality Gate
- Target audience can complete their task using only the documentation
- Documentation is discoverable (linked from README, searchable)
- Auto-generated docs are integrated into CI pipeline
- No outdated information (verified within last quarter)
Anti-Patterns
- Write once, abandon forever -- Outdated docs are worse than no docs. They mislead.
- Documentation dump -- A 200-page doc no one reads. Keep it focused and findable.
- Separate documentation system -- If docs aren't next to code, they won't be updated with code.
- No documentation at all -- "The code is self-documenting" is only true for WHAT, never for WHY.
Related Skills
This skill applies at every phase. Key integration points:
- spec-writing -- specification is documentation
- system-design -- architecture docs
- runbooks -- operational documentation
- retrospective -- process documentation
Distribution
- Public install surface:
skills/.curated - Canonical authoring source:
skills/cross-cutting/documentation/SKILL.md - This package is exported for
npx skills add/updatecompatibility. - Packaging stability:
beta - Capability readiness:
beta
More from yknothing/prodcraft
system-design
Use when reviewed requirements or specifications are ready and the team must decide high-level architecture, component boundaries, integration seams, or brownfield coexistence strategy before API design, technology selection, or task planning.
6ci-cd
Use when a reviewed implementation slice needs an automated build, test, and deployment pipeline, especially when brownfield rollback, release-boundary checks, contract/integration gates, and staged delivery must be explicit before shipping.
6intake
The mandatory gateway for all new engineering work. Triage and route new products, apps, features, migrations, tech-debt, or any 'not sure where to start' request to the correct lifecycle path. Use before starting design or implementation. Do not use for ongoing tasks, specific debugging, or PR reviews.
6feature-development
Use when a reviewed task slice has tests or acceptance targets and the team must turn it into a small, mergeable implementation increment without expanding scope, breaking contracts, or hiding release-boundary risk.
6monitoring-observability
Use when a live service or newly delivered release needs actionable telemetry, dashboards, and alerts that expose real user-impactful boundaries, especially when brownfield coexistence rules, unsupported-flow safety, rollback health, or queue/backfill behavior must be visible before incidents escalate.
6incident-response
Use when a live production issue needs coordinated containment, severity triage, stakeholder communication, and evidence capture, especially when a recent release, brownfield coexistence rules, rollback decisions, or unresolved contract boundaries must be handled before root-cause work.
6