System Overview

A high-level tour of the two pillars, the Corpus Juris and the Execution Engine, and how the pieces fit.

RegelRecht is built on two pillars: the Corpus Juris (a git-versioned body of all Dutch law) and the Execution Engine (a runtime that evaluates laws deterministically).

System Context

<<person>>LawmakerDrafts and publishes legislation<<person>>CitizenChecks eligibility for services<<person>>Government AgencyMakes decisions based on law<<system>>RegelRechtMachine-readable law platform<<external_system>>BWB / wetten.nlOfficial Dutch law publicationEdits laws, reviews interpretationsChecks eligibilityExecutes laws for decisionsSource of law textRegelRecht - System Context

Container Diagram

<<person>>User<<container>>Editor[Vue 3 / Vite]Law editing and browsing<<container>>Editor API[Rust / Axum]Serves the editor and corpus REST API<<container>>Engine[Rust / WASM]Deterministic law execution<<container>>Pipeline[Rust / PostgreSQL]Job queue and law status tracking<<container>>Harvester[Rust]Downloads laws from BWB / CVDR<<container>>Enrich Worker[Rust / LLM]Adds machine_readable sections<<container>>Admin[Rust + Vue]Operations dashboard<<container_db>>Corpus Juris[Git / YAML]All laws in machine-readable format<<container_db>>PostgreSQL[Database]Job queue and law statusRegelRecht[SYSTEM]Browses and edits lawsREST API callsExecutes laws (WASM)Reads and writes law filesWrites harvested lawsWrites enriched lawsManages jobsTriggers harvestingTriggers enrichmentMonitors pipelineRegelRecht - Containers

The editor, TUI, lawmaking visualization, Grafana, and the engine’s WASM/CLI builds are additional surfaces over the same engine and corpus; they are omitted here to keep the container view readable. See the component docs for each.

Data Flow

  1. Harvesting: The harvester downloads laws from BWB (wetten.nl) and converts XML to YAML
  2. Enrichment: Laws are enriched with machine-readable interpretations (currently manual + AI-assisted)
  3. Storage: All laws live in the Corpus Juris (git repository) as versioned YAML files
  4. Execution: The engine loads laws from the corpus and evaluates them given inputs
  5. Cross-references: When a law references another, the engine resolves the dependency chain automatically

Design Principles

The YAML format stays close to the original legal text structure. Same inputs always produce the same outputs. Every computed value traces back to a specific article and paragraph. Text interpretation is separate from execution. And all laws, tooling, and decisions are publicly auditable.

Further Reading

RegelRecht

An exploration by Bureau Architectuur of the Dutch Ministry of the Interior into the possibilities of transparent, executable legislation.

Links

GitHub repository
How it works
Stay informed
Documentation

Contact

regelrecht@minbzk.nl

Part of

Bureau Architectuur
Ministry of the Interior and Kingdom Relations