Downloads Dutch legislation from BWB and CVDR and converts it into the corpus YAML format.
The harvester downloads Dutch legislation and converts it to the RegelRecht YAML format. It handles two sources: national law from the BWB (Basiswettenbestand / wetten.nl) and decentralized regulations from the CVDR (Centrale Voorziening Decentrale Regelgeving). The CLI picks the right source from the identifier, so BWBR… IDs are fetched from BWB and CVDR… IDs from the CVDR.
packages/harvester/machine_readable yet)BWBR + 7 digits) and date1, 1.1, 1.1.a)The harvester uses an extensible registry system for XML element handling:
| Handler Type | Elements | Behavior |
|---|---|---|
| Inline | nadruk, extref, intref, al | Pass through with text |
| Structural | lid, lidnr, lijst, li | Manage numbering, recurse |
| Skip | meta-data, jci, kop, brondata | Excluded from output |
| Passthrough | sup, sub | Extract without special handling |
| Marker | plaatje, illustratie, formule | Text where there is any, otherwise [formule niet in tekst beschikbaar] |
The marker matters more than it looks. The BWB XML states some norms as a
picture: artikel 22a Participatiewet puts the whole kostendelersnorm formula in
an <illustratie>. Those elements used to be skipped, so the sentence that
introduces the formula ended on its colon and the norm vanished with nothing to
show it had. An incomplete article then read as a complete one. The harvester
still cannot render an image, but it no longer drops it in silence, and a
<formule> carrying a readable fallback keeps that text.
Articles are split following the legal text structure:
Produces dot-notation: 1, 1.1, 1.1.a, 1.1.a.1°
For CVDR regulations use download_cvdr_law; detect_source returns the right source for either kind of identifier.
Example: regulation/nl/wet/wet_op_de_zorgtoeslag/2025-01-01.yaml
The regulatory layer is determined from the WTI metadata (soort-regeling field).
--max-size)--max-size flag (e.g., Wet op het financieel toezicht at 52.6 MB)Integration tests use fixtures from tests/fixtures/zorgtoeslag/ (real WTI and content XML) to validate the complete pipeline from XML to valid YAML.
An exploration by Bureau Architectuur of the Dutch Ministry of Economic Affairs and Climate Policy into the possibilities of transparent, executable legislation.
GitHub repository
How it works
Stay informed
Roadmap (Dutch)
Documentation
Research
Bureau Architectuur
Ministry of Economic Affairs and Climate Policy