FOR TEAMS BUILDING AGENT LOOPS

Your loop needs a check it can't fake.

Loop engineering takes you out of the turn: the system acts, reads feedback, and iterates on its own. That only converges if the feedback is real. A model grading its own output has no fixed point, so it iterates toward what it would score itself, not toward correct. doloop is the deterministic check the loop iterates against - the same verdict for the same input, every run.

A meditating Jedi master: 'Do. Or do-loop. There is a try.'

What loop engineering is

Loop engineering is the practice of designing automated, repeating AI agent systems that act, observe feedback, and iterate toward a goal without turn-by-turn prompting - replacing yourself as the person who prompts the agent. Its mechanics are automations that fire the loop, isolated worktrees for parallel work, and sub-agents that divide it. Those are the plumbing. None of them is the part that decides whether an iteration was any good.

The missing piece: the signal the loop iterates against

A loop is only as good as the feedback it optimizes toward. When that feedback is another model reading the output, the loop has no fixed point. Models rate model-written work higher than a person would, so a loop that grades itself climbs its own hill: it converges on what the model finds acceptable, which is not the same as correct. You get an autonomous system that iterates confidently toward the wrong place and reports success.

doloop is that check

doloop returns a deterministic verdict: the same input gives the same answer, byte for byte, every run, with each finding grounded in a rule you can read. It names the exact issue and the line. Your own model - you bring the key - applies the fix and generates the rewrite; doloop re-checks until it passes. The verdict is the part your model cannot produce for itself, because a thing under test cannot be its own fixed point. The acceptance protocol carries this over a signed wire: a deliverable is accepted, rejected, or held, and the rules you confirm are kept so the loop never regresses.

When the loop breaks, it has to be able to say so

A loop that can only talk to itself hangs silently when it breaks. A job deadlocks, a step stalls, a model goes dead - and from the outside it all still reads as working. The automated path cannot report its own failure, because the failure is in the path. So the acceptance protocol carries a second, out-of-band channel alongside the work: a break-glass line a stuck loop uses to say exactly what went wrong - this job re-delivers the same rejection every round, the repair step never fired - to whoever can act on it. It is deliberately not answered by the same automation, because that automation is the thing that broke. A loop is built to act on feedback; when the loop itself is what failed, it still needs a way to be heard.

Scale is the reason, not a nice-to-have

At one document a person closes the loop by reading the output. The whole point of loop engineering is to remove that person. So at scale there is no reviewer left, and the loop's own check is the only thing between it and shipping wrong output. Human review does not scale. A model-judge check does scale - but it scales the drift, because recursive self-grading amplifies the model's own bias on every cycle. The more autonomous the loop, the more the model takes shortcuts, so a deterministic check matters more with scale, not less.

Which loops need it

Loops over structured output already have deterministic checks: unit tests, schema validators, type checkers. A mature loop uses them, and it should. The gap is loops over semantic output - prose quality, data extraction, code-convention and comprehension judgment - where the only check on offer today is a model judging a model. That check does not converge. Those are the loops that need doloop, and they are the ones whose output ships to a consequence: code merged, a document filed, copy published, a value posted to a ledger.

The short version

Loop engineering builds the system that acts without you. doloop is the deterministic check it iterates against, so iterate toward a goal means converge on correct - not on what the model would grade itself. Bring your own model; doloop is the fixed point it can't fake.