Ship verified code, one stage per agent

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
claude-code

Source: Phaes-Sovereignty

More planning loops

Ralph the PRD backlog

The canonical Ralph loop: each iteration starts fresh, reads the PRD and guardrails, ships exactly one backlog item end-to-end, and records what it learned.

prompt
→ Claude
/loop start each iteration with fresh context: read PROMPT.md, prd.json, and .ralph/guardrails.md; pick the single highest-priority item in prd.json not marked done, implement it with tests, run the full check suite, commit and mark it done only if green; if blocked or a check fails twice the same way, append the lesson to .ralph/guardrails.md and move on; stop when every item is done or after 30 turns
planninghigh riskclaude-codecodex

Spec-first Ralph (PLAN.md-driven)

Loop/ralphHumanLayer

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.

prompt
→ Claude
Ralph variant where the loop prompt is "read PLAN.md, pick highest-priority unchecked item, implement, check it off, commit, exit" — spec file evolves with the codebase. Guardrails: Stop when the goal is verifiably met, or stop after 15 iterations, whichever comes first. Keep changes minimal and never touch files outside the task’s scope.
planningmedium riskclaude-code

Find winner assets per class

Loop/loop

Dig deeper into asset classes until you identify true winners, re-analyzing every 2 hours.

prompt
→ Claude
/loop 2h keep going and dig deeper until you find us true winners per asset class Cap the run at 15 passes.
planninglow riskclaude-code