name: speckit-superb-finish description: 'Development branch completion protocol. Bridges an installed obra/superpowers finishing-a-development-branch skill. Guides the user through structured options (merge, PR, keep, discard) after verification passes. Call manually after speckit.superb.verify succeeds.
' compatibility: Requires spec-kit project structure with .specify/ directory metadata: author: github-spec-kit source: superb:commands/finish.md
Finish — Complete Development Branch
Type: Superpowers-adapted command Skill origin: obra/superpowers
finishing-a-development-branchInvocation: Standalone command. Call afterspeckit.superb.verifyconfirms all checks pass.
Prerequisite Gate
Before executing this command, confirm:
speckit.superb.verifyhas been run and passed in this session.- All tests are green (full suite, not subset).
- All
spec.mdrequirements are covered (spec-coverage checklist complete).
If any of the above is not met, STOP:
Cannot finish: verification has not passed yet.
Run /speckit.superb.verify first.
Step 1 — Resolve Installed Skill
Look for finishing-a-development-branch/SKILL.md in this exact order:
./.agents/skills/finishing-a-development-branch/SKILL.md~/.agents/skills/finishing-a-development-branch/SKILL.md
If the workspace and global copies both exist, use the workspace copy.
If no readable file is found, STOP:
ERROR: Optional superpowers skill `finishing-a-development-branch` not found.
Run /speckit.superb.check for diagnostics.
Report the source you resolved before continuing:
Using installed skill: finishing-a-development-branch
Source: [workspace|global]
Path: [resolved path]
Step 2 — Bind Spec-Kit Context
- Read any user-provided directives for the PR or merge context:
$ARGUMENTS - Identify the current feature branch name from
tasks.mdheader orgit branch --show-current. - Identify the base branch:
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null - Summarize what was implemented — read
spec.mdfeature name and the verification evidence from the most recentverifyrun. - Resolve the active feature spec path using the same Spec Kit prerequisite
script pattern used by follow-up commands:
- Prefer
FEATURE_SPECwhen present - Otherwise use
FEATURE_DIR/spec.md - Do not infer the path from the branch name manually
- Prefer
Step 3 — Execute the Finishing Skill
Apply the resolved installed skill with these spec-kit additions:
-
Final test verification — run the full test suite one more time (the skill requires this).
-
Present structured options — exactly 4 choices, no open-ended questions:
Implementation verified complete. What would you like to do? 1. Merge back to [base-branch] locally 2. Push and create a Pull Request 3. Keep the branch as-is (I'll handle it later) 4. Discard this work Which option? -
Execute the chosen option — follow the skill's procedures for each option.
-
Cleanup — handle worktree cleanup per the skill's rules.
Step 4 — Status Synchronization
Synchronize spec.md only for outcomes this command can directly observe.
If the user chooses "Push and create a Pull Request"
Update the spec by running:
.specify/scripts/bash/sync-spec-status.sh --status "In Review"
Only do this after PR creation succeeds.
If PR creation fails, preserve the previous status, typically Verified.
If the user chooses "Keep the branch as-is"
Do not change status.
If verification already passed, the feature usually remains Verified.
If the user chooses "Discard this work"
After explicit confirmation and only after discard succeeds, update the spec by running:
.specify/scripts/bash/sync-spec-status.sh --status "Abandoned"
If discard fails, preserve the previous status.
If the user chooses "Merge back locally"
Do not write Completed.
Preserve the current status.
This bridge intentionally avoids claiming final completion because the dominant real-world integration path is GitHub PR creation and later merge, which happens outside the current bridge hook surface.
General rules:
- Use the script output as the source of truth for resolved spec path and resulting status
- Do not overwrite
Abandonedsilently later - Do not introduce
Completedin the current bridge lifecycle model
Step 5 — Spec-Kit PR Enhancement (Option 2 only)
If the user chooses "Push and create a Pull Request", enhance the PR body with spec-kit context:
## Summary
[Feature name from spec.md]
## Spec Coverage
[Paste the spec-coverage checklist from the verify run]
## Verification Evidence
- Test suite: [N] tests, [N] passing, 0 failing
- Spec coverage: [N/N] requirements verified
## Review
Consider running `/speckit.superb.critique` for spec-aligned review.