Ralph Story Executor
FeaturedOn demandAbout Ralph Story Executor
A manually triggered loop, capped at 20 rounds, that implements the unfinished stories listed in .ralph/prd.json. Each round picks a story with passes: false, implements it, then runs a combined test, lint and build check before the story's status is updated.
Key features
- 01Tests, lint and build chained into one gate
- 02Progress tracked through the passes field in .ralph/prd.json
- 03Manual trigger, capped at 20 rounds
- 04Works with Cursor and Claude Code
Use cases
- 01Implementing a backlog of stories written in a PRD file
- 02Letting a coding agent advance a task list under build verification
- 03Projects where every story must clear the full check before counting as done
- Goal
- Every story in .ralph/prd.json has passes: true.
- Exit when
- Stop when no stories remain with passes: false, and respond "ALL STORIES ARE COMPLETE".
- Between iterations run
- npm test && npm run lint && npm run build
Launch prompt
Paste into Cursor / Claude Code. The agent repeats the steps below until the exit condition is met.
Start the "Ralph Story Executor" loop. Goal: Every story in .ralph/prd.json has passes: true. Max iterations: 20. Step 1: Pick the next story — Read .ralph/prd.json and choose one story with passes: false as the target for this round. If none is left, end the loop. Step 2: Implement the story — Change the code as the story describes, keeping the scope to what that story needs. Step 3: Run the checks — Run tests, lint and build in sequence; the round passes only if all three succeed. If any fails, fix the problem from the output and retry in the next round. `npm test && npm run lint && npm run build` Step 4: Update the status — Once the checks pass, set the story's passes to true as the record of progress for the round. Between iterations run: `npm test && npm run lint && npm run build` Exit when: Stop when no stories remain with passes: false, and respond "ALL STORIES ARE COMPLETE".
Steps
Each round runs in order; if the exit condition isn’t met, another round starts, up to 20.
Read .ralph/prd.json and choose one story with passes: false as the target for this round. If none is left, end the loop.
Change the code as the story describes, keeping the scope to what that story needs.
Run tests, lint and build in sequence; the round passes only if all three succeed. If any fails, fix the problem from the output and retry in the next round.
npm test && npm run lint && npm run buildOnce the checks pass, set the story's passes to true as the record of progress for the round.
Supported agents
Coding agents that can run this loop directly.