How to get started

After you’ve decided to use Rules as Code for your poject, you are likely starting from one of two places:

  1. You are coding existing rules (legislation/regulation); or
  2. You are developing new rules.

If you are in the lucky position to be helping write new rules, likely with or inside of a government department, then please see this other guide on Better Rules. Otherwise, please proceed below.

The key component for creating reliable and useful Rules as Code is a multidisciplinary team. You need to have developers sitting alongside people who understand the rules, who may be policy people, lawyers, or front line staff who have to apply the rules every day. This subject matter expertise will help you implement a coded version, but will also help create test cases to ensure your coding delivers expected results. There are, of course, situations where the historical application of the rules are wrong, so you need to balance this historical experience with what the legislation/regulation specifically says. This enables you to create the most fair and true reflection of the law as code.

We would recommend you create a team with the following skills, noting that everyone should be equally committed to your goal, and ideally aligned on values and behaviours, as this is hard work and you’ll need to work through complexity and ambiguity with calm kindness to make significant progress:

  • 1 Scrummaster to keep everyone on track, establish project cadences, backlog, sprint planning, etc
  • 1-2 Subject Matter Specialists and Policy Advisors
  • 1-2 Legal Advisor/interpreter
  • 1-2 Rules-as-Code Developers
  • 1-2 Service Designer to support the process and bring a user-centric and design lens to the project
  • 1-2 Business Rules Specialist

You also want to create a working group of people, including those who would use your RaC system (and the resulting service/software) to engage with and advise the work from the start. Your service designer(s) will be best placed to engage with this group on user research, user testing, etc.

If you are only building RaC for your specific project, then you probably don’t need to engage in a lot of broader community development. If however, you are hoping to build RaC as national digital infrastructure for your country, you should work and engage openly, inviting and collaborating with open source and open government advocates and civic hackers in your country. The stronger a community of collaborators you can make, the faster your RaC will grow, and the more impact you’ll be able to make.

In the following pages you’ll learn how to set up your own RaC system, and how to codify your rules :)