一键导入
comet-archive
Comet Phase 5: Archive. Invoke with /comet-archive. Merge delta specs into main specs with OpenSpec semantics, archive change.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Comet Phase 5: Archive. Invoke with /comet-archive. Merge delta specs into main specs with OpenSpec semantics, archive change.
用 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 | Comet Phase 5: Archive. Invoke with /comet-archive. Merge delta specs into main specs with OpenSpec semantics, archive change. |
verify_result: pass in openspec/changes/<name>/.comet.yamlArchive summaries and lifecycle closure notes must use the language of the user request that triggered this workflow.
Execute entry verification:
COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
if [ -z "$COMET_ENV" ]; then
echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
return 1
fi
. "$COMET_ENV"
"$COMET_BASH" "$COMET_STATE" check <name> archive
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
After entry verification passes, must follow the comet/reference/decision-point.md protocol to pause and wait for the user to confirm whether to archive immediately. Must not run "$COMET_BASH" "$COMET_ARCHIVE" "<change-name>" before user confirmation.
Before confirmation, show the user a brief summary:
The user confirmation question must be presented as a single-select question with these options:
"$COMET_BASH" "$COMET_STATE" transition <change-name> archive-reopen to return to phase: verify, then invoke /comet-verify. If verification confirms fixes are needed, follow /comet-verify's verification-failure decision flow back to /comet-buildphase: archive state and wait for the user to invoke /comet-archive again laterOnly after the user selects "Confirm archive" may Step 2 continue. After the user selects "Needs adjustment or re-verification", must first run the archive-reopen state transition; do not edit .comet.yaml manually.
Run the archive script to automatically complete all steps:
"$COMET_BASH" "$COMET_ARCHIVE" "<change-name>"
The script automatically executes:
archived: true through comet-state transition <archive-name> archivedIf script returns non-zero exit code, report error and stop.
If script returns zero exit code, archive is complete.
The summary X/Y steps succeeded counts real executed steps and does not double-count delta spec sync or document annotation.
The script calls OpenSpec archive to merge ADDED/MODIFIED/REMOVED/RENAMED delta semantics into main specs, then verifies main specs do not contain delta-only section headings.
Use --dry-run flag to preview without executing.
Spec lifecycle completes here:
brainstorming → delta spec → implementation → verification → main spec merge → design doc annotation → archive
openspec/changes/archive/YYYY-MM-DD-<change-name>/ exists.comet.yaml contains archived: trueThe archive script moves openspec/changes/<name>/ to openspec/changes/archive/YYYY-MM-DD-<name>/.
WARNING: After successful archive, do not run
"$COMET_BASH" "$COMET_GUARD" <change-name> archiveagainst the old active change name; the active directory no longer exists. Doing so will cause the guard to error with "change directory not found". Archive completeness is determined by script exit code and archived directory state.
Comet workflow complete. To start new work, invoke /comet or /comet-open.
Follow comet/reference/context-recovery.md with phase set to archive. If archived: true and archive directory exists, archival is complete — do not re-execute archive operations.