TL;DR
Code review is about making sure the requirements of the code are met, the place where accountability is signed off. With agents doing most of the writing, this step is more important than ever. We believe compiled and hard constraints are one of the most powerful paradigms we have. Imagine not being able to know if your code compiles, the linter passes or the unit tests succeed?
What if we can extend the boundary of what’s verifiable to more abstract properties of the codebase? We call them checks: requirements about the program as a whole, written in code. Enabling reviewers to express more powerful requirements on their code, so they can trust the output more and spend their attention on the higher level aspects of review.
What review is about
The review is mainly about answering a series of questions like: does the change do what it should, what else does it affect, is it the right change? But equally important is enforcing requirements on the code that often boil down to a yes-or-no answer:
- Every public endpoint checks authorization.
- Customers never see a raw stack trace.
- Personal data never reaches external services.
None of these are easily expressible as a unit test, they are questions about the code as a whole. Most requirements are of the form “every” and “never” that have to hold for all current endpoints as well as the one someone adds next month which has no test yet. So today they either live in some AGENTS.md or more probably in the engineer’s head. When agents read them, they mostly follow them even as the number of requirements grows.1 However when these requirements conflict with each other or with the task at hand, nothing guarantees this will be flagged. The reviewer is the only gate. An AI reviewer helps, but it reads the same text and can miss the same things.

This post is about moving that line: taking the requirements in the middle out of the human or agent responsibility and instead checking them deterministically on every pull request.
Prompts set prices. Checks build walls.
In optimization terms, a requirement in an agent’s context is a soft constraint: a penalty weighed against finishing the task, at a weight you can nudge but can’t see. A check is a hard constraint: the change passes or it fails.
Take one requirement, written both ways. In an AGENTS.md:
Never call an outside service while a database transaction is open.
As a check:
duringCallsTo(transaction).assertNeverCalls(outside) An agent weighs the first against its task and can trade it away without anything failing. The second fails consistently every time.

Some context is still relevant so the agent understands what you want and why and the important requirements should be listed there. However the full list of requirements should not have to live there and will be taken care of in checks. Preferably as a pre-review step so that none of the code submitted for review has failing requirements.
A check is an abstraction you define
Abstraction compiles your codebase into a semantic model: which functions call which, and where data flows. Checks are written against that model in your own vocabulary. You name the parts of your architecture by function name, folder, role or tag, then state the requirement between them.
The transaction requirement above comes from our demo app, a small invoicing product. An outside service, like the email provider, can be slow, and the transaction holds its locks the whole time. If the transaction then rolls back, the email has already gone out, about an invoice that doesn’t exist. In this app every transaction goes through one helper, and every outside service lives in one folder. This is the whole check:
let transaction = functions().filterNameExact("withTransaction")
let outside = functions().filterInFileWithName("src/integrations/*")
// Never call an outside service while a database transaction is open.
duringCallsTo(transaction).assertNeverCalls(outside) The first two lines name the parts: the transaction helper and the outside services. The last line is the requirement. duringCallsTo doesn’t stop at the body of withTransaction: it follows the code each caller hands it to run inside the transaction, every function that code calls, and every function those call, across files.
To test it, we made the kind of change agents make every day: send an invoice the moment it’s created. The email went inside the transaction, two calls down and in another file, with a comment that sounds reasonable: “so a failed send leaves no open invoice behind.” The check failed on that change, naming withTransaction and the sendEmail it reached. The same email helper is also called from sendInvoice, outside any transaction, and the check leaves that call alone. The fix is to commit first and send after.
Code is the ultimate abstraction. It says exactly what it means, and it runs. A requirement in an AGENTS.md is text, and every agent and reviewer reads it a little differently. A check is the same requirement written as code, in your own terms. No off-the-shelf linter knows what “a transaction”, “an outside service” or “customer-facing” means in your codebase. You define those terms, and your checks hold them on every pull request.
What changes in review
Each check runs on every pull request, or from your own coding agent over MCP, so the checks can be made sure to be green before anyone opens the diff. A green check means you don’t need to spend time validating this requirement unless the query itself needs to change. A red and failing check names what broke the requirement and what it reached, enabling an agent to fix it before a reviewer sees it.2 That enables us to focus more on higher level questions during review, which is where people, and AI review, add the most.
Where checks stop
- Static analysis approximates. Whether code can ever take a given path is undecidable in general. The usual blind spots are calls:
- whose target is only decided at runtime, like reflection or eval
- into code the analysis can’t see, like a closed-source dependency or code generated at build time
- to another service, over HTTP or a queue
- Some requirements are too fuzzy to state exactly. For those, a check can be an agentic reasoning check instead of a query.
- Code can meet checks halfway. Small, pure functions are easier to check, and easier for people and agents to reason about. Purity can even be a requirement of its own: “the money math never touches the database, the network or the file system.”
- Taste stays in context. Naming and readability are preferences, not requirements.
- Make sure a broken change would fail. A check that only looks for a call to
checkAuth()still passes code that ignores the answer. Test checks like a smoke alarm: violate the requirement on purpose and see that it goes off. A team writing proofs about Python with AI agents asks the same of every proof: “could a broken version of the function pass it too?”3
Closing remarks
Every requirement you move across the verifiability line is one less thing a reviewer has to remember, and one more thing everyone can trust.
Where do the first checks come from? Often from a recurring issue found in review, more on this later.
Thank you for reading! We hope you’ll follow along on our journey.
References
- Thibaud Gloaguen, Niels Mündler, Mark Müller, Veselin Raychev and Martin Vechev, Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents? (February 2026). Coding agents "tend to respect their instructions". The same study found that context files tended to lower task success compared with no repository context, and raised inference cost by over 20%.
- Jason Wei, Asymmetry of verification and verifier's rule (July 2025): "The ease of training AI to solve a task is proportional to how verifiable the task is." A check gives an agent something to verify its own work against.
- David Andrews and Chao Zhang, Formalizing CPython (November 2026). Agents copied CPython's source into Lean, tested each copy against real Python and proved what each function does. Many early proofs were valid but useless, because a broken version of the function passed them too. The same idea runs through this post: "Writing a proof about a function forces you to say exactly what it does."
Try Abstraction out yourself
Get in touch
Write to us at contact@abstraction.com.