spec-driven-modify
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou are helping the user modify an existing spec-driven change artifact.
你正在协助用户修改现有的基于规范的变更工件。
Prerequisites
前提条件
The directory must exist at the project root. Before proceeding, verify:
.spec-driven/ls .spec-driven/If this fails, the project is not initialized. Run first.
/spec-driven-init项目根目录下必须存在目录。在继续操作前,请验证:
.spec-driven/ls .spec-driven/如果验证失败,说明项目尚未初始化,请先运行。
/spec-driven-initSteps
操作步骤
-
Select the change — runto list active changes. Ask the user which change they want to modify. If they already specified one, use it.
node {{SKILL_DIR}}/scripts/spec-driven.js modify -
Understand the requested change — ask the user what changes they want to make if not already specified. Focus on the content of the change, not which files to edit.
-
Determine affected artifacts — based on the change request, decide which files need modification. A single change may affect multiple artifacts:
- — scope, goals, or requirements changes
proposal.md - — delta specs describing observable behavior changes, mirroring
specs/by file path.spec-driven/specs/ - — implementation approach or architecture decisions
design.md - — task breakdown, additions, or removals
tasks.md - — new questions or resolved answers
questions.md
Read all relevant artifact files before making changes.- If the request affects , also read
specs/,.spec-driven/config.yaml, and each relevant main spec file before editing..spec-driven/specs/INDEX.md
-
Apply modifications:
- For and
proposal.md: edit freelydesign.md - For : preserve the delta spec format. Keep the matching file path under
specs/, usechanges/<name>/specs/,## ADDED Requirements, and## MODIFIED Requirementssection markers as needed, and keep## REMOVED Requirementsheadings intact. Write observable behavior only — do not turn specs into implementation notes, architecture details, or API design docs.### Requirement: - For : preserve all
tasks.mdcompleted task state — only add, remove, or reword- [x]incomplete tasks unless the user explicitly asks to change completed ones- [ ] - For : add new questions under
questions.md, or move questions to## Openwith an## Resolvedanswer line when the human provides answersA:
- For
-
Show a summary — briefly describe what changed across all modified files and confirm with the user.
-
选择变更项 — 运行列出当前活跃的变更项。询问用户想要修改哪一个变更项;如果用户已经指定,则直接使用该变更项。
node {{SKILL_DIR}}/scripts/spec-driven.js modify -
明确变更需求 — 如果用户未说明具体修改内容,请询问他们想要进行哪些变更。重点关注变更的内容,而非需要编辑的文件。
-
确定受影响的工件 — 根据变更需求,决定需要修改哪些文件。单次变更可能涉及多个工件:
- — 范围、目标或需求变更
proposal.md - — 描述可观察行为变更的增量规范,文件路径与
specs/保持一致.spec-driven/specs/ - — 实现方案或架构决策变更
design.md - — 任务拆分、新增或移除
tasks.md - — 新增问题或已解决问题的答案更新
questions.md
在进行修改前,请读取所有相关工件文件。- 如果变更涉及,请同时读取
specs/、.spec-driven/config.yaml以及每个相关的主规范文件,再进行编辑。.spec-driven/specs/INDEX.md
-
执行修改:
- 对于和
proposal.md:可自由编辑design.md - 对于:保留增量规范格式。在
specs/下保持匹配的文件路径,根据需要使用changes/<name>/specs/、## ADDED Requirements和## MODIFIED Requirements章节标记,且保留## REMOVED Requirements标题不变。仅编写可观察的行为内容——不要将规范转化为实现说明、架构细节或API设计文档。### Requirement: - 对于:保留所有
tasks.md标记的已完成任务状态——除非用户明确要求修改已完成任务,否则仅新增、移除或改写- [x]标记的未完成任务- [ ] - 对于:将新问题添加到
questions.md章节下;当用户提供答案时,将问题移至## Open章节,并添加## Resolved开头的答案行A:
- 对于
-
展示修改摘要 — 简要描述所有修改文件中的变更内容,并与用户确认。
Rules
规则
- Never uncheck a completed task () unless the user explicitly asks
- [x] - Don't restructure a file wholesale when a targeted edit is sufficient
- Keep the same heading structure unless changing structure is the explicit goal
- One change request may span multiple files — edit all relevant artifacts together
- When editing , follow
specs/rules and keep each delta file aligned with the corresponding main spec file.spec-driven/config.yaml
- 除非用户明确要求,否则绝不取消已完成任务的勾选状态()
- [x] - 当只需针对性编辑时,不要对文件进行整体重构
- 除非明确目标是修改结构,否则保持原有的标题结构
- 单次变更请求可能涉及多个文件——同时编辑所有相关工件
- 编辑时,遵循
specs/中的规则,确保每个增量文件与对应的主规范文件保持一致.spec-driven/config.yaml