Image by Tom Hill from Pixabay

Rules as Code in 2020: The Year in Review

This roundup was drafted with the input of many people, but in particular Meng Wong, Jason Morris, Scott McNaughton, Thomas Guillet, and Pia Andrews.

Well, it’s been an enormous year for pretty much everyone, and not necessarily for great reasons.

Here in Australia, 2020 kicked off with the entire country being on fire, and then segued not-so-smoothly into the global pandemic.

COVID-19 has highlighted a great many weaknesses in how we do governance and deliver services, stretching the capability of government and businesses to merely keep functioning, let alone improve service delivery. Many governments relied heavily on emergency powers to be able to respond quickly to the health, economic and humanitarian crisis as it unfolded. Some governments have seen this as a failure of their systemic resilience, and in response are transforming themselves to be more resilient in the face of the increasing likelihood of rolling emergencies. Others have taken a different path, focusing on how to transition back from emergency powers to ‘business as usual’ as things ‘go back to normal’.

Now, more than ever, Rules as Code (RaC) offers opportunities to enable transparent, more resilient, more adaptable, more efficient and effective service delivery — exactly what we need to help build more robust systems to better respond to crises.

While, in 2020, priorities have had to shift and resources have been diverted to pandemic response, there’s still been a lot of RaC work accomplished in the last 12 months. It’s a traditional time to look back and take stock. So without further ado, here’s some of the developments in RaC that caught my eye this year.

Governments

In early 2020, the Canadian government kicked off a multi-agency RaC discovery project involving the Canada School of Public Service, the Department of Justice, the Labor Program (Employment and Social Development Canada; EDSC) and the Community of Federal Regulators. They began by coding sections of the Canada Labour Standards Regulations (ss 12 and 13) regarding leave entitlements, and building a prototype leave entitlements calculator.

Read/Watch more:

Following EDSC’s recruitment of RaC maven Pia Andrews from the Antipodes in February, in November they welcomed two Code for Canada teams of embedded fellows. One of these teams has begun work on creating a ‘Policy Difference Engine’ — a RaC enabled legislative modelling tool. This, in my mind, is one of the more compelling of the RaC use cases — being able to model and test coded legislative rulesets, and use that feedback to not only confirm that policy intent has been preserved in the coding, but to refine and improve the policy prior to launch. It will be worth checking in on this project during 2021.

In October, the state of NSW in Australia released its first piece of coded legislation, the Community Gaming Regulation 2020 (coded version here), and a web tool based on the coded rules.

This was a project kicked off by the NSW Government Policy Lab in 2019, and it weathered a fair amount of reorganisations (and a pandemic) to make it through to 2020.

‘Community games’ are things like lucky doors prizes, bingo, raffles — the kind of thing your local pub, community centre, or RSL (‘Retired Serviceman’s League’ for the non-Australians) are likely to host. Gambling and gambling-type games are highly regulated in NSW and require a licence, but there are a series of exceptions for certain games under certain conditions.

The regulation lays out the eligibility rules for the exceptions — they’re quite prescriptive, and therefore ideal for a RaC implementation. The web tool helps users apply the regulation and work out if they need a permit to run the game they wish to run.

Read more:

2020 also saw the shuttering of the NZ Service Innovation Lab, which closed down in June.

I’ve long admired the Service Innovation Lab, which was a RaC trailblazer as early as 2018, when dinosaurs roamed the non-machine-consumable earth. Their work on the Better Rules approach was paradigm-shifting, their SmartSmart RaC implementation holds a special place in my list of case studies of RaC-enabled service design, and their alumni (like Pia Andrews, Nadia Webster and Hamish Fraser) continue to make waves.

Read more:

  • All the Service Innovation Lab’s projects, tools and reports are still available on their website and are well worth a look.

NGOs

The French Government’s RaC-enabled Mes Aides benefits simulator, created in 2014, was one of this generation of RaC’s first demonstrations of the power of RaC to enable policy modelling.

