Why We Don’t Read the Assembly: What AI Agents Can Borrow from Compilers
A proposal for making AI-generated code and summaries easier to trust: agree on what must survive, verify the result independently, and keep permission separate.
Audio summary: a one-minute spoken version of this post.
I don’t read the assembly every time I compile a program. So why do I want to look over a coding agent’s shoulder when I ask it to “keep the latest progress”?
Here is the case that bothers me. The source produces two progress updates, v1 and then v2, but the receiver sees v2 first and v1 second. “Keep the latest” could mean keep the most recently received update, or keep the newest source version. Both are implementable. They produce different results. No amount of precision in the generated code can settle which one the user meant.
A compiler and an agent both turn something we wrote into something a machine can run, yet one feels like translation and the other like delegation. My working answer is that the compiler starts with a program whose meaning is defined by the language. The agent is often asked to work out what the request should mean and implement it in the same pass. What I’d borrow from compilers isn’t the idea that English can become a programming language. It’s the discipline of saying what must survive a transformation, then checking the result against that promise.
The compiler didn’t decide what “latest” means
A compiler can change the instructions without changing the behaviour the language says matters. That isn’t because compilers are deterministic or incapable of bugs. CompCert makes the promise unusually explicit: for a successful compilation under the guarantee’s assumptions, the target’s observable behaviour must be one of the behaviours allowed by the source.[1]
The word I’d underline is allowed. The source need not prescribe one exact execution. And the promise has edges. CompCert’s theorem covers a defined part of the toolchain, from a checked representation of C to an assembly-level representation, and it concerns the behaviour modelled inside that boundary.[1] It isn’t a claim about timing, linking, or whether the source does what its author wanted. A compiler can faithfully compile the wrong business rule.
With the out-of-order updates, the agent may get the request before anyone has written down which update wins.
The line doesn’t fall neatly between formal language and natural language, though. “Do not push” is clear enough to enforce. “Keep the latest” is not, at least in this case. One request can contain a hard constraint, an unresolved product decision, and an implementation choice the agent is free to make. If I treat all of it as ambiguous, I waste time on questions nobody needed to ask. If I treat all of it as settled, the agent makes the product decision and nobody notices.
A small contract before the diff
What I’d try is the lightest contract that fits the risk. Suppose the product owner confirms that “latest” means newest at the source. The contract might then fit in a ticket comment:
Must hold: For the same learner and activity, an older source version must never replace a newer one.
v2 → v1leavesv2in place;v1 → v2advances tov2. Changing the learner’s ID doesn’t change the rule.Still open: What should happen when an update has no version? Don’t silently pick a default.
Allowed for this run: Edit and test locally. Don’t push or deploy.
I’d keep the original request next to the contract so that my interpretation doesn’t get mistaken for what the user said. Instead of asking someone to approve a paraphrase, I’d ask what should happen when the old update arrives last.
Checking the patch against the contract is a separate job. Here I’d borrow the idea of translation validation. Alive2 checks particular LLVM IR transformations rather than asking users to trust every transformation in the abstract.[2] For an agent’s patch, the equivalent could be an independently written test that observes whether progress ever goes backwards, plus a reviewer who asks what the implementation does when the version is missing. If the code silently treats a missing version as 0, that is a policy choice the contract never made. None of this is a proof. A test shows what happened on the cases someone thought to write, and a review can still expose choices a happy-path test misses.
A patch can pass every test and still not be approved to merge or deploy. Likewise, a policy can tell me when records should be deleted without letting an agent delete them. I’d check permission at the point where the action would happen, not infer it from a passing test or a sentence in a document.
I first thought of all this as reducing information entropy. As a metaphor it helps: a good counterexample eliminates plausible readings. But a spec can pin down every variable name while leaving the expensive question unanswered. The question I’d rather ask is: where would guessing wrong change the outcome, and how hard would it be to notice or undo? If an existing test already distinguishes the two readings and reflects an agreed rule, use it. There’s no need to write a second spec. If the rule is still unsettled, stop at that decision rather than adding a test that quietly settles it for you.
A summary can pass the test and still lose the point
The same question comes up when we ask an agent to read documents we won’t read ourselves. A short brief can’t preserve the answer to every future question. What it can try to preserve is the ability to make specified decisions from a known set of sources.
I tried this on a fictional board-game library policy. The same model produced two briefs under a 330-character limit. One got ordinary summary instructions. The other was asked to preserve decision-changing exceptions, cite clauses, and list gaps. The readers were fresh calls to the same model, not independent humans, and they answered questions from the briefs alone. Both briefs scored eight out of eight on the planned multiple-choice questions, and even the ordinary brief used clause labels. So this compares two prompts, not citations versus no citations, and it doesn’t establish a winner.
The open-ended follow-up was more revealing. Does a safety recall automatically change the fee rules? The ordinary brief didn’t say. The structured brief said “fees same,” which could be read more broadly than the source warranted: a recall does not, by itself, change the fee rules. The structured brief also listed the points cap and pickup deadline under “Gaps,” but the model reading it couldn’t tell whether the policy omitted them or the brief did. The multiple-choice questions had let the readers select “not specified” without showing evidence that it was the source, rather than the brief, that was silent.
For a decision brief, then, I’d check in both directions. Start from a conclusion and follow its reference back to the exact wording. Then start from the original, pick a handful of exceptions, triggers, and deadlines that could reverse an action, and see whether someone can answer questions about them using only the brief, with evidence. When they can’t, can they distinguish not specified in the checked source, not covered in this brief, source not checked, and sources disagree? A citation helps with the first direction. It cannot, by itself, tell you what disappeared in the second.
What would make this worth the effort?
One synthetic policy and one run per condition showed a weakness in my test. They did not show that the proposed workflow saves time. A better trial would hold the review budget and access to clarification constant, use several policies, and write open-ended questions with an answer key before generating the briefs. I’d measure wrong decisions, justified abstentions, and the time spent preparing and checking each brief. I’d also change one rule and see whether the workflow flags the affected conclusions while leaving the others alone. If the extra work doesn’t prevent enough consequential mistakes or make review easier, I wouldn’t make it the default.
I’m not proposing that every prompt become a formal spec. I’m proposing that for a decision we don’t want an agent to guess, we give it the equivalent of a testable boundary. Where that boundary earns its keep is the part I haven’t worked out, and you may think I’ve drawn it in the wrong place. Which decisions would you insist on making explicit? And what evidence would let you trust the result without reading every line?
Sources
[1] https://compcert.org/motivations.html — CompCert: Context and motivations [2] https://github.com/AliveToolkit/alive2 — Alive2: Automatic verification of LLVM optimizations