As we stabilize the YAML schema (issue #7), we need to document small design decisions about the format. This RFC groups related choices rather than creating separate RFCs for each.
machine_readable sections are publicly accessible^[a-z0-9_]+$ (e.g., toetsingsinkomen)|- Styletext field uses markdown to preserve original law formatting|- (literal block scalar) for multiline textWhat to preserve:
machine_readable sectionThe POC v0.1.6 schema had several top-level “regulation discovery” fields. This section documents how each is handled in v0.2.0:
| POC v0.1.6 Field | v0.2.0 Status | Notes |
|---|---|---|
law_type | Replaced by regulatory_layer | More comprehensive: WET, AMVB, MINISTERIELE_REGELING, KONINKLIJK_BESLUIT, GRONDWET, EU_VERORDENING, etc. (see RFC-015 for the full ranked layer list) |
legal_character | Moved to execution.produces.legal_character | Now per-article instead of per-service (BESCHIKKING, TOETS, etc.) |
decision_type | Moved to execution.produces.decision_type | Now per-article instead of per-service (TOEKENNING, GOEDKEURING, etc.) |
discoverable | Removed | No longer needed; all outputs are public endpoints (see Decision 1) |
service | Replaced by competent_authority | The “service” concept becomes the authority responsible for execution; see RFC-002 for detailed design |
Why per-article instead of per-service?
The produces construct on an article’s execution block declares what legal artifact the article produces when executed. legal_character (e.g. BESCHIKKING, VASTSTELLING) classifies the type of legal act; decision_type (e.g. TOEKENNING, AFWIJZING) classifies the outcome. These fields serve as filter targets for reactive hooks (see RFC-007) and lifecycle stages (see RFC-008).
Open question: Single vs multiple executions per article?
Currently execution is an object (one per article). Should we allow multiple executions per article?
The execution.produces property could enable different outcomes from the same execution:
legal_character values (BESCHIKKING vs TOETS)This raises the question: should produces be an array to support multiple distinct outcomes from one article’s logic?
Alternative: Move produces to action level instead of execution level. This way, different actions within one execution can produce different legal outcomes without needing multiple executions.
POC v0.1.6 had several top-level metadata fields. This section documents how each is handled in v0.2.0:
| POC v0.1.6 Field | v0.2.0 Status | Notes |
|---|---|---|
name (top-level) | Kept | Now supports plain text or internal # reference |
name (in fields) | Kept | Still used in baseField for field names (parameters, input, output) |
law | Removed | Replaced by bwb_id + officiele_titel for proper identification |
description | Removed | Article text field is self-describing |
valid_from | Kept | Effective date (inwerkingtredingsdatum; when law becomes effective) |
| - | Added publication_date | Publication date (publicatiedatum; when law was published) |
references | Replaced by requires | Now in machineReadableSection with structured format |
legal_basis (top-level) | Kept | Array structure: [{law_id, article, description}] |
Two prefix conventions distinguish input from output references:
$ prefix - References to input (what you read):
$bsn$leeftijd_op_verkiezingsdatum$MINIMUM_LEEFTIJDUsed in execution context (actions, conditions, source parameters).
# prefix - References to output (what is produced):
name and competent_authorityname: '#wet_naam' or competent_authority: '#bevoegd_gezag'Reason: Make properties traceable to the source.
This is a convention, not enforced by the schema.
regelrecht:// URI SchemeCross-law references use the regelrecht:// URI scheme:
law_id, the $id slug of the target lawoutput_name, the name of an output produced by one of the law’s articles#field (optional fragment), extracts a specific field from the output (e.g. #value)The engine resolves these URIs by finding the law by $id, locating the article that produces the named output, executing it, and extracting the requested field. This scheme is used for cross-law input references (RFC-003, RFC-007) and as annotation targets (RFC-005).
Rationale: No clear purpose identified. Can be reintroduced when a concrete use case emerges (e.g., signature hashes, content verification).
Field values can have temporal metadata describing how they relate to time.
baseField definition (available on parameters, input, output)type, period_type, referenceStructure:
Usage examples:
type: period, period_type: year → yearly incometype: period, period_type: month → monthly insurance statustype: point_in_time, reference: $calculation_date → age at calculation momentNot adopted: immutable_after
POC v0.1.6 had immutable_after: "P2Y" to indicate when values become final (e.g., revision period (herzieningstermijn)). This is removed because immutability/finality should be modeled as explicit rules in laws (e.g., Awir).
The v0.1.6 schema had two separate mechanisms for external input:
sourceField with sourceReference (database lookups)inputField with serviceReference (cross-law calls)In v0.2.0, all inputs use inputField.source with a unified format:
Source properties:
output (required): Output name to retrieve from the sourceregulation (optional): Name of external law/regulation. If omitted, it’s either an internal reference or an external data source that must be resolved outside the YAML.parameters (optional): Parameters to pass when calling the source (e.g., bsn: $bsn)description (optional): Human-readable description or legal referencearticles[].number is a free-form stringnumber serves as both display name and identifierRationale: Laws have varying article structures:
By keeping number free-form:
The v0.1.6 requirements property is removed in v0.2.0.
Reason: Obsolete - requirements can be inferred from actions during execution.
Minor changes to operations and types between v0.1.6 and v0.2.0:
Operation enum renames (for clarity):
| v0.1.6 | v0.2.0 |
|---|---|
GREATER_OR_EQUAL | GREATER_THAN_OR_EQUAL |
LESS_OR_EQUAL | LESS_THAN_OR_EQUAL |
Type specification additions:
| Field | Change |
|---|---|
type_spec.unit | Added "days" unit |
variableReference | Now allows lowercase ($name in addition to $NAME) |
Rationale:
$standaardpremie vs $STANDAARDPREMIE)schema/v0.2.0/schema.jsonAn 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