RULES AS CODE
Showcase
11 April 2019
Agenda ➢ Introduction & Welcome to Country
➢ Meet the team
➢ The story so far
➢ Status quo
➢ Vision and strategy
➢ The RaC proof of concept
➢ Policy Lab workshop - Feedback
➢ Demo – POC Family savings calculator
➢ Demo (Changes)
➢ Next steps
➢ Question Time
Meet the Team
Policy Lab
Code for Australia (CFA)
Digital NSW Accelerator
The story so far
Nov ‘18
Jan ‘19
Feb ’19
Mar ’19
April ‘19
• Discovery
• Rules engine
research
• Learn from our
NZ counterparts.
• Project planning
• Experiment with
Open Fisca
• CFA join the team
• Toolkitworkshop
• Engaged with users
to buildpipelineof
projects.
• Family rebate POC
• Showcase
Our current scope
• Focused initially on service delivery rules and regulation
• Prescriptive rules, not judgement-based rules
• Edge cases can be potentially codified over time, as
precedent is established
• Opportunity to collaborate with PCO on shaping drafting
guidelines and methods
Examples in NSW, Australia
• Eligibility and calculation engines
• Better Regulation program
• Triggers to refer to judgement
What is
RaC?
Drafting and publishing
rules from legislation,
regulation and policy in
human and machine
consumable form.
What is not
RaC?
When we looked domestically and internationally, we
found:
• most ‘digital legislation’ efforts were structured
contentthat would still require interpretation,
codifying and hardcoding efforts. A few notable
exceptions, but many people don’t understand
difference between a website and rules as code
• most products in this space were interpretation
engines that assume the legislation is drafted only in
human form
• most people’s expectationswere based on doing the
best they can, based on the statusquo.
Rules as code is not:
• Structured content (like
XML and variants).
• Interpretation or
translation engines.
• A website.
The Public Sector need to step up and apply digital
transformation efforts beyond service delivery.
• When multi-disciplinary teams work with end users to
develop human and machine consumable rules, the
policy intent can be better being sustained through to
implementation.
• Modelling is increasingly hard, but rules as code
enables more comprehensive and broad testing.
• When everyone consumescommon rules, there is less
room for misinterpretation, and monitoring for known
use case patterns creates opportunity to close
interpretation loopholes.
• Co-drafting means upon enactment, API is up.
• Traceability, transparency, appealability.
Benefits of
RaC?
Human-readable
rules in legislation/
policy.
Myriad interpretationsto
provide functional specs to
implement.
Myriad efforts to code
into myriad business
systems/logic.
Status Quo
• Complex: Myriad
squared people
interfacing with
rules through
myriad systems to
which the rules
were added.
• Inconsistent:Very
limited reuse and
conflicting
interpretations of
same rules in
different systems.
• Lack of confidence:
Government
doesn’t provide
rules assurance.
Vision
and
strategy
Vision
Legislation and policy is easier to create, understand, apply
and comply with for the people and businesses of NSW.
Strategy
Transform legislation and policy so that it is both
human-readable and machine-readable.
Enable efficiency, transparency, innovation, and
seamless service design.
Co-draft HR/MR rules using
test drivenHCD design
approach.
Test APIs available.
HR form enactedby
Government.
OfficialAPI available
immediately.
All agencies& orgs across
sectorsconsume gov rules
as code for myriaduse
cases
Future State
Services
Compliance tools
Automated
auditing
Testing
• More efficient:
Single set of rules
used by multiple
users.
• More certainty:
Government
provides rules
assurance.
• Easier to regulate:
Use of rules can
be monitored for
patterns and
prioritisation of
regulation efforts.
Proof of concept
Policy Lab Workshop
• The purpose of the workshop was to test the Rules as Code (RaC)
proof of concept (PoC) with a group of key users.
• The workshop is the first in a series of activities, aimed at continually
testing and iterating the PoC with users.
We had 25 participants attend the workshop, including representatives
from:
• Service NSW
• Department of Planning and Environment (DPE)
• Department of Industry (DoI)
• Parliamentary Counsel Office (PCO)
• Department of Finance, Services and Innovation (DFSI)
• Australasian Legal Information Institute (Austlii)
• Office of Environment and Heritage (OEH)
• Independent Pricing and Regulatory Tribunal (IPART)
Summary of workshop findings
Top 3 Likes Top 3 Challenges
Top 2 Questions
1. RaC will help citizens understand and apply the rules
that affect them.
2. The Rules Engine and API is re-usable, accessible, up-
to-date, open and scalable.
3. RaC will make legislation and policy simpler and less
ambiguous.
1. Concern that the Rules Engine may remove discretion and
flexibility in decision-making.
2. There are barriers to the use and uptake of the Toolkit.
3. It is unclear how much the rules engine would cost to use,
the maintenance required and the resources required.
4. Tied in third place, reliability and accuracy of the coded
rules.
1. To focus on consistency and standardisation across
whole of government.
2. To start small with the PoC.
3. To use the PoC to develop use cases.
Top 3 Ideas
1. What types of rules will work in the Rules Engine?
2. What will be the functionality of the toolkit, rules
engine and user interface?
Family Savings Calculator
Demo
• Continue experimenting with different rules
from the cost of living program.
• Partner with agencies to help build the Toolkit
and Rules Engine – for rules in development and
existing rules.
• Continue testing and iterating the proof of
concept with users and stakeholders.
• Develop an Accelerator Program to assist take-
up.
• Explore opportunity for Rules as Code as a
reusable component for service delivery
Next
steps
Questions

