Building a Loop
/lamoom run building-loops
The two rules it enforces#
Everything into files, at every action
Reasoning, collected data, and intermediate output are written immediately, not held in memory until the end. A subagent that dies mid-run must leave its work behind, never an empty outputs folder. This is what makes a partial run salvageable and a failed run debuggable.
Every mistake upgrades the loop
When something breaks, do not just fix the output. Fix the loop: add a judge, add a gate, or update the step so the same failure can never happen silently again. Repair the chain before the point where it broke, not at the point where you noticed.
Use it as a seed library#
Run it, break things, and let the rules force your loop to harden. The starter keeps a short brief about who the run is for and how it must sound, which your Claude writes the first time you run it and which you can edit afterward from the console.
Designing your gates#
A gate earns its place when a run without it produces a plausible result you would have shipped by mistake. Two patterns worth copying from the catalog:
| Pattern | Where to see it |
|---|---|
| A judge panel with distinct perspectives | FrontendBuilder scores with four judges plus a human-parity check |
| Refuse-to-finalize gates | Well-Architected Design holds six at once |
Next#
When the loop holds up under its own failures, put it on the shelf: see Publish Your App.