Generate documentation from planning artifacts (inline docs, ADRs, changelogs, user guides) at task, scope, or planning level.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-planning-with-ai:doc-generate <NNN-slug> [<scope-NN> [<task-NN>]] (e.g. 001-user-auth-api scope-01 task-02)<NNN-slug> [<scope-NN> [<task-NN>]] (e.g. 001-user-auth-api scope-01 task-02)This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate documentation from planning artifacts. Detects the level (task / scope / planning) from the number of tokens in `$ARGUMENTS` and the area code from the scope file, then writes to `docs/`.
Generate documentation from planning artifacts. Detects the level (task / scope / planning) from the number of tokens in $ARGUMENTS and the area code from the scope file, then writes to docs/.
Area → document matrix:
| Area | Inline doc | ADR | Changelog | User guide |
|---|---|---|---|---|
| WB | ✅ | — | ✅ | ✅ |
| AP | ✅ | ✅ | ✅ | ✅ |
| IN | — | ✅ | — | — |
| AG | ✅ | ✅ | — | — |
| DO | silent no-op | |||
| W | silent no-op | |||
| unknown/custom | ✅ | ✅ | ✅ | ✅ |
$ARGUMENTS — one of:
NNN-slug scope-NN task-NN — task level (3 tokens)NNN-slug scope-NN — scope level (2 tokens)NNN-slug — planning level (1 token)Split $ARGUMENTS on whitespace:
planning-id = token 1, scope-id = token 2, task-id = token 3.planning-id = token 1, scope-id = token 2.planning-id = token 1.Find .planning/active/<planning-id>/02-deepening/<scope-id>-*/<task-id>-*.md. If not found, stop and report. Read the file completely: Objective, Technical Design, Implementation Steps, Unit Tests, Done Criteria.
Read the scope file .planning/active/<planning-id>/02-deepening/<scope-id>-*.md. Look for a field named Area: or Repository Area: (case-insensitive, anywhere in the file). Extract the area code (e.g. WB, AP, IN, AG, DO, W). If not found, treat as unknown.
If area is DO or W: exit silently (no output, no files written).
If docs/ does not exist at the project root, create it with mkdir -p docs/guides docs/adr docs/changelog.
Skip this step for area IN.
docs/guides/<planning-id>/<scope-id>/<task-id>.mdIf the file does not exist, write:
# <component name — derived from Objective>
**Source:** <task-id> | **Area:** <area> | **Date:** <today>
## What it does
<Objective section verbatim or lightly paraphrased>
## How to use it
<Derived from Implementation Steps: public API, endpoints, props, schemas — written as usage instructions, not implementation steps>
## Example
<Minimal usage example inferred from the component type and interfaces exposed>
If the file already exists, append:
---
## Update — <today>
**Source:** <task-id>
### What changed
<Objective section verbatim or lightly paraphrased>
### How to use it
<Derived from Implementation Steps>
### Example
<Minimal usage example>
Skip this step for area WB.
Technical Design section of the task file for decision indicator phrases: "chose", "decided to", "over", "instead of", "alternative discarded", "alternative considered", "rejected", "we avoid".task-slug: take the task filename, remove the leading task-NN- prefix, and strip the .md extension.docs/adr/<YYYY-MM-DD>-<task-slug>.md where <YYYY-MM-DD> is today's date.If the file does not exist, write:
# ADR: <task Objective as title>
**Date:** <today>
**Status:** Accepted
**Planning:** <planning-id> / <scope-id> / <task-id>
## Context
<Technical Design — Approach field, or the full Technical Design section if no labelled fields>
## Decision
<Sentences from Technical Design that contain decision indicator phrases>
## Consequences
<Technical Design — Design notes field, or any consequences mentioned>
## Alternatives Considered
<Sentences containing "alternative", "discarded", "rejected", "instead of" — or "None documented" if none found>
If the file already exists, append:
---
## Revision — <today>
**Source:** <task-id>
### Decision
<Sentences with decision indicators>
### Alternatives Considered
<Sentences with alternative/discarded/rejected/instead of — or "None documented">
List every file written and every sub-step skipped with the reason.
Find .planning/active/<planning-id>/02-deepening/<scope-id>-*.md. If not found, stop and report. Read it completely: name, objective, area, done criteria, task list.
Same as T2: look for Area: or Repository Area:. Treat missing as unknown.
If area is DO or W: exit silently.
If docs/ does not exist, create docs/guides docs/adr docs/changelog with mkdir -p.
Skip for areas IN and AG.
docs/changelog/<planning-id>/<scope-id>.mdIf the file does not exist, write:
# <scope name in plain language>
**Planning:** <planning-id> | **Date:** <today> | **Area:** <area>
## What changed
- <User-facing bullet derived from scope objective — "Users can now…" / "Fixed…" / "Added…">
- <Additional bullets from done criteria, rephrased for end users>
## Who is affected
<Inferred audience: WB → "Web users"; AP → "API consumers"; unknown → "End users and API consumers">
If the file already exists, append:
---
## Update — <today>
### What changed
- <Bullets from scope objective and done criteria>
### Who is affected
<Inferred audience>
Skip for areas IN and AG.
docs/guides/<planning-id>/<scope-id>/ as source material (read all task-NN-*.md files found there).docs/guides/<planning-id>/<scope-id>.mdIf the file does not exist, write:
# <scope name — feature title>
**Date:** <today> | **Area:** <area>
## Overview
<Scope objective rephrased for end users — no technical jargon>
## How to use
<Narrative guide synthesised from: task inline docs (if any), done criteria, scope task descriptions>
## Related components
<Links to task-level inline docs under docs/guides/<planning-id>/<scope-id>/ — or "None">
If the file already exists, append:
---
## Revision — <today>
### Overview
<Scope objective rephrased for end users>
### How to use
<Narrative from task inline docs and done criteria>
### Related components
<Links or "None">
Only for area IN.
docs/adr/ whose filename contains the scope-id (e.g. scope-01).scope-slug: take the scope filename, remove the leading scope-NN- prefix, strip .md.docs/adr/<YYYY-MM-DD>-<scope-slug>.md.If the file does not exist, write:
# ADR Summary: <scope name>
**Date:** <today>
**Status:** Accepted
**Planning:** <planning-id> / <scope-id>
**Source ADRs:** <comma-separated list of source ADR filenames>
## Decisions Made in This Scope
<One paragraph per source ADR summarising its Decision section>
## Combined Consequences
<Merged Consequences sections from all source ADRs>
If the file already exists, append:
---
## Update — <today>
**Source ADRs:** <comma-separated list of source ADR filenames>
### Decisions Made in This Scope
<One paragraph per source ADR summarising its Decision section>
### Combined Consequences
<Merged Consequences sections from all source ADRs>
List every file written and every step skipped with the reason.
Look for <planning-id> under .planning/active/, .planning/, and .planning/finished/ (in that order). If not found, stop and report.
Glob docs/changelog/<planning-id>/scope-*.md. If none found: report "no scope changelog entries — run /doc-generate <planning-id> <scope-id> for each scope first" and stop.
Sort the collected scope changelog files by scope number (ascending). Write docs/changelog/<planning-id>/RELEASE.md (always overwrite):
# Release Notes — <planning-id>
**Generated:** <today>
<contents of scope-01.md>
---
<contents of scope-02.md>
---
<… one section per scope, separated by ---, in scope-number order>
Glob docs/guides/<planning-id>/scope-*.md.
If none found: report "no scope guides found — run /doc-generate <planning-id> <scope-id> for each scope first" and write only the RELEASE.md.
Sort the collected scope guide files by scope number (ascending). Write docs/guides/<planning-id>/README.md (always overwrite):
# User Guide — <planning-id>
**Generated:** <today>
## Table of Contents
- [<scope-01 title>](<scope-01 filename>)
- [<scope-02 title>](<scope-02 filename>)
- …
---
<contents of scope-01.md>
---
<contents of scope-02.md>
---
<… in scope-number order>
List RELEASE.md and README.md written (or skipped), and any scopes missing from the consolidated files.
docs/changelog/<planning-id>/RELEASE.md and docs/guides/<planning-id>/README.md, which are always regenerated from source.docs/ missing → create docs/guides, docs/adr, docs/changelog before writing any file.npx claudepluginhub cmartinezs/claude-planning-with-ai --plugin claude-planning-with-aiCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.