← Registry
Loop Official

Ralph Loop

Repeatedly relaunch a fresh coding-agent session against a prompt until the implementation plan is complete.

Ralph is Geoffrey Huntley's autonomous-coding technique: in its purest form a Bash loop that feeds a prompt file into a coding agent over and over (`while :; do cat PROMPT.md | claude-code ; done`). Each iteration starts with fresh context, has the agent pick and implement one task, updates a persistent IMPLEMENTATION_PLAN.md that acts as shared state between otherwise-isolated runs, and commits — so git history plus the on-disk plan carry continuity across sessions. Progress comes from 'eventual consistency': more loops resolve remaining work. The documented loop.sh accepts a max-iterations cap, and the method splits into a plan prompt (gap analysis, no code) and a build prompt (implement, test, commit).

Loop

Goal
Every task in IMPLEMENTATION_PLAN.md is implemented, tested, and committed so the planned project is complete.
Exit when
IMPLEMENTATION_PLAN.md has no remaining unchecked tasks (the check command returns 0) and the working tree is clean with all work committed.

Check between iterations

grep -c '\[ \]' IMPLEMENTATION_PLAN.md
$

Kickoff prompt

Start the "Ralph Loop" loop. Goal: Every task in IMPLEMENTATION_PLAN.md is implemented, tested, and committed so the planned project is complete. Max iterations: 15 Between iterations run: grep -c '\[ \]' IMPLEMENTATION_PLAN.md Exit when: IMPLEMENTATION_PLAN.md has no remaining unchecked tasks (the check command returns 0) and the working tree is clean with all work committed. Step 1: Read IMPLEMENTATION_PLAN.md and the specs, pick the single highest-priority unchecked task, implement and test only that task, then commit and update the plan.