| name | workflow-abort |
| description | Abort a workflow — cleans up worktrees and branches, marks the workspace as aborted. |
Workflow: Abort
Clean up a stuck or unwanted workflow. Removes git worktrees and branches but preserves workspace files for reference.
Workspace Discovery
The user invokes this as /workflow-abort {slug}.
- If
$ARGUMENTS is empty, scan .workflow/*/ directories and list available workspaces
- Scan
.workflow/*/ for a folder matching the slug $ARGUMENTS
- Read
STATUS.yaml — can be any phase except complete
Process
1. Confirm with user
Present the current state (phase, completed tasks, pending tasks) and ask:
"This will remove all worktrees and branches for {slug}. The workspace files (discussion, design, plan, reports) will be preserved. Continue?"
Wait for confirmation before proceeding.
2. Remove task worktrees
Check for remaining task worktrees:
git worktree list
For each worktree under .workflow/{type}/{slug}/worktrees/task-*:
git worktree remove {TASK_WORKTREE} --force
git branch -D work/{type}/{slug}/task-{N}
3. Remove base worktree
If base_worktree exists in STATUS.yaml:
git worktree remove {BASE_WORKTREE} --force
git branch -D work/{type}/{slug}/base
4. Clean up worktrees directory
-rf {WORKSPACE}/worktrees