Prerequisites
phase: archiveverify_result: passbranch_status: pending- The current branch matches the change’s
bound_branch
branch_status remains pending until the user confirms immediate remote delivery in this phase.
Flow
Final archive and delivery confirmation
Before confirmation, Comet shows the change, verification report, bound branch, ownership of existing uncommitted changes, and the irreversible archive operations it is about to perform.
Only the first two choices run:
archive_confirmation is machine-owned and must not be edited by hand.
Execute archive
archived: true in the actual archive directory.
Preview the operation without mutation:
Put the final state in one archive commit
After archiving, Comet runs these commands before committing:handled means that the remote delivery method has been confirmed. It does not mean that the push or PR creation has already succeeded. The guard must pass before the commit so that archived: true and branch_status: handled enter the same, unique archive commit.
Comet stages only paths attributable to the current change:
- The former active change path and actual archive path
- Main specs updated by this delta
- Archive metadata in the Design Doc and Plan
- The final
.comet.yamlin the archive directory
git add -A or include unrelated user changes.
Remote delivery and completion
After the archive commit succeeds, Comet performs only the delivery method selected during confirmation:- Push the current bound branch once; or
- Push once, then open a PR.
finishing-a-development-branch or asks about local merge, keeping the branch, or deferring the push after archiving. To defer delivery, choose “Do not archive yet” before the irreversible operation.
Only after all selected remote operations succeed does Comet run:
handled, and Comet has left no uncommitted .comet.yaml behind.
Failure handling
- If archive, state persistence, guard, or commit fails, stop without running remote operations.
- If push fails, the complete archive commit remains local; retry only that same push in the current task.
- If PR creation fails, the branch is already pushed; retry only PR creation in the current task.
- Do not clear the current selection or declare the workflow complete after a failure.