Rules as Code - Showcase - 11 April 2019

  • 2.
  • 3.
    Agenda ➢ Introduction& Welcome to Country ➢ Meet the team ➢ The story so far ➢ Status quo ➢ Vision and strategy ➢ The RaC proof of concept ➢ Policy Lab workshop - Feedback ➢ Demo – POC Family savings calculator ➢ Demo (Changes) ➢ Next steps ➢ Question Time
  • 4.
    Meet the Team PolicyLab Code for Australia (CFA) Digital NSW Accelerator
  • 5.
    The story sofar Nov ‘18 Jan ‘19 Feb ’19 Mar ’19 April ‘19 • Discovery • Rules engine research • Learn from our NZ counterparts. • Project planning • Experiment with Open Fisca • CFA join the team • Toolkitworkshop • Engaged with users to buildpipelineof projects. • Family rebate POC • Showcase
  • 6.
    Our current scope •Focused initially on service delivery rules and regulation • Prescriptive rules, not judgement-based rules • Edge cases can be potentially codified over time, as precedent is established • Opportunity to collaborate with PCO on shaping drafting guidelines and methods Examples in NSW, Australia • Eligibility and calculation engines • Better Regulation program • Triggers to refer to judgement What is RaC? Drafting and publishing rules from legislation, regulation and policy in human and machine consumable form.
  • 7.
    What is not RaC? Whenwe looked domestically and internationally, we found: • most ‘digital legislation’ efforts were structured contentthat would still require interpretation, codifying and hardcoding efforts. A few notable exceptions, but many people don’t understand difference between a website and rules as code • most products in this space were interpretation engines that assume the legislation is drafted only in human form • most people’s expectationswere based on doing the best they can, based on the statusquo. Rules as code is not: • Structured content (like XML and variants). • Interpretation or translation engines. • A website. The Public Sector need to step up and apply digital transformation efforts beyond service delivery.
  • 8.
    • When multi-disciplinaryteams work with end users to develop human and machine consumable rules, the policy intent can be better being sustained through to implementation. • Modelling is increasingly hard, but rules as code enables more comprehensive and broad testing. • When everyone consumescommon rules, there is less room for misinterpretation, and monitoring for known use case patterns creates opportunity to close interpretation loopholes. • Co-drafting means upon enactment, API is up. • Traceability, transparency, appealability. Benefits of RaC?
  • 9.
    Human-readable rules in legislation/ policy. Myriadinterpretationsto provide functional specs to implement. Myriad efforts to code into myriad business systems/logic. Status Quo • Complex: Myriad squared people interfacing with rules through myriad systems to which the rules were added. • Inconsistent:Very limited reuse and conflicting interpretations of same rules in different systems. • Lack of confidence: Government doesn’t provide rules assurance.
  • 10.
    Vision and strategy Vision Legislation and policyis easier to create, understand, apply and comply with for the people and businesses of NSW. Strategy Transform legislation and policy so that it is both human-readable and machine-readable. Enable efficiency, transparency, innovation, and seamless service design.
  • 11.
    Co-draft HR/MR rulesusing test drivenHCD design approach. Test APIs available. HR form enactedby Government. OfficialAPI available immediately. All agencies& orgs across sectorsconsume gov rules as code for myriaduse cases Future State Services Compliance tools Automated auditing Testing • More efficient: Single set of rules used by multiple users. • More certainty: Government provides rules assurance. • Easier to regulate: Use of rules can be monitored for patterns and prioritisation of regulation efforts.
  • 12.
  • 13.
    Policy Lab Workshop •The purpose of the workshop was to test the Rules as Code (RaC) proof of concept (PoC) with a group of key users. • The workshop is the first in a series of activities, aimed at continually testing and iterating the PoC with users. We had 25 participants attend the workshop, including representatives from: • Service NSW • Department of Planning and Environment (DPE) • Department of Industry (DoI) • Parliamentary Counsel Office (PCO) • Department of Finance, Services and Innovation (DFSI) • Australasian Legal Information Institute (Austlii) • Office of Environment and Heritage (OEH) • Independent Pricing and Regulatory Tribunal (IPART)
  • 14.
    Summary of workshopfindings Top 3 Likes Top 3 Challenges Top 2 Questions 1. RaC will help citizens understand and apply the rules that affect them. 2. The Rules Engine and API is re-usable, accessible, up- to-date, open and scalable. 3. RaC will make legislation and policy simpler and less ambiguous. 1. Concern that the Rules Engine may remove discretion and flexibility in decision-making. 2. There are barriers to the use and uptake of the Toolkit. 3. It is unclear how much the rules engine would cost to use, the maintenance required and the resources required. 4. Tied in third place, reliability and accuracy of the coded rules. 1. To focus on consistency and standardisation across whole of government. 2. To start small with the PoC. 3. To use the PoC to develop use cases. Top 3 Ideas 1. What types of rules will work in the Rules Engine? 2. What will be the functionality of the toolkit, rules engine and user interface?
  • 15.
  • 16.
    • Continue experimentingwith different rules from the cost of living program. • Partner with agencies to help build the Toolkit and Rules Engine – for rules in development and existing rules. • Continue testing and iterating the proof of concept with users and stakeholders. • Develop an Accelerator Program to assist take- up. • Explore opportunity for Rules as Code as a reusable component for service delivery Next steps
  • 17.