Explain Ralph Wiggum technique and available commands
Iterative development methodology that runs the same prompt repeatedly in a loop. Use when you have well-defined tasks with clear success criteria that benefit from continuous refinement and self-correction.
/plugin marketplace add teknologist/claude-ralph-wiggum-pro/plugin install ralph-wiggum-pro@teknologist-pluginsPlease explain the following to the user:
The Ralph Wiggum technique is an iterative development methodology based on continuous AI loops, pioneered by Geoffrey Huntley.
Core concept:
while :; do
cat PROMPT.md | claude-code --continue
done
The same prompt is fed to Claude repeatedly. The "self-referential" aspect comes from Claude seeing its own previous work in the files and git history, not from feeding output back as input.
Each iteration:
The technique is described as "deterministically bad in an undeterministic world" - failures are predictable, enabling systematic improvement through prompt tuning.
Start a Ralph loop in your current session.
Usage:
/ralph-wiggum-pro:ralph-loop "Refactor the cache layer. Output <promise>DONE</promise> when complete." --completion-promise DONE --max-iterations 20
/ralph-wiggum-pro:ralph-loop "Add tests. Output <promise>TESTS COMPLETE</promise> when all pass." --completion-promise "TESTS COMPLETE"
Options:
--max-iterations <n> - Max iterations before auto-stop--completion-promise <text> - Keyword to detect inside <promise> tags (quotes optional for single words)Critical: Your prompt MUST include instructions to output <promise>KEYWORD</promise> when done. The --completion-promise specifies what KEYWORD to look for inside those tags.
How it works:
~/.claude/ralph-wiggum-pro/loops/ralph-loop.{session_id}.local.md<promise>KEYWORD</promise> found → loop endsList all active Ralph loops across all sessions.
Usage:
/ralph-wiggum-pro:list-ralph-loops
Shows:
Cancel an active Ralph loop (removes the loop state file).
Usage:
/ralph-wiggum-pro:cancel-ralph
How it works:
~/.claude/ralph-wiggum-pro/loops/View historical Ralph loop session data.
Usage:
/ralph-wiggum-pro:ralph-stats # Show last 10 sessions
/ralph-wiggum-pro:ralph-stats --last 20 # Show last 20 sessions
/ralph-wiggum-pro:ralph-stats --project my-api # Filter by project
/ralph-wiggum-pro:ralph-stats --outcome success # Show only successful loops
/ralph-wiggum-pro:ralph-stats --all # Show all sessions
Options:
--last N, -n N - Show last N sessions (default: 10)--project NAME, -p NAME - Filter by project name--outcome TYPE, -o TYPE - Filter by outcome (success, max_iterations, cancelled, error)--all, -a - Show all sessionsShows:
Log location: ~/.claude/ralph-wiggum-pro/logs/sessions.jsonl
To signal completion, Claude must output a <promise> tag:
<promise>TASK COMPLETE</promise>
The stop hook looks for this specific tag. Without it (or --max-iterations), Ralph runs infinitely.
The "loop" doesn't mean Claude talks to itself. It means:
/ralph-wiggum-pro:ralph-loop "Fix the token refresh logic in auth.ts. Output <promise>FIXED</promise> when all tests pass." --completion-promise FIXED --max-iterations 10
You'll see Ralph:
Good for:
Not good for:
Ralph Wiggum Pro supports multiple concurrent loops in different Claude Code terminals:
/clear commands~/.claude/ralph-wiggum-pro/loops/ralph-loop.{session_id}.local.mdMonitor and manage all your Ralph loops from a web browser:
bunx ralph-dashboard # Start on localhost:3847
bunx ralph-dashboard -p 8080 # Custom port