The Fight Over Rules As Code
In this corner, Pia Andrews
Pia Andrews is the Executive Director of Digital Government for the Department of Finance, Services and Innovation of the Government of New South Wales in Australia. She is a self-described open data and open government “ninja.”
She recently shared some work her NSW Policy Lab is doing on Rules as Code or “RaC.”
A major idea in the “Rules as Code” community is that government legislation and regulation and policy can and probably should be drafted in two languages at the same time. It should be drafted in natural human language (in Canada English, French, or both) as it is now. It should also be drafted in a machine executable language at the same time. And both would be published side-by-side.
The benefits to this co-drafting approach are more than you might expect.
Co-drafting simplifies creating automated government services, certainly. In addition to saving time and effort in writing software to answer legal questions, it also provides a single, authoritative interpretation of what the rules mean.
But perhaps surprisingly, even if you never use the encoded version, drafting them that way may makes the rules themselves better.
Certain mistakes that might be hard to see in a natural language rule become plainly obvious when you try to encode that rule. Writing in both languages forces you to be more precise about what you are saying, bringing problems to light that you wouldn’t see drafting in English. Arguably, co-drafting in a machine executable language is just better drafting technique.
But more than that, machine executable legislation can be tested in ways that human beings are not capable of. A human being cannot generate 10,000 random fact scenarios, calculate legal outcomes for those scenarios, and test those legal outcomes for unexpected results in a matter of minutes. So the legislation can be “debugged” as it is being written, instead of the loopholes being found later.
This means that not only can the rules be encoded, but so can tests. And these tests benefit from the same rigour imposed by a machine executable language.
For a more complete run-down of the thinking around Rules as Code, check out the Better Rules for Government Discovery Report from New Zealand’s Service Innovation Lab.
Andrews’ Policy Lab recently tested some of these ideas by encoding some existing legislation in a tool called OpenFisca, and then using that code to generate two different user-facing tools to assist people in finding government benefits to which they are entitled. The slides and video (1hr) of their recent showcase of that experiment is available online.
Andrews was also invited to speak at #FutureLaw2019, a conference held this last April at CodeX, Stanford Law’s Center for the study of Computational Law. A video of that talk is available on CodeX’s YouTube channel.
The conversation that began at Stanford has continued online, and a global video conference “show and tell” of rules as code technologies is now scheduled for May 13, 2019.
The Stakes are High
Rules as Code suggests the “legalese” of the future will be a programming language, or a family of programming languages. That possibility has implications for legal education and continuing professional development. It changes the sort of services that legal service providers can offer to people who are dealing with complicated legal rules. It changes how legal service providers of the future deal with knowledge management when we can encode legal knowledge and allow computers to use it, rather than merely regurgitate it.
It will also have doctrinal effects in the area of statutory and contract interpretation. Rules drafted in a strict semantics, with explicit testing criteria setting out some of the things the drafters were seeking to accomplish and avoid, is a completely different source material from natural language laws and Hansard transcripts.
For the consumers of legal services, the benefits are clear. Imagine, for instance, that tax laws were written in a machine executable language by the government. The task of creating an online tax filing tool would be just a matter of generating a new interface to collect the data. The hard parts would be done by the law itself.
Which brings us to the other combatant.
In the opposite corner, TurboTax
There are organizations and people who rely on the complexity of government legislation in order to make profit. And these entrenched interests do not go quietly. At the time of writing, the United States Congress is considering legislation called the Taxpayer First Act. According to critics the bill includes provisions requested by lobbyists for incumbents in the tax preparation market that would make it illegal for the Internal Revenue Service to create tools that automate tax preparation.
Essentially, it would be illegal for the IRS to provide, for free, what TurboTax and H&R Block and other providers get paid to do.
At the time of writing, the bill had passed the House of Representatives, and is going to the Senate.
The contrast could not be more stark: If the bill passes, the US revenue agency would be legally prohibited from doing for taxes what New South Wales’s Government Policy Lab is actively pursuing for benefits.
Round one in the fight over Rules as Code has begun. Stay tuned.
Where is Canada in this fight?
Rules as Code is a global conversation. The agenda for the May 13 Rules as Code Show and Tell lists presenters from Australia, Canada, Denmark, France, Jersey, New Zealand, Singapore, the United Kingdom, and the United States of America. Public servants from Australia, Jersey, and New Zealand are included.
The scheduled Canadian participants come from academia and the private sector. But the Rules as Code conversation is also gaining steam in the Canadian federal public service. Various departments, including the Canada School of Public Service are discussing a pilot project with colleagues. So the fight over Rules as Code is coming to Canada, and sooner rather than later. The legal profession in Canada would do well to start thinking now about what corner we want to fight from.
I’m with Pia.
Comments are closed.