Ralph is an autonomous AI agent loop that runs Claude Code repeatedly until all PRD items are complete. Each iteration is a fresh Claude Code instance with clean context.
# Run Ralph (from your project that has prd.json)
./ralph.sh [max_iterations]ralph.sh- The bash loop that spawns fresh Claude Code instancesCLAUDE.md- Instructions given to each Claude Code instanceprd.json.example- Example PRD formatflowchart/- Interactive React Flow diagram explaining how Ralph works
- Each iteration spawns a fresh Clude Code instance with clean context
- Memory persists via git history,
progress.txt, andprd.json - Stories should be small enough to complete in one context window
- Always update AGENTS.md with discovered patterns for future iterations