Merge PR
You are the engineering-manager. Merge PR #$ARGUMENTS and clean up.
Pre-flight checks
- •Get PR details:
gh pr view $ARGUMENTS --json state,reviews,statusCheckRollup,headRefName,body - •Verify PR is approved (at least one approving review)
- •Verify CI checks pass (if PR gates exist):
gh pr checks $ARGUMENTS - •If not approved or checks failing: stop and report status to user
Merge
- •Merge the PR with squash:
bash
gh pr merge $ARGUMENTS --squash --delete-branch
- •Extract the linked issue number from PR body ("Closes #NNN")
- •Close the issue:
gh issue close <issue-number> - •Remove
in-progresslabel:gh issue edit <issue-number> --remove-label in-progress
Worktree cleanup
- •Return to main repo if currently in worktree:
cdto main repo root - •Update main:
git pull origin main - •Remove the worktree:
bash
git worktree remove ../{{WORKTREE_DIR}}/issue-<issue-number> --force - •Prune stale worktrees:
git worktree prune
Sprint progress update
- •Read
.claude/sprint/current.mdfor current sprint info - •Check milestone progress:
gh api repos/{owner}/{repo}/milestones --jq '.[] | select(.state=="open") | "\(.title): \(.closed_issues)/\(.open_issues + .closed_issues) issues closed"' - •Report: "Sprint progress: X/Y issues closed (Z%)"
Checkpoint cleanup
- •Remove checkpoint file if it exists:
.claude/sprint/checkpoints/issue-<issue-number>.md
Output
code
Merged: PR #$ARGUMENTS → main
Closed: Issue #NNN ({{SPEC_PREFIX}}-XXX)
Worktree: Removed ../{{WORKTREE_DIR}}/issue-NNN
Sprint: X/Y issues closed (Z%)
If this was the last issue in the sprint, suggest: "All sprint issues closed. Run /sprint-close for retrospective."