flow

/flow-abort

Phase: Any (no phase gate)

Usage: /flow-abort, /flow-abort --auto, or /flow-abort --manual

The escape hatch. Abandons the current feature completely — closes the PR, deletes the remote branch, removes the worktree, and deletes the state file.

Available from any phase, no prerequisites. Best-effort — warns if the state file is missing.


What It Does

  1. Reads .flow-states/<branch>.json for feature details (or infers from git state if the file is missing)
  2. Removes the “Flow In-Progress” label from any issues referenced in the prompt (if state file exists)
  3. Confirms with the user before any destructive action, including any warnings from the entry check
  4. Navigates to the project root
  5. Closes the PR with gh pr close and a comment
  6. Removes the worktree with git worktree remove --force
  7. Deletes the remote branch with git push origin --delete
  8. Deletes the local branch with git branch -D
  9. Deletes .flow-states/<branch>.json and CI sentinel

Steps 4–9 follow a mix of abort-specific actions and cleanup operations. Every step after confirmation is best-effort — if one fails (e.g., PR already closed, worktree already removed), it continues to the next.


When to Use It


vs /flow-complete

  /flow-complete /flow-abort
When After Learn (Phase 5) Any phase
PR Squash-merged into main Closed
Remote branch Deleted (via cleanup) Deleted (via cleanup)
Worktree Removed Removed
State file Deleted Deleted
Missing state Warns, proceeds Warns, proceeds

Use /flow-complete for the happy path after a completed feature. Use /flow-abort to walk away from a feature entirely.


Gates