Drive implementation through a SPEC.md-first workflow covering research, review gates, approved-spec execution, and completeness verification. Use this skill when the user explicitly asks to follow a spec-driven workflow, write a SPEC.md before implementing, create a specification, define requirements before coding, or use a spec-first approach. Covers the full lifecycle: research external unknowns, author SPEC.md, pass review gates, implement against the approved spec, and verify completeness. Activated only on explicit user request, not automatically.
npx claudepluginhub ririnto/sinon --plugin spec-driven-developmentThis skill uses the workspace's default tool permissions.
Drive work through approved `spec/` artifacts before implementation.
agents/openai.yamlassets/schemas/contract-frontmatter.schema.jsonassets/schemas/research-frontmatter.schema.jsonassets/schemas/spec-frontmatter.schema.jsonassets/templates/CHANGELOG.mdassets/templates/CONTRACT.mdassets/templates/RESEARCH.mdassets/templates/SPEC.mdassets/templates/openapi.yamlreferences/examples/valid-spec-tree/spec/CHANGELOG.mdreferences/examples/valid-spec-tree/spec/domain/SPEC.mdreferences/examples/valid-spec-tree/spec/domain/ingest/CONTRACT.mdreferences/examples/valid-spec-tree/spec/domain/ingest/SPEC.mdreferences/examples/valid-spec-tree/spec/domain/ingest/openapi.yamlreferences/examples/valid-spec-tree/spec/research/library/demo-lib/RESEARCH.mdreferences/linking-guide.mdreferences/research-authoring-guide.mdreferences/review-checklist.mdreferences/spec-authoring-guide.mdreferences/workflow.mdMandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Drive work through approved spec/ artifacts before implementation.
Treat SPEC.md as the source of truth for scope, intended behavior, and externally meaningful constraints.
Use the current working repository as the destination for spec/ outputs.
Use the installed skill root only as the source for bundled scripts and templates.
When this skill is installed as a plugin, resolve the installed paths like this:
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:?CLAUDE_PLUGIN_ROOT must point to the installed plugin root}"
SKILL_ROOT="${PLUGIN_ROOT}/skills/spec-driven-development"
If your host does not provide ${CLAUDE_PLUGIN_ROOT}, replace SKILL_ROOT with the absolute path to the installed spec-driven-development skill directory.
spec/domain/<ownership-path>/SPEC.md for capability specs, where <ownership-path> reflects the owning capability boundary.
MUST NOT use topic, policy, audit, or repository-improvement unless they map to a real owning capability.spec/research/{framework|library|topic}/{name}/RESEARCH.md for research artifacts.RESEARCH.md only for framework, library, or topic investigation that informs later spec decisions.
MUST NOT use RESEARCH.md for project comparison, repository audits, implementation planning, migration sequencing, or task management.call entries SPEC-to-SPEC only, using relative paths to existing SPEC.md files.
MUST keep call: [] when a SPEC has no outbound dependencies.SPEC.md as the source of truth for implementation scope.SPEC.md focused on abstract requirements, intended behavior, boundaries, and externally meaningful constraints.
SHOULD avoid introducing language, framework, library, or code-style constraints unless the user explicitly requests them or verified external constraints make them necessary.spec -> code.
MUST NOT reverse-derive spec content from current implementation."${SKILL_ROOT}/scripts/sdd.sh" validate <spec-root-or-subtree> before Spec Review closes and again after the final spec sync when uv is available on the host.
When uv is not available, MUST document the absent runtime in the review record and MUST complete every applicable inline-checklist item manually in place of the validator result.npx -y markdownlint-cli2 <touched-markdown-files> only when the maintainer or consuming repository already uses markdownlint.
Markdown linting is OPTIONAL maintenance guidance, not a prerequisite for ordinary offline use of this skill.Offline prerequisite: sdd.sh shells out to uvx, which is part of uv. The validator is the preferred Spec Review gate when uv is installed on the host. When uv is not installed, fall back to the manual inline-checklist path documented in the Ordinary offline workflow and Review gates sections.
Use these bundled paths from SKILL_ROOT:
./scripts/sdd.sh — single CLI entrypoint that dispatches to all SDD toolkit subcommands. The shipped subcommands are:
validate <spec-root> — validate a spec/ tree or subtree (default Spec Review gate)list-frontmatter [spec-path] — frontmatter inventory and inbound-call queriesget-frontmatter <kind> <path> — read one artifact frontmatter blockgenerate-diagram [spec-root] — generate Mermaid relationship diagrams from SPEC linkslist-tags [spec-path] — aggregate tag inventory across the tree./scripts/sdd/ — Python package that implements the CLI../scripts/pyproject.toml — sibling of ./scripts/sdd/; declares the sdd console script entry point that sdd.sh invokes via uvx --from "${script_dir}"../assets/templates/ — scaffolds for SPEC.md, RESEARCH.md, CONTRACT.md, openapi.yaml, and spec/CHANGELOG.md./assets/schemas/ — schema files used by the validator./references/examples/ — validator-clean examples for comparisonFollow this path unless a named blocker sends you to an optional reference.
Decide whether research is needed.
RESEARCH.md only when external framework, library, or topic behavior is unclear or version-sensitive.Create the required scaffolds in the current working repository without overwriting existing authored files.
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:?CLAUDE_PLUGIN_ROOT must point to the installed plugin root}"
SKILL_ROOT="${PLUGIN_ROOT}/skills/spec-driven-development"
mkdir -p spec/domain/service
cp -n "${SKILL_ROOT}/assets/templates/SPEC.md" spec/domain/service/SPEC.md
mkdir -p spec
cp -n "${SKILL_ROOT}/assets/templates/CHANGELOG.md" spec/CHANGELOG.md
Adjust service to the real ownership path.
Create optional scaffolds only when they materially improve clarity.
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:?CLAUDE_PLUGIN_ROOT must point to the installed plugin root}"
SKILL_ROOT="${PLUGIN_ROOT}/skills/spec-driven-development"
cp -n "${SKILL_ROOT}/assets/templates/CONTRACT.md" spec/domain/service/CONTRACT.md
cp -n "${SKILL_ROOT}/assets/templates/openapi.yaml" spec/domain/service/openapi.yaml
mkdir -p spec/research/library/react-router
cp -n "${SKILL_ROOT}/assets/templates/RESEARCH.md" \
spec/research/library/react-router/RESEARCH.md
CONTRACT.md is optional semantic contract depth.openapi.yaml is optional HTTP boundary depth.RESEARCH.md is optional and only for external investigation.Author or revise SPEC.md.
Necessity, Role, and Overview before detailed requirements.Normal Flow, Alternative Flow, and Error Flow scenarios.If research exists, keep it evidence-oriented.
subject.name and subject.version.Link outbound dependencies from the calling SPEC.
call entries in the caller's frontmatter.SPEC.md targets only.call: [] when no outbound dependency exists.Ask for explicit approval before formal review.
SPEC.md draft.Run Spec Review.
"${SKILL_ROOT}/scripts/sdd.sh" validate ./spec
SPEC.md status to approved and refresh last_updated.Implement only after Gate 2 passes.
SPEC.md status to wip when implementation starts.spec/.Run Implementation Review and final sync.
SPEC.md.call when dependencies change.RESEARCH.md, CONTRACT.md, openapi.yaml, and spec/CHANGELOG.md synchronized with the implemented state."${SKILL_ROOT}/scripts/sdd.sh" validate ./spec
SPEC.md with the correct post-implementation status and refresh last_updated.draft: initial authoring has started.review: the artifact is ready for formal review.approved: scope is accepted and implementation may start.wip: implementation is in progress.implemented: implementation review and verification are complete.deprecated, superseded, removed: retirement or replacement states.Passes only when the user explicitly approves the scope, primary requirements, and scenario direction of the current SPEC.md draft.
Passes only when both conditions are true:
pass or n/a, with zero remaining fail items."${SKILL_ROOT}/scripts/sdd.sh" validate ./spec exits with status 0 when uv is available on the host; otherwise the review record documents the absent runtime and every applicable inline-checklist item is recorded as pass or n/a manually.Record each applicable item as pass, fail, or n/a with rationale.
SPEC.md frontmatter includes title, description, last_updated, status, and callSPEC.md is placed under spec/domain/<ownership-path>/SPEC.mdSPEC.md remains implementation-agnostic by defaultcall links are SPEC-to-SPEC only, relative, and resolve to existing targetsRESEARCH.md, when present, is limited to external framework/library/topic investigationCONTRACT.md or openapi.yaml, when present, stays consistent with the current SPECTODO: markers or template placeholders are removed from authored artifacts"${SKILL_ROOT}/scripts/sdd.sh" validate ./spec passesSPEC.mdSPEC.md status and last_updated are synchronized with implementation statecall links are updated when dependency relationships changedRESEARCH.md, CONTRACT.md, openapi.yaml, and spec/CHANGELOG.md, when present, are synchronized with the implemented statespec/CHANGELOG.md keeps the latest date first and excludes planning-only content"${SKILL_ROOT}/scripts/sdd.sh" validate ./spec passes after final syncFor v1, reviews MUST be recorded in reviewer or agent output.
The workflow MUST NOT require a repo-tracked REVIEW.md.
Each review record MUST include:
pass, fail, or n/aUse these from the consuming repository after setting SKILL_ROOT:
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:?CLAUDE_PLUGIN_ROOT must point to the installed plugin root}"
SKILL_ROOT="${PLUGIN_ROOT}/skills/spec-driven-development"
"${SKILL_ROOT}/scripts/sdd.sh" validate ./spec
"${SKILL_ROOT}/scripts/sdd.sh" list-frontmatter ./spec --inbound-of spec/domain/ingest/SPEC.md
"${SKILL_ROOT}/scripts/sdd.sh" generate-diagram ./spec
If you need per-file Markdown linting for maintainer hygiene, run it separately and treat it as optional:
npx -y markdownlint-cli2 <touched-markdown-files>
Open a reference only for the named blocker:
./references/workflow.md — open when you need the full stage-by-stage lifecycle, entry and exit conditions, or review-loop semantics./references/spec-authoring-guide.md — open when drafting or revising detailed SPEC.md sections./references/research-authoring-guide.md — open when drafting or revising RESEARCH.md./references/linking-guide.md — open when editing call links or querying inbound dependencies../../docs/maintainers/runtime-architecture.md — open only when maintaining this plugin's packaged runtime and documentation boundariesReturn:
spec/SPEC.md draftsdd.sh validate exit result when uv is available (or a documented absence of uv), together with the inline-checklist results recorded as pass, fail, or n/a with rationale per applicable item