Orchestrates and advises on Ralph Loop automated development sessions. Use when the user wants to run ralph-loop, asks how to set up a Ralph task, wants iterative agent-driven development, says 'run this in a loop until it works', or has a task with testable acceptance criteria they want to automate. Helps write effective loop prompts, sets safe iteration limits, monitors loop progress, detects stuck loops, and advises on completion criteria. Keeps context short — the heavy work happens inside the loop.
Ralph Loop = a Stop hook that re-feeds the same prompt on every session exit, letting Claude iterate until a completion promise appears.
Plugin location: ~/.claude/plugins/cache/claude-plugins-official/ralph-loop/1.0.0/
The orchestrator's job is before and after the loop — not inside it. Keep this conversation context lean; the loop runs autonomously.
Three phases:
Ask if unclear (max 2 questions):
Ralph is a good fit when:
Ralph is NOT a good fit when:
/gsd-fast instead)A good ralph prompt has four parts:
[TASK DESCRIPTION]
What to build/fix in concrete terms.
[SELF-CORRECTION LOOP]
Run tests after each change. If any fail, read the errors, fix them, and run again.
Check [linter/build/output] before declaring done.
[ESCAPE HATCH]
After [N-3] iterations, if still not complete:
- Document what's blocking
- List approaches tried
- Suggest alternatives
[COMPLETION PROMISE]
Output exactly: <promise>COMPLETE</promise>
Only output this when ALL criteria are unequivocally met.
Present the drafted prompt to the user and ask: "Does this capture what you want? Adjust anything before we launch."
Recommend --max-iterations based on task complexity:
| Task type | Suggested limit |
|---|---|
| Simple fix, clear criteria | 10–15 |
| Feature with tests | 20–30 |
| Greenfield small project | 30–50 |
| Complex multi-phase | 50+ (monitor closely) |
Always set a limit. Always include an escape hatch in the prompt at limit - 3 iterations.
Show the final command for the user to run:
/ralph-loop "[prompt]" --completion-promise "COMPLETE" --max-iterations N
Tell the user:
"Ralph is now running. Each time Claude tries to exit, the hook re-feeds the prompt. You'll see iteration progress in git history. Come back and tell me when it finishes, gets stuck, or you want a status check."
Do not keep talking or consuming context during the loop. Hand off cleanly.
When the user reports back, check progress:
git log --oneline -20
Signs the loop is stuck:
If stuck → suggest prompt adjustment:
/cancel-ralph and relaunch with refined promptWhen the completion promise fires:
git log --oneline, run tests manually/gsd-fast "cleanup/polish" for any small finishing touchesIf the Stop hook fails with WSL errors, fix the hook to use Git Bash:
"command": "\"C:/Program Files/Git/bin/bash.exe\" ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh"
Edit: ~/.claude/plugins/cache/claude-plugins-official/ralph-loop/<hash>/hooks/hooks.json