CoachDiscoverMapCompareSavedAI LearningAI WeeklyAbout
← Library
02 · Applied

The Ralph Loop

A reusable scaffolding skill that turns "build this" into "build this, then keep improving until it scores at least an 8."

Takeaway 1
The Ralph Loop wraps the agent in a goal-directed infinite loop with a built-in exit condition.
Takeaway 2
You define what "good enough" means as a score and a target — the loop chooses when to stop.
Takeaway 3
An iteration cap protects you from runaway loops and runaway costs.

What the Ralph Loop Does

The Ralph Loop is a meta-skill that keeps the agent working toward a goal until a measurable success criterion is met. You hand it a target, success criteria, and a maximum number of tries. The agent attempts the work, self-scores against the criteria, and decides whether to keep going or call it done.

A Ralph Loop turns one-shot prompts into a goal-seeking loop. The agent stops on its own when the work is good enough — you don't have to babysit the process.

The author drops a Ralph Loop script into the chat alongside the build prompt. It is itself a published skill — you can find it on the author's GitHub — so any future project can wrap a build phase in the same loop just by referencing it.

"A Ralph Loop is the same as 'keep trying until you succeed.'" It is sharper — every iteration self-scores against named criteria and exits only when the score crosses the bar (or the iteration cap is hit).

Success Criteria — The Exit Condition

Success criteria are the named conditions that close the loop. They turn a vague goal into a checklist: needs a workflow, needs status, needs three specific skills, needs sample data. The agent grades each attempt against this checklist and only exits when the score reaches at least your target (the author uses "at least an 8").

Good criteria are short, named, and verifiable on inspection. Bad criteria — "make it good" — give the loop nothing to grade against, so it never knows when to stop.

For the time-off list, the criteria included: workflow exists, status column exists, "request time off" skill created, "review pending" skill created, plus sample data. Five concrete checks. Easy to grade, easy to see when the loop has converged.

The Iteration Cap

An iteration cap is the maximum number of attempts you'll let the loop make. The author uses "up to five tries" for the request list and "four tries" for the calendar list. If the agent can't hit the score in that many tries, it exits anyway with the best version it produced.

Always cap the loop. Unbounded loops can run for hours and burn credits chasing the last 5% of a score. Capping forces the agent to ship something.
"Higher caps always produce better results." Sometimes — but often the agent finds its answer in 2–3 iterations. Caps above 5 mostly buy diminishing returns and bigger bills.

The List Formatting Skill — A Helper Skill

The author also drops in a List Formatting skill — another published, reusable skill — alongside the Ralph Loop. It teaches the agent how to make SharePoint list views look polished: column widths, status pills, conditional colours, header styling. The Ralph Loop calls it as a tool during the formatting phase.

Skills can compose. A build prompt that includes the Ralph Loop and the List Formatting skill gets goal-directed iteration plus pretty output, for free, with no new authoring.

This is the real power of the skills library: every reusable skill you publish lowers the bar for the next app you build. The time-off tracker only took 20 minutes precisely because Ralph Loop and List Formatting were already on the shelf.

Flashcards — Applied
02 · Applied
Ralph Loop
tap to reveal →
A reusable meta-skill that wraps the agent in a goal-seeking loop. Each iteration self-scores against named success criteria; the loop exits when the score clears the bar or the iteration cap is hit.
← tap to flip back
02 · Applied
Success Criteria
tap to reveal →
The named, verifiable conditions a Ralph Loop attempt must meet to be considered "done." Each criterion is a check the agent can self-grade on inspection.
← tap to flip back
02 · Applied
Iteration Cap
tap to reveal →
The maximum attempts a Ralph Loop will make before exiting with its best output. Caps protect against runaway runs and burn — most loops converge in 2 to 4 tries.
← tap to flip back
02 · Applied
List Formatting Skill
tap to reveal →
A published helper skill that teaches the agent polished list-view styling — column widths, status pills, conditional colours. Reused alongside Ralph Loop in any build.
← tap to flip back