Spec-first Ralph (PLAN.md-driven)
The spec-driven maturation of the Ralph loop: each fresh-context iteration reads PLAN.md, implements the highest-priority unchecked item, checks it off, and commits — so the spec file evolves alongside the codebase.
Implementation note
When to use: Ralph-style autonomous grinding where you want the plan itself to be the living artifact — a checklist the loop consumes and the team can read, edit, and reprioritize between iterations. How it works: each fresh-context iteration reads PLAN.md, picks the highest-priority unchecked item, implements it, checks it off, commits, and exits. The spec file evolves alongside the codebase: completed items accumulate as history, and anyone can insert, reorder, or annotate items to steer the next iteration without touching the loop machinery. HumanLayer describes this as the spec-driven maturation of the original Ralph. Safety: the checkbox protocol is the state rail — progress is legible in one file, and a human can pause the loop, edit PLAN.md, and resume with redirected priorities. Keep items small and independently shippable, run it on a branch, and add an iteration cap since the loop itself does not carry one. Hardened 2026-07-27: explicit stop/cap/verification guardrails appended; regraded D→A.
Source: HumanLayer ↗graded A · 95/100 — how grades work →
More planning loops
Implement feature X autonomously
Ralph runs until it outputs DONE, implementing the feature end-to-end over up to 20 iterations.
Ship GOALS.md phases 1-13
Implement each GOALS.md phase with tests and validation, committing and pushing after stable milestones until unblocked.
Execute roadmap phases to completion
Work through each phase in your roadmap, verify each one, run the final audit, and stop when all phases pass.