Spec-Driven Workflow
Spec-Driven Workflow enforces writing a specification before any code, defining what the system must, should, and will not do. It produces structured spec documents with mandatory sections, acceptance criteria in Given/When/Then format, and generates test stubs from the spec to drive test-driven development.
✨ What it does
- Enforces a 9-section spec format with mandatory fields.
- Uses RFC 2119 keywords (MUST/SHOULD/MAY) for requirements.
- Requires acceptance criteria in Given/When/Then format.
- Includes bounded autonomy rules to stop and escalate when needed.
- Provides scripts (spec_validator.py, test_extractor.py) for validation and test generation.
- Includes a self-review checklist to verify implementation matches spec.
🎯 When to use it
- When the user asks to write specs before coding or define acceptance criteria.
- When planning features before implementation or following spec-first development.
- When generating tests from specifications or ensuring scope control.
- When the user wants to avoid rework and clarify requirements early.
🚀 How to use
Trigger by asking to write a spec before coding, define acceptance criteria, or plan a feature spec-first. Provide the feature description, context, and any constraints. The skill will guide through phases: gather requirements, write spec, validate, generate tests, implement, and self-review. Example prompts:
Write a spec for a password reset feature before implementing it.
Define acceptance criteria for user login using Given/When/Then.
📄 Output: A structured specification document with numbered requirements, acceptance criteria, edge cases, API contracts, and data models, plus generated test stubs.
📦 Add this skill to Claude Code
# 1. Get the skills repo
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills
# 2. Copy this skill into your project (or ~/.claude/skills for all projects)
mkdir -p .claude/skills
cp -r /tmp/claude-skills/engineering/skills/spec-driven-workflow .claude/skills/spec-driven-workflowSkill source: engineering/skills/spec-driven-workflow/SKILL.md
⚠️ Good to know
Requires strict adherence to the spec-first rule; no code without an approved spec, and the skill assumes the user will follow the full workflow including validation and test generation.
❓ FAQ
What is the Iron Law?
No code without an approved spec. No exceptions, no quick prototypes, no documenting later.
What happens if I discover a missing requirement during implementation?
You must STOP and update the spec first before continuing implementation.
How do I validate a spec?
Run spec_validator.py --file spec.md --strict and manually check that every requirement has acceptance criteria, edge cases cover dependencies, and non-functional requirements have measurable thresholds.
🤖 Overview, features, install steps and FAQ were generated from the project's SKILL.md on Sep 4, 2026. Always check the original source before running commands.