For some, the appeal of “Legislation as Code” is the prospect that legislation could instead be drafted and even enacted in machine-executable languages, and thereby modelled and executed in computer systems. This approach raises several common concerns: that law can be ambiguous; that legal logic cannot be accurately coded; and that law lacks a consistent ontology to facilitate computation. While arguably relevant, they are superfluous to the core reason why legislation should not be written in code.
Rather, the critical failing of ideation around enacted “Legislation as Code” is that it fails to consider the integral power structures that underpin law’s technological use of written natural language. The practice of writing law in words and then interpreting their meaning keeps in balance fundamental constitutional arrangements between the Legislature, the Executive and the Judiciary. The relationship between these institutions and the entire structure of law depends on the features of natural language for recording legislative provisions, separating the intent of the Executive from the effect of its words, and balancing power. Code is unavoidably rule AND interpretation. Legislation enacted in code running within computing systems risks disempowering or excluding the Judiciary from its constitutional role as final interpreter.
Standalone code-as-law is not yet (if ever) able to provide the features of natural language that this balancing of power relies upon. In its own right, this is a significant topic beyond the scope of this report, but it is worth noting that:
even programmers rely on natural language to communicate with each other, to the point that natural language commenting is a feature of most code languages,
it is generally expected that computers will interpret and execute code the same way each time, you can’t easily ask the computer to change its interpretation without changing the code.
Short of enacted legislation-as-code, we can instead focus on the opportunities for approaches that I would describe as non-authoritative interpretation-as-code. The insights I’ve gained from doing this research, have been important for helping me to contextualise my own work in this space and to identify the risks and opportunities coming from that work. The following are two examples from my own experience that I think are significant and would benefit from being explored further through the incubator we propose in our recommendations.
The first example was influenced by work that incorporated interpretation-as-code into policy development and legislative drafting via the better rules approach and the Better Rules programme. This work takes a service design approach to policy development and as part of that, anticipates the way that policy and law will be implemented in computer systems as well as the effects it will have on the people it impacts. It is a concept that needs on-going case-studies that consider appropriate measures to counter the constitutional risks we identify more fully in this report.
The second example is what I have come to call “Open Interpretation”. This is where entities charged with interpreting the law and implementing policy publish their interpretations (in rules-as-code form) as part of the responsibility and accountability that comes with this delegated power. While we do not cover this particular use in depth in the report, this practice offers a significant opportunity to practically implement one of the foundational principles of the rule of law: “the law should be publicly accessible and able to be easily understood by all to whom it applies”. While interpretation-as-code may not seem at first an obvious choice to achieve the goal that law be “easily understood”, it is not the code itself but the endless tools that can be built utilising such code that will achieve that end. A recent example of this is consentcheck.wellington.govt.nz which utilises the council’s coded interpretation of its district plan’s residential rules. To be most effective these rules should be made publicly available and versioned, easy to scrutinise, open for feedback, suggestions and recognised as subservient to the law.
A deep understanding of the way that technology and law interact is essential not just for understanding the risks, but also the benefits of rules-as-code approaches. With a proper understanding, both law and code can enhance one another in the public interest. This project began in part because of reservations I had about the wider implications of the Service Innovation Lab’s work on the better rules approach, and I want to thank Te Manatū a Ture o Aotearoa for the opportunity to explore these issues and undertake this research.
1st March 2021