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.
branch_status: pending)verify_result: pass in openspec/changes/<name>/.comet.yamlArchive summaries and lifecycle closure notes must use the configured Comet artifact language from comet state get <name> language.
Use the stable comet CLI described in comet/reference/scripts.md, then run entry verification. When resuming from any entry point, first run the recovery check in comet/reference/context-recovery.md:
comet state select <change-name>
comet state check <name> archiveProceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
If the select / check output is BLOCKED because bound_branch does not match the current branch, immediately pause under comet/reference/decision-point.md and let the user choose one option: switch back to the bound branch and rerun entry verification, or run comet state rebind <change-name> after the user explicitly confirms the current branch should take over this change, then rerun entry verification. Do not switch branches or rebind on your own.
After entry verification passes, first read comet state get <change-name> isolation, then follow the comet/reference/decision-point.md protocol to pause and wait for the user to confirm whether to archive and deliver remotely now. Must not run comet state transition <change-name> archive-confirm or 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 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-buildarchive-confirm or the archive command; keep the active change, phase: archive, and branch_status: pending, then wait for the user to invoke /comet-archive again laterOnly after the user selects one of the first two immediate-delivery choices, record that choice and immediately run:
comet state transition <change-name> archive-confirmIf the transition returns a non-zero exit code, report the error and stop. Only after the transition succeeds 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. After the user selects "Do not archive yet", stop immediately; do not archive, commit, push, or set branch_status to handled.
Run the archive script:
comet archive "<change-name>"The script automatically executes:
If 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 → archiveThe archive script only moves files and merges the spec; it does not commit. After archiving, the worktree holds these uncommitted changes:
openspec/changes/<name>/ to openspec/changes/archive/YYYY-MM-DD-<name>/First persist the confirmed delivery choice into archived state, then run the final archive guard:
comet state set <change-name> branch_status handled
comet guard <change-name> archiveHere, handled means only that the user confirmed how to deliver this complete archive commit remotely. It does not mean that push or PR creation has succeeded. Stop without committing or performing remote operations if the state write or guard fails.
After archive, read git status --short and compare it with the pre-archive dirty-worktree attribution baseline. Stage only paths attributable to this change: the original active path, actual archive path printed by the command, the archived .comet.yaml updated to branch_status: handled, main specs changed by this delta, and archive metadata on this Design Doc/Plan. Stop if any path cannot be attributed.
Use explicit pathspecs, then inspect the staged diff. Never stage the whole repository or mix the user's pre-existing changes into the archive commit:
git add -- <individually verified archive paths...>
git diff --cached --stat
git commit -m "chore: archive <change-name>"Stop if the commit fails or the staged diff contains unrelated paths.
After the archive commit succeeds, perform only the remote delivery method the user confirmed in Step 1:
If push fails, report the error and retain the current selection record; do not clear selection or report completion. Within the current task, retry only that same push. If PR creation fails, the branch already contains the complete archive commit; report the error and retain the current selection record. Within the current task, retry only PR creation. Do not automatically switch, delete, rebase, or rewrite branches after failure.
Only after every remote delivery operation selected by the user succeeds may you run comet state clear-selection and report the Classic workflow complete.
Archive no longer invokes Superpowers finishing-a-development-branch. Local merge, keeping a branch for later, or postponing push does not immediately produce final remote state, so the user must choose "Do not archive yet" in Step 1 rather than choosing it after archive.
openspec/changes/archive/YYYY-MM-DD-<change-name>/ exists.comet.yaml contains archived: truebranch_status: handled is included in the only archive commitcomet guard <change-name> archive passesThe archive script moves openspec/changes/<name>/ to openspec/changes/archive/YYYY-MM-DD-<name>/.
comet guard <change-name> archive resolves the actual archive directory from the original change name; do not construct a dated archive path manually.
Comet Classic workflow complete. To start new Classic work, invoke /comet-classic or /comet-open.
Follow comet/reference/context-recovery.md with phase set to archive. If archived: true and the archive directory exists, do not re-execute archive operations. Retry the same push or PR creation only when the current task context explicitly records the remote delivery method selected in Step 1. This Skill does not promise automatic recovery after the user leaves the flow and changes branch topology independently.
2945693
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.