Loop Engineering — stop babysitting your agents
The mental shift: the prompt is the source
The code is no longer the source of truth — it's the build artifact of a prompt. The programmer writes the prompt; the prompt writes the code. So the thing worth versioning above the code is the prompt (and the intent behind it). Lose the prompt and you've lost the thing that can regenerate and evolve the code; keep it and the code is reproducible, auditable, improvable.
prompts/ log linked to the commit/PR each produced), and consolidate the intent above them. Code review becomes prompt review.The flywheel: three layers that compound
Three capabilities stack — each one unlocks the next. (Framework credit: Sid Bhattacharya, "Stop babysitting your agents," Claude Code team.)
- ✓VerificationTeach the agent to check its own work in a loop. Reliability is the prerequisite for everything else.
- ✓Multi-agentOnce an agent is reliable, run many in parallel with confidence — waves, worktrees, councils.
- 3Background loopsTake the keyboard out of the hot path entirely — the loop runs and self-perpetuates while you sleep.
1. Verification loops — teach the agent to check its own work
A loop is an autonomous circuit: write code → build/run → observe (logs, browser, DB, tests) → on failure, debug + rewrite → repeat until a success state. Give the agent the tools (dev server, browser MCP, smoke scripts, test runner) and the instructions, and it hill-climbs to a working result — so the PR it hands you actually works.
Package a verification loop as a self-improving skill: instruct the skill to edit itself whenever it hits a blocker. The next agent (or teammate) never hits that blocker again — the skill compounds across the team.
2. Multi-agent — parallelize once reliable
When each agent verifies itself, you can fan out. Cofoundy's patterns:
3. Background loops — keyboard out of the hot path
The endgame: you stop spinning up sessions. The loop runs on a trigger and self-perpetuates.
The Cofoundy CTO flywheel (worked example)
/cto is this flywheel made concrete: ground → council (design) → ceo-gate → parallel build in worktrees → integrate → live e2e verify → gated merge to prod → prod smoke → publish + handoff. The overnight T1.9 run that produced this very page:
Where this lives
Loop engineering is the how of agentic engineering. The fluency map (24 progressive concepts, operator → system-improver) is the AI-Native Curriculum; the access + integrity layer is the onboarding protocol. Together they're the agentic-engineering knowledge base every Cofoundy operator works from.