Ravilution logo
Back to writing

AI

Architect-in-the-Loop: Reducing Comprehension Debt

Loop engineering works until the engineer stops designing. A note on comprehension debt, where it comes from, and a set of skills that keep it down.

By Ravi AutarJune 20, 20266 min read

The current buzzword in AI is “Loop Engineering,” and it has earned the attention. A lot of smart people have written sharp posts on why working in loops is a great way to get the most out of frontier models, even if the token bill can be ruinous. A few examples:

  1. @addyosmani gave a clear overview of the core components required for loop engineering.
  2. @sydneyrunkle broke down different kinds of loops and discussed hill-climbing loops to rewrite the agent harness with improved configurations.
  3. @RLanceMartin showcases how the late Claude Fable 5 excelled at long-horizon tasks that can be orchestrated through loops.

The practical question for an engineer is how the ideas behind loop engineering help in the daily work of orchestrating coding agents. Harnessing the power of these agents, and the loops that drive them, is likely to set apart the next generation of builders.

A loop

The agent dispatches work, the result gets graded, and the grade feeds the next round.

Agent

plans and dispatches

Workers

do the work in parallel

Grade

scores what came back

↺ next round

Loops are impressive when they work as intended. In practice, harnessing and directing that power is far more challenging than the posts let on. As models get more capable, the complexity of the problems they can solve expands, especially once they are wrapped in self-correcting loops. But so does the volume of their output, and the number of implicit and explicit decisions they make on the engineer’s behalf.

That is also what makes them dangerous. A loop produces faster than a person can understand what it produced, and the gap between the two is where the trouble starts: within hours, an engineer can ship a complex feature they do not fully understand, on top of a system they do not understand either.

Comprehension Debt

Every loop leaves you with something you haven’t done yet: understood what it built. That does not mean understanding every line of code written (not realistic at this pace anyway), but thoroughly understanding the changes you are shipping and the decisions being made along the way, the explicit ones and the quiet ones. Skip that and the problem doesn’t disappear, it accrues. Like tech debt, except what you owe is understanding. This is comprehension debt.

Comprehension debt

What the loop ships against what you understand, cycle after cycle.

the debt

cycles shipped →

What the loop shipsWhat you understand

Where the debt comes from

Engineers describe the same struggle in different words. It is a symptom of one common root cause: context pollution, not of the AI model, but of the human brain. Overload that context window and there’s no room left to properly understand what you’re building, which only accrues more debt. Every engineer has experienced this in some form, and there are four main culprits:

  1. Delivery Speed. As engineers adopt more AI in their day-to-day, the expectation from their employer rises right along with it: deploy, support, and iterate on features at breakneck speed. Even more so at a company building AI-native tooling or products.
  2. Parallel Problem Solving. On top of shipping at that speed, hardly any developer works on a single feature at a time. Three or four problems run at once, each with its own context and stakeholders, each needing its own solution design. Rotating between them also means rehydrating context at every switch, which is slow and draining.
  3. A codebase that won’t sit still. You’re not the only one fighting this. Everyone in your org is going through the same motions, shipping thousands of lines a day under the same expectations and context constraints. Systems can change overnight, and the assumptions you had on Monday don’t survive to the end of the week. On top of that, you still have to dock your own solution onto a system that keeps moving, like that docking scene in Interstellar where Cooper has to match a spinning ship.
  4. AI slop essays. This is the one echoed the most, by engineers and non-engineers alike: the verbosity AI comes with. You can diligently read three whole paragraphs it produced only to realize you didn’t learn a single new thing. Or worse, your attention gets yanked in ten new directions it happened to mention along the way. This kind of output reads as if it were written for other AI agents, not for human minds.

Repeat these patterns daily and the debt grows faster than you can ever pay it down. The danger isn’t falling behind on the reading; it’s what you start doing to keep up: you let things through.

Architecture by Ratification

Keep letting things through, and the debt curdles into something specific: it turns you into a rubber stamp. You still own the delivery and approve every design, but you’ve stopped deciding; you’re just ratifying what the agent hands you. This is the failure mode to avoid, and comprehension debt is what gets you there. Each approval feels manageable, so you grant it. But the gap between what the agent built and what you actually understood widens with every cycle. You start skimming the plans, then trusting the summaries instead of the plans, then approving because nothing has obviously broken yet; which is not the same as knowing why it’s right. There’s no single moment when you decide to stop being the architect; you just drift, one approval at a time, into architecture by ratification.

What that costs is the thing that makes an excellent engineer in the first place: knowing a system inside out, owning it, and being able to criticize it from every angle. That’s the first thing the debt takes.

Stay the Architect-in-the-Loop

A loop is only as powerful as your understanding of what it’s meant to build. The objective, then, is to aggressively reduce context pollution and repay comprehension debt with due diligence, so you truly understand the changes being made. Done right, momentum tips in your favor: you ship fast, and you understand and stand behind every change you make. You stop being the human-in-the-loop approving an architecture driven by agents. You become the architect-in-the-loop: designing the solution with the AI, owning the decisions and trade-offs, and leading the changes it implements.

The open-source architect-in-the-loop repository holds a set of Claude Code skills aimed squarely at keeping context pollution and comprehension debt in check. The philosophy is simple: humans understand far more slowly than agents can produce, so any plan a loop is about to implement must be fully comprehended by the human before a single change is made. The core skills:

  • pair: sets the tone and style of the conversation to cut down on AI prose.
  • teach: sets the pace so you can get up to speed on a concept, component, or system, one step at a time.
  • goal-alignment: the loop design itself, and the heart of the repo. It ensures you understand the design decisions before anything runs, then sets up the loop with pre-flight checks, subagents, critics, and loop evaluators.

The same loop, with you as the gate

Nothing ships until you understand the plan. The checks exist to make it understandable first.

Plan

what the loop will build

You, the architect

understand it before it runs

pre-flightsubagentscriticsevaluator

Ship

only what you understood

↺ next round

The next post, The Repeat Tax, covers how these skills hold up in daily use: where they pay off and where they still fall short.

Say hi.