Ralph Story Executor
Fresh-context loop: pick one incomplete story from prd.json, implement it, run backpressure checks, commit, and update progress before the next iteration.
Related reading: The Ralph Loop, Explained
Kickoff prompt
Start the "Ralph Story Executor" loop.
Goal: every story in .ralph/prd.json has passes: true
Max iterations: 20
Between iterations run: npm test && npm run lint && npm run build
Exit when: no stories remain with passes: false (respond "ALL STORIES ARE COMPLETE")
Step 1: Read .ralph/prd.json and .ralph/progress.md. Pick one incomplete story, implement it, run backpressure checks, commit, update prd.json and progress.md, then stop this iteration.
Self-pace this loop. Each iteration does exactly one story. State lives on disk, not in chat history.Basic information
Category
Automation
Goal
every story in .ralph/prd.json has passes: true
Max iterations
20
Check command
npm test && npm run lint && npm run build
Exit when
no stories remain with passes: false (respond "ALL STORIES ARE COMPLETE")
Supported agents
Cursor, Claude Code
Steps
- 1
Read state
Read .ralph/prd.json and .ralph/progress.md. Resume any story marked inProgress, else pick the lowest-priority story with passes: false.
- 2
Implement one story
Implement exactly one user story with minimal scope. Mark it inProgress in prd.json before coding.
- 3
Run backpressure
Run the project's test, lint, and build commands from AGENTS.md. Fix failures before committing.
npm test && npm run lint && npm run build - 4
Commit and record
Commit with a story-scoped message. Set passes: true in prd.json and append learnings to progress.md.