2020 saw the French Government shut down Mes Aides this year in favor of another institutional project with a more traditional setup. Fortunately, in March some of the team behind Mes Aides created an NGO — Mes Aides.org — to continue the Mes Aides benefit simulator as a community-run project, and preserve knowledge gained about RaC implementation and how to better inform citizens of their benefits and entitlements. In particular, the team updated the site with several COVID benefits as the French government sought to respond to the COVID-19 crisis.

Read/watch more:

Before shutting down the original Mes Aides, Thomas Guillet published a couple of blog posts to summarise what was achieved.

With respect to the new MesAides.org, Thomas has recorded a live coding session of the addition of a benefit in the simulator and the OpenFisca rule engine to showcase the Mes Aides service development and RaC approach.

In October, the Observatory of Public Sector Innovation released its comprehensive research report into RaC/primer: Cracking the Code — Rulemaking for Humans and Machines. Big props to James Mohun and Alex Roberts on this huge piece of work.

The report is intended to be an accessible entry point to RaC for individuals or organisations. It’s also meant to highlight potential challenges and benefits, and enable further experimentation with RaC by governments across the world.

Read/watch more:

In December, Apolitical and the World Economic Forum’s Global Future Council on Agile Governance released the Agile 50 — a list of the 50 most influential people in the world revolutionising government. This year, the list included two members of the Rules as Code community — Nadia Webster and myself. This strikes me as clear recognition of the impact that RaC as an emerging discipline is having on governments around the world

It’s obviously a great honour, but I would argue it’s also a win for all RaC practitioners. The RaC community is extremely supportive and collaborative, and I’ve seen numerous people this year spend a great deal of time and energy, often unpaid, to help old friends and new around the world get their respective projects up and running. So, for me, a win for one of us (or two, as the case may be) is a win for all of us.

Universities and Academia

In March, the Singapore Management University was awarded a $15 million grant to do research into computational law, and established the Centre for Computational Law.

According to Meng Wong (Principal Investigator at the Centre), this grant was “the result of (at least) three years of hard work by [now] Industry Director [of the Centre] Alexis Chun — compared to fundraising, writing a compiler is a piece of cake!”.

The Centre is led by a rare animal indeed — computer scientist, lawyer, and academic Professor Lim How Khang, who is also leading SMU’s new degree program in Computing & Law. The Centre’s research program will focus on the study and development of open source technologies for ‘smart’ contracts and ‘smart’ statutes, starting with the design and implementation of a domain-specific programming language enable laws, rules and agreements to be expressed in code.

“We are committed to the discipline of working in Pasteur’s Quadrant” (that is, use-inspired basic research), says Meng. “Two of the use cases we’re working on are squarely in the domain of Rules as Code, and we’ll be formalising legislation and regulation in a machine-consumable way over the next 6–12 months. These formalisations will help accelerate service delivery, answer end-user questions, and detect loopholes in contracts and law”.

So far, he says, “we have the beginnings of our own DSL (domain-specific language), and are experimentally drafting contracts and regulations in it. We have a parser, some early IDE (integrated development environment) support, isomorphic natural language generation, and a whole list of open research questions around logics and semantics”. Which is quite a lot for an institution still in its first year.

The Centre’s computational law research program has already snagged some high profile recruits, including computational law researcher Jason Morris, and computational linguist Dr Inari Listenmaa.

In October, the Australian Research Council announced $31.8 AUD in funding for a new national research centre — The ARC Centre of Excellence for Automated Decision-Making and Society. The new Centre aims to create the knowledge and strategies necessary for responsible, ethical, and inclusive automated decision-making, combining social and technological disciplines in an international industry, research and civil society network. The Centre is focusing on automated decision-making works in four key domains — News and Media, Transport and Mobility, Health, and Social Services.

Read more:

