spec-coding-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Spec 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

激活时机

  1. Read 00-agent-execution.md first — these are global rules that apply to every phase and take precedence over all other instructions
  2. Start Phase 01 — follow 01-initialization.md to create the requirement definition document
  3. Work through phases in order — consult the reference file for each phase as you enter it
All generated documents go under
.dev/[NNN]-[req-name]/
in the project root.
  1. 首先阅读00-agent-execution.md —— 这些是适用于所有阶段的全局规则,优先级高于其他所有指令
  2. 启动第一阶段 —— 遵循01-initialization.md创建需求定义文档
  3. 按顺序完成各阶段 —— 进入每个阶段时,查阅对应的参考文件
所有生成的文档需存放在项目根目录下的
.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

阶段参考

PhaseOutputReference
01 Initialization
init.md
01-initialization.md
02 Prerequisite Tasks
inspect.md
/
research.md
/
profiling.md
/
diagnosis.md
02-prerequisite-tasks.md
03 Algorithm Design
algorithm-design.md
03-algorithm-design.md
04 Implementation Plan
plan.md
04-implementation-plan.md
05 Task Planning
tasks.md
05-task-planning.md
06 Execution
start-and-resume.md
+ code
06-start-and-resume.md
阶段输出参考文档
01 初始化
init.md
01-initialization.md
02 前置任务
inspect.md
/
research.md
/
profiling.md
/
diagnosis.md
02-prerequisite-tasks.md
03 算法设计
algorithm-design.md
03-algorithm-design.md
04 实现计划
plan.md
04-implementation-plan.md
05 任务规划
tasks.md
05-task-planning.md
06 执行
start-and-resume.md
+ 代码
06-start-and-resume.md

Coding Reference

编码参考

TopicReference
OOP & SOLID Principles07-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
    live
    ; breaking changes are allowed for
    pre-launch
    + new modules
  • Never hardcode secrets; use environment variables
  • All identifiers, comments, and docs must be in English
  • 不得跳过必填阶段
  • 在修改任何内容前先阅读现有代码
  • 进入下一个任务前,需编写并通过单元测试
  • 当项目处于
    live
    状态时,尽量减少变更;对于
    pre-launch
    项目和新模块,允许进行破坏性变更
  • 切勿硬编码密钥;请使用环境变量
  • 所有标识符、注释和文档必须使用英文