From superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work (git or jj) - guides completion of development work by presenting structured options for merge, PR, or cleanup
npx claudepluginhub fzymgc-house/fzymgc-house-skills --plugin superpowersThis skill uses the workspace's default tool permissions.
> **Before running any VCS commands, read `references/vcs-preamble.md` and use
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Before running any VCS commands, read
references/vcs-preamble.mdand use the appropriate commands for the detected VCS (git or jj).
Guide completion of development work by presenting clear options and handling chosen workflow.
Core principle: Verify tests → Present options → Execute choice → Clean up.
Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."
if jj root >/dev/null 2>&1; then
VCS=jj
else
VCS=git
fi
Before presenting options, verify tests pass:
# Run project's test suite
npm test / cargo test / pytest / go test ./...
If tests fail:
Tests failing (<N> failures). Must fix before completing:
[Show failures]
Cannot proceed with merge/PR until tests pass.
Stop. Don't proceed to Step 2.
If tests pass: Continue to Step 2.
git:
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
jj:
# Find the trunk bookmark (main or master)
jj log -r 'trunk()' --no-graph -T 'bookmarks' --limit 1
Or ask: "This branch split from main - is that correct?"
Present exactly these 4 options:
Implementation 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?
Don't add explanation - keep options concise.
git:
# Switch to base branch
git checkout <base-branch>
# Pull latest
git pull
# Merge feature branch
git merge <feature-branch>
# Verify tests on merged result
<test command>
# If tests pass
git branch -d <feature-branch>
jj:
# Rebase feature onto base branch, skip commits that become empty
jj rebase -s <rev> -o main --skip-emptied
# Verify tests on merged result
<test command>
# If tests pass, delete the bookmark
jj bookmark delete <name>
Then: Cleanup workspace (Step 5)
git:
# Push branch
git push -u origin <feature-branch>
# Create PR
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed>
## Test Plan
- [ ] <verification steps>
EOF
)"
jj:
# Set bookmark and push
jj bookmark set <name> -r @-
jj git push -b <name>
# Create PR
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed>
## Test Plan
- [ ] <verification steps>
EOF
)"
Then: Cleanup workspace (Step 5)
Report: "Keeping branch . Workspace preserved at ."
Don't cleanup workspace.
Confirm first:
This will permanently delete:
- Branch <name>
- All commits: <commit-list>
- Workspace at <path>
Type 'discard' to confirm.
Wait for exact confirmation.
If confirmed:
git:
git checkout <base-branch>
git branch -D <feature-branch>
jj:
jj abandon <rev>
jj bookmark delete <name>
Then: Cleanup workspace (Step 5)
For Options 1, 2, 4:
git:
Check if in worktree:
git worktree list | grep $(git branch --show-current)
If yes:
git worktree remove <worktree-path>
jj:
jj workspace forget <name>
rm -rf <path>
Note: jj workspace forget de-registers the workspace but does NOT
delete files -- you must rm -rf the directory after.
For Option 3: Keep workspace.
| Option | Merge | Push | Keep Workspace | Cleanup Branch |
|---|---|---|---|---|
| 1. Merge locally | yes | - | - | yes |
| 2. Create PR | - | yes | yes | - |
| 3. Keep as-is | - | - | yes | - |
| 4. Discard | - | - | - | yes (force) |
Skipping test verification
Open-ended questions
Automatic workspace cleanup
No confirmation for discard
Using git commands in jj repos
git checkout / git branch -D corrupts jj stateNever:
Always:
Called by:
Pairs with: