Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Loops: from prompter to loop designer

Read it here: https://colincalnan.github.io/loops-tutorial/

A field guide to AI agent loops, in 15 short lessons. It takes someone who prompts a coding agent by hand and gets them to the point where they can design a loop that runs without them, and can tell when they should not.

Why it exists

Two of the most visible people in AI engineering said the same thing this year. Boris Cherny, who runs Claude Code at Anthropic: "I don't prompt Claude anymore. I have loops running that prompt Claude and figure out what to do. My job is to write loops." Peter Steinberger, creator of OpenClaw: "You shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents."

Most people read that, nodded, and had no idea what it actually meant in practice. This guide fixes that, in order, without jargon for its own sake.

What it covers

  • The three parts that matter: verification as the gate, state as the memory, the stop condition as the brakes
  • Do you even need one? Good first loops, bad first loops, and where to keep a human in the chair
  • The five building blocks, and the smallest loop that actually works
  • A loop start to finish, and how loops fail
  • Guardrails: hooks as gates the system enforces, permissions, and human gates on scheduled work
  • The no-code version, for people who are not going to open a terminal
  • Beyond the loop: subagents, worktrees, and dynamic workflows
  • The same loop on Codex, because the concept is portable and the model is not the tool

How it is built

One self-contained HTML file. No build step, no dependencies, no analytics, no network calls. Progress is tracked in local storage, so it works fully offline once loaded, which was the point: it should be readable on a phone with no signal.

It is deliberately tool-agnostic. It teaches Claude Code and Codex side by side and argues that the concept survives whichever tool you land on.

On sourcing

The guide flags its own evidence quality inline. Where a quote is reported from a thread rather than verified against a primary recording, it says so, and the final section explains how much to trust each claim. That is on purpose. A teaching artifact that overstates its sources teaches the wrong habit.

Licence

Copyright (c) 2026 Colin Calnan. Free to read, link, and share.

About

Loops: from prompter to loop designer. A field guide to AI agent loops (Claude Code + Codex). Self-contained, offline-capable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages