Legislation as code: digitising the rulebook in the public sector.
Strip a public service back to its essence and you find a set of rules. Who qualifies for a benefit. How a tax is calculated. What a licence requires. Whether an application meets the threshold. Public administration is, in large part, the consistent application of legislation, regulation and policy - and for decades, most of those rules have lived in dense legal text, lever-arch files and the experienced heads of long-serving staff.
That model is reaching its limits. Manual interpretation is slow and difficult to scale. It is inconsistent - two officers, reading the same guidance, can reasonably reach different conclusions. It takes a long time to train people to competency, and that knowledge walks out of the door when they leave. And it is opaque: when a decision is challenged, reconstructing exactly why it was made can be surprisingly hard.
There is a better way, and it has a name: legislation as code.
The idea is to translate rules into structured, machine-readable logic - using approaches such as Decision Model and Notation (DMN) and rules engines - so that routine decisions can be automated, consistently and transparently, and updated when the law itself changes.
Done well, the benefits compound. Processing is faster and cheaper. Decisions are consistent, which is another word for fair. The time it takes to bring new staff up to competency falls sharply, because the rules no longer live solely in individual expertise. And because the logic is explicit, you can show your working - exactly why a given decision was reached - which matters enormously in a public service answerable to citizens, auditors and elected representatives.
We won’t pretend it’s simple. It isn’t, and anyone who tells you otherwise hasn’t done it.
Legislation is messy. It is full of edge cases, cross-references, discretion and clauses that were never written with automation in mind. Turning that into clean logic takes genuine analysis and close work with the people who understand the rules in practice, not just on paper.
The environment is governance-heavy, too. Public-sector programmes navigate multiple boards and gateways, and business cases must be made in detail to people accountable to the public purse. Agile delivery often has to operate inside a waterfall funding and governance structure - a tension that has to be managed honestly rather than wished away.
And you must keep a human in the loop. Automation should handle the routine and the clear-cut, freeing skilled people to deal with the genuinely complex, the discretionary and the appeal. The goal is better judgement, not the removal of judgement.
This is work we know well.
We’ve helped a government revenue authority digitise legislation into DMN models, introduce a rules engine, and consolidate multiple organisations into a single, automated service that complies with taxation and social-security law. The headline outcome is efficiency - lower overheads, faster processing - but the deeper one is a service that is consistent, transparent, and able to keep pace as the law evolves.
The public sector rarely lacks ambition for digital transformation.
What it has lacked is a pragmatic route from the statute book to a working, automated service. That route - careful analysis, the right tools, and respect for the complexity of the rules - is where the real value lies.



