A rules-as-code case study from New Zealand

Tom Barraclough
3 min readMay 24, 2020

Hamish Fraser (Twitter, LinkedIn)
Curtis Barnes (Twitter, LinkedIn)
Tom Barraclough (Twitter, LinkedIn)

As part of a New Zealand Law Foundation funded research project into “legislation as code” (LAC) we’ve identified a specific legal situation here in New Zealand that offers a concise playground for a legislation as code research project. The project is charitably funded, public interest research by an independent team of researchers.

We’d like to facilitate a discussion around this project as we attempt two things.

  1. A real world use-case of legislation-as-code that would aid people in navigating a complex piece of law which has significant implications for them
  2. Material to potentially justify a law change inspired by attempts to code the law in a way that would clarify the legal text relating to the project.

As we’ve started to explore the project, the immediate and longer term ramifications of LAC have been bought into sharper focus, along with numerous related discussions and problems.

Facilitating the conversation is a challenge given its scope. It’s our hope that this case study can become a nexus for discussing the issues that may arise in the rules as code space.

A picture of a red sign on a stake driven into the ground that says “Please stay on the path”.
Photo by Mark Duffel on Unsplash

Here’s a list of some of the areas this project falls into:

  1. Legislation as code, law as code, rules as code.
  2. Access to Justice.
  3. Government as a Platform.
  4. Implications of open-source legislation-as-code enabled applications.
  5. Roles and responsibilities in a citizen-initiated project space.
  6. Citizen-led legislative change.

Case Study Summary and components

We have organised the case study to allow people to go as deep as they like into it.

The key documents are:

  1. This post.
  2. An explanation of the case study which can be accessed here as a google doc.
  3. An appendix with some of the more detailed issues we encountered and want to discuss can be accessed here as a google doc.
  4. A second appendix of the key sections of the legislation involved (available as PDF and through the New Zealand Legislation website).
  5. A draft “concept model” for public criticism (initial feedback was that this was more of a diagram than an actual concept model so criticism is welcome here).

Discussion Questions

  1. Can the relevant law (see component 4 above) be turned into a piece of code? (This is the main question from the case study materials.)
  2. What would that code do? How will people interact with it?
  3. Who should turn the law into code? What are the implications of each of these potential people or institutions? ACC? Citizens? Government? (as a platform?) Private contractors? A mixture of these?
  4. What are the process requirements that will make any translation or modelling effective, just and reliable, etc? Does it always require a multidisciplinary team, or can part or whole be done by a single person?
  5. What are the risks of interacting with this piece of law in code form, or any output produced from the code (ie a software interface), or any output of that output (ie what the interface produces)?
  6. What are the ongoing maintenance requirements if any in relation to the outputs, being the code, the interface, or the materials the interface produces?
  7. How will other agencies interact with the output of the interface? Ie, what does the interface generate? A text form? An input to some other automated process? Something for human review? A commercial service?
  8. Where is this code stored? Government as a platform / API? Or is it a citizens / open source initiative?
  9. If outputs are generated (ie an interface) how can the accessibility and usability of these outputs be supported over time?

Feedback

We would like to hear your feedback on the questions we raise or any issues you had with this exercise.

Please provide feedback in whatever way is the most useful to you. You can contact us via:

  • email at casestudy@brainbox.institute
  • Twitter, including tagging us in any published responses.

--

--

Tom Barraclough

Director and researcher at the Brainbox Institute, a home for discussion about the law, policy and emerging technologies www.brainbox.institute