From spec-driven
Run pre-spec reconnaissance (prep), load an existing spec to resume work, update progress after implementation, review with the collegium panel, or create a new one. Use when starting a session around a feature, when the user mentions a spec by name, when asked to prep, scope, or review/critique a spec, or after completing implementation work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spec-driven:spec <feature-name><feature-name>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
!`cat ${CLAUDE_SKILL_DIR}/taxonomy.md`
!cat ${CLAUDE_SKILL_DIR}/taxonomy.md
!cat .claude/taxonomy.md 2>/dev/null || echo "No project taxonomy found — use free-form area/domain values."
If $ARGUMENTS is empty: Infer the feature name from the current conversation context. Propose a kebab-case slug and ask the user to confirm before proceeding.
Before treating $ARGUMENTS as a feature name, check for an explicit sub-command token.
Sub-command set: prep, create, resume, review, update, handoff, status, list.
Matching rule (case-insensitive, whitespace-tokenized):
$ARGUMENTS on whitespace.sub_command = first, feature = remaining tokens joined by space.sub_command = last, feature = all-but-last tokens joined.## Routing below.If feature is empty after extraction, infer it from conversation context (same rule as the empty-args branch above). Confirm with the user only if ambiguous. Exception: for list, an empty feature means "no filter — show all"; do not infer from context.
Dispatch:
| Token | Action |
|---|---|
prep | Read prep.md and follow it. Pre-spec reconnaissance: align on the real change, scaffold the folder + product-brief.md, then fan out recon waves into research/. Hands off to create. |
create | If docs/specs/<feature>/ already exists as a full spec (has progress.md), refuse with: Spec '<feature>' already exists at docs/specs/<feature>/. Use /spec <feature> to resume, or remove the folder first. If it exists in prep stage (only product-brief.md/research/, no progress.md), proceed — read create.md; it consumes the prep output. Otherwise (fresh) read create.md and follow it. |
resume | Read resume.md and follow it. |
review | Read review.md and follow it. |
update | Read update.md and follow it. |
handoff | Read handoff.md and follow it. |
status | Read status.md and follow it. |
list | Read list.md and follow it. The feature name is optional — when omitted, list all specs; when present, treat it as a filter. |
For every sub-command except create, the sub-mode file is responsible for handling the "spec does not exist" case.
After dispatching, stop. Do not also evaluate the routing section below.
(Reached only when no sub-command token was matched above.)
Check if a spec folder exists at docs/specs/$ARGUMENTS/.
Spec does not exist → read create.md and follow its instructions
Spec exists, still in prep (no progress.md — only product-brief.md/research/) → read prep.md; it resumes reconnaissance from where it left off.
Spec exists (has progress.md) → determine intent from conversation context:
All sub-modes follow the rules below. This reference is embedded in SKILL.md (not injected via !cat) so it always loads with the skill.
docs/specs/<name>/
├── CLAUDE.md # metadata + routing
├── product-brief.md # stable reference — business intent (≤30 lines, no code); by prep
├── design.md # stable reference — problem, UX, decisions
├── technical.md # stable reference — contracts, architecture
├── progress.md # thin index: phase list + top-level checkboxes + pointers
├── pr-opening.md # PR-readiness gate: spec state + pre-PR checks (not a phase)
├── code-map.md # load-bearing files inventory (scaffolded empty)
├── in-flight.md # ephemeral pending work (on-demand; created by handoff)
├── phases/ # parent folder for all per-phase content
│ ├── phase-1-<slug>.md # flat file — default shape for small phases
│ ├── phase-2-<slug>.md
│ └── phase-N-<slug>/ # folder — complex phase with supplementary files
│ ├── plan.md # main phase plan (mirrors the flat-file role)
│ └── <descriptive-name>.md # supplementary files added as needed
├── reviews/ # on-demand; dated YYYY-MM-DD-<slug>.md; immutable
├── research/ # on-demand; dated YYYY-MM-DD-<slug>.md; immutable
└── ledger/ # forward-propagating learnings
├── INDEX.md # warm cache: one row per entry with [applies-to] tag
└── <kind>-<slug>.md # free-form kinds: gotcha, principle, domain, decision, workaround, …
| Artifact | Kind | Purpose |
|---|---|---|
CLAUDE.md | stable | Metadata frontmatter + file index + relationship to code |
product-brief.md | stable | Business intent — who/what/why, the real change, out of scope. ≤30 lines, no code. Written by prep; the contract recon agents work against |
design.md | stable | Problem, decisions table, UX flows, wireframes |
technical.md | stable | API contracts, data models, architecture |
progress.md | small | Thin index of phases; top-level checkboxes; pointers into phases/ |
pr-opening.md | small | PR-readiness gate — spec state (<20 lines) + pre-PR checks scoped to touched subprojects. Not a phase |
code-map.md | small | Load-bearing files this spec depends on or introduces |
in-flight.md | ephemeral | Mid-session pending state; overwritten each handoff |
phases/phase-*.md (flat) | small-to-medium | Per-phase plan + sub-checkboxes + guidance |
phases/phase-*/plan.md (folder) | small-to-medium | Same as flat, for phases with supplementary files |
phases/phase-*/<supplementary>.md | on-demand | Tier sub-plans, wireframes, fixture notes, scratch |
reviews/*.md | on-demand, immutable | Collegium review snapshots; never edited |
research/*.md | on-demand, immutable | Deep-research and prep recon-wave snapshots; never edited |
ledger/INDEX.md | warm cache | One row per ledger entry with [applies-to] tag + one-line summary |
ledger/<kind>-*.md | forward-propagating | Durable learnings tagged by phase scope |
phases/.phases/phase-1-canonical-schema.mdphases/phase-8-csv-import/plan.md (always points at plan.md inside the folder)## Phases
- [ ] Phase 1 — Canonical schema → `phases/phase-1-canonical-schema.md`
- [x] Phase 2 — Migration runner → `phases/phase-2-migration-runner.md`
- [ ] Phase 8 — CSV import → `phases/phase-8-csv-import/plan.md`
ledger/<kind>-<slug>.mdphases/in-flight.md[x] only when all sub-checkboxes in its phase entry are checked.phases/.phases/phase-<N>-<slug>.md. Holds phase goal, dependencies, files to touch, implementation guidance, sub-checkboxes, and any phase-local notes that don't forward-propagate.phases/phase-<N>-<slug>/ with plan.md inside — for phases that need supplementary files (tier breakdowns, sub-plans, ASCII diagrams, fixture notes). Can be chosen at birth when complexity is known, or promoted from flat file later.phases/phase-<N>-<slug>/plan.md and delete the old flat file. Update the pointer in progress.md. User confirms before promotion.plan.md is the entry point. If a supplementary file holds critical context, plan.md must explicitly link to it so resume picks it up.pr-opening.md. Sub-checkboxes are each sized to one TDD commit (red → change → green → commit).pr-opening.md.Every ledger entry lives at ledger/<kind>-<slug>.md with required frontmatter:
---
kind: gotcha | principle | domain | decision | workaround | <free>
applies-to: [general] | [phase 5+] | [phase 6, 7] | [general, load-bearing]
created: <ISO 8601 with timezone>
superseded-by: <filename> # optional — marks this entry as deprecated
---
# <Title>
<body — short, usually 5-30 lines>
applies-to grammarThe bracketed value is a comma-separated list of free-form scope tokens. Resume uses it to filter the INDEX and decide which entries apply to the current phase.
[general] — applies to all phases.[phase N] — exactly one phase.[phase N, M, P] — enumeration of specific phases.[phase N+] — phase N and all later phases (forward-open).load-bearing — composable modifier. When present, the entry is always surfaced regardless of phase filter. Example: [general, load-bearing], [phase 5+, load-bearing].Pick the narrowest correct scope at write time. Use [general] only when the learning truly applies to every phase. Use load-bearing sparingly — it's for mission-critical knowledge that an agent must see regardless of which phase they're working on.
ledger/INDEX.md is the warm cache. One row per entry, grouped by kind via section headings:
# Ledger Index (layout v1)
## Gotchas
- `gotcha-money-parsing.md` — [general] — parseFloat drops centavos; use strict regex
## Principles
- `principle-no-schema-without-fixtures.md` — [general] — observe real source data before writing transforms
## Domain
- `domain-invoice-line-mapping.md` — [phase 6, 7] — Momence line_item → ticket_type vs class_pass
## Decisions
- `decision-csv-pivot.md` — [phase 8+] — API path abandoned; CSV authoritative
superseded-by: field pointing to the replacement; resume's filter excludes superseded ones.git log -p in-flight.md.code-map.md). Ticked before the draft PR opens. Never straight to main..claude/ convention, a CI manifest), use those; otherwise default, per touched module, to: tests pass · lint + typecheck/compile · any feature-specific e2e.YYYY-MM-DD-<slug>.md. Slug derived from the dominant theme (e.g., phase-5-readiness, integration-boundaries). Review slugs are always auto-derived (fallback: phase-<N>-collegium); research slugs may be confirmed with the user if ambiguous.Handoff reflection is preserved but redirected. Reflection content goes to:
ledger/decision-<slug>.mdledger/gotcha-<slug>.mdledger/principle-<slug>.mdledger/domain-<slug>.mdin-flight.md for ephemeral state only: half-built code, "pick up from here" instructions, open session questions.Handoff must not:
progress.md (no handoff blocks, no session logs)| Artifact | Scaffolded at spec birth? |
|---|---|
CLAUDE.md | yes |
design.md | yes |
technical.md | yes |
progress.md | yes |
pr-opening.md | yes — by create (scaffolded with the pre-PR checks) |
code-map.md | yes (empty table with header) |
phases/ | yes |
phases/phase-<N>-<slug>.md or phases/phase-<N>-<slug>/plan.md | yes — one per planned phase |
ledger/ | yes |
ledger/INDEX.md | yes (header only) |
product-brief.md | no — created by prep before the spec body exists |
in-flight.md | no — created by handoff when pending state exists |
reviews/ | no — created on first review write |
research/ | no — created on first research/recon write (deep research or prep waves) |
| Phase folder supplementary files | no — added during execution when needed |
Individual ledger/*.md entries | no — created during update/handoff when a learning emerges |
ledger/INDEX.md presence = new layout. Absence = legacy.progress.md including any session/handoff blocks. One-line "legacy layout detected" notice printed.ledger/ (on user confirmation) for new learnings, but never appends a new session log to the legacy progress.md. Legacy content stays untouched.prep (folder + brief + recon) → draft (spec written) → active (implementing) → done/good-enough. Prep is optional but recommended for non-trivial specs; create can run cold.bash ${CLAUDE_SKILL_DIR}/scripts/spec-bump.sh <spec-name>docs/specs/<name>/npx claudepluginhub anton-haskevych/spec-driven --plugin spec-drivenProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.