What are ‘machine readable laws’?

TJ Harrop
3 min readFeb 22, 2019

--

I’m currently working for the Government of New South Wales where I do a tech design job that I’m fairly certain has no name.

Thanks to a vision of our Digital Gov Exec Director Pia, and the buy-in of our lab director Marina Chiovetti, part of that job now includes an experimental project to create rules (that includes Legislation, Policies, and Regulation) that are machine readable.

Why do this?

We want to to make our rules open to the public to help digital systems to be compliant so that everyone can deliver better outcomes to the people of NSW.

How things work now

When people make software or websites that need to know government-created rules, they go and read the ‘human readable’ version online (if published), work out what it means, and code the software to (hopefully) be compliant.

How we want things to work

Machine readable means that whenever a piece of software needs to know government-created rules, there’s a place it can go to get that information directly from us.

The problem this fixes

Every time some Government rules are interpreted, then hard coded in to a digital system of some sort, that’s one new interpretation that:

  • Could be wrong
  • Needs to be kept up-to-date manually
  • Can only be used by systems the architecture or policy allow

This means that at any time there are systems, both in government and out, that are incorrect or out of date, even though they’re based on rules that are:

  • Public property (thanks to the Government Information (Public Access) Act 2009)
  • Could technically be made machine readable

The vision

If the rules are able to be directly read by systems that need to know them, we can guarantee that people are getting right answers. There are 2 examples that best summarise the benefits:

The case for NGOs

Not everyone wants to deal directly with the Government, and that’s OK. NGO’s exist based on human needs and can help with family matters, employment, healthcare, all sorts. Historically, government services have required citizens to come directly to us for help or answers, and NGOs are often left signposting without being empowered to give further help.

If we make rules in to machine readable, logic based, and publicly accessible data and APIs, NGOs can give better help to people.

The case for compliance

This one is less fun, but it’s huge. When we make our rules machine readable, it means we can stop the risk associated with out-of-date or incorrect systems.

For example:

Let’s say there’s a law that says how much annual leave somebody is entitled to (there is) and that it depends on the industry (it does) and is a little complicated (it’s very complicated). Every time somebody builds those rules in to a workforce management system, they might get it wrong. There could be thousands of versions of those rules, all disconnected from each other, all potentially wrong, and probably all closed-source (hidden).

Then the Government changes the rule. Instead of 4 weeks a year, it’s 5. Every single place that the rules were re-written as a calculation needs to be changed, even the ones that used to be right.

If we make a machine-readable version of that legislation, all those external services can point at it, so they not only get proper answers, but also use new rules the minute they’re updated. Automatic compliance!

What to expect from us in the coming weeks

We’re just getting started. We (that’s 2 of us — me and Allan Barger) codified our first policy today, and we’ll be getting more and more done in the coming weeks.

The best way to keep up to date is to follow the GitHub repo at https://github.com/digitalnsw/openfisca-nsw or to follow our blog on digital.nsw.gov.au which we will no doubt overflow with our work, or just follow my medium!

Special mentions: None of this would have been possible without Brenda Wallace and Hamish Fraser from New Zealand’s Service Innovation Lab. If it wasn’t for Pia this wouldn’t be an idea in NSW, if it wasn’t for Marina it wouldn’t be an actual project.

--

--

TJ Harrop

RegTech Product guy. Currently NSW Government. Prev: UK Gov, Jaguar Land Rover, Apple & more stuff. Been around the block. Ex digi lecturer. Designers can code!