Law-following AI assumes the law is readable. Mostly, it isn’t.
There is an assumption running quietly through the law-following AI literature: that the law is available in a form a system can obey. Structured statutes. Indexed case law. Regulators who publish machine-readable guidance. When those conditions hold, the research question is interesting and tractable — how do we specify obligations, how do we test compliance, how do we keep a model inside the fence.
Most of the world’s law does not hold those conditions. It is a PDF. Then another PDF. Then a circular nobody indexed, followed by an unwritten practice that everyone follows and no one has codified. This is not a detail. It is the binding constraint on whether “law-following AI” describes a capability or a marketing claim.
What following the law actually requires
Build the thing once and the requirements stop being abstract. For a system to follow a rule, someone has to make four decisions before a line of code is written:
- What is the obligation? Every sentence that says “shall”, “must”, or “may not” has to become a determinate requirement — and most statutes contain clauses that do none of those things while still mattering.
- What facts does it depend on? “Personal data” has a statutory definition; whether a particular record falls inside it is a factual question the specification must expose, not assume.
- What are the exceptions? Law is mostly exceptions. A rule without its carve-outs is a rule that will be wrong in the cases that matter.
- How do you evidence it? If the system cannot point to the clause it applied and the facts it relied on, it has not followed the law; it has guessed at it.
The code for any single obligation is usually small — a few hundred lines, an afternoon of work. The modelling is where the time goes, and it is legal work, not engineering work. That is the uncomfortable part: the field keeps framing law-following as a technical problem, and the hardest layer is doctrinal.
Why the gap is invisible from the inside
In the US, the EU and the UK, the infrastructure hides this problem. Legislation is published in structured form. Case law is searchable. Regulators issue guidance with consistent vocabulary. A researcher can spend a year on the specification logic and never once confront the question of where the rule came from.
In Nigeria, and in most legal systems on earth, that question is the first one. The National Data Protection Act exists. The implementing practice is thinner than the statute. Sectoral regulators publish rules in different registers. Enforcement is discretionary and capacity-constrained. A model that “follows the law” here has to be specified against a moving, partially undocumented target.
This is not an argument that law-following AI is impossible outside high-capacity jurisdictions. It is an argument that the specification method has to change. The interesting design problems — provenance, exception handling, auditability, human approval of state changes — become load-bearing rather than nice-to-have when the legal system itself is thin.
The export problem
AI systems will be deployed in Lagos, Nairobi and Jakarta long before those legal systems are digitised to Washington or Brussels standards. If law-following is specified only for the jurisdictions with the infrastructure, the field will produce a governance model that assumes institutions most of the world does not have — and then wonder why adoption looks like theatre.
The same is true of the regulatory side. A regulator asked to supervise AI systems without the technical capacity to inspect them will rely on attestation, which is to say on paper. Compliance automation can help — but only if the obligations it automates were specified honestly in the first place.
What I’m building
I am working through a small, bounded corpus: a set of obligations from Nigerian financial and data-protection regulation, mapped into machine-checkable rules with source lines, defined terms, exceptions and an audit trail — then compared against the obligation categories in the EU AI Act and its general-purpose AI code.
The output is deliberately small: a method, a taxonomy of obligation types, and a working prototype over roughly twenty provisions. The point is not to encode Nigerian law. It is to test whether the specification method survives contact with a legal system the literature does not describe.
The question is not whether the law can be encoded. It is whether the encoding can be audited — by a lawyer, by a regulator, and by the person whose rights it decides.
If you work on AI governance in a jurisdiction the field does not write about, I would like to hear what breaks first. The failure modes are probably more similar across countries than the statutes are.
