snarktank/ralph autonomously completes software development stories by running AI coding tools in a loop with fresh context, ensuring quality checks pass before committing code. It addresses the problem where large development tasks fail because an LLM runs out of context before finishing.
Project overview
Each iteration spawns a new AI instance with clean context and maintains progress across iterations via git history, progress.txt, and prd.json, allowing it to complete PRDs that would exceed a single context window.
Deployment
Refer to project documentation
License
MIT
Best for
Developers who can decompose work into PRD items small enough to complete in one context window and who have working typecheck, test, and CI feedback loops in place.
Developers comfortable installing external AI coding tools and running terminal commands to orchestrate an autonomous loop.
Key capabilities
Runs an AI coding tool repeatedly until all items in a PRD are complete or max iterations are reached.
Maintains memory across iterations via git history, progress.txt, and prd.json.
Includes skills to generate Product Requirements Documents and convert them to a structured JSON format for autonomous execution.
Runs typecheck and tests during each iteration to verify behavior and keep CI green.
Limitations and risks
Each PRD item must be small enough to complete in one context window.
Requires working feedback loops (typecheck, tests, CI) to function correctly.
Broken code can compound across iterations if CI is not kept green.
Getting started
Install Amp or Claude Code and jq. Setup difficulty is medium because it requires installing external AI coding tools, configuring project files, and using terminal commands.
Copy ralph.sh and prompt files to your project.
Create a PRD using the skill, then convert the PRD to prd.json.
Run ./scripts/ralph/ralph.sh to start autonomous execution.
AI Search
Find projects, verify facts, compare options, or turn a complex need into an actionable plan
Try a searchA click only fills the search box; you stay in control