Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.
TypeScript agentic-aiai-agentsai-codinganthropicautomationclaudeclaude-codecodexcoding-agentsdevops-automationdevtoolsgithub-actionsgrokllmloop-engineeringmcpprompt-engineering
Why We Killed Our CI Sweeper (After Day 4)
Honest failure story — valuable for pattern design.
What Happened
/loop 5mon red main during a flaky migration branch- Token spend: ~8M tokens in 48h
- Loop proposed 11 PRs; 3 were symptom fixes; 1 broke prod config (caught in human review)
Root Causes
- No L1 phase — went straight to auto-fix
- Verifier same session as implementer on half the runs
- No branch allowlist — swept feature branches with known red CI
- No daily budget — scheduler never paused
What We Did
scheduler_deleteall CI sweeper tasks- Switched to event-driven GitHub Action only on
mainfailures - Re-enabled with:
- Report-only for 1 week
- Verifier as separate sub-agent
- 2M token/day cap in LOOP.md
- Branch allowlist:
mainonly
Lesson
CI sweeper is a high-leverage entry loop and a high-risk unattended loop. The pattern doc exists because we learned this the hard way.