From rav-town
Run the Ralph autonomous coding loop. Iterates through PRD user stories, spawning a fresh AI session per iteration to implement, test, and commit each story. Triggers on: run ralph loop, start ralph, execute prd, ralph iterate.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rav-town:ralph-loopThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Runs the Ralph execution loop (`ralph.sh`) that iterates through PRD user stories, spawning a fresh AI coding session per iteration.
Runs the Ralph execution loop (ralph.sh) that iterates through PRD user stories, spawning a fresh AI coding session per iteration.
Execute the ralph.sh script from this skill's scripts/ directory. The script reads a PRD JSON file and iterates through its user stories, invoking an AI tool (Copilot, Claude, or AMP) once per story.
${CLAUDE_PLUGIN_ROOT}/skills/ralph-loop/scripts/ralph.sh --prd <path-to-prd.json> [--tool copilot|claude|amp] [--port-offset N] [max_iterations]
| Parameter | Required | Default | Description |
|---|---|---|---|
--prd <file> | Yes | — | Path to the PRD JSON file (e.g., docs/prds/prd-2026-03-15-task-status.json) |
--tool <name> | No | copilot | AI backend: copilot, claude, or amp |
--port-offset N | No | — | Port offset for parallel isolation (API=3001+N, Web=3000+N) |
max_iterations | No | 10 | Maximum loop iterations before aborting |
# Run with Copilot (default), 12 iterations max
${CLAUDE_PLUGIN_ROOT}/skills/ralph-loop/scripts/ralph.sh \
--prd docs/prds/prd-2026-03-15-task-status.json \
--port-offset 10 \
12
Each iteration spawns a fresh AI session that:
passes: falsefeat: [US-XXX] - Story Titlepasses: true in the PRD JSONcomplete, creates PR, enables auto-merge, and outputs <promise>PRD-COMPLETE</promise>The script expects:
--prd (e.g., docs/prds/prd-2026-03-15-task-status.json)prd- prefix replaced with progress-, .json replaced with .txt (e.g., docs/prds/progress-2026-03-15-task-status.txt)${CLAUDE_PLUGIN_ROOT}/skills/ralph-loop/scripts/CLAUDE.md (same directory as ralph.sh)The loop exits successfully (exit 0) when:
passes: truestatus: complete<promise>PRD-COMPLETE</promise>The loop exits with failure (exit 1) when:
max_iterations is reached without all stories passingWhen --port-offset N is provided, the script exports environment variables so parallel agents don't collide:
| Variable | Value |
|---|---|
PORT | 3001 + N |
WEB_PORT | 3000 + N |
NEXT_PUBLIC_API_URL | http://localhost:<PORT> |
| File | Purpose |
|---|---|
scripts/ralph.sh | The core execution loop |
scripts/CLAUDE.md | Prompt template injected into each AI iteration |
npx claudepluginhub patelr3/agents --plugin rav-townRalph autonomous agent for iterative development with multi-PRD parallel support. Commands: '/ralph-ryan:prd' (create PRD), '/ralph-ryan:prep' (prepare), '/ralph-ryan:run' (execute), '/ralph-ryan:status' (overview). Triggers on: ralph prd, ralph prep, ralph run, ralph go, ralph status.
Executes PRP Ralph loops autonomously: reads .claude/prp-ralph.state.md, assesses plan progress, implements incremental changes, runs full validations until complete.
Starts PRD-driven loop in Claude Code: reads prd.json + progress.txt per iteration, implements stories, verifies, commits, discovers new tasks, uses loophaus stop hook.