spec-driven-development
Creates comprehensive specifications before coding. Use when starting a new project, feature, or significant refactor and no spec exists. Decouples requirements, surfaces unstated assumptions, maps dependencies, and defines acceptance criteria.
1How It Works & Mechanism
Phase 0 requirement decoupling and modular dependency capability mapping.
Spec-driven development has four phases, preceded by a scope check (Phase 0) that activates only when one request bundles several independently testable capabilities. Do not advance to the next phase until the current one is validated.
Surface Assumptions Checklist: exposes unstated dependencies and performance expectations upfront.
**Propose a capability map before writing any spec.** Small and reviewable — a module table plus a build order, not a project plan:
Explicit acceptance test contract definitions before implementation starts.
**Surface assumptions immediately.** Before writing any spec content, list what you're assuming:
Phased implementation roadmaps with rollback and verification milestones.
Write a spec document covering these six core areas: … 1. **Objective** … 2. **Commands** … 3. **Project Structure** … 4. **Code Style** … 5. **Testing Strategy** … 6. **Boundaries**
将模糊需求重构翻译为具体、可测试的验收条件(Success Criteria),为后续验证建立确定性指标。
**Reframe instructions as success criteria.** When receiving vague requirements, translate them into concrete conditions:
规格保存后必须硬性强制立即停轮(CRITICAL STOP),严禁在同轮会话中直接进入 Plan 或编写代码。
**Stop after writing the spec (CRITICAL).** Once the spec is saved: … **STOP YOUR TURN IMMEDIATELY.** Do NOT start Phase 2, invoke `planning-and-task-breakdown`, or write code in this turn.
保持格式无关性并兼容现有规范体系,可无缝对接 OpenSpec 等第三方规格系统而无需创建冗余副本。
**External spec tools:** This workflow is format-agnostic. If the project already uses OpenSpec or another specification system, keep that system's artifact format and storage conventions
规划产物规范化落盘:计划保存至 tasks/plan.md,任务清单写入 tasks/todo.md,为下游构建与执行命令提供标准契约。
Save the plan to `tasks/plan.md` and record the task list in the task list target defined by `planning-and-task-breakdown` (default `tasks/todo.md`; projects may designate an external tracker instead).
2Core Capabilities
4Recommended Governance & Evidence
5Second-Pass Verification
- [ok] 自身目录零代码与零网络外发 — 经检查,skills/spec-driven-development/ 下仅有 SKILL.md(13099 bytes),全量扫描无网络请求端点、无环境变量读取、无任何可执行脚本。
- [ok] Phase 0 能力图(Capability Map)与稳定 ID 机制真实存在 — SKILL.md Phase 0 明确给出 Capability Map 表格规范(Module id / Responsibility / Depends on)与 Build order 依赖次序示例,并要求模块 ID 一经选定不可中途重命名。
- [ok] 六大核心规格维度与模板一一对应 — SKILL.md 明确列出 Objective、Commands、Project Structure、Code Style、Testing Strategy、Boundaries 六大核心领域,并在下方给出了对齐的 Markdown Spec Template。
- [ok] 强制停轮门禁(Critical Stop)具有绝对约束力 — SKILL.md 显式写明 'Stop after writing the spec (CRITICAL)' 并大写强调 'STOP YOUR TURN IMMEDIATELY. Do NOT start Phase 2, invoke planning-and-task-breakdown, or write code in this turn'。
- [ok] 与下游规划技能的产物对接约定明确 — Phase 2 明确规定规划结果保存至 tasks/plan.md,任务清单录入 tasks/todo.md,并声明以 planning-and-task-breakdown 作为权威依据。
6Verdict & Scenarios
Preview this skill in an interactive chat playground. Generic LLM evaluation trial.
💬 Open Chat Trial (Preview)