ralph-stop
Stop Ralph's autonomous iteration loop gracefully.
What This Skill Does
This skill stops the autonomous loop started by /ralph:start. It sets a stop signal, allows the current iteration to finish, and updates the status.
Prerequisites
- •Ralph must be initialized (
/ralph:inithas been run) - •
docs/ai/ralph/status.jsonmust exist
Implementation
When this skill is invoked:
- •
Set the stop flag: Create a stop signal file that
/ralph:startwill checkbashtouch docs/ai/ralph/.ralph_stop
- •
Inform about current iteration: If an iteration is running, let it finish naturally. The stop signal will be checked before spawning the next iteration.
- •
Update status.json: Set the status to 'stopped' and record the timestamp
bash# Read current status.json jq '.status = "stopped" | .last_updated = now | .stopped_at = now' docs/ai/ralph/status.json > /tmp/status.json.tmp mv /tmp/status.json.tmp docs/ai/ralph/status.json
- •
Report to user:
codeRalph has been signaled to stop. - The current iteration (if running) will finish naturally - No new iterations will be spawned - Status updated to 'stopped' You can resume later with /ralph:start or run a single iteration with /ralph:iterate.
Coordination with /ralph:start
The /ralph:start skill checks for the existence of docs/ai/ralph/.ralph_stop before each iteration. When this file exists:
- •The loop stops spawning new ralph-worker subagents
- •The current iteration completes normally
- •The loop exits gracefully
Notes
- •This is a graceful stop, not an emergency abort
- •Any work in progress will complete
- •To resume, use
/ralph:startagain (it will clear the stop flag) - •The stop flag is just a signal file, not a lock file