| name | finish |
| description | Complete verified feature — create PR, merge, or keep branch |
| when_to_use | TRIGGER when: user says "finish", "ship it", "create PR", or feature status is "verified". DO NOT TRIGGER when: not yet verified. |
| effort | medium |
| allowed-tools | Read, Bash, Glob, AskUserQuestion |
| argument-hint | [feature-name] |
Active Feature State
!for f in .planning/features/*/CONTEXT.md; do [ -f "$f" ] && d=$(dirname "$f") && echo "$(basename "$d"): $(sed -n 's/^status: *//p' "$f")"; done 2>/dev/null; true
!for f in .planning/features/*/PLAN.md; do [ -f "$f" ] && d=$(dirname "$f") && echo "$(basename "$d") plan: $(grep -c 'status="done"' "$f" 2>/dev/null || echo 0) done, $(grep -c 'status="pending"' "$f" 2>/dev/null || echo 0) pending"; done 2>/dev/null; true
Finish the active feature after verification passes.
Find Active Feature
- Look in
.planning/features/ for feature directories
- Read each
CONTEXT.md and check the status field
- Find the feature with status
done
- If
$ARGUMENTS is provided, use it as the feature name
- If no candidates, report that no finished features were found
Prerequisites
Run the project's test suite to confirm everything passes:
If tests fail, stop and report failures. Do not proceed.
Present Options
Feature '{name}' is verified and complete.
1. Create a Pull Request (push branch + gh pr create)
2. Merge to {base-branch} locally
3. Keep as-is (I'll handle it later)
Which option?
Use AskUserQuestion to get the user's choice.
Execute Choice
Option 1: Create PR
First, check that gh is available: gh auth status. If it fails, tell the user to install/authenticate gh and abort.
git rev-parse --verify main &>/dev/null && echo main || echo master
git push -u origin HEAD
gh pr create --title "{type}: {feature-name}" --body "$(cat <<'EOF'
## Summary
{2-3 bullets from CONTEXT.md acceptance criteria}
## Test plan
{key verify commands from PLAN.md}
Built with [Ship](https://github.com/dilhanz/ship)
EOF
)"
Report the PR URL to the user.
Option 2: Merge Locally
BASE=$(git rev-parse --verify main &>/dev/null && echo main || echo master)
git checkout $BASE
git merge {feature-branch}
Run tests again on the merged result. If tests pass, report success.
Option 3: Keep As-Is
Report: "Feature '{name}' kept on current branch. Run /ship:finish again when ready."
Report
## FEATURE FINISHED
Feature: {name}
Action: {PR created / Merged to main / Kept as-is}
{If PR:} PR: {url}
{If merged:} Branch merged and tests passing
$ARGUMENTS