From am2rican5
Orchestrate the full spec-driven development lifecycle through four phases (Specify, Plan, Implement, Validate). Supports three rigor levels and lightweight mode for small changes. Use when user says "spec driven development", "SDD workflow", "specify then implement", "spec first development", "write spec then build", or "develop with specification". Do NOT use for writing specs only (use spec-writer) or for validating existing code against specs (use spec-validator agent directly).
How this skill is triggered — by the user, by Claude, or both
Slash command
/am2rican5:sdd-workflowThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- ALWAYS start with Phase 1 (Specify) — never skip to implementation without a spec
Before starting, check for existing artifacts from a previous session:
specs/<feature-name>.md — if exists, Phase 1 is donespecs/<feature-name>.plan.md — if exists, Phase 2 is donespecs/<feature-name>.validation.md — if exists, Phase 4 is doneIF existing artifacts found:
IF no artifacts found → proceed to Step 1.
Analyze the user's feature description to select the workflow mode:
Lightweight Mode (auto-detected for small changes):
Full Mode (default for everything else):
Rigor Level (see references/rigor-levels.md for details):
Announce the selected mode and rigor level. If the user mentioned "API", "contract", "long-term", "team", or "shared", recommend spec-anchored and explain why.
If the user explicitly requests a specific rigor level, use it.
Goal: Produce a spec file at specs/<feature-name>.md
Option A: Delegate to spec-writer skill If the feature needs deep elicitation (complex, unclear, many stakeholders):
"This feature would benefit from a detailed specification. I'll use the spec-writer skill to guide you through it."
Use the Skill tool to invoke spec-writer with the feature description.
Option B: Inline spec creation For straightforward features where the user has already described clear requirements:
specs/<feature-name>.mdPhase 1 is complete when specs/<feature-name>.md exists and the user has confirmed it.
Goal: Produce an implementation plan at specs/<feature-name>.plan.md
Invoke the spec-planner agent using the Task tool:
Task tool call:
subagent_type: "spec-planner"
prompt: "Read the spec at specs/<feature-name>.md and produce an implementation plan. Scan the codebase for existing patterns and relevant code. Output the plan to specs/<feature-name>.plan.md"
Wait for the agent to complete and read the generated plan.
Present the plan to the user:
"Here's the implementation plan. Review the architecture decisions and task breakdown. Should we proceed, or adjust anything?"
Phase 2 is complete when the plan file exists and the user approves it.
In lightweight mode: Skip this phase. The acceptance criteria from the spec serve as the implementation guide.
Goal: Build the feature according to the plan (or spec in lightweight mode)
This phase is user-driven. The skill provides structure, not automation:
During implementation, watch for:
Phase 3 is complete when all plan tasks (or acceptance criteria) are addressed.
Goal: Verify implementation matches the spec. Produce a validation report.
Invoke the spec-validator agent using the Task tool:
Task tool call:
subagent_type: "spec-validator"
prompt: "Read the spec at specs/<feature-name>.md. Validate the implementation against all acceptance criteria and edge cases. Write the report to specs/<feature-name>.validation.md"
Wait for the agent to complete and read the validation report.
Present the report to the user with a summary:
If PASS: "All acceptance criteria met. Implementation is complete."
If PARTIAL: "N/M criteria met. Here's what's missing: [list]. Would you like to address these now?"
If FAIL: "Significant gaps found. Here are the issues: [list]. Let's fix these before considering this done."
For spec-anchored rigor: remind the user that the spec should be updated if implementation legitimately diverged from the original spec.
When all four phases are done:
User: "I want to add OAuth2 login to my app using spec-driven development"
SDD Workflow:
→ Detected: "login" + "OAuth2" = auth feature, multi-file change
→ Mode: Full workflow
→ Rigor: Recommending spec-anchored (auth is security-critical, shared)
Phase 1 (Specify): Delegating to spec-writer...
[spec-writer guides user through OAuth2 spec creation]
✓ Spec written to specs/oauth2-login.md
Phase 2 (Plan): Invoking spec-planner agent...
[agent analyzes codebase and generates plan]
✓ Plan written to specs/oauth2-login.plan.md
"Here's the plan with 8 tasks. Review and approve?"
Phase 3 (Implement): Working through tasks...
Task 1/8: Add OAuth2 client configuration ✓
Task 2/8: Create callback endpoint ✓
...
Task 8/8: Add session management ✓
Phase 4 (Validate): Invoking spec-validator agent...
✓ All 12 acceptance criteria met
✓ 5/6 edge cases covered (1 marked UNCLEAR - manual verification needed)
Report: specs/oauth2-login.validation.md
User: "Fix the off-by-one error in the pagination component"
SDD Workflow:
→ Detected: 1-2 files, bug fix, clear scope
→ Mode: Lightweight (skip formal plan)
→ Rigor: spec-first
Phase 1: Quick acceptance criteria:
AC1: Given page 1 with 10 items per page, when requesting page 2, then items 11-20 are shown
AC2: Given the last page, when displayed, then only remaining items shown (no duplicates)
✓ Spec written to specs/pagination-fix.md
Phase 3: Implementing fix...
✓ Fixed offset calculation in pagination.ts
Phase 4: Validating...
✓ Both acceptance criteria met
Cause: They feel it's overhead for a "simple" change. Solution: Explain value: "Specs prevent rework by clarifying requirements upfront. Even 2-3 acceptance criteria help." If they insist, let them proceed but note the risk of rework.
Cause: The spec-planner agent missed acceptance criteria or misinterpreted constraints. Solution: Phase 2 should be re-run. The plan must address every acceptance criterion in the spec. Review the spec for clarity if the agent consistently misinterprets it.
Cause: Reality doesn't match the plan — new constraints discovered during coding. Solution: This is normal. Update the plan if the divergence is intentional. Flag it if accidental. The plan is a guide, not a contract.
Cause: Acceptance criteria were met but edge cases were missed during implementation. Solution: Better late than never. The gaps inform either code fixes or spec updates (if requirements changed during implementation).
Cause: The three levels seem abstract without project context. Solution: Default to spec-first. It has the lowest overhead and still provides value. Suggest upgrading later if the feature becomes long-lived.
Cause: User closes session or context window fills up. Solution: Artifacts on disk allow resumption. Step 0 handles detection automatically on the next invocation.
npx claudepluginhub am2rican5/cc-plugin --plugin am2rican5Writes structured specifications before coding. Use when requirements are ambiguous, starting a new project/feature, or changes touch multiple files.
Enforces a gated Spec → Plan → Build → Test → Review → Ship lifecycle for multi-file features and projects, preventing AI coding agents from skipping specification and verification steps.
Guides spec-driven development through phases: research, requirements, design, tasks, autonomous task-by-task implementation. Decomposes large epics into ordered specs with progress tracking.