Skip to content

< CollectionsArticle

Ralph.

Ralph Wiggum as a "software engineer"

Geoffrey Huntley · 2025

Read the post (opens in a new tab)

Run the same prompt in a loop until the work is done, and when it goes wrong, fix the prompt.

4 sections · 4 problems

0 of 4 done

Start Next: 01 Write a Ralph Loop From Scratch

Fig. 1. The agent types a patch, runs the tests, reads what failed, and patches again, until every bulb is lit or the budget runs out.

Section 01

The loop

0 of 1

The post: A coding agent, one prompt, and a shell loop that runs it again and again.

  1. 01Write a Ralph Loop From Scratchimplement · medium

Section 02

The plan file

0 of 1

The post: The loop works through a checklist, one item a loop, and ticks an item off only when the tests pass.

  1. 02Work a Ralph Loop Through Its Plan Fileimplement · medium

Section 03

Back pressure

0 of 1

The post: Tests and builds reject bad work, so the loop can run without someone watching it.

  1. 03Write the Tests That Catch the Bugtests · medium

Section 04

When it is stuck

0 of 1

Beyond the post: A loop that repeats itself needs noticing.

  1. 04Detect an Agent Stuck in a Loopharness · medium
All collections