SecurityTechInsider AI security & governance
EN/ NL
Governance

Thuringia and the federal government test code

Germany is turning Law as Code into a Thuringian Reallabor with AI-converted legal logic. Why source traceability and human validation remain indispensable.

4 December 2026 4 min
Illustration for this article: Thuringia and the federal government test code. A coil of unbranded ribbon cable unspooling across a matte floor into darkness.
Organisations building decisions on AI-converted legal code must now validate each version against its source and test it on concrete cases before deployment. Image: SecurityTechInsider — original editorial illustration

You must now require that any code derived from legal text be linked to its source passage, validated by a legal expert, and tested on concrete cases before it supports any decision you make or enforce.

The prompt is an analysis of 4 December 2026 of Law as Code conversion and validation in the Thuringian Reallabor, which argues that machine-readability of legal logic does not guarantee legal correctness, and that source traceability and human validation remain indispensable safeguards. The German federal and Thuringian governments are running an experimental digital legislative cycle in which AI converts legal logic into machine-readable code. In our assessment, this moves Law as Code from theory toward administrative practice in which derived code representations may develop alongside statutory text—a shift that creates new risks for organisations that build decisions on such code.

The Reallabor treats legal logic—conditions, exceptions, decision steps—as material that computers can process. The statutory text remains the legal reference; code is a derived, parallel representation rather than law itself. This differs fundamentally from digitising text for human reading. Formalising meaning into machine-readable form creates the possibility of automated processing, but not the certainty of correctness.

What happens when legal logic is converted to code?

Researchers at the Technische Universität München compared 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 exposed both genuine interpretation disputes and formal errors. The authors emphasised that their method is a tool for experts, not an autonomous legal decision-maker. This means you cannot assume that two plausible-looking code versions will behave identically on the same case.

Researchers at the University of Amsterdam assessed languages for Rules as Code against a framework measuring not only technical properties but also traceability, explainability, maintainability, interoperability, security and organisational fit. Their work shows that a language can be syntactically usable while the absence of explicit formal semantics limits automated reasoning and verification. Code that looks correct may not be.

Which failure modes must you guard against?

  • Divergence between code and statute — a code version that is syntactically correct but interprets the law differently from the statutory text, creating silent misalignment in decisions.
  • Unvalidated transformation — legal logic converted to code without recording the source passage or having a legal expert confirm the interpretation before deployment.
  • Behavioural difference between versions — two code formalisations that both appear correct but produce different outcomes on the same case, creating inconsistency in enforcement.
  • Loss of maintainability — code that lacks explainability or documented legal change, making it impossible for future enforcers to understand or update the logic safely.
  • Uncontrolled rollback — no agreed process for removing or reverting a faulty code version, leaving decisions based on incorrect logic in place.

What controls must you be able to demonstrate?

  1. Record the source passage for every transformation — document which statutory text or legal provision each code version represents, and maintain that link through all updates.
  2. Obtain legal expert validation before deployment — require a qualified legal professional to review the derived logic, confirm the interpretation, and sign off on the code version before it supports decisions.
  3. Test on concrete cases and record the results — run the code against real or representative cases, document which cases expose differences between versions, and retain that record.
  4. Establish a legal change trigger for revalidation — define which changes to the statutory text or legal context require the code to be revalidated, and execute that revalidation before the new version goes live.
  5. Agree a rollback and audit process with your legal and security functions — document how a faulty code version is removed, how decisions made under it are handled, and how all changes and decisions remain auditable.

How does this apply to your organisation?

These controls apply whether you are a government body running the Thuringian experiment or a private organisation translating rules into decision logic for compliance, benefit or contract processes. The kinship is visible in governance approaches that treat recording source references and human release as safeguards against uncontrolled reliance on derived decision logic. This is consistent with emerging guidance on how AI systems should handle conflicting sources and the principle that AI analyses need source references and human oversight.

The Thuringian Reallabor remains an experiment and implementation activity, not proof that German law is already generally executable code. It is best understood as a test of verification infrastructure rather than as evidence that legislation can be automated wholesale.

Tooling can enforce that code versions are linked to source passages and that validation sign-offs are recorded. What tooling cannot do is judge whether a particular formalisation of legal logic is correct. That remains your professional responsibility, and the responsibility of the legal expert you appoint to validate it. Governance infrastructure can make that responsibility visible and auditable; it cannot replace it.

Sources: This article draws on reporting and guidance from Bundesregierung Deutschland, University of Amsterdam, IOS Press, Association for Computational Linguistics and Technische Universität München.

Marit Halversen

Written by

Marit Halversen

Covers AI governance and regulatory design, with a focus on how compliance obligations land on architecture rather than on paperwork.