Skip to content

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.

How It Works Get Started GitHub

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

Execution Engine

Corpus Juris

All Dutch law
Git-versioned YAML

Universal Rust/WASM
runtime

Lawmakers

Citizens

Government
Agencies

  1. 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.

  2. 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

PrincipleWhat It Means
Zero domain knowledgeNo hardcoded holidays, tax rates, or special cases. Everything comes from law YAML.
Identical executionBrowser, backend, editor — same inputs, same result.
Version control as governanceGit history captures legislative evolution. Branches are proposals, merges are publication.
TraceabilityEvery computed value points back to a specific article and paragraph.
Open by defaultLaw, 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

Type to search the documentation.