cancel-ralph
Cancel active Ralph Loop
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- cancel-ralph
- triggers
- cancel ralph, stop loop, cancel loop, ralph stop, end loop
- changelog
- docs/ciclos/cycle28-20260815.md
- description
- Cancel active Ralph Loop
- token_budget
- 2850
03 SKILL.md 正文
When to Use
Cancel active Ralph Loop
Cancel Ralph
Stop an active Ralph Loop before completion.
Overview
Invoke this skill when a ralph-loop is running but should stop early — task scope changed, parameters wrong, loop stuck, or higher priority work.
Rules
- Check first: verify loop is active before attempting cancellation
- Read iteration: report which iteration was reached on cancel
- Clean state: remove the loop state file completely
- Notify: inform user of cancellation + last iteration
Anti-Patterns
| Anti-Pattern | Why | Do Instead |
|---|---|---|
| Force-killing without reading iteration | User loses progress context | Read iteration before deleting |
| Cancelling when no loop active | Wasted operation | Always check with test -f first |
| Leaving stale state file | Next loop start may pick up old state | Always rm -f the file |
| Aborting without telling user | Confusing, breaks trust | Always explain what was cancelled |
| Cancelling during a write operation | Partial state corruption | Wait for iteration boundary or checkpoint |
| Deleting without verifying it's YOUR loop | Could kill another agent's loop | Check loop metadata (task ID, owner) first |
When to Use
- Task requirements changed mid-loop
- Wrong parameters passed to the loop
- Loop appears stuck (repeating same step)
- Higher priority task needs the context slot
Note: Prefer completing tasks properly with <promise>DONE</promise> when possible.
See reference.md for extended details, examples, and detailed patterns.
Anti-Rationalization
| Rationalization | Red Flag | Verification |
|---|---|---|
| "cancelar sin confirmación del estado" | cancelar sin verificar si loop activo | test -f .opencode/ralph-loop.local.md + grep iteration file:line |
| "asumir que el loop se detiene solo" | borrar state sin reportar iteration ni notify | leer iteration, rm -f state, notificar usuario con última iteration |
| "cancelar durante write operation" | cancelar en medio de escritura → corrupción parcial | esperar boundary/checkpoint file:line antes de rm |
Red Flags
- Doing work without checking output format → STOP, re-read skill
- Second occurrence of same rationalization → force RED zone
Verification
- Output matches skill ## Output contract + file:line citaton
- cross-ref-check.ps1 → SKILL.md OK
Refs
ralph-loop · recovery-protocol · help
04 同仓库更多 Skills
web-quality-audit
Comprehensive web audit: performance, a11y, SEO, responsive, animation, design tokens.
ui-engine
UI system — Grid/Flexbox/@layer/:has(), container queries, compositor-only animation, OKLCH tokens, component patterns
baseline-ui
Anti-slop UI — layout, typography, responsive, animation, tokens. Use for cleanup or polish.
skill-creator
Create new AI agent skills following Agent Skills spec -- auto-bootstrap unknown tasks, define structure, register in AGENTS.md
senior-engineer
Apply senior engineering competencies — system design, trade-off analysis, delegation, mentoring, and tech debt strategy
prompt-engineering
Design effective prompts using SPEARS framework — scope, principles, examples, assertions, refinements, with ReAct and multi-agent patterns