Ralph is an autonomous AI agent loop that runs repeatedly until all PRD items are complete. Converts PRDs to executable JSON, implements stories iteratively with quality checks, and tracks progress.
npx claudepluginhub naimkatiman/continuous-improvement --plugin continuous-improvementThis skill uses the workspace's default tool permissions.
Ralph runs iteratively until all PRD stories are complete. Each iteration: picks highest priority story, implements, runs quality checks, commits if passing, updates progress, repeats.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Ralph runs iteratively until all PRD stories are complete. Each iteration: picks highest priority story, implements, runs quality checks, commits if passing, updates progress, repeats.
jq installed (brew install jq on macOS)Generate a detailed requirements document using the PRD skill:
Load the prd skill and create a PRD for [your feature description]
Output saved to tasks/prd-[feature-name].md
Convert the markdown PRD to executable JSON:
Load the ralph skill and convert tasks/prd-[feature-name].md to prd.json
This creates prd.json with user stories structured for autonomous execution.
Execute the autonomous loop:
# Using Amp (default)
./scripts/ralph/ralph.sh [max_iterations]
# Using Claude Code
./scripts/ralph/ralph.sh --tool claude [max_iterations]
Default: 10 iterations. Use --tool amp or --tool claude to select your AI tool.
branchNamepasses: falsepasses: trueprogress.txtEvery story gets a clean slate. Previous work is visible only via git history and prd.json, preventing context pollution.
Stories should be completable in 10-30 minutes. If a story stalls, break it down.
Ralph updates AGENTS.md after each story so subsequent iterations know what's already done.
progress.txt for human reviewRalph starts a dev server and uses Playwright to verify UI stories actually render.
Ralph stops when:
passes: trueprd.json — executable PRD with user storiesprogress.txt — accumulated learnings and statusralph.sh — the loop scriptAGENTS.md — iteration memoryIf Ralph gets stuck:
prd.json for malformed storiesprogress.txt for accumulated errorsnpm test or equivalentEdit the prompt template in scripts/ralph/prompt.md (Amp) or scripts/ralph/CLAUDE.md (Claude Code) to adjust behavior.
After completion, archive prd.json and progress.txt to tasks/archive/[date]/ for future reference.