Documentation Template
A documentation contract that makes the system learnable, searchable, and maintainable — and resilient to ownership change.
When to Use
- Establishing the docs IA for a new design system or rebooting a stale one.
- Adding a component, pattern, or foundation page that must match house structure.
- Recording a non-trivial design or architectural decision (ADR).
- Releasing a versioned change that affects consumers (changelog + migration).
- Onboarding contributors and reducing review churn with a written contribution guide.
Stack Baseline (2026)
| Concern |
Standard |
| Information architecture |
Diátaxis (Tutorials / How-to / Reference / Explanation) |
| Component reference |
Storybook 8/9 autodocs, MDX2, CSF3 |
| Decision records |
MADR 4.0 (Markdown ADR) in docs/adr/ |
| Changelog |
Keep a Changelog 1.1, Conventional Commits |
| Versioning |
SemVer 2.0 for the design system package |
| Search / IA tooling |
Algolia DocSearch, Pagefind, or built-in Storybook search |
| Accessibility of docs |
WCAG 2.2 AA on the docs site itself |
| Status taxonomy |
Experimental → Beta → Stable → Deprecated → Removed |
Prerequisites
- A docs platform (Storybook, Docusaurus, Astro Starlight, or similar) with MDX support.
- Naming convention finalized (file paths, headings, status badges).
- Owner per page (DRI) recorded in frontmatter.
- A token reference and component manifest available to auto-generate sections.
Instructions
- Map every page to a Diátaxis quadrant. A page does one job: teach (tutorial), solve (how-to), describe (reference), or explain (explanation). Don't blend.
- Adopt a single page frontmatter contract:
---
title: Button
status: stable # experimental | beta | stable | deprecated | removed
since: 4.2.0
owner: '@design-systems/forms-pod'
tags: [forms, action]
diataxis: reference
---
- Component reference page skeleton:
# Button
> One-line value statement.
## When to use / When not to use
## Anatomy
## Variants & sizes
## Props (auto-generated)
## States (default, hover, focus-visible, active, disabled, loading)
## Accessibility
## Tokens consumed
## Content guidelines
## Do / Don't
## Related components
## Changelog
- Pattern page skeleton: problem → context → solution → anatomy → variants → behavior → good/bad examples → a11y → related patterns → research backing.
- Foundation page skeleton: purpose → principles → rules/specs → examples → exceptions (with rationale) → references.
- ADR template (MADR 4):
# ADR-0042: Adopt OKLCH for color ramps
- Status: Accepted
- Date: 2026-02-14
- Deciders: @design-systems-council
## Context
## Decision
## Consequences
## Alternatives considered
- Changelog discipline (Keep a Changelog 1.1):
## [5.0.0] - 2026-03-01
### Added
- `Button` `tone="critical"` variant.
### Changed
- **BREAKING**: `Button` prop `kind` renamed to `variant`. Codemod: `npx @org/codemods button-kind-to-variant`.
### Deprecated
- `LegacyDialog` — removal planned for 6.0.0.
- Contribution guide must spell out: proposal template, design review cadence, code+design review checklists, status-change criteria, release process, and deprecation policy with a minimum two-minor-version notice.
- Auto-generate where possible. Props from TS types, tokens from DTCG JSON, accessibility checklist from axe rules, examples from real Storybook stories.
- Freshness audit. A scheduled job flags pages with
lastReviewed older than 6 months or whose component version > docs since.
Common Pitfalls
| Pitfall |
Why it hurts |
Fix |
| Mixing tutorial and reference on one page |
Readers can't find or trust either |
Split per Diátaxis quadrant |
| Hand-maintained props tables |
Drift from code immediately |
Generate from TS types via Storybook autodocs |
| No status badge on pages |
Consumers adopt experimental APIs unknowingly |
Mandatory status in frontmatter, surfaced in nav |
| Decisions live in Slack/Notion |
Lost institutional memory |
Capture as ADRs in repo |
| Free-form changelog |
Migration becomes guesswork |
Enforce Keep a Changelog + Conventional Commits |
| No deprecation timeline |
Breaking changes ambush consumers |
Policy: deprecate ≥ 2 minor versions before removal, ship codemod |
Output Format
A docs site organized by Diátaxis quadrants, with: per-page YAML frontmatter (title/status/since/owner/diataxis), an adr/ folder of MADR records, a root CHANGELOG.md, a CONTRIBUTING.md describing the proposal → adopt → deprecate workflow, and a freshness dashboard listing stale or version-mismatched pages.
Authoritative References
Source: SwapnilPopat/ai-assistant-skills — distributed by TomeVault.
1---2name: documentation-template3description: Produce Diátaxis-organized design system documentation (tutorials, how-to, reference, explanation) with ADRs, Keep-a-Changelog entries, and SemVer-aware contribution guidance. Use when this capability is needed.4---5# Documentation Template6A documentation contract that makes the system learnable, searchable, and maintainable — and resilient to ownership change.78## When to Use9- Establishing the docs IA for a new design system or rebooting a stale one.10- Adding a component, pattern, or foundation page that must match house structure.11- Recording a non-trivial design or architectural decision (ADR).12- Releasing a versioned change that affects consumers (changelog + migration).13- Onboarding contributors and reducing review churn with a written contribution guide.1415## Stack Baseline (2026)16| Concern | Standard |17| --- | --- |18| Information architecture | Diátaxis (Tutorials / How-to / Reference / Explanation) |19| Component reference | Storybook 8/9 autodocs, MDX2, CSF3 |20| Decision records | MADR 4.0 (Markdown ADR) in `docs/adr/` |21| Changelog | Keep a Changelog 1.1, Conventional Commits |22| Versioning | SemVer 2.0 for the design system package |23| Search / IA tooling | Algolia DocSearch, Pagefind, or built-in Storybook search |24| Accessibility of docs | WCAG 2.2 AA on the docs site itself |25| Status taxonomy | Experimental → Beta → Stable → Deprecated → Removed |2627## Prerequisites28- A docs platform (Storybook, Docusaurus, Astro Starlight, or similar) with MDX support.29- Naming convention finalized (file paths, headings, status badges).30- Owner per page (DRI) recorded in frontmatter.31- A token reference and component manifest available to auto-generate sections.3233## Instructions341. **Map every page to a Diátaxis quadrant.** A page does *one* job: teach (tutorial), solve (how-to), describe (reference), or explain (explanation). Don't blend.352. **Adopt a single page frontmatter contract:**36 ```md37 ---38 title: Button39 status: stable # experimental | beta | stable | deprecated | removed40 since: 4.2.041 owner: '@design-systems/forms-pod'42 tags: [forms, action]43 diataxis: reference44 ---45 ```463. **Component reference page skeleton:**47 ```md48 # Button49 > One-line value statement.50 ## When to use / When not to use51 ## Anatomy52 ## Variants & sizes53 ## Props (auto-generated)54 ## States (default, hover, focus-visible, active, disabled, loading)55 ## Accessibility56 ## Tokens consumed57 ## Content guidelines58 ## Do / Don't59 ## Related components60 ## Changelog61 ```624. **Pattern page skeleton:** problem → context → solution → anatomy → variants → behavior → good/bad examples → a11y → related patterns → research backing.635. **Foundation page skeleton:** purpose → principles → rules/specs → examples → exceptions (with rationale) → references.646. **ADR template (MADR 4):**65 ```md66 # ADR-0042: Adopt OKLCH for color ramps67 - Status: Accepted68 - Date: 2026-02-1469 - Deciders: @design-systems-council70 ## Context71 ## Decision72 ## Consequences73 ## Alternatives considered74 ```757. **Changelog discipline (Keep a Changelog 1.1):**76 ```md77 ## [5.0.0] - 2026-03-0178 ### Added79 - `Button` `tone="critical"` variant.80 ### Changed81 - **BREAKING**: `Button` prop `kind` renamed to `variant`. Codemod: `npx @org/codemods button-kind-to-variant`.82 ### Deprecated83 - `LegacyDialog` — removal planned for 6.0.0.84 ```858. **Contribution guide** must spell out: proposal template, design review cadence, code+design review checklists, status-change criteria, release process, and deprecation policy with a minimum two-minor-version notice.869. **Auto-generate where possible.** Props from TS types, tokens from DTCG JSON, accessibility checklist from axe rules, examples from real Storybook stories.8710. **Freshness audit.** A scheduled job flags pages with `lastReviewed` older than 6 months or whose component version > docs `since`.8889## Common Pitfalls90| Pitfall | Why it hurts | Fix |91| --- | --- | --- |92| Mixing tutorial and reference on one page | Readers can't find or trust either | Split per Diátaxis quadrant |93| Hand-maintained props tables | Drift from code immediately | Generate from TS types via Storybook autodocs |94| No status badge on pages | Consumers adopt experimental APIs unknowingly | Mandatory `status` in frontmatter, surfaced in nav |95| Decisions live in Slack/Notion | Lost institutional memory | Capture as ADRs in repo |96| Free-form changelog | Migration becomes guesswork | Enforce Keep a Changelog + Conventional Commits |97| No deprecation timeline | Breaking changes ambush consumers | Policy: deprecate ≥ 2 minor versions before removal, ship codemod |9899## Output Format100A docs site organized by Diátaxis quadrants, with: per-page YAML frontmatter (title/status/since/owner/diataxis), an `adr/` folder of MADR records, a root `CHANGELOG.md`, a `CONTRIBUTING.md` describing the proposal → adopt → deprecate workflow, and a freshness dashboard listing stale or version-mismatched pages.101102## Authoritative References103- Diátaxis — https://diataxis.fr/104- Keep a Changelog — https://keepachangelog.com/en/1.1.0/105- Semantic Versioning — https://semver.org/106- MADR (Markdown ADR) — https://adr.github.io/madr/107- Storybook docs — https://storybook.js.org/docs108- Conventional Commits — https://www.conventionalcommits.org/109110---111> Source: [SwapnilPopat/ai-assistant-skills](https://github.com/SwapnilPopat/ai-assistant-skills) — distributed by [TomeVault](https://tomevault.io).112<!-- tomevault:4.0:skill_md:2026-06-16 -->