spec-driven-archive
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou are helping the user archive a completed spec-driven change.
你正在帮助用户归档已完成的spec-driven变更。
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 which change to archive. If already specified, use it.
node {{SKILL_DIR}}/scripts/spec-driven.js modify -
Check for incomplete tasks — run:
node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>If, warn the user:remaining > 0"This change has X incomplete tasks. Archiving will preserve them as-is. Are you sure you want to proceed?" Wait for confirmation before continuing. -
Merge delta specs — list all files in:
.spec-driven/changes/<name>/specs/- If is empty: ask the user to confirm this change has no observable spec impact before continuing.
specs/ - For each delta file (e.g. ), merge into the corresponding main spec file (e.g.
specs/install/install-behavior.md):.spec-driven/specs/install/install-behavior.md- ADDED: append the blocks to the target file (create it if it doesn't exist)
### Requirement: - MODIFIED: locate the existing block by name and replace it in place
### Requirement: <name> - REMOVED: locate the block by name and delete it; remove the file if it becomes empty
### Requirement: <name>
- ADDED: append the
- Briefly summarize what changed in after merging.
specs/
- If
-
Update specs/INDEX.md — after merging, update:
.spec-driven/specs/INDEX.md- Add entries for any newly created spec files (with a one-line description)
- Remove entries for any deleted spec files
- Leave existing entries unchanged unless the file's scope changed
-
Archive the change — run:
node {{SKILL_DIR}}/scripts/spec-driven.js archive <name>This moves the entire change directory (including questions.md) to the archive. -
Confirm — report the result:
- Where the change was moved to (e.g. )
.spec-driven/changes/archive/2024-01-15-<name>/ - Suggest running if there's follow-up work
/spec-driven-propose
- Where the change was moved to (e.g.
-
选择变更 — 运行列出所有活跃变更。询问用户要归档哪一个变更。如果已指定变更名称,则直接使用该名称。
node {{SKILL_DIR}}/scripts/spec-driven.js modify -
检查未完成任务 — 运行:
node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>如果,向用户发出警告:remaining > 0"此变更存在X项未完成任务。归档操作将按原样保留这些任务。你确定要继续吗?" 等待用户确认后再继续。 -
合并增量规格文档 — 列出下的所有文件:
.spec-driven/changes/<name>/specs/- 如果目录为空:请用户确认该变更对规格文档无可见影响后再继续。
specs/ - 对于每个增量文件(例如),将其合并到对应的主规格文件(例如
specs/install/install-behavior.md)中:.spec-driven/specs/install/install-behavior.md- ADDED(新增):将块追加到目标文件中(如果目标文件不存在则创建)
### Requirement: - MODIFIED(修改):通过名称定位现有的块并原地替换
### Requirement: <name> - REMOVED(移除):通过名称定位块并删除;如果文件变为空则删除该文件
### Requirement: <name>
- ADDED(新增):将
- 合并完成后,简要总结目录中的变更内容。
specs/
- 如果
-
更新specs/INDEX.md — 合并完成后,更新:
.spec-driven/specs/INDEX.md- 为所有新创建的规格文件添加条目(附带一行描述)
- 删除已删除规格文件的条目
- 除非文件范围发生变化,否则保留现有条目不变
-
归档变更 — 运行:
node {{SKILL_DIR}}/scripts/spec-driven.js archive <name>此命令会将整个变更目录(包括questions.md)移动到归档目录中。 -
确认结果 — 向用户报告操作结果:
- 变更被移动到的位置(例如)
.spec-driven/changes/archive/2024-01-15-<name>/ - 如果有后续工作,建议运行
/spec-driven-propose
- 变更被移动到的位置(例如
Rules
规则
- Always check for incomplete tasks before archiving
- Always merge delta specs before archiving — this is a hard gate, not optional
- Do not skip the incomplete-task warning — let the user make an informed decision
- Do not delete anything — archive only moves, never deletes
- 归档前必须检查未完成任务
- 归档前必须合并增量规格文档 — 这是硬性要求,不可跳过
- 不得跳过未完成任务警告 — 让用户做出知情决策
- 不得删除任何内容 — 归档仅执行移动操作,绝不删除