/craft:abort [slice-NNN]from craft
Abandon a slice. Asks confirmation, then closes the plan file by default — deleted, or moved into .claude/plans/.closed/ when the user's settings deny or ask on removing it. Aborted slices have no archive value — they leave only their (possibly partial) commits behind, which the user manages separately.
Ships in craft. Installing the plugin adds it to Claude Code.
Discard work on a slice that won't be completed. The slice plan file is closed by default — deleted, or moved into .claude/plans/.closed/ (gitignored once /craft:prime step 4f's block is applied) when the user's settings deny or ask on removing it (D34) — aborted slices are not archived (the archive is for completed slices that earned their place via Phase 9).
If partial commits exist, they remain in the git history and the user is responsible for cleanup (revert, branch reset, etc.) as appropriate.
This command is a durable-state mutation (file deletion or move) and follows the Pre/Post-Assertion pattern documented in skills/workflow/SKILL.md.
Capture <slice-NNN> from the command argument. No defaulting to "the active slice" — abort is destructive and must be explicit.
No argument: pick the slice. A click is explicit, so it is no default. Glob .claude/plans/slice-*-*.md; with no
match end with "No active slice plan to abort.". Otherwise ask which slice to abort in an AskUserQuestion call of its own: one option per slice (label: its ID, description: title and Status:) plus Cancel (the tool needs two options, so a single active slice still gets Cancel as the second); with more than three slices, split the options into steps or group them by status, and nothing is dropped. Where the tool is not available, list the slices as text and ask for the ID. The pick continues as /craft:abort <that id> — A1 below checks it like a typed one; Cancel, or no answer, ends with "Abort cancelled.". A malformed argument (a typo is not the same as no argument) is still refused by A1, not turned into a pick.
Run both. Any failure stops the command before any deletion happens.
The slice ID — typed as the command argument, or clicked at Step 1 — must be present and match the pattern slice-\d{3}.
Failure → abort: "/craft:abort requires a slice ID (e.g., /craft:abort slice-007). Run /craft:status to see active slices."
Glob .claude/plans/slice-<NNN>-*.md.
slice-<NNN>. Run /craft:status to see active slices."slice-<NNN>-*: <list>. This should not happen — inspect .claude/plans/ manually."<slice-plan>.Read <slice-plan> and surface:
About to abort:
Slice: slice-<NNN> "<title>"
Phase: <X>
Status: <status>
Sub-tasks done: <Y>/<Z>
Started: <K> days ago
Run git log --grep "Slice: slice-<NNN>" to find commits already made for this slice. If any:
⚠ <N> commits already exist for this slice:
<hash> <subject>
<hash> <subject>
...
These commits will REMAIN in git history. If you want them removed, you must
do that manually (git reset, git revert, branch operations).
Bash git worktree list --porcelain. If any worktree's branch matches slice-<NNN>-* for this slice:
Bash git -C <worktree-path> status --porcelain to detect uncommitted changes.Bash bash "${CLAUDE_PLUGIN_ROOT}/scripts/handoff-marker-state.sh" <worktree-path> — a live handoff marker
is a question the slice is still waiting on, and git status does not list it when the project ignores .craft/.
On STATE=LIVE show its status and phase (MARKER_STATUS=, MARKER_PHASE=); STALE and NONE add nothing.
When the helper cannot run and a .craft/handoff.md is present (the fallback counts it live), there is no status to
show: say state unknown (helper could not run) in its place.
Live vs. stale and the fallback when the helper cannot run are defined in skills/workflow/SKILL.md →
Handoff marker lifecycle. Read-only: abort never renames a marker.Then ask. Ask it in an AskUserQuestion call of its own (two options, the default No first), and ask the next question (Step 3) only after the answer; where the tool is not available, render the legend below as text:
⚠ A worktree for this slice exists at <path>.
<If uncommitted: "<N> uncommitted files would be lost: <list>">
<If a live marker: "Open handoff: .craft/handoff.md — Status: <MARKER_STATUS>, Phase <MARKER_PHASE> — removal deletes it">
<On the fallback: "Open handoff: .craft/handoff.md — state unknown (helper could not run) — removal deletes it">
Remove the worktree and delete its branch as part of the abort?
[N] No — leave the worktree intact; you can clean it up later with /craft:worktree-clean
[Y] Yes — `git worktree remove <path>` + `git branch -d <branch>` (uses `-D` only if branch has unmerged commits AND user re-confirms)
Default is No — match the rest of /craft:abort's "destructive operations need explicit confirmation" stance. If the user picks [Y] but git branch -d reports unmerged commits, escalate with a separate confirmation before falling back to -D. Never silent force-delete.
If the slice was last modified within the past 60 minutes (stat/ls -lT on the plan file), surface it:
⚠ This slice was last touched <N> minutes ago. Sure you want to abort?
Ask it in an `AskUserQuestion` call of its own (two options, the default No first; where the tool is not available, as text), together with no other question, and wait for the answer before continuing. A No ends the abort here; ambiguity → clean abort.
If the slice plan contains a non-empty ## Handoff section, surface it:
⚠ This slice has a Handoff section that you may still want. Sure you want
to delete it?
Ask it in an `AskUserQuestion` call of its own (two options, the default No first; where the tool is not available, as text), only after the previous question (if any) was answered, and wait for the answer. A No ends the abort here.
1. Abort slice-<NNN>?
[No] Cancel — nothing is changed
[Yes] Continue to the final confirmation
2. Really abort slice-<NNN>? CRAFT cannot undo this — the plan file is closed (deleted; or moved into .claude/plans/.closed/
when your settings deny or ask on removal, or into .claude/plans/_aborted/ if you asked for that — a moved plan is
only recoverable by hand)<, and the worktree <path> with its branch <branch> is removed — only when Step 2b was
answered [Y]>.
[No] Cancel — nothing is changed
[Yes] Abort slice-<NNN> now
The second question names the exact slice ID (slice-<NNN>, three-digit number) and that the step cannot be undone. It is
asked only after the first was answered "Yes". Only proceed when both are answered "Yes". A "No" at either step, or any
other answer → clean abort with: "Abort cancelled." — a No at the first ends the abort before the second is asked.
Where no one can click, render each question as text with its full legend, the second only after an explicit "yes" to the first.
Default action — close the plan, never with an rm of your own (a user may deny or ask on removing files, and CRAFT
never goes around that rule — D34):
bash "${CLAUDE_PLUGIN_ROOT}/scripts/close-file.sh" --project "<project-root>" <slice-plan>
RESULT=moved → the plan now lives at TARGET= in .claude/plans/.closed/ (gitignored once /craft:prime step 4f's
block is applied; a deny or ask rule on removing it, named by RULE_SOURCE=, or doubt, named by REASON=).RESULT=delete → issue DELETE_CMD= exactly as printed, as a Bash call of its own — the permission check stays the
final judge. If that call is denied or refused, run the helper again with --move.ERROR=tracked: → git tracks the plan: git rm -f -- <slice-plan> instead (a staged deletion git can undo; the
human commits it). Any other ERROR= → surface it and stop; P1 reports the plan still in place.If the user explicitly requested archival earlier ("move to _aborted/ instead"), substitute:
mkdir -p .claude/plans/_aborted/
mv <slice-plan> .claude/plans/_aborted/
Archival is never the default — only on explicit user request during this command run.
Run bash "${CLAUDE_PLUGIN_ROOT}/scripts/pause-request.sh" consume --project "<project-root>" (in CRAFT's own source repo scripts/pause-request.sh): a pause request
still pending (skills/workflow/SKILL.md → The pause request) belonged to the slice just abandoned and must not pause the next
one. A no-op (CONSUMED=no) without a request; a missing or failing helper does not stop the abort.
If the user answered [Y] at Step 2b AND Step 5's two confirmations passed:
git worktree remove <path>
git branch -d <branch>
Order matters — the worktree comes off first, then the branch. If git worktree remove reports uncommitted changes, surface the error and skip the git branch -d (the user must reconcile manually); do not pass --force. If git branch -d reports unmerged commits, surface and stop; do not fall back to -D without re-confirming (per the Step 2b legend).
If the user answered [N] at Step 2b, this step does nothing — the worktree remains for manual cleanup via /craft:worktree-clean.
Run both after Step 6. Any failure → warn loudly, surface to the user, do not pretend success.
Glob .claude/plans/slice-<NNN>-*.md.
<path> after abort. The close or mv may have failed silently. Inspect manually."Only runs when Step 6b executed:
Bash git worktree list --porcelain must not list the removed worktree path.Bash git branch --list <branch> must return empty.Failure → "⚠ Worktree-removal was requested but <path> or branch <name> is still present. Inspect with git worktree list / git branch and reconcile manually. The slice plan IS gone — recovery means recreating the worktree from main if needed."
Only runs when Step 6 used the _aborted/ path:
Glob .claude/plans/_aborted/slice-<NNN>-*.md. Must yield exactly one match.Failure → "⚠ Archival was requested but the moved file is not at .claude/plans/_aborted/. The slice plan may have been lost. Inspect manually."
Success (default close):
✓ slice-<NNN> aborted. Plan file <deleted | moved to .claude/plans/.closed/[ (rule in <RULE_SOURCE>) — only when RULE_SOURCE= was printed]>.
✓ Pre-assertions: argument ✓, plan file located
✓ Post-assertions: plan removed
[If commits existed:]
Note: <N> commits remain in git history. Manage manually if cleanup is needed.
Recommended next: /craft:status to see remaining active slices, or /craft:plan for new work.
Success (archival requested):
✓ slice-<NNN> aborted. Plan file moved to .claude/plans/_aborted/.
✓ Pre-assertions: argument ✓, plan file located
✓ Post-assertions: plan removed from active path, archive copy present
[If commits existed:]
Note: <N> commits remain in git history. Manage manually if cleanup is needed.
Recommended next: /craft:status to see remaining active slices.
Aborted:
Abort cancelled — <reason>. Slice plan untouched.
Partial (post-assertion failure):
⚠ Abort partially complete — <which assertion(s) failed>.
Inspect `.claude/plans/` manually to confirm the state.
| Situation | Behavior |
|---|---|
| No argument | Step 1 offers the active slices as a click; the pick is checked by A1 like a typed ID. |
| No argument and no active slice plan | End with "No active slice plan to abort." |
| A1 fails (argument malformed, or no ID after the pick) | Abort with /craft:status hint. |
| A2 fails (no matching plan / multiple matches) | Abort with the diagnostic message. |
| User answers "No" at either confirmation of Step 5 | Clean abort: "Abort cancelled." Nothing is changed. |
| User answers "no" to the recency or handoff warning | Clean abort, plan untouched. |
User wants to move to _aborted/ instead of closing | Allow only when explicitly requested during this command run — mv instead of the close. Never default to archiving. |
| P1 fails (file still present after the close or mv) | Warn loudly; user inspects manually. No auto-retry. |
P2 fails (archival requested but file missing in _aborted/) | Warn loudly; user inspects manually. |
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub chriras/craft --plugin craft24 commands in this plugin
/block/craft:block — Block the Active Slice on a PrerequisiteRecord a first-class `blocked` state on the active slice when work cannot proceed until a prerequisite — itself a unit of work or a decision — is resolved. Classifies the blocker, writes on-demand frontmatter + a/build/craft:build — Implement the Active SlicePhase 4 — implement the active slice. Loads project-local specialist skills lazily, works sub-tasks in order, runs tests silently, bundles at sub-task boundaries./checkout/craft:checkout — Inspect a WorktreeSwitch into a slice- or epic-worktree for human inspection during Recap / Review. Read-only — resolves the worktree path, prints the cd instruction and the stack-pack provisioning hint. Does not install anything./commit/craft:commit — Phase 9 Commit & CleanupPhase 9 — atomic commits, decisions promotion dialog, slice archive write, plan file closing (deleted, or moved into .claude/plans/.closed/ under a rule on removing files). On a pull-request + Protected-main profile it opens a PR and merges via gh only after a GitHub approval ("Freigabe ≠ Merge"). The slice closes here — and a finished epic (Epic-close: after an autopilot run's merge, a sequential run, or slice by slice by hand)./continue/craft:continue — Resume an Active SliceResume work on an active slice. Routes automatically to the right phase command based on the slice's recorded Status. Use after /craft:prime when picking up where you left off./epic/craft:epic — Plan a Multi-Slice EpicPlan a multi-slice epic — captures Vision and initial Slice Decomposition, writes an epic plan file under .claude/plans/.Other plugins' commands for the same job