**Ralph** is an 🏷️#open-source, MIT-licensed autonomous coding loop published on 📝GitHub by Ryan Carson (snarktank). It runs an AI coding agent repeatedly until every item in a 📝Product Requirements Document (PRD) passes. Each iteration starts a fresh agent with clean context, takes the highest-priority unfinished user story, implements it, runs quality checks, commits on success, and marks the story done. The loop exits when the agent reports all stories complete.
Ralph packages Geoffrey Huntley's "Ralph" pattern, which it credits as its basis, into a bash script (ralph.sh) plus skills. It is a simpler cousin of the worker-and-judge 📝Ralph Loop. Instead of a separate judge reading a long transcript, it keeps memory outside the model: git history, a prd.json task list with a passes flag per story, an append-only progress.txt of learnings, and an 📝AGENTS.md updated after each iteration with patterns and gotchas. It drives Amp by default and 📝Claude Code with --tool claude, needs jq and a git repository, and runs 10 iterations unless told otherwise. It installs by copying the script into a project or as a 📝Claude Code Plugin from its own marketplace. By October 2026 the repository had about 21,900 stars and 2,100 forks.
📝Jim Goodman introduced me to Ralph.
Key Features
- Fresh context per iteration — each pass spawns a new agent, so long builds never exhaust a single 📝context window.
- File-based memory — git history,
prd.json, andprogress.txtcarry state between iterations instead of the model's context. - PRD skills —
/prddrafts a requirements document and/ralphconverts it into theprd.jsonstories the loop works through. - Self-updating AGENTS.md — each iteration records patterns and gotchas where coding agents read them automatically.
- Agent choice — runs Amp by default or Claude Code via
--tool claude, with a configurable iteration cap.
