Ralph is an autonomous one-story-per-iteration execution loop driven by a product requirements backlog.
What It Is
Ralph is an autonomous execution technique that works through a product requirements backlog one user story per iteration. A product requirements document (PRD) backlog such as prd.json, plus progress notes, drives which unfinished story comes next. Each iteration picks that story, implements and verifies it, then records what changed before the next pass. Ralph is not the factory itself—the factory is the workflow system that keeps agent work persistent—and it is not a one-shot chat reply that ends when a single answer returns.
Why It Matters
Long PRDs stay mergeable and reviewable when each iteration finishes one small story instead of stuffing an entire feature into one context window. Learnings carry forward in progress notes, so later iterations reuse what earlier passes discovered. That keeps large backlogs moving as a sequence of reviewable changes rather than one oversized attempt that runs out of context mid-feature.
How It Works
Each Ralph iteration starts by reading the PRD backlog and progress notes, then picks the highest-priority unfinished user story. The run implements and verifies only that story, marks it complete in the backlog, and records what changed plus learnings for later passes. The loop continues with the next unfinished story until every story passes, or until an explicit stop path ends the run. One iteration owns one story; the backlog and progress notes carry state across iterations.
Compared To Nearby Techniques
A plain factory loop keeps iterating under the factory until a goal is done; Ralph is a specific loop that advances a PRD backlog one user story per iteration, not a generic keep-iterating format. Planner-executor splits plan work from execute work across roles; Ralph does not require that role split—it executes the next unfinished story in the backlog. Writer-reviewer pairs draft work with an explicit review gate before the goal can complete; Ralph’s gate is finishing and verifying one story, then recording progress, not a separate writer-plus-reviewer handoff. Workqueue-executor drains or organizes a work queue; Ralph’s driver is the ordered PRD story list and progress notes, not a queue-drain pattern.