Legislation as code isn’t Robojudge

TJ Harrop
3 min readJan 20, 2020

--

Last year I started working on “rules as code” – a government project to draft machine readable laws and policies, rather than just human readable ones.

One of the questions that came up a lot when we discussed creating a computerised version of government rules was “what happens to discretion?”

The answer is simple: nothing.

All that we do when we codify the law is make a version that says whether a scenario definitely does, or definitely does not follow some measurable rules. It’s a method that works best with mathematical laws, things like taxes and benefits, but can also be applied to other scenarios.

As an example, the first thing we created in the NSW gov was an API which asks for a person’s information (nothing too personal) and showed the government rebates and products they’re entitled to.

But that’s just policies, the law is different and includes judicial discretion, which introduces some issues.

Discretion isn’t black-and-white.

Thankfully, the human process of judicial discretion doesn’t just say “If this then that”. As a relatable example, if somebody is driving at 60 in a 50, they’re speeding. If we’re trying to work out the difference between manslaughter and murder, things aren’t as formulaic.

When considering what codified legislation is and isn’t right for, it’s important to consider:

  • Whether the rules themselves are the kind of ‘if this then that’ rules which can be entirely calculated
  • Whether the rules rely on empathy or human understanding
  • How we combine codified rules with human decisions to help avoid prejudice and biases

Making decisions more open

Another common question is how the decisions made can be more open. Codified rules are open in their very nature, as all factors to make a decision can be logged and audited. This gives us a process that can help judges and governments make unbiased decisions.

The law is already codified anyway

The majority of laws are made by the government as human readable text. The definition of human readable can be a little misleading, as comprehension relies on knowledge of legal prose – it doesn’t take a law degree, but it’s not something many can pick up without prior work.

Because governments, companies, and people rely on software to go about their daily tasks, those laws already end up being codified. In the current system, the codification isn’t done by (or even with) the people who understand the rule’s intent. Instead, it’s done by a person reading, interpreting, and codifying the legal prose. What we end up with is a system in which laws are codified, but in a way that is completely decoupled from those who truly understand them. By codifying laws from the start, we remove the risk of misinterpretation.

Conclusion

Rules as code doesn’t mean judgements will always be done by computers. Decisions being made by computers doesn’t mean they’re made in a way where the process isn’t understandable and open, and most importantly the concept of codified laws doesn’t apply to all laws equally.

By codifying the laws we can make decisions more open, we can avoid misinterpretation, and we can make laws accessible to all, not just to government and those who can follow legal prose.

--

--

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!