Skip to content
An official website of the OECD. Find out more
Created by the Public Governance Directorate

This website was created by the OECD Observatory of Public Sector Innovation (OPSI), part of the OECD Public Governance Directorate (GOV).

How to validate authenticity

Validation that this is an official OECD website can be found on the Innovative Government page of the corporate OECD website.

Law as Code in Practice: Rulemapping Complex Tax Legislation with Germany’s Federal Ministry of Finance

Tax laws are very complex, requiring much time from public servants to apply them consistently, check for errors, or predict the effects of changes. To address that challenge, Germany's Federal Ministry of Finance is piloting Rulemapping – a methodology that converts legal rule sets into structured visual diagrams, making the logic of the law easy to read, test, and analyse. Unique worldwide, it enables finding errors in laws and testing the effects of proposed changes before implementation.

Innovation Summary

Innovation Overview

Law is essential to democracy – it guarantees that decisions are made not arbitrarily, but based on objective, transparent criteria. Yet, as rule sets grow more complex and more dynamic, citizen's trust towards law is under pressure. Public servants spend significant time applying laws consistently, which often results in delays and high costs of implementation. Traditional approaches to digitalisation, which require manual translation of legal requirements into code, are unable to keep up with the complexity of modern rule sets. The gap between the legal text and its digital implementation is a structural problem – and it is getting worse.

Rulemapping is a methodology for the visualisation and automated modelling of complex rule structures. It is based on the legal principle of major premises and makes the thought process of legal reasoning explicit and machine-readable.

It breaks down linear legal texts into their elementary components and then links them with logical operators. As a result, a contradiction-free decision diagram emerges – called a Rulemap – where all conditions and exceptions are examined layer by layer. Unlike general-purpose process modelling standards such as BPMN or DMN, Rulemapping is built specifically around the logic of legal reasoning, making it uniquely suited to the requirements of law and public administration. The methodology is recognised as a breakthrough innovation by SPRIND – Germany's Federal Agency for Disruptive Innovation – which is co-funding its development into a generally applicable international standard for Law as Code.

In cooperation with the German Federal Ministry of Finance (BMF), Rulemapping is being applied to income tax legislation – one of the most complex and citizen-relevant areas of law. The pilot demonstrates three core capabilities:

  • rule set modelling, producing Rulemaps that are machine-processable and directly convertible into various programming languages without additional translation overhead;
  • quality assurance through systematic test case development, with the rule set validated against 3,000 test cases;
  • impact simulation, allowing proposed legislative changes to be modelled and tested against historical or synthetic data before enactment.

The full potential of Rulemapping unfolds when it becomes a shared public infrastructure. If laws are developed and maintained as Rulemaps – machine-readable, version-controlled, and openly accessible – administrations, software providers, and citizens all benefit from a consistent, up-to-date legal framework that is directly processable. SPRIND's and Rulemapping's shared goal is to establish this methodology as an open international standard - transferable across legal domains and jurisdictions - creating the foundation for governments to make their laws not only transparent and testable but fit for the digital age.

Innovation Description

What Makes Your Project Innovative?

Governments have long struggled to bridge the gap between legal text and digital implementation. Existing methods model processes, but not the logical structure of law itself. Besides, they do not correspond to the legal text directly, but are rather are a product of technical translation. Rulemapping maps the law: each precondition and exception is represented as a node in a rulemap graph, creating a deterministic, version-controlled, and fully auditable representation of the rule set.

This enables capabilities that are not possible with existing approaches: systematic quality assurance of rule sets before implementation; detection of internal inconsistencies and contradictions within the legal text and impact simulation of proposed legal changes using real or synthetic data. The methodology is grounded in legal reasoning rather than process logic - credible to legal experts and uniquely suited to the complexity of real legislative environments.

What is the current status of your innovation?

The BMF pilot is currently active: wage tax deduction rule sets are modelled as Rulemaps, test cases are developed to validate internal consistency, and impact simulations are run on proposed legislative amendments. In parallel, pilot results are evaluated and documented to assess feasibility and build the case for scaling the methodology across further rule-intensive domains of public administration.

Innovation Development

Collaborations & Partnerships

This case is driven in partnership with Germany's Federal Ministry of Finance, which contributes by providing domain knowledge, legislative materials, and institutional validation.

Users, Stakeholders & Beneficiaries

Primary users are legal and administrative experts at the BMF, who use Rulemaps to model, test, and simulate tax legislation. A second direct user group are employers and software developers, who depend on accurate tax calculation rules and benefit from Rulemaps being machine-readable and directly convertible into programming languages. Citizens are the ultimate beneficiaries: Rulemapping increases legal certainty, reduces waiting times for decisions, and ensures that laws are applied consistently.

Innovation Reflections

Results, Outcomes & Impacts

The pilot aimed to make German wage tax deduction rules transparent, understandable, and traceable - for the state authorities, employers and software developers who depend on them.

Results show that the methodology enables faster identification of required updates to tax calculation rules, more efficient implementation of legislative changes, and clearer documentation of both the content and rationale behind amendments.

Internal discussions on correct implementation of legislative amendments are better supported when changes are visualised and tested with rulemaps. Tax rules proved directly convertible into various programming languages.

Machine-readability was validated on the basis of 3,000 successful test cases.

Challenges and Failures

The primary challenge was identifying which parts of the existing calculation rules required updating, given the complex legislative network affecting the taxation rules. No failures were encountered. To address this challenge, not only the existing tax calculation rules were mapped using Rulemapping, but also the broader legal norms that affect these calculations. This provided transparency whether new legislation would trigger the need to update existing rules - turning a previously opaque dependency into a traceable and manageable process.

Conditions for Success

Three conditions were decisive. First, the Rulemapping methodology itself: unlike other modelling approaches, it enables direct conversion of legal language and logic into a form that is both human-readable and machine-executable, allowing very complex legal rules to be developed, discussed, and tested within a short period of time. Second, the commitment from leadership in the BMF to modernise the system and make it more understandable and accessible was crucial. Third, a shared and clearly defined goal - to improve the process for all stakeholders, including employers, software developers, employees, the Ministry, and the interested public - created the alignment necessary for successful implementation.

Lessons Learned

Innovations in public administration cannot happen in a black box: cooperation of all stakeholders must be built into the process from the start. Innovative solutions should not only solve specific computational tasks but also enable transparency. Outputs should be directly usable to avoid additional overhead from required conversions. Transparency of rule-based systems enables not only ex-post traceability of how decisions are reached, but also the active participation of authorities responsible for legal content in the technical development process. That creates the necessary discourse for legal certainty.

Year: 2025
Level of Government: Other

Status:

  • Developing Proposals - turning ideas into business cases that can be assessed and acted on
  • Implementation - making the innovation happen
  • Evaluation - understanding whether the innovative initiative has delivered what was needed

Innovation provided by:

Date Published:

25 September 2026

Join our community:

It only takes a few minutes to complete the form and share your project.