Rules as Code is the concept of writing digital government rules, legislation, regulation, standards and policy.
September 15, 2021
Digital Governments’ ultimate goal is to harness digital technology to improve citizens’ lives. A new frontier in Digital Government is the idea of Rules as Code, or RaC. Rules as Code is the concept of writing government rules: legislation, regulation, standards, and policy, in a language machines can understand – code. It is an idea that has been called, “Transformative,” by Estonia’s Chief Information Officer, Siim Sikkut. The Prime Minister of Australia, Scott Morrison said, “When [rules] are written in code then that makes for rapid implementation and application to the practices it is seeking to regulate.”
When interacting with the government, people expect government services and transactions to be as easy as streaming a movie or shopping online. As Joyce Murray, Canadian Minister of Digital Government said, “People expect government to be part of this technological age, where innovation is happening at breakneck speed.”
Yet, the problem is government largely functions on systems built for an analogue world – where the rules that govern services are written for human use. The rules can be complex (they are written for precision and meaning - not for readability or accessibility) making it difficult for citizens and business to understand their obligations. And when digital services are built on these analogue rules, they must first be interpreted to become machine-consumable. This can result in a mismatch between rule intent and implementation.
"an effective way of developing such policy and legislation is for multidisciplinary teams of policy analysts, legislative drafters, service designers and software developers to co-design the policy and legislation, taking a user-centric approach that focuses on how the service could most effectively be delivered. In this case, ‘user’ can mean people and technology systems as the end-users of machine consumable rules."
If government rules were also written for machines, that is to be machine-consumable, there are several potential benefits:
Also, from a software development standpoint, when government rules are written as code, software development standards such as testing, automated deployment, version control, encoding best practices for resource stacks, and best-in-class security can be applied to improve the quality of the rules.
Below we examine more closely some of the potential benefits of government rules as code:
Improved Rule Quality and Accessibility
Machines function logically. That is in a flow of yes or no and true or false statements. By writing rules as code, in the logical flow of these on/off statements, coded rules could bring clarity and transparency to a rule by converting complicated legal and legislative language into simple to understand logical sequences. This could make rules simpler to understand and interpret, improving the quality of the rule.
With rules written as code, rules can be tested in computer simulations. Tens of thousands of situations can be simulated in a matter of minutes, allowing for rules to be essentially ‘debugged’.
Transparency, Value and Trust for Citizens
The basic premise of transparency in government is that government will operate in an accessible and visible manner and that their activities and decision making are open and clear to the public. With rules written as code, government creates transparency, trust and open engagement with citizens. People can see and understand what is going on with the rules that govern them.
Government can create trust and pride by becoming a trusted steward of data and information. The quality of information, accuracy, accessibility and how people’s personal data is used can become a pedestal for government to prove they are listening and understand how important it is to citizens how their data is used and secured. Rules as Code can deliver security policies and procedures that protect data from threats and disruption.
Rules as Code allows for tracking of rule change - a revision history. Across government, people can collaborate on code with other teams in different areas of government and can help streamline the development process and provide a centralized source for all the government’s code.
Better Service Delivery
With Rules as Code, rules can be applied to digital services without the need to interpret them. Rules could be implemented by machines as soon as they become available, in the exact manner intended. Automated or semi-automated digital services could be built that can deliver a result, explain how the rules were applied to achieve the result, and all inputs and evidence for that result could be available to citizens openly and transparently.
Government Rules as Code, creates rules that are simpler to understand and interpret for citizens. Rules themselves benefit by becoming better. When rules become machine-consumable, innovation becomes possible. Services can be created to deliver the exact intent of a piece of legislation, standard, regulation or policy. Rules as Code can help change cumbersome, inefficient, analogue government into nimble, agile, and innovative digital entities to improve citizens lives – a truly transformative idea.