spec-driven-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou are helping the user initialize the spec-driven workflow in a project.
你正在帮助用户在项目中初始化spec-driven工作流。
Steps
步骤
-
Confirm the target project — ask which project to initialize. If the user is already in the project root, use the current directory. Accept eitheror an explicit path.
. -
Run init — run:
node {{SKILL_DIR}}/scripts/spec-driven.js init [path]Pass the path only if it differs from the current directory. -
Draft context — read any existing project files that describe the project (,
README.md,AGENTS.md,CLAUDE.md,package.json, etc.). Draft apom.xmlvalue of 3–5 sentences covering:context- What the project does
- Tech stack and language(s)
- Key conventions or constraints worth noting
Write the draft into thefield ofcontext, then show it to the user and ask if they want to adjust anything..spec-driven/config.yaml -
Capture existing behavior — ask: "Does this project already have behavior worth documenting?" If yes, help the user write initial spec files underusing the standard format:
.spec-driven/specs/<category>/- Group by domain area (e.g. ,
auth/,api/)core/ - Use headings with RFC 2119 keywords
### Requirement: <name> - Describe what the system currently does, not what it should do
- Add an entry for each new file to
.spec-driven/specs/INDEX.md
This step is important for existing projects — without initial specs,has nothing to read and cannot detect conflicts.propose - Group by domain area (e.g.
-
Confirm — show the user what was created and suggest runningto create their first change.
/spec-driven-propose
-
确认目标项目 — 询问用户要初始化哪个项目。如果用户已处于项目根目录,则使用当前目录。接受或明确的路径作为输入。
. -
运行init命令 — 执行以下命令:
node {{SKILL_DIR}}/scripts/spec-driven.js init [path]仅当目标路径与当前目录不同时才需要传入path参数。 -
草拟上下文信息 — 读取所有描述项目的现有文件(如、
README.md、AGENTS.md、CLAUDE.md、package.json等)。草拟一段3-5句话的pom.xml内容,涵盖:context- 项目的功能用途
- 技术栈与使用的编程语言
- 需要注意的关键约定或约束条件
将草拟的内容写入的.spec-driven/config.yaml字段,随后展示给用户并询问是否需要调整。context -
记录现有行为 — 询问用户:“该项目是否已有值得记录的行为?”如果是,帮助用户按照标准格式在目录下编写初始规范文件:
.spec-driven/specs/<category>/- 按领域分组(例如、
auth/、api/)core/ - 使用标题,并采用RFC 2119关键词
### Requirement: <name> - 描述系统当前的实际行为,而非预期行为
- 为每个新文件在中添加对应的条目
.spec-driven/specs/INDEX.md
这一步对已有项目至关重要——如果没有初始规范文件,命令将没有可读取的内容,也就无法检测冲突。propose - 按领域分组(例如
-
确认完成 — 向用户展示已创建的内容,并建议运行命令来创建他们的第一个变更提议。
/spec-driven-propose
Rules
规则
- Do not create any changes — initialization only
- Keep the context field concise: 3–5 sentences is enough for the AI to work from
- If .spec-driven/ already exists, do not reinitialize — suggest instead
/spec-driven-propose
- 不得创建任何变更——仅执行初始化操作
- 保持context字段简洁:3-5句话足以供AI使用
- 如果.spec-driven/目录已存在,请勿重新初始化——建议用户使用命令替代
/spec-driven-propose