| name | workflow-complete |
| description | Finalize the workflow — squash commits into one clean commit, remove worktrees, and close the workspace. |
Workflow: Complete Phase
Finalize the work — squash, clean up, and close the workspace.
Skills Integration
Superpowers
finishing-a-development-branch — Invoke this before squashing/merging. It guides the decision on how to integrate the work (squash merge, rebase, etc.) and ensures nothing is left behind.
verification-before-completion — Final pre-merge verification. Run bun check and bun lint --fix one last time on the base worktree before squashing.
Workspace Discovery
The user invokes this as /workflow-complete {slug}.
- If
$ARGUMENTS is empty, scan .workflow/*/ directories and list available workspaces — ask which one
- Scan
.workflow/*/ for a folder matching the slug $ARGUMENTS
- Read
STATUS.yaml — phase must be review-complete. If not, tell the user which phase to complete first.
- Update STATUS.yaml:
phase: completing, updated: {ISO timestamp}
Process
1. Read workspace state
Read STATUS.yaml for:
branch — the base branch name (work/{type}/{slug}/base)
base_worktree — the base worktree path
type — for commit message prefix
Read DESIGN.md for the overview (used in commit message).
2. Squash commits
In the base worktree (which has all task branches merged in), squash all commits since branching from main:
git -C {BASE_WORKTREE} log main..HEAD --oneline
git -C {BASE_WORKTREE} reset --soft main
git -C {BASE_WORKTREE} commit -m "$(cat <<'EOF'
{type}({scope}): {descriptive message}
{Summary from DESIGN.md overview}
Implemented:
- {Key change 1}
- {Key change 2}
- {Key change 3}
EOF
)"
3. Merge to main
First, verify the main tree is clean:
git status --porcelain
If there are uncommitted changes, stop and ask the user to commit or stash them first.
Then merge:
git checkout main
git merge work/{type}/{slug}/base
IMPORTANT: Ask the user before merging. Present the squashed commit and ask:
"Here's the squashed commit. Merge to main?"
4. Clean up worktrees and branches
git worktree remove {BASE_WORKTREE}
git branch -d work/{type}/{slug}/base
git worktree list | grep '.workflow/{type}/{slug}/worktrees' || true
rm -rf {WORKSPACE}/worktrees
5. Mark complete
Update STATUS.yaml:
phase: complete
completed: {ISO timestamp}
- Remove
base_worktree key (no longer valid)
6. Summary
Present final summary:
## Workspace Complete: {slug}
- **Commit**: {hash} — {message}
- **Branch**: merged to main, worktrees removed
- **Workspace**: `.workflow/{type}/{slug}/` preserved for reference
Rules
- Ask before merging — always confirm with the user
- No co-author on squash — the final commit is clean
- Preserve .workflow/ directory — don't delete it, useful for reference (only worktrees/ subdir is removed)
- Conventional commit — squashed message follows project conventions
- Use
-C for git commands — never use cd