spec-driven-development
Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet. Use when drafting a PRD or requirements document with objectives and scope, or when requirements are unclear, ambiguous, or only exist as a vague idea. Use when a single requirement spans several independently testable capabilities and needs decomposing into a capability map of modules before specifying.
1实现原理 · 为什么它能做到
实施严格的四阶段门禁工作流(Specify → Plan → Tasks → Implement),并在多能力复合需求前置 Phase 0 范围检查,每一步必须经人类评审核准后方可进入下一阶段。
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.
在编写具体规格前引入能力映射(Capability Map),以稳定 kebab-case 模块 ID 与单向依赖图切分多模块边界,各模块独立编写 SPEC-{id}.md。
**Propose a capability map before writing any spec.** Small and reviewable — a module table plus a build order, not a project plan:
规格撰写前强制立即公开暴露所有假设(Surface Assumptions),禁止智能体在需求模糊时自行脑补与静默决策。
**Surface assumptions immediately.** Before writing any spec content, list what you're assuming:
规格说明书统一覆盖六大核心要素:明确目标、完整可执行命令、工程目录布局、真实代码风格切片、测试策略与三级行为边界。
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).
2核心能力
4管控建议与判定依据
5第二遍独立确认
- [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 作为权威依据。
6结论
Preview this skill in an interactive chat playground. Generic LLM evaluation trial.
💬 Open Chat Trial (Preview)