원클릭으로
comet-archive
Use when Comet change 验证已通过,需要用户确认归档、合并 delta spec,或恢复 archive 阶段。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when Comet change 验证已通过,需要用户确认归档、合并 delta spec,或恢复 archive 阶段。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use only when explicitly invoked as /comet-any or when the user explicitly wants to customize the /comet-classic five-phase workflow or create/upgrade a workflow Skill managed by Comet Creator. Do not use for general Skill authoring, cleanup, or review.
Use only when explicitly invoked as /comet-archive or routed by the root Comet skill/runtime to the archive phase; confirm archive, merge delta specs, and finish the branch.
Use only when explicitly invoked as /comet-build or routed by the root Comet skill/runtime to a full workflow build phase; create or recover the implementation plan and execute tasks.
Use when the user explicitly invokes /comet-classic, asks to start or resume the permanent Comet Classic workflow, or repository evidence identifies one unambiguous active Classic change; route through the intent runtime and .comet.yaml.
Use only when explicitly invoked as /comet-design or routed by the root Comet skill/runtime to a full workflow design phase; create or recover the deep technical Design Doc.
Use only when explicitly invoked as /comet-hotfix or routed by the root Comet skill/runtime to the hotfix preset; fix an existing behavior bug, not an ordinary unmanaged bugfix.
| name | comet-archive |
| description | Use when Comet change 验证已通过,需要用户确认归档、合并 delta spec,或恢复 archive 阶段。 |
openspec/changes/<name>/.comet.yaml 中 verify_result: pass归档摘要和生命周期闭环说明必须使用触发本次工作流的用户请求语言。
按 comet/reference/scripts.md 定位脚本(定位 comet-env.mjs),然后执行入口验证;从任意入口恢复时先按 comet/reference/context-recovery.md 运行恢复检查:
node "$COMET_STATE" check <name> archive
验证通过后继续 Step 1。验证失败时脚本会输出具体失败原因。
入口验证通过后,必须按 comet/reference/decision-point.md 的协议暂停并等待用户确认是否立即归档。不得在用户确认前运行 node "$COMET_ARCHIVE" "<change-name>"。
确认前必须向用户展示简短摘要:
用户确认问题必须以单选题形式呈现,包含以下选项:
node "$COMET_STATE" transition <change-name> archive-reopen 回到 phase: verify,再调用 /comet-verify。若验证阶段确认需要修复,再按 /comet-verify 的验证失败决策回到 /comet-buildphase: archive 状态,等待用户稍后再次调用 /comet-archive只有用户选择「确认归档」后,才允许继续 Step 2。用户选择「需要调整或重新验证」后,必须先执行 archive-reopen 状态回退,不得手动编辑 .comet.yaml。
运行归档脚本,自动完成以下全部步骤:
node "$COMET_ARCHIVE" "<change-name>"
脚本自动执行:
如脚本返回非零退出码,报告错误并停止。
如脚本返回零退出码,归档完成。
脚本摘要中的 X/Y steps succeeded 以真实执行步骤计数,不会因 delta spec 同步或文档标注重复累计。
脚本会调用 OpenSpec 归档能力按 ADDED/MODIFIED/REMOVED/RENAMED 语义合并主 spec,并在归档后校验主 spec 中没有残留 delta-only section 标题。
如需预览而不实际执行,使用 --dry-run 参数。
Spec 生命周期在此完成:
brainstorming → delta spec → 实施 → 验证 → 主 spec 合并 → design doc 标注 → 归档
归档脚本只移动文件和合并 spec,不会自动提交。归档完成后工作区会有以下未提交改动:
openspec/changes/<name>/ 移动到 openspec/changes/archive/YYYY-MM-DD-<name>/必须提示用户提交这些归档改动,否则归档成果会停留在工作区。展示待提交文件后建议执行:
git add -A
git commit -m "chore: archive <change-name>"
如分支处理(阶段 4)选择尚未合并到主分支,提交后按所选方式(合并 / PR / 保持分支)一并收尾。
openspec/changes/archive/YYYY-MM-DD-<change-name>/ 存在.comet.yaml 中 archived: true归档脚本会把 openspec/changes/<name>/ 移动到 openspec/changes/archive/YYYY-MM-DD-<name>/。
WARNING: 归档成功后不要再对原 change 名运行
node "$COMET_GUARD" <change-name> archive,因为原活跃目录已经不存在。误调会导致 guard 报错"change directory not found"。归档完整性以脚本退出码和归档目录状态为准。
Comet 流程全部完成。如需开始新工作,调用 /comet 或 /comet-open。
按 comet/reference/context-recovery.md 执行,phase 参数为 archive。若 archived: true 且归档目录存在,归档已完成,无需再次执行归档操作。