LoopFlow
Tutorial Workshop Keywords 🎮 LoopFlow Lab
Keywords / when … (transitions)

when … (transitions)

Rules evaluated after each observe. Control & transitions

Syntax

when it passes and the goal is met: stop
when it fails: reflect, then plan again
when blocked: ask a human

What it does

when … rules run after each observe. Conditions: it passes · it passes and the goal is met · it fails · blocked. Actions: stop · stop and warn · reflect · plan · act · observe · ask a human. Precedence is fixed: blocked > attempts > pass > fail.

Example

when it passes and the goal is met: stop
when it fails: reflect on which layer broke, then plan again
when blocked: ask a human
transition rules

How it runs

AFTER EACH OBSERVE — FIRST MATCH WINS 1blocked? ask a human 2after N tries? stop & warn ⚠ 3passes & goal met? stop ✓ done 4it fails? reflect, then plan again
The order is the engine's, not yours: attempts is checked before fail, so the thrash guard always wins once you hit the limit.

Related