Use cases for rules as code
Benefits of rules as code
A clear and certain citizen experience
Helps citizens access rules and legislation (no legal jargon)
An OpenFisca rules engine can be reused by multiple user interfaces
Easier to manage
Once coded, rules are easier to manage and change
Makes laws and government more transparent
RaC can help inform policy and model changes
A rules as code (RaC) project should have three main ‘work’ streams.
Rules analysis and mapping to capture entities (persons, groups, etc.), legislative requirements, eligibility logic, and calculation logic.
Creating a user interface that calls the rules from OpenFisca. This could be a website, chatbot, voice app, or mobile app.
Open source. Open rules. OpenFisca
The solution architecture of a RaC project depends on the project, However, below is a sample architecture combining OpenFisca and Drupal.
Rules as code in action
GovZero Aotearoa, New Zealand
Codifying the Social Security Act to help citizens understand eligibility for entitlements
Fair Trading New South Wales, Australia
Making it easy for citizens to check if they’re allowed to conduct gaming activities
Mes Aides (My Helpers), France
Informing French citizens about their eligibility for national and local benefits
Lex Impact — France
Allowing users to test the impact of policy changes
Les meves ajudes (My Aides), Spain
Making it easy for citizens to see what benefits they’re eligible for
Rapu Ture — Exploring the Rules, New Zealand
Allowing users to explore and evaluate government rules
GovZero Aotearoa is community-led initiative with a genuine mission to bring people together to work on civic-minded projects to develop open digital public infrastructure that reduces social injustice and increases wellbeing. Salsa has been actively contributing to the GovZero Rules as code project stream.
Introducing GovZero rules as code
Rules as code is being developed to help citizens of Aotearoa understand their eligibility for entitlements under the Social Security Act.
How to turn legislation into rules as code
Using a Miro board we analyse the legislation and identify eligibility criteria, eligibility logic and calculation logic. After that we define variables and set up test cases for each type of benefit.
Salsa RaC setup services
Discovery and design
Rules analysis and mapping, content services, user-centred design, and end-to-end solution architecture.
Development, test and deploy
Set up environments, code rules in OpenFisca, configure Drupal forms and Drupal RaC module, UI/UX for forms, QA
Design and conduct user testing sessions, synthesis results, report and feedback into design team.
Salsa RaC ongoing services
RaC OpenFisca and Drupal support
Service desk support to cover incident response, bug fixes, etc.
RaC platform hosting
Platform hosting for OpenFisca and Drupal, with support packages to meet your needs.
Rules content support
Ongoing maintenance support to cover rule changes and other feature changes.