Ralph Overnight Builds — Progressive Curriculum Entry

A graduated path to unattended Ralph runs: start with a single bounded task, add a PROMPT.md spec file, add verification, and only then remove the human from the loop for overnight builds.

prompt
→ Claude
Staged path from basic prompt → PROMPT.md spec → overnight Ralph run: start with a single bounded task, add a spec file, add verification, only then remove the human from the loop. Cap the run at 25 iterations; leave remaining work for the next session.
claude-code

Implementation note

When to use: you are tempted by overnight Ralph runs but have not run one before — this is the curriculum that gets you there without learning each failure mode the expensive way. How it works: a staged path where each stage adds one piece of rigor. Start with a single bounded task run under supervision. Then move the task definition into a PROMPT.md spec file. Then add verification, so done is machine-checked rather than asserted. Only after all three are solid do you remove the human from the loop and let it run overnight. Each stage exercises the discipline the next one depends on. Safety: the sequencing is the safety mechanism — unattended operation is earned last, after bounded scope, a written spec, and objective verification are already proven on supervised runs. Most overnight-loop disasters trace to a skipped stage. When you do go unattended, add the standard rails: iteration caps, budget limits, sandbox, branch.

Source: Claude Code Masterclass newsletter

More planning loops

Ship verified code, one stage per agent

Loop/ralph

Run a multi-stage software factory pipeline where each agent handles one task in a fresh context, anchored to mechanical gates and held-out test suites.

prompt
→ Claude
# AGENTS.md — read this first This is Software Bodega , a software factory: a pipeline that turns an idea into verified code with one human touch per stage. Where state lives — on disk, never in chat history: - factory/STATE.md — current stage + pointer. Single source of truth. - factory/BRIEF.md BLUEPRINT.md CONTRACT.md HANDOFF.md REVIEW.md GUIDE.md - factory/.planning/{spec,decompose,plan}.json — machine-checked artifacts - factory/.planning/gate-results/ — <gate>-<sha>.json verdicts - factory/tasks/ .md — one file per task - factory/progress.md factory/log.md — append-only diaries. Never rewrite. Rules that do not bend: 1. One agent per station. One task per fresh context window. No multi-agent chat. 2. Every gate anchors to something mechanical. LLM judges are fallbacks and must be a different model FAMILY than the author. 3. factory/tests/heldout/ is held out . Never read it, never reference it, never write to it. If you can see it, that is a bug — report it. 4. Repair loops cap at 2. Then resample N=3. Then PARK. Never loop forever. 5. Never weaken a test to make it pass. Never edit CONTRACT.md — it is signed. 6. git add
planninghigh riskclaude-code

Run flow until gate or timeout

Loop/goal

Execute a flow step repeatedly until it signals DONE or GATE, or halt after 40 turns to proceed.

prompt
→ Claude
/goal FLOW says DONE or GATE, or stop after 40 turns then /flow-next
planninglow riskclaude-code

Draft a sprint plan from the backlog

Loop/goallooprepo

Turn the open issue backlog into a proposed two-week sprint plan with estimates, a dependency ordering, and an explicit cut line, written as a document for the team to edit.

prompt
→ Claude
/goal SPRINT-PLAN.md contains a proposed 2-week plan — read all open issues labeled `ready`, estimate each as S/M/L based on the code it touches, order them by dependency and value, draw a cut line at a realistic capacity, and list what falls below it with reasons; make no changes to the issues themselves; stop after 6 turns
planninglow riskclaude-codecodex
1