This post is by Tim de Sousa, editor of the Rules as Code Handbook
- **The problem: **The thinking about Rules as Code is often focused on initial steps.
- Why it matters: We can’t build what we can’t imagine,
- The solution: Imagine the ideal Rules as Code enabled future, so we can design towards it.
Rules as Code (RaC) is still an emerging practice. Much of the current discussion about RaC is centred on introductory questions such as why and how we should code rules (and we’ve tried to answer those questions here), but to understand the true potential of RaC, we have to take a longer view.
Coded rules offers the opportunity to build better ways to consult the public, explain how the rules will work, and apply the rules in a user friendly way.
In this two part series, I set out some possible optimistic futures that could be enabled by RaC. Part 1 envisaged how RaC could be used to enable more trustworthy automated systems and support evidence-based policy through policy simulations. In this part, I look at ways RaC will make laws easier for citizens to understand and for organisations to apply.
Democratising law by making it easier to understand and apply
In many ways, laws are already coded. Like code, laws are often written in language that is difficult to understand or sometimes utterly unintelligible to non-lawyers. Like legislation, code relies on defined terms and on applying them consistently and strictly, and refers to precedents. As mutual adherents of formal logic and semantics, lawyers and coders are at least cousins, if not siblings.
While code may not be any more understandable to the general public, having coded rules offers the opportunity to build better ways to consult the public, explain how the rules will work, and apply the rules in a user friendly way.
In the optimistic future, governments still release exposure drafts and consult with the community, but now it’s routine to release coded versions of draft legislative rulesets together with the human-readable bills. Stakeholders can, for example, easily integrate the proposed rules into their business systems to test how the proposed rules will impact their operations and use this information to inform their submissions. If they identify contradictions or flaws in the ruleset, they make a pull request and suggest corrections directly, instead of or in addition to a written submission. Data journalists use the rules to create visualisations or tools to explain to readers how the rules will work (as is often currently done with budget analyses and tax calculators - generally with a lot of painstaking manual work), or the governments themselves create interfaces to help the public understand and to build social support.
Once passed, governments use the coded rules to make the laws easier to understand and apply through purpose-built tools and interfaces.
The future is here
In this case, with apologies to William Gibson, the future is here - it’s just not evenly distributed.
For example, Wellington City Council (WCC) in New Zealand is investing in creating a rules-enabled planning applications process. Planning law is often very detailed and difficult for lay people to understand. That’s why WCC has developed a resource consent checker - that is, a web interface that helps residents work out when they need consent from the council to do their planned residential development. Residents can get a quick and definitive answer instead of pouring over zoning maps and then struggling to read complex development control legislation. The code will soon be open, enabling transparency and the development of new tools by others.
Similarly, the NSW Department of Environment and Planning and Code of Australia have recently issued a RaC-enabled tool that helps users understand and comply with a complex environmental protection and energy efficiency program.
Not just cheaper compliance, better compliance
As systems capabilities grow, business operations become more complex - and regulation becomes more complex to compensate. In corporate circles, compliance has become a major cost, and monitoring regulatory change is a major component of that. In 2020, the compliance teams of most regulated entities were spending at least 22% and up to 35% of their time just tracking and analysing regulatory developments. Another major time and cost sink is manually coding regulatory developments into business systems to enable compliance.
In the RaC-enabled optimistic future, regulated organisations have long since linked their business systems to APIs (Applied Programming Interfaces) published by regulators. Their business systems consume new rules via the relevant API and automatically update when they come into effect, ensuring immediate compliance. The systems automatically log the change and notify the compliance staff of the update. Organisations subject to multiple regulators or jurisdictions are able to build systems that consume and apply rules from multiple APIs. The APIs, being a conduit to representations of the law, are open and available to the public, enabling enterprising vendors and service providers to build them into their own solutions or create new products.
This future would require an increased initial investment by governments and regulators to code rules, but with the rapid development of ‘low code’ tools like Blawx and Datalex, even this could become a much easier and cheaper task.
Gone are the days where compliance teams spent a quarter of their work week to identify new regulations. Businesses spend less on manually coding new requirements and implementing updates, and become more profitable - they thus pay more tax, which the government can spend on public services. The productivity dividend easily outstrips the initial investment required to draft the rules in a machine-consumable format. Further, the code is warranted by the government or regulator, which minimises the risk of mistranslation and inadvertent non-compliance. Many companies have not cut their staffing - they have decided to pursue better outcomes rather than just cheaper ones. Instead, their compliance staff are better able to focus their attention on solving more difficult issues which cannot be easily automated.
What next?
If we want to make it to the optimistic future, we need to deliberately work to build it. It’s not enough to merely iterate and achieve incremental change. We don’t need a faster horse, or even a faster car - we need a spaceship. We need to_ transform _our ways of doing things, with intention, empathy and energy.— Tim de Sousa
👋 You can create a post like this one! Share your thoughts with a community of public servants. Learn more.

Log in or sign up to continue the conversation