Agent Skillstzachbon/smart-ralph › ralph-specum-cancel

ralph-specum-cancel

GitHub

用于安全停止 Ralph Specum 执行并可选移除 spec。支持清理原型、释放租约、保留证据及审批流程,确保操作可追溯且不影响远程分支。

plugins/ralph-specum-codex/skills/ralph-specum-cancel/SKILL.md tzachbon/smart-ralph

Trigger Scenarios

用户明确要求取消或停止 Ralph Specum 执行 需要移除当前 spec 或清理原型状态

Install

npx skills add tzachbon/smart-ralph --skill ralph-specum-cancel -g -y
More Options

Non-standard path

npx skills add https://github.com/tzachbon/smart-ralph/tree/main/plugins/ralph-specum-codex/skills/ralph-specum-cancel -g -y

Use without installing

npx skills use tzachbon/smart-ralph@ralph-specum-cancel

指定 Agent (Claude Code)

npx skills add tzachbon/smart-ralph --skill ralph-specum-cancel -a claude-code -g -y

安装 repo 全部 skill

npx skills add tzachbon/smart-ralph --all -g -y

预览 repo 内 skill

npx skills add tzachbon/smart-ralph --list

SKILL.md

Frontmatter
{
    "name": "ralph-specum-cancel",
    "metadata": {
        "action": "cancel",
        "surface": "helper"
    },
    "description": "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."
}

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 activePrototypes field 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

  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:
    • Inspect its owner, leaseToken, and harnessRun.id. When owner and leaseToken are both null or absent, verify that harnessRun.id is 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 through locked_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, and sourceDisposition: retained. Never overwrite existing candidate or final bytes; allocate a new publication ID with supersedes: ["<original-id>"] on collision.
    • Before review, store the exact returned candidateHash. Update the existing original entry through compare-and-set transition, or reserve a separate superseding ID through create-only locked_state.py upsert-prototype with the copied recovery fields and exact candidateHash. 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 call review-candidate and publish with 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.py without changing unrelated state.
  5. 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.
  6. 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.
  7. If no state exists, report that no active loop exists and remove nothing unless the exact full-removal confirmation is complete.
  8. Keep active epic files unless the user separately requests their removal. Report exactly what was removed and what was preserved.

Version History

  • 183c1be Current 2026-09-02 23:24

    新增对原型阶段的处理逻辑,包括 reconcile 操作、租约释放验证及候选记录评审流程。

  • 1b33202 2026-07-05 09:17

Same Skill Collection

.agents/skills/Command Development/SKILL.md
.agents/skills/MCP Integration/SKILL.md
.agents/skills/Plugin Settings/SKILL.md
.agents/skills/Plugin Structure/SKILL.md
.agents/skills/Skill Development/SKILL.md
plugins/ralph-speckit/skills/communication-style/SKILL.md
plugins/ralph-speckit/skills/delegation-principle/SKILL.md
plugins/ralph-speckit/skills/smart-ralph/SKILL.md
plugins/ralph-speckit/skills/speckit-workflow/SKILL.md
plugins/ralph-specum-codex/skills/interview-framework-codex/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-design/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-feedback/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-help/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-implement/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-index/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-prototype/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-refactor/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-requirements/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-research/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-start/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-status/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-switch/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-tasks/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum-triage/SKILL.md
plugins/ralph-specum-codex/skills/ralph-specum/SKILL.md
plugins/ralph-specum/skills/communication-style/SKILL.md
plugins/ralph-specum/skills/interview-framework/SKILL.md
plugins/ralph-specum/skills/reality-verification/SKILL.md
plugins/ralph-specum/skills/smart-ralph/SKILL.md
plugins/ralph-specum/skills/spec-workflow/SKILL.md
.agents/skills/Hook Development/SKILL.md

Metadata

Files
0
Version
183c1be
Hash
e43cbacc
Indexed
2026-07-05 09:17

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-03 11:15
浙ICP备14020137号-1 $お客様$