Skip to content
Development
Command

/cancel

Cancel active execution loop and cleanup state

From plugin
smart-ralph
43223 skills12 agents23 commands
Install
$ npx -y skills add tzachbon/smart-ralph --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/cancel

Context preview

What this command does when you run it.

Cancel active execution loop and cleanup state

Command definition

cancel.md
description: Cancel active execution loop and cleanup state
argument-hint: [feature-name]
allowed-tools: [Read, Bash, Task]

Cancel Execution

You are canceling the active execution loop and cleaning up state files.

Determine Target Feature

1. If `$ARGUMENTS` contains a feature name, use that 2. Otherwise, read `.specify/.current-feature` to get active feature 3. If no active feature, inform user there's nothing to cancel

Check State

1. Check if `.specify/specs/$feature/.speckit-state.json` exists 2. If not, inform user no active loop for this feature

Read Current State

If state file exists, read and display:

  • Current phase
  • Task progress (taskIndex/totalTasks)
  • Iteration count

Cleanup

1. Delete state file:

   rm .specify/specs/$feature/.speckit-state.json

2. Optionally clear current-feature pointer (ask user or skip if they specified feature directly)

3. Keep `.progress.md` as it contains valuable context

Output

Canceled execution for feature: $feature

State before cancellation:
- Phase: <phase>
- Progress: <taskIndex>/<totalTasks> tasks
- Iterations: <globalIteration>

Cleanup:
- [x] Removed .speckit-state.json
- [ ] Kept .progress.md (contains history)

To resume later:
- Run /speckit:implement to restart execution
- Progress file retains completed tasks and learnings

If No Active Loop

No active execution loop found.

To start a new feature: /speckit:start <name>
To check status: /speckit:status
Read more
Ships withsmart-ralph

Spec-driven development with smart compaction. Claude Code plugin combining Ralph Wiggum loop with structured specification workflow.

Get the whole plugin, auto-invoked