with one click
workflow-complete
// Finalize the workflow — squash commits into one clean commit, remove worktrees, and close the workspace.
// Finalize the workflow — squash commits into one clean commit, remove worktrees, and close the workspace.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | workflow-complete |
| description | Finalize the workflow — squash commits into one clean commit, remove worktrees, and close the workspace. |
Finalize the work — squash, clean up, and close the workspace.
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.The user invokes this as /workflow-complete {slug}.
$ARGUMENTS is empty, scan .workflow/*/ directories and list available workspaces — ask which one.workflow/*/ for a folder matching the slug $ARGUMENTSSTATUS.yaml — phase must be review-complete. If not, tell the user which phase to complete first.phase: completing, updated: {ISO timestamp}Read STATUS.yaml for:
branch — the base branch name (work/{type}/{slug}/base)base_worktree — the base worktree pathtype — for commit message prefixRead DESIGN.md for the overview (used in commit message).
In the base worktree (which has all task branches merged in), squash all commits since branching from main:
# Count commits to squash
git -C {BASE_WORKTREE} log main..HEAD --oneline
# Soft reset to branch point
git -C {BASE_WORKTREE} reset --soft main
# Create single clean commit (NO co-author)
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
)"
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:
# Switch to main in the project root
git checkout main
# Merge the squashed branch
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?"
# Remove base worktree
git worktree remove {BASE_WORKTREE}
# Delete base branch
git branch -d work/{type}/{slug}/base
# Remove any leftover task worktrees (shouldn't exist, but just in case)
# Check for any remaining worktrees in the workflow directory
git worktree list | grep '.workflow/{type}/{slug}/worktrees' || true
# Clean up the worktrees directory
rm -rf {WORKSPACE}/worktrees
Update STATUS.yaml:
phase: completecompleted: {ISO timestamp}base_worktree key (no longer valid)Present final summary:
## Workspace Complete: {slug}
- **Commit**: {hash} — {message}
- **Branch**: merged to main, worktrees removed
- **Workspace**: `.workflow/{type}/{slug}/` preserved for reference
-C for git commands — never use cd