I’m cheating on this one, since the MIT Computational Law Report actually started publishing in September 2019. I feel like they’ve really hit their stride in 2020, so I felt like it was worth highlighting. The Report describes itself as a “publication that explores the ways that law and legal processes can be reimagined and engineered as computational systems”. This year, they’ve published great work on RaC (such as this demo of RaC tool Blawx), and RaC-adjacent issues such as smart contracts and hypotheticals on robojudges.

Tools and languages

  • Jason Morris has been working on his web-based RaC tool Blawx for a few years. Blawx is a web-based rules as code interface and a legal reasoning server that is designed to be approachable for non-programmers, and allow application developers to use Blawx encodings of contracts or laws to provide legal reasoning capabilities to other online applications. In January, Jason officially released Blawx on GitHub as an open source project under the MIT licence.
  • There’s also been significant progress in programming language projects this year. For example, RaC-specific programming languages such as Denis Merigoux’s Catala, and Daniel Amyot’s smart contract-focused specification language Symboleo.
  • While not RaC-specific, s(CASP) is an open source tool that was released in October. It has a number of RaC-friendly features, such as automatically-generated explanations which can be used to provide easy traceability of RaC-enabled decisions. We’ve seen this kind of functionality before in tools like DataLex and Neota Logic, but this is especially attractive because it’s open source software.

Read more:

What’s coming up next year?

Quite a lot, it turns out.

  • Australia: The state of NSW is planning on bringing together services provided by over two dozen business regulators into a single digital platform; “[Customer Service Minister Victor Dominello] said the digitising of regulation, known as “rules-as-code”, would enable a major shift in regulatory approach”.
  • Canada: The Canada School of Public Service, Labour Program (ESDC), the Department of Justice and the Community of Federal Regulators will be launching a new full scale RaC project in early 2021. Building on the success of the Discovery Project in 2020, Canada’s new RaC project will involve the simultaneous drafting of a new regulation in code and natural language. Using a multi-disciplinary team of experts, Canada will test the RaC process end-to-end, including co-drafting in code and natural language, allowing public feedback and comment on coded regulation prior to implementation, and making the new regulation available digitally as an API for public consumption.
  • Canada: The Canada School of Public Service is working on the development of a RaC ‘Playbook’ to document the processes, techniques and technology driving RaC. This document will act as a guide and resource for Canada’s federal public service as it explores a wider adoption of RaC.
  • New Zealand: In NZ local government, a ‘resource consent’ is a written decision from the Council about something that may affect the environment or the community, such as a planning approval. Nadia Webster and Hamish Fraser at Wellington City Council (WCC) are building a RaC-enabled Resource Consent Check tool which will help residents planning a residential building project understand when they need a Resource Consent, and smooth the applications process. This Minimum Viable Product will be a demonstrator project that aims to establish an RaC platform, practice and service for other RaC projects at WCC.
  • NZ Blog: Hamish Fraser has started planning work on a blog (which be hosted at https://hamish.dev ) with the goal of capturing the experience and detail of how the Resource Consent Checker tool project was carried out and combining that with his and Nadia’s experiences in previous projects.
  • NZ Research: NZ Law Foundation-funded research project “Legislation as Code in New Zealand” is projected to be published next year. The report will consider the legal, social, constitutional and democratic implications of converting, drafting and consuming legislation in machine-readable languages.
  • Tools: Jason Morris hopes to add a number of language and interface features to Blawx in 2021, including the ability to build a simple web interview. The interview will collect data and explain a legal conclusion in natural language with links to source material. Jason intended to demonstrate that this can be done in Blawx by merely importing an existing RaC ruleset and posing a question.

This roundup only covers the projects that caught my eye (and things that RaC friends yelled at me about on Twitter). There are doubtless many things that I missed. In any case, 2020 turned out to be a massive year for RaC and RaC practitioners, and 2021 is bringing bigger things to look forward to.

Happy Holidays and Happy New Year!

I’m an Australian privacy and information governance policy specialist with a focus on innovation and emerging technologies. @timdesousa

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store