The article-based YAML format for machine-readable law, conforming to the official JSON schema.
Laws in RegelRecht are stored as YAML files conforming to the law schema. Each file represents one law at a specific point in time.
| Field | Required | Description |
|---|---|---|
$id | Yes | Machine identifier (snake_case) |
regulatory_layer | Yes | WET, AMVB, MINISTERIELE_REGELING, GEMEENTELIJKE_VERORDENING, etc. |
publication_date | Yes | Official publication date (ISO 8601) |
valid_from | No | Effective date |
bwb_id | Conditional | Required for national laws (format: BWBR + 7 digits) |
gemeente_code | Conditional | Required for municipal ordinances (format: GM + 4 digits) |
Each article mirrors a real article in Dutch law:
Constants used in calculations:
Operations are the building blocks of law logic:
| Category | Operations | Syntax |
|---|---|---|
| Arithmetic | ADD, SUBTRACT, MULTIPLY, DIVIDE | values: [...] |
| Aggregate | MIN, MAX | values: [...] |
| Comparison | EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL | subject:, value: |
| Logical | AND, OR, NOT | AND/OR: conditions: [...]; NOT: value: (wraps a single operation) |
| Collection | IN, LIST | IN: subject: + value: or values: [...]; LIST: items: [...] |
| Conditional | IF (alias SWITCH) | cases: [{when:, then:}], default: |
| Date | AGE, DATE_ADD, DATE, DAY_OF_WEEK | AGE: date_of_birth:, reference_date:; DATE_ADD: date: + years:/months:/days:; DATE: year:, month:, day:; DAY_OF_WEEK: date: |
These 21 operations make up the schema. The engine also accepts the compat aliases NOT_EQUALS, IS_NULL, NOT_NULL, and NOT_IN for backward compatibility, but they are outside the schema, so prefer wrapping the positive operation in NOT. See RFC-004: Uniform Operation Syntax for the full specification.
$variableName - reference inputs, outputs, definitions, or parameters$referencedate.year - dot notation for property access#output_name - internal reference (same law)Laws reference outputs from other laws via source:
See RFC-007: Cross-Law Execution for details.
Higher laws declare open_terms that lower regulations implement:
The engine resolves implementations at runtime using lex superior / lex posterior rules.
See RFC-003: Inversion of Control for the full pattern.
Articles can declare what kind of legal product they produce:
This enables the Awb procedure hooks (RFC-008).
Fields can have detailed type information:
The corpus is still small and growing. At the time of writing it spans three regulatory layers:
| Layer | Laws | Examples |
|---|---|---|
| WET | ~15 | Participatiewet, Zorgtoeslag, Zorgverzekeringswet, Awb, BW Boek 5 |
| MINISTERIELE_REGELING | 1 | Regeling standaardpremie (2 versions) |
| GEMEENTELIJKE_VERORDENING | 2 | Amsterdam APV erfgrens, Diemen afstemmingsverordening |
For the authoritative, current set, see corpus/regulation/ in the repository.
An exploration by Bureau Architectuur of the Dutch Ministry of the Interior into the possibilities of transparent, executable legislation.
Bureau Architectuur
Ministry of the Interior and Kingdom Relations