Campaign - What is Rules as code (RaC)?
Campaign - What is Rules as code (RaC)?

What is Rules as Code?

Rules as Code (RaC) is the process of encoding and publishing rules (legislation, regulations and policies) as machine-readable code.

Read about Rules as Code

Use cases for Rules as Code (RaC)

Rules as Code can allow governments to deliver trusted, citizen-centric digital services that are scalable and re-usable. Machine-readable rules and legislation can be consumed by government agencies across jurisdictions to deliver services and enable citizens to check their eligibility and comply with obligations.

Service delivery

Deliver more efficient citizen-centric digital services based on consistent and traceable application of rules/legislation. RaC services can also enable a pathway to test-driven policy development.


Use Rules as Code to provide citizens with a trusted, central source of truth to check their eligibility for government services and benefits specific to their needs.

Regulatory compliance

Provide an easy-to-use, authoritative interface for businesses to check their regulatory obligations. A well-designed RaC system can improve compliance and remove the policing burden on regulators.

Benefits of Rules as Code

Reduces ambiguity

A clear and certain citizen experience

More accessible

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

Inform policy

RaC can help inform policy and model changes

Salsa's Rules as Code services

Salsa offers a range of RaC services, from consultation, service design and rapid prototyping to full end-to-end development, deployment, hosting and support of RaC systems. Our services cater to agencies at all stages of the RaC journey, from clients taking their first steps to clients ready to implement and deploy RaC services.

For agencies looking to explore how Rules as Code could improve service delivery, rapid prototyping provides a low-cost, low-risk process to assess and validateRaC solutions in a sandbox environment. Salsa's RaC services include:

Want to learn more about Rules as Code?

Read some of Salsa's insights and thought leadership content on Rules as Code:

How does it work?

The exact set up of an RaC project will depend on the individual requirements. However, below is a diagram showing a sample pathway from legislation to users, via OpenFisca.

Rules as code - Solution Architecture

Rules as Code in action

Many jurisdictions are using Rules as Code including France, New Zealand, Australia and Spain. Some RaC projects are presented below. View case studies in more detail

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

Interested in Rules as Code?