The German federal and Thuringian governments are testing a digital legislative cycle in a Reallabor in which legal logic is converted into machine-readable code with AI. For decision-makers this mainly means that machine-readability does not guarantee legal correctness: every code version must be linked to the source passage, validated by legal experts and tested on concrete cases before it supports decisions.
In the first progress report on the Föderale Modernisierungsagenda the Bundesregierung confirms that Thuringia, together with the federal government, is running a Reallabor Law as Code. The experiment covers a digital legislative cycle, AI-supported conversion and maintenance of legal logic into machine-readable code, semantic interoperability for unclear legal concepts and an open-source ecosystem. In our assessment, this moves Law as Code beyond a purely theoretical automation idea toward an administrative experiment in which a derived code representation may be developed alongside the statutory text.
What exactly does the Thuringian Reallabor Law as Code involve?
In our analysis, the Reallabor can be understood as a test environment in which legal logic—such as conditions, exceptions and decision steps—is represented in a form computers can process. The statutory text remains the legal reference in this article’s framing, while any code is treated as a derived, parallel representation rather than as the law itself.
The difference from an ordinary digital statutory text is fundamental. A readable text is primarily presented for human interpretation; Law as Code seeks to represent underlying legal logic in a structured, machine-readable form that can support automated processing and analysis. Whether a particular representation is executable or suitable for automated enforcement is a separate question requiring validation. In our assessment this is the core of the experiment: not digitisation of text, but formalisation of meaning.
Why does machine-readable legislation not guarantee legal correctness?
Because the form of code says nothing about the correctness of the interpretation within it. Researchers at the University of Amsterdam show in a systematic assessment of languages for Rules as Code that a language can be syntactically usable while the absence of explicit formal semantics limits automated reasoning and verification. Their framework measures not only technical properties, but also traceability, explainability, maintainability, interoperability, security and organisational fit.
The sharpest warning comes from researchers affiliated with the Technische Universität München. In their study comparing formalisations of legislation by the decisions they encode they compare nine formalisations of ten EU provisions generated by language models. Their finding: structural similarity does not predict that two versions give the same legal outcome. Generated edge cases expose both genuine interpretation disputes and formal errors. The authors emphasise that their method is a tool for experts and not an autonomous legal decision-maker.
The assessment criteria that follow from this can be summarised as follows:
- formal semantics: is the meaning of the code recorded unambiguously?
- source traceability: is every rule linked to the exact statutory passage?
- explainability: can a legal expert reconstruct why the code reaches an outcome?
- maintainability: are text and code versioned together when the law changes?
- behavioural comparison: has it been tested which concrete cases two versions treat differently?
What does AI-driven conversion of legislation mean for executives, legal experts and CISOs?
Our analysis: because the Bundesregierung uses AI to convert and maintain legal logic, a derived code version arises that lives alongside the law; therefore commissioning parties that later build on such code must already require that every transformation be recorded and linked to the source passage, before a process relies on it. Because the Munich researchers demonstrate that plausible-looking formalisations can differ behaviourally, an organisation runs the risk that two valid code versions give a different outcome on the same case; therefore a legal expert must not only ask whether a rule map is syntactically correct, but also which concrete cases split the versions, and record that before deployment. Because the UvA framework sets explainability and maintainability as independent requirements, an unmanaged code version particularly affects the enforcers who base decisions on it; therefore every rule map should come with an authorised legal expert who approves the derived logic and a recorded legal change that triggers a new validation. And because the code can influence a decision while the statutory text remains the legal norm, executives bear the risk of a silent divergence between the two; therefore a CISO must agree with the legal function how a faulty code version is rolled back and how changes and decisions remain auditable.
Which controls must surround a parallel code version of regulation?
In our assessment, the following are a prudent minimum set of controls, derived from the academic findings and from the experimental character of the project. They also apply to private organisations that translate rules into decision logic, such as compliance, benefit or contract processes.
- Link every rule to the exact source passage, so that provenance remains verifiable (source traceability).
- Have an authorised legal expert approve the derived logic before it supports a decision.
- Test every formalisation with counterexamples and record which cases two versions treat differently.
- Version statutory text and code together and designate which legal change triggers a revalidation.
- Keep transformations, interpretation choices, review results and releases auditable.
- Record in advance how a faulty code version is rolled back.
In our analysis, these controls are consistent with a governance approach that treats recording source references and human release as safeguards against uncontrolled reliance on derived decision logic. The kinship is visible in debates about how AI systems deal with conflicting sources and in the NIST line that AI analyses need source references and human release. For decision-makers who want to secure this organisationally, a sober governance approach for AI is the starting point, alongside the broader discussion about independent verification instead of reliance on vendor declarations.
Finally the status, kept precise: the Thuringian Reallabor and the plans mentioned are an experiment and implementation activity, not proof that German law is already generally executable code. Our assessment is that the pilot is best understood, for now, as a test of verification infrastructure rather than as proof that legislation can already be automated generally.
Sources and references
Sources: The article relies on the progress report of the Bundesregierung and on peer-reviewed studies by the University of Amsterdam and the Technische Universität München.
