Since our last post about the Rules as Code project in January, the move towards making machine-consumable legislation and policy has picked up speed in Australia and around the world. We've been connecting with other Australian jurisdictions and our international colleagues to see what we can learn from each other. We've also been experimenting.
What have we been up to since January?
Testing
In NSW, the Policy Lab and the digital.nsw Accelerator Lab have been focusing on experimenting and building exemplars - working with different kinds of rules, technologies and approaches - and building out our Rules as Code âtoolkit' so we can help NSW agencies to code their own rules.
In February, the DNA Lab collaborated with Brenda Wallace (@BR3NDA) from the New Zealand Service Innovation Lab to learn more about the OpenFisca platform (an open source project that allows you to turn legislation into code) as an option for our Rules Engine (a central, open repository of codified NSW legislation and policy). The first set of rules we used to test OpenFisca were rebates from the NSW Cost of Living program, specifically the Active Kids Rebate and the Creative Kids Rebate. We chose these two rebates because of their simplicity and clear eligibility criteria - they're prescriptive and don't require any exercise of discretion. We built a simple eligibility checker to prove the concept.
We continued testing OpenFisca using other rebates in the cost of living program, demonstrating to colleagues how we could use a single set of coded rules in OpenFisca to support multiple applications. With one change in a rules' engine, all the linked applications instantly use the updated rule. For a demonstration of the Rules Engine using a family savings exemplar, watch our showcase video or view the Rules as Code - Showcase - 11 April 2019 slides.
Learning and documenting
We've also been engaging with NSW Government agencies to demonstrate Rules as Code and build a pipeline of projects. We brought our users and stakeholders together in a recent workshop seeking feedback on our proof of concept. The workshop was the first in a series of activities aimed at continually testing and iterating the proof of concept with users.
What does our proof of concept look like now?
Toolkit
The Toolkit will include guidance on:
- What rules can be coded.
- How policy teams can structure new rules to enable them to be coded more easily.
- Building and using a multi-disciplinary team to draft human-readable and machine-consumable rules together, and to code rules.
- Using coded rules to test policy, and model policy and policy changes.
- Technical documentation for developers.
Details of how it will work and who will be involved and the format of the toolkit are still evolving. We'll be doing more co-design and user testing with agencies in the coming months to help build it out.
Rules Engine and API
A key part of the concept is the rules engine and the ability to consume those rules via an Application Programming Interface (API). This would enable openness and transparency and allow any user group (government, regulators, NGOs, private business) to access and use the rules to build internal or external facing digital services.
We're going to continue using OpenFisca as a platform for the rules' engine, but we're also exploring other options.
What's next?
We're going to keep experimenting, but we'll be partnering with agencies to explore the potential and challenges of coded rules. The first rules we're coding will build a tool to help charities, not-for-profits and other users understand how the regulation applies to them. Over the next few months we're engaging the Better Regulation Division to code parts of the new Community Gaming Regulation. Keep an eye out for further blogs about this!
If you are interested in finding out more about Rules as Code or have a project that you think could be suitable, please get in touch at PolicyLab@finance.nsw.gov.au.