Arsh Shah

Intent must be readable

· Agents and the law · 4 min read

Machine code nobody can read works right up until a court asks what the software was supposed to do. Law runs on intent, and intent has to be legible to a person.

Picture a company whose pricing engine starts giving one customer a discount it was never supposed to get. When the dispute lands, the engineer who wrote the rule has left and the ticket just says "apply loyalty tier." Nobody can say whether the customer was meant to qualify. Everyone ends up guessing at intent from the code.

There's a fashionable idea that software is heading toward a place where humans no longer read it. Models write and review the code, and the artifact that runs in production is something no person ever looked at. Some people think we'll go further: programs expressed in representations optimized for machines rather than for us, unreadable on purpose because readability is overhead.

It might work as an engineering bet, but I think it'll fail legally the first time a judge asks a simple question: what was this software supposed to do?

Law is built on intent

Almost every area of law that touches commerce turns on what someone meant. Contract interpretation asks what the parties intended, and fraud requires intent to deceive. Even strict liability regimes, which deliberately set intent aside, define their scope by reference to what the product was for.

When a person makes a decision, we can ask them about intent. You can depose a person and read their email. When software makes a decision, the intent lives somewhere else, in the spec and the code. If neither can be read by a person, there's no intent to examine.

A legal system confronted with behavior and no intent has two options. It can presume the worst, or it can impose strict liability on whoever was closest. Neither is good for builders.

What "readable" means

I'm not arguing that every line of code needs a human reviewer. My argument is that the intent of a system must be expressed somewhere in a form a person can read, and that there must be a traceable link between that statement of intent and what the system actually did.

In practice I'd start with a plain-language policy a human wrote or approved, something like "This agent may renew software subscriptions under five thousand dollars per year with vendors on the approved list." Next to it goes a log tying each action to the rule that allowed it.

Between those sits a formal version a machine enforces, in rules and tests that a human can audit. When something breaks, a court can read the policy and an expert can check the formal rules against it, and the log shows whether the system did what it was supposed to. That's what accountability looks like for delegated software. It's also, not coincidentally, what good engineering looks like. The best software teams I know already push human intent into types and lint rules , which stay accurate longer than comments.

The contract analogy

Lawyers have lived with this problem for centuries in a different form. A contract is a program that runs on human institutions. Most of it's boilerplate nobody reads closely until it matters. When it matters, the question is always the same: what did this clause mean, and who intended what?

A lot of legal reasoning is finding the one clause in a long agreement that decides who pays when something breaks. Good contracts are written so that the clause can be found. Bad ones hide it or rely on terms nobody defined.

Software that executes commercial decisions is a contract with a runtime. It should be held to the same standard: the operative terms must be findable and legible. Software that acts on law needs to be at least as readable as the law it acts on. I go into the wider point in Code isn't law.

The best arguments against this

Courts will adapt. They'll adapt slowly, and the adaptation will be painful for whoever is first. Courts adapted to software in the past by leaning on expert witnesses and documentation. If there's no documentation and the experts can't read the artifact either, adaptation looks like presuming liability.

Readability is a tax on speed. It is, in the short term. In the long term illegible systems are slower, because every incident and audit turns into archaeology.

Models will explain themselves. Post-hoc explanations are useful, but they come after the fact. A model explaining itself afterward is more like a witness, and witnesses can be wrong.

What I'd ask of builders

Write down what the system is for, in words a judge could read. Keep that statement under version control next to the code. Make every consequential action cite the rule that allowed it. If you can do that, you can let machines write as much of the implementation as you like.

If you can't, then when a court asks what the software was supposed to do, the honest answer will be "we don't know."

Where I think this goes

I expect a new kind of document to show up, somewhere between a contract and a product spec, written to be read by both people and machines. Companies that get good at writing them will be able to hand far more to software, because they'll be able to answer for it when something goes wrong. I don't know yet what it'll be called or who'll standardize it. If you're already writing something like this inside your company, I'd like to see it.