Ralph specum cancel

From tzachbon/smart-ralph · View interactive version

Ralph specum cancel is an AI agent skill from the GitHub repository tzachbon/smart-ralph. This skill should be used only when the user explicitly asks to use `$ralph-specum-cancel`, or explicitly asks Ralph Specum in Codex to stop execution or remove a spec.

How to use this skill

Skill file

Ralph Specum Cancel

Use this to stop execution safely and optionally remove a spec. Safe cancel preserves the spec and every prototype source path.

Derive RALPH_CODEX_PLUGIN_ROOT from this loaded skill by resolving two parent directories from the SKILL.md directory. Never derive it from the project working directory.

Contract

Action

  1. Resolve the target spec. If none exists, report that there is nothing to cancel.
  2. Read .ralph-state.json when present and summarize the current phase and progress.
  3. If activePrototypes is non-empty, use the resolved basePath and run "$RALPH_CODEX_PLUGIN_ROOT/scripts/prototype_records.py" reconcile before cancellation. Process active IDs by created, then ID, at the next safe tool boundary.
  4. For each active prototype:
  1. Safe cancel is the default. After every active prototype has a verified immutable cancelled record, delete only .ralph-state.json through locked_state.py delete-state. Keep the spec directory, .current-spec, terminal records, prototype source, partial work, scratch paths, worktrees, and local branches.
  2. If full removal was explicitly requested, show the resolved spec directory and every prototype isolation path and branch. Require confirmation naming the exact spec directory before removing it. Prototype paths and local branches require separate exact confirmations and are never included in recursive spec cleanup. Never delete a remote branch.
  3. If no state exists, report that no active loop exists and remove nothing unless the exact full-removal confirmation is complete.
  4. Keep active epic files unless the user separately requests their removal. Report exactly what was removed and what was preserved.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.