spec-coding-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSpec Coding Skill
规格编码技能(Spec Coding Skill)
A spec-driven methodology for LLM agents to define, plan, and implement large-scale coding work with quality and consistency.
这是一种基于规格说明的方法,用于指导LLM Agent高质量、一致性地定义、规划和实现大规模编码工作。
When Activated
激活时机
- Read 00-agent-execution.md first — these are global rules that apply to every phase and take precedence over all other instructions
- Start Phase 01 — follow 01-initialization.md to create the requirement definition document
- Work through phases in order — consult the reference file for each phase as you enter it
All generated documents go under in the project root.
.dev/[NNN]-[req-name]/- 首先阅读00-agent-execution.md —— 这些是适用于所有阶段的全局规则,优先级高于其他所有指令
- 启动第一阶段 —— 遵循01-initialization.md创建需求定义文档
- 按顺序完成各阶段 —— 进入每个阶段时,查阅对应的参考文件
所有生成的文档需存放在项目根目录下的路径中。
.dev/[NNN]-[req-name]/Phase Overview
阶段概览
Phase 01 — Initialization (required)
↓
Phase 02 — Prerequisite Tasks (optional, LLM judges)
Phase 03 — Algorithm Design (optional, LLM judges)
↓
Phase 04 — Implementation Plan (required)
↓
Phase 05 — Task Planning (required)
↓
Phase 06 — Execution (required)Phases 02 and 03 are independent — both, one, or neither may be needed.
Phase 01 — 初始化 (必填)
↓
Phase 02 — 前置任务 (可选,由LLM判断是否需要)
Phase 03 — 算法设计 (可选,由LLM判断是否需要)
↓
Phase 04 — 实现计划 (必填)
↓
Phase 05 — 任务规划 (必填)
↓
Phase 06 — 执行 (必填)第2和第3阶段为独立阶段——可根据需要选择执行两者之一、全部或都不执行。
Phase Reference
阶段参考
| Phase | Output | Reference |
|---|---|---|
| 01 Initialization | | 01-initialization.md |
| 02 Prerequisite Tasks | | 02-prerequisite-tasks.md |
| 03 Algorithm Design | | 03-algorithm-design.md |
| 04 Implementation Plan | | 04-implementation-plan.md |
| 05 Task Planning | | 05-task-planning.md |
| 06 Execution | | 06-start-and-resume.md |
| 阶段 | 输出 | 参考文档 |
|---|---|---|
| 01 初始化 | | 01-initialization.md |
| 02 前置任务 | | 02-prerequisite-tasks.md |
| 03 算法设计 | | 03-algorithm-design.md |
| 04 实现计划 | | 04-implementation-plan.md |
| 05 任务规划 | | 05-task-planning.md |
| 06 执行 | | 06-start-and-resume.md |
Coding Reference
编码参考
| Topic | Reference |
|---|---|
| OOP & SOLID Principles | 07-oop-principles.md |
| Coding Standards (all languages) | 08-coding-standards.md |
| 主题 | 参考文档 |
|---|---|
| OOP & SOLID原则 | 07-oop-principles.md |
| 编码规范(全语言) | 08-coding-standards.md |
Core Rules
核心规则
- Never skip a required phase
- Read existing code before modifying anything
- Write and pass unit tests before moving to the next task
- Minimize changes when the project is ; breaking changes are allowed for
live+ new modulespre-launch - Never hardcode secrets; use environment variables
- All identifiers, comments, and docs must be in English
- 不得跳过必填阶段
- 在修改任何内容前先阅读现有代码
- 进入下一个任务前,需编写并通过单元测试
- 当项目处于状态时,尽量减少变更;对于
live项目和新模块,允许进行破坏性变更pre-launch - 切勿硬编码密钥;请使用环境变量
- 所有标识符、注释和文档必须使用英文