spec-driven-modify

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
You are helping the user modify an existing spec-driven change artifact.
你正在协助用户修改现有的基于规范的变更工件。

Prerequisites

前提条件

The
.spec-driven/
directory must exist at the project root. Before proceeding, verify:
ls .spec-driven/
If this fails, the project is not initialized. Run
/spec-driven-init
first.
项目根目录下必须存在
.spec-driven/
目录。在继续操作前,请验证:
ls .spec-driven/
如果验证失败,说明项目尚未初始化,请先运行
/spec-driven-init

Steps

操作步骤

  1. Select the change — run
    node {{SKILL_DIR}}/scripts/spec-driven.js modify
    to list active changes. Ask the user which change they want to modify. If they already specified one, use it.
  2. 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.
  3. Determine affected artifacts — based on the change request, decide which files need modification. A single change may affect multiple artifacts:
    • proposal.md
      — scope, goals, or requirements changes
    • specs/
      — delta specs describing observable behavior changes, mirroring
      .spec-driven/specs/
      by file path
    • design.md
      — implementation approach or architecture decisions
    • tasks.md
      — task breakdown, additions, or removals
    • questions.md
      — new questions or resolved answers
    Read all relevant artifact files before making changes.
    • If the request affects
      specs/
      , also read
      .spec-driven/config.yaml
      ,
      .spec-driven/specs/INDEX.md
      , and each relevant main spec file before editing.
  4. Apply modifications:
    • For
      proposal.md
      and
      design.md
      : edit freely
    • For
      specs/
      : preserve the delta spec format. Keep the matching file path under
      changes/<name>/specs/
      , use
      ## ADDED Requirements
      ,
      ## MODIFIED Requirements
      , and
      ## REMOVED Requirements
      section markers as needed, and keep
      ### Requirement:
      headings intact. Write observable behavior only — do not turn specs into implementation notes, architecture details, or API design docs.
    • For
      tasks.md
      : preserve all
      - [x]
      completed task state
      — only add, remove, or reword
      - [ ]
      incomplete tasks unless the user explicitly asks to change completed ones
    • For
      questions.md
      : add new questions under
      ## Open
      , or move questions to
      ## Resolved
      with an
      A:
      answer line when the human provides answers
  5. Show a summary — briefly describe what changed across all modified files and confirm with the user.
  1. 选择变更项 — 运行
    node {{SKILL_DIR}}/scripts/spec-driven.js modify
    列出当前活跃的变更项。询问用户想要修改哪一个变更项;如果用户已经指定,则直接使用该变更项。
  2. 明确变更需求 — 如果用户未说明具体修改内容,请询问他们想要进行哪些变更。重点关注变更的内容,而非需要编辑的文件。
  3. 确定受影响的工件 — 根据变更需求,决定需要修改哪些文件。单次变更可能涉及多个工件:
    • proposal.md
      — 范围、目标或需求变更
    • specs/
      — 描述可观察行为变更的增量规范,文件路径与
      .spec-driven/specs/
      保持一致
    • design.md
      — 实现方案或架构决策变更
    • tasks.md
      — 任务拆分、新增或移除
    • questions.md
      — 新增问题或已解决问题的答案更新
    在进行修改前,请读取所有相关工件文件。
    • 如果变更涉及
      specs/
      ,请同时读取
      .spec-driven/config.yaml
      .spec-driven/specs/INDEX.md
      以及每个相关的主规范文件,再进行编辑。
  4. 执行修改
    • 对于
      proposal.md
      design.md
      :可自由编辑
    • 对于
      specs/
      :保留增量规范格式。在
      changes/<name>/specs/
      下保持匹配的文件路径,根据需要使用
      ## ADDED Requirements
      ## MODIFIED Requirements
      ## REMOVED Requirements
      章节标记,且保留
      ### Requirement:
      标题不变。仅编写可观察的行为内容——不要将规范转化为实现说明、架构细节或API设计文档。
    • 对于
      tasks.md
      保留所有
      - [x]
      标记的已完成任务状态
      ——除非用户明确要求修改已完成任务,否则仅新增、移除或改写
      - [ ]
      标记的未完成任务
    • 对于
      questions.md
      :将新问题添加到
      ## Open
      章节下;当用户提供答案时,将问题移至
      ## Resolved
      章节,并添加
      A:
      开头的答案行
  5. 展示修改摘要 — 简要描述所有修改文件中的变更内容,并与用户确认。

Rules

规则

  • Never uncheck a completed task (
    - [x]
    ) unless the user explicitly asks
  • 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
    specs/
    , follow
    .spec-driven/config.yaml
    rules and keep each delta file aligned with the corresponding main spec file
  • 除非用户明确要求,否则绝不取消已完成任务的勾选状态(
    - [x]
  • 当只需针对性编辑时,不要对文件进行整体重构
  • 除非明确目标是修改结构,否则保持原有的标题结构
  • 单次变更请求可能涉及多个文件——同时编辑所有相关工件
  • 编辑
    specs/
    时,遵循
    .spec-driven/config.yaml
    中的规则,确保每个增量文件与对应的主规范文件保持一致