What is RegelRecht?
RegelRecht is an open-source platform for making Dutch legislation machine-readable and executable. Lawmakers draft in it, government agencies run it, and citizens can inspect how decisions about them are made.
Executable Law
Dutch legislation encoded in YAML and executed by a deterministic engine. Every decision traces back to its legal source.
Cross-Law References
Laws reference each other just as in statute books. The engine resolves dependencies automatically across the entire corpus.
Delegation and IoC
Higher laws delegate to lower regulations. The engine discovers implementations at runtime, matching the real legal hierarchy.
Test-Driven Legislation
BDD scenarios derived from the Memorie van Toelichting verify that machine-readable law matches what Parliament intended.
Multi-Organization Execution
Different government organizations handle different laws. The engine models these boundaries and can exchange signed results between organizations.
Open Source
Built by the Dutch Ministry of the Interior (MinBZK). All law, all tooling, all decisions are open and auditable.
The Problem
Dutch law is published as natural language text. When government agencies need to implement legislation in IT systems, they manually translate legal rules into software. Each agency writes its own interpretation of the same law. Nobody can check whether those implementations match what Parliament intended. Citizens cannot see how decisions about them are made. And there is no way to test whether the software actually follows the law.
The Vision
RegelRecht takes a different approach: encode each law once in a structured format, and run it through a single execution engine. The specification is the law. One engine runs it the same way everywhere: in the editor for lawmakers, in the browser for citizens, and in government backends for official decisions.
Architecture
-
Corpus Juris: a git-versioned repository containing all Dutch laws in machine-readable YAML format. Laws are organized by type and versioned by effective date.
-
Execution Engine: a deterministic Rust engine that evaluates laws given inputs. It compiles to both native code and WebAssembly, running identically in every context.
What does a machine-readable law look like?
# Wet op de zorgtoeslag, article 2
- number: '2'
text: |
De verzekerde heeft aanspraak op een zorgtoeslag ter hoogte
van het verschil tussen de standaardpremie en de normpremie...
machine_readable:
execution:
input:
- name: toetsingsinkomen
source:
regulation: algemene_wet_inkomensafhankelijke_regelingen
output: toetsingsinkomen
parameters:
bsn: $bsn
output:
- name: hoogte_zorgtoeslag
type: amount
actions:
- output: hoogte_zorgtoeslag
value:
operation: MAX
values:
- 0
- operation: SUBTRACT
values:
- $standaardpremie
- $normpremie
Each article sits alongside the original legal text. The machine_readable section defines inputs, outputs, and the calculation logic. The engine executes this directly.
Key Concepts
Cross-Law References
Dutch laws reference each other extensively. The Wet op de zorgtoeslag references the Zorgverzekeringswet, the AWIR, and the BRP. The engine resolves these dependencies automatically - if law A depends on a value computed by law B, the engine executes both.
Inversion of Control
Higher laws (e.g., a wet) can declare open terms that lower regulations (e.g., a ministeriële regeling) fill in. This mirrors the legal delegation hierarchy. Lower regulations register themselves via implements - just as they do in statute books with “Gelet op artikel 4 van de Wet op de zorgtoeslag”.
Execution-First Validation
Rather than having humans analyze law and build specifications (analysis-first), RegelRecht uses AI to generate candidate specifications, then has legal experts validate and challenge them. Test scenarios are derived from the Memorie van Toelichting - the explanatory memorandum containing the legislature’s intended examples.
Federated Corpus
Legislation is decentralized: municipalities, provinces, and water boards produce their own regulations. The corpus supports federated sources - each authority maintains their own regulations in their own Git repository, while the engine discovers and loads them via a registry.
Administrative Procedures
Individual decisions (beschikkingen) are not instant computations - they are administrative law processes spanning stages over time (application → review → decision → notification → objection). The AWB lifecycle is modeled as data in YAML, not hardcoded in the engine.
Design Principles
| Principle | What It Means |
|---|---|
| Zero domain knowledge | No hardcoded holidays, tax rates, or special cases. Everything comes from law YAML. |
| Identical execution | Browser, backend, editor — same inputs, same result. |
| Version control as governance | Git history captures legislative evolution. Branches are proposals, merges are publication. |
| Traceability | Every computed value points back to a specific article and paragraph. |
| Open by default | Law, tooling, decisions — all publicly auditable. |
Who is this for?
Developers building government services that implement Dutch law. Use the engine to compute legal outcomes instead of hand-coding rules.
Legal experts validating whether machine-readable interpretations match the law. The execution-first methodology uses concrete test cases from parliamentary documents.
Policy makers exploring how legislation works in practice. Run “what if” scenarios in the browser to see how changing a parameter affects outcomes across multiple laws.
Next Steps
- Getting Started - set up your development environment
- Law Format - understand the YAML law format
- Architecture - system design and components
- RFCs - all design decisions