loop engineering
Try it

Run a loop. Watch it stop for an honest reason.

Most of loop engineering is invisible until you feel it: the budget draining on every retry, a verifier that’s too loose waving a bug through, the moment a run gives up and asks for a human. Set the dials, press Run, and watch the token travel the seven‐step lifecycle — trigger, discover, delegate, act, verify, persist, decide — turn after turn. Nothing here calls a model; it is the same arithmetic the runnable example uses, drawn so you can see it turn.

Loop idle. Choose a scenario or press Run.

Scenarios
Stop philosophy

/goal halts the instant a separate checker confirms the done‐condition. The workhorse of serious loops.

loop‐receipts.log
    What you just watched

    Every run ends one of five ways

    Four are honest stops; the fifth is the one that should scare you. A loop you can walk away from is one whose worst ending you have already seen.

    • honest stop
      Goal met. The separate checker confirmed the done‐condition and the work was genuinely correct. The only ending you actually want.
    • honest stop
      Budget spent. Tokens ran out before the goal. The machine clock fails loudly, so you can bound it with a number. Token economics →
    • honest stop
      Stalled. The same failure kept repeating with no new evidence. Stopping beats thrashing.
    • honest stop
      Needs a human. The change was borderline and the checker would not certify it, so it escalated. This is a success state, not a failure.
    • the dangerous one
      Shipped a bug. The checker passed work that was not correct, because its strictness sat below the true bar. A verifier weaker than the work is worse than none: it manufactures false confidence. Why the checker is the asset →

    Notice what /loop does that /goal never would: it keeps spending after the work is already correct, because a cadence does not know whether it succeeded. That gap is the whole reason /goal exists. Read the chapter →