tzachbon/smart-ralph / plugins/ralph-specum-codex/skills/ralph-specum-cancel
ralph-specum-cancel
VerifiedThis 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.
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
- Resolve the target by explicit path, exact name, or
.current-spec - Treat a missing
activePrototypesfield as an empty map - Publish reviewed immutable cancellation evidence before removing active state
- Confirm the exact local target before any deletion
- Never delete a remote branch or perform another remote action
- Do not guess on ambiguous names
Action
- Resolve the target spec. If none exists, report that there is nothing to cancel.
- Read
.ralph-state.jsonwhen present and summarize the current phase and progress. - If
activePrototypesis non-empty, use the resolvedbasePathand run"$RALPH_CODEX_PLUGIN_ROOT/scripts/prototype_records.py" reconcilebefore cancellation. Process active IDs bycreated, then ID, at the next safe tool boundary. - For each active prototype:
- Inspect its
owner,leaseToken, andharnessRun.id. WhenownerandleaseTokenare both null or absent, verify thatharnessRun.idis also null or absent and no builder is associated, then skip interrupt and release and continue cancellation. If those fields disagree, treat the entry as inconsistent builder ownership: retain the lease and active entry and stop for that ID. Otherwise, interrupt only its recorded child builder through the bounded harness contract. Release throughlocked_state.py release-lease --id <id> --lease-token <leaseToken>only after the harness verifies that the recorded builder and descendants stopped. If interruption is unavailable or unverified, or reports any failed termination attempt, retain the lease and active entry and stop cancellation for that ID. - Preserve its question, blocker, return phase and task, timestamps, local branch, isolation pointers, partial implementation, run evidence, stale metadata, and downstream artifacts.
- Render an exclusive terminal candidate with
verdict: cancelled,gateApproved: false, andsourceDisposition: retained. Never overwrite existing candidate or final bytes; allocate a new publication ID withsupersedes: ["<original-id>"]on collision. - Before review, store the exact returned
candidateHash. Update the existing original entry through compare-and-settransition, or reserve a separate superseding ID through create-onlylocked_state.py upsert-prototypewith the copied recovery fields and exactcandidateHash. Retain the original active entry unchanged while the superseding record is reviewed. A reservation collision preserves both entries and candidates and allocates another ID. - Send the exact candidate bytes and source pointers to the reviewer. Continue only after
REVIEW_PASS, then callreview-candidateandpublishwith the publication ID and exact candidate hash. - Re-read and parse the immutable final and verify its hash. Publication removes its own active publication entry. When a superseding ID was used, remove the original active entry only after final verification succeeds; any earlier failure retains it. Reconcile, then restore the recorded main phase and task index through
locked_state.pywithout changing unrelated state.
- Inspect its
- Safe cancel is the default. After every active prototype has a verified immutable
cancelledrecord, delete only.ralph-state.jsonthroughlocked_state.py delete-state. Keep the spec directory,.current-spec, terminal records, prototype source, partial work, scratch paths, worktrees, and local branches. - 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.
- If no state exists, report that no active loop exists and remove nothing unless the exact full-removal confirmation is complete.
- Keep active epic files unless the user separately requests their removal. Report exactly what was removed and what was preserved.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |