用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/rpamis/comet --skill comet-archive命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | comet-archive |
| description | Phase 5 of Comet Classic — confirm archive, merge delta specs, and finish the branch. |
Before starting or recovering, read and follow comet-classic/reference/classic-layout.md. Every OpenSpec CLI call in this file must use the adapter, and every file path must use the <classic-*> logical roots bound by that protocol.
branch_status: pending)verify_result: pass in <classic-change-dir>/.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-classic/reference/scripts.md, then run entry verification. When resuming from any entry point, first run the recovery check in comet-classic/reference/context-recovery.md:
comet state select <change-name>
comet state check <name> archive
Proceed 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-classic/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-classic/reference/decision-point.md protocol to pause and wait for the user to confirm whether to archive now and how to handle the archive commit. 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 every option below. Text fallback must use this table. A structured question must use Method as its short label and Actual effect as its description; do not shorten these into ambiguous choices:
| Option | Method | Actual effect |
|---|---|---|
| A | Archive locally (no push) | Complete Archive and create the only archive commit; keep it on the current bound branch without pushing or creating a PR |
| B | "Confirm archive and push now" | Complete Archive and create the only archive commit, then push the current bound branch without creating a PR |
| C | "Confirm archive, push now, and create a PR" | Complete Archive and create the only archive commit, push the current bound branch, then create a PR |
| D | "Needs adjustment or re-verification" | Do not archive; run comet state transition <change-name> archive-reopen to return to phase: verify, then invoke /comet-verify; if fixes are needed, follow the verification-failure decision back to /comet-build |
| E | "Do not archive yet" | Do not run archive-confirm or the archive command, commit, or push; keep the active change, phase: archive, and branch_status: pending, then wait to invoke /comet-archive later |
Only after the user selects A, B, or C, record the archive-commit handling choice and immediately run:
comet state transition <change-name> archive-confirm
If 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 D, "Needs adjustment or re-verification", first run the archive-reopen state transition; do not edit .comet.yaml manually. After the user selects E, "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 → archive
The archive script only moves files and merges the spec; it does not commit. After archiving, the worktree holds these uncommitted changes:
<classic-change-dir>/ to <classic-archive-root>/YYYY-MM-DD-<name>/First persist the confirmed archive-commit handling choice into archived state, then run the final archive guard:
comet state set <change-name> branch_status handled
comet guard <change-name> archive
Here, handled means only that the user confirmed how to handle this complete archive commit, including keeping it local, pushing it, or pushing it and creating a PR. 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 handling method the user confirmed in Step 1:
After the user selects B or C, 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.
For A, the selected handling method is complete once the only archive commit succeeds. For B or C, wait until every selected remote operation succeeds. Only after the selected handling method completes may you run comet state clear-selection and report the Classic workflow complete.
Archive no longer invokes Superpowers finishing-a-development-branch and does not offer local merge, switch, delete, or rebase operations. A user who wants to complete Archive locally must select A in Step 1; a user who is not ready to archive must select E.
<classic-archive-root>/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 <classic-change-dir>/ to <classic-archive-root>/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-classic/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 B or C from Step 1; A performs no remote operation. This Skill does not promise automatic recovery after the user leaves the flow and changes branch topology independently.