RFC-048: A Cell Answers Through a Reduction, and the Process Combines the Answers

ProposedPartially implemented
Depends onRequired by

Note (November 2026): the proof of concept no longer has the reduction of the Awb that this RFC describes. Which decisions still hold after objection and appeal now follows from effects the Awb itself declares (produces[].effects and requires[].effects, schema v0.8.14 and v0.8.15). The reductions of the proof of concept play their chronicle forward with a projection. See Playing the chronicle forward. The text below is unchanged.

Note (November 2026): since schema v0.8.18 a step of such a projection, and its per, can name the fact of its records instead of a kind: <regulation>#<article>#<fact>. An article that requires more than one fact can then be played forward, one step per fact. See the same section of the chronolexography page.

Note (November 2026): since schema v0.8.20 a property of the state of such a projection may be an array with declared columns, filled from an array of rows a fact holds. A read model iterates over it with a nested FOREACH. A property of that state may also be empty (nullable: true). See One aggregate per decision.

Note (November 2026): RFC-056 adds a condition to §2 and §4. The cell that runs the execution uses the answer of another cell only with a legal basis: the binding is in its own policy, or in that of the authority it decides for, or the term names the holder of the policy as competent and the holder’s cell gives the answer. Otherwise the engine refuses the input before it asks the cell. A form prefills only from a law or the cell’s own policy.

Context

Some questions in a law can only be answered from what an organization recorded earlier. The law itself does not hold the answer:

  • The head grants leave “slechts eenmaal … per schooljaar” (Leerplichtwet 1969 art. 13a lid 2). Earlier grants are in the school’s own decisions.
  • Leave must fall “buiten de schoolvakanties” (art. 11 onder f). The holidays depend on where the school is established, a fact the school recorded.
  • An examination may be skipped if “aan de aanvrager eerder een gehandicaptenparkeerkaart is verstrekt” (Regeling gehandicaptenparkeerkaart art. 2 lid 2). Another municipality or the CBR may have issued it.

The law leaves such terms to the authority, but it does not say how the authority reads its own records back. The position paper does. It says that a reduction always takes place in the cell where the recordings were made (“Reductie vindt altijd plaats ín de cel waar de betreffende chronolexogrammen zijn vastgelegd”). It also says that the consumer combines the answers, not the source (“Synthese gebeurt bij de afnemer, niet bij de bron”).

In this RFC those words mean the following:

  • A cell is an organization that keeps its own chronicle and answers questions from it.
  • A reduction is a rulework that reads a chronicle and gives named answers, for example “leave was already granted this school year”.
  • The source is the cell that gives the answer.
  • The consumer is the law together with the policy of the authority that decides. The law asks the question, and the policy says where the answer comes from.
  • Synthesis is making one outcome from the answers of different cells, each to its own question.

Decision

Chronolexography shows this at work.

1. A reduction is a named answer of its cell

Each cell decides for itself how it reduces. The engine only asks the cell for an answer by its name (§2).

The cell in packages/cel uses reductions written in the law format, as rulework with regulatory_layer: REDUCTIE. A reduction sits with its cell, at corpus/cells/<cell>/reductions/<id>/<valid_from>.yaml. The engine type-checks and traces it like any article, and the loader also applies the checks in §3.

  • Where the reduction sits says whose it is, so it names no competent_authority (schema v0.8.12).
  • Each output of the reduction is one answer of that cell.
  • A reduction of no cell sits beside the cells, at corpus/cells/reductions/<id>/. Other reductions call it, and it gives no answer itself (below).
  • A reduction fills no open term, so it has no implements. The one who asks decides which question an answer serves. One answer can therefore serve terms in several laws (§2).
# corpus/cells/obs_de_klimop/reductions/reductie_verlof_al_verleend_in_schooljaar, shortened execution: parameters: [bsn_jongere, eerste_verlofdag] input: - name: geldende_besluiten source: regulation: reductie_algemene_wet_bestuursrecht output: geldende_besluiten parameters: {basis: leerplichtwet_1969#13a} - name: begin_schooljaar source: regulation: fictief_beleid_vakantieverlof_obs_de_klimop output: begin_schooljaar_van_verlof parameters: {eerste_verlofdag: $eerste_verlofdag} output: - name: verlof_al_verleend_in_schooljaar

A reduction reads the chronicle with these keys:

  • source.decisions gives one row per decision under an article. The article is written as <regulation>#<article>, or as a $-reference to a parameter that holds one (schema v0.8.11). With the parameter, a reduction about decisions under another law is told which article to search. A law about procedure, such as the Awb or the Awir, needs that. An input reads under one article, so decisions under several articles take several inputs. A row holds the fields, findings and outputs of the decision under their own names, its basis and its id. A decision value in a row, such as the decision a judgment set in place, is a row in turn. It carries the id of the record that holds it, and every output its article declares, with null where the value has none.
  • source.facts (<regulation>#<article>#<fact>) gives one row per recorded fact (RFC-051). The last # separates the name of the fact from the article.
  • combine: ONLY on a FOREACH returns the one result that the filter leaves. It returns null when no result is left, and an error when two or more are.

A reduction may also need a norm, such as the start of the school year. It then calls policy or law with source.regulation, and passes what it found in the chronicle as parameters. That way the norm is written once, in policy. In the example above, the head’s policy says in which school year the leave falls, and the reduction applies that to each row.

A reduction may call another reduction in the same way, and only a reduction may do so. A reduction of no cell has no chronicle of its own, so no cell gives it as an answer. It reads the chronicle of the cell that runs the calling reduction. A norm that every administrative body applies to its own decisions is then written once, and the calling reduction does not repeat it. The reduction of the Awb is one. Given an article, it gives the decisions under that article that still hold after objection and appeal (Awb 7:11, 8:72), including those the court set in place (8:72 lid 3 onder b). A reduction never calls a reduction of another cell, because the called reduction would read the caller’s chronicle instead of its own cell’s. The cell does not check this, so whoever loads the corpus refuses such a call.

The file cel.yaml is the cell’s catalogue. For each answer it names the reduction that gives it. It holds no logic.

# corpus/cells/obs_de_klimop/cel.yaml name: Het hoofd van OBS De Klimop category: het hoofd answers: verlof_al_verleend_in_schooljaar: reductie_verlof_al_verleend_in_schooljaar

2. The decider’s policy binds a term to an answer

The law never names a cell. The consumer chooses which term an answer fills, in the UITVOERINGSBELEID (implementing policy) of the authority that decides. One article of that policy fills the term with implements, and takes the answer as an input:

# fictief_beleid_vakantieverlof_obs_de_klimop art. 2, shortened open_terms: - id: verlof_al_verleend_in_schooljaar_volgens_hoofd type: boolean decided_per_case_by: het hoofd implements: - {law: leerplichtwet_1969, article: 13a, open_term: verlof_al_verleend_in_schooljaar} execution: input: - name: antwoord_verlof_al_verleend nullable: true source: reduction: verlof_al_verleend_in_schooljaar parameters: {bsn_jongere: $bsn_jongere, eerste_verlofdag: $eerste_verlofdag} actions: - output: verlof_al_verleend_in_schooljaar value: operation: IF cases: - when: {operation: EQUALS, subject: $antwoord_verlof_al_verleend, value: null} then: $verlof_al_verleend_in_schooljaar_volgens_hoofd default: $antwoord_verlof_al_verleend

We call such an article the binding: it binds the term of the law to a named answer. A caller may give an execution an answerer (OpenTermAnswerer, in a Call). Wherever the binding runs, at any depth of nested calls, the engine asks the answerer for the answer by name, with the parameters that the binding passes. During a decision the cell is the answerer. It runs the reduction that its catalogue names, and returns the value together with where it came from.

  • The binding is an article of policy like any other. Its value becomes the value of the term, even when that value is null. A finding is what the authority itself decides in a single case. It cannot replace the binding’s value, not even on a term that the law leaves to the authority per case. Law and policy say what holds, and the engine adds no priority rule of its own. If a caller gives a finding on a term that a policy fills, the engine refuses the execution, even when the case never reads the term. Only a default remains: where a regulation is silent, the default of the delegating law applies (RFC-036).
  • Without an answer the input is null (hence nullable: true). The policy itself says what holds then. If the authority should judge such a case, the policy declares an open term of its own with decided_per_case_by and uses it when the answer is null, as above. The engine asks for that finding only when a case needs it. Without the finding, a required term makes the execution fail, so a missing answer never grants anything.
  • decided_per_case_by only marks that a term is judged per case. Who gives the finding follows from competence, as it does for a decision (RFC-002). It is the authority that the term names in its own competent_authority. If the term names none, it is the authority that carries out the article: the article’s competent_authority, or else the holder of the rulework. The finding becomes part of the decision, so a cell refuses a finding on a term of its decision when another authority answers that term. There is one exception. A court can decide that its judgment takes the place of the annulled decision (Awb 8:72 lid 3 onder b). The court then gives the findings for the decision it takes again, and its cell does not check them against the terms of that decision. With the terms a decision needs, the engine also says who answers each one (decision_terms).
  • A policy that fills a required term without a default must give a value in every case. So the type checker refuses an output for that term that may be null (N5), also when the term is judged per case.
  • The binding passes only the parameters it names. The cell refuses one the reduction does not declare, and a declared one the binding leaves out unless it is required: false.
  • Should the term occur in another article, or in another law the same authority carries out, the policy gets a second article with the same source. The reduction stays as it is.
  • The engine never runs a reduction itself. A REDUCTIE stays out of the index the engine uses to find policy that fills a term.

3. Only a reduction reads a chronicle

Law and policy never read a chronicle directly. The loader (load_check::reject_misplaced_reduction) refuses a rulework that breaks one of these rules:

  • source.decisions and source.facts appear only in a REDUCTIE, and have no other key beside them in their source.
  • A REDUCTIE has no implements, hooks, overrides, execution.produces or open_terms.
  • source.reduction appears only in an article with implements, in a UITVOERINGSBELEID that names one holder by name, from schema v0.8.9. The only other key allowed beside it in source is parameters.
  • source.decisions: $<name> appears only where <name> is a parameter that the article declares.

At run time the engine refuses a call to a REDUCTIE from rulework that is not a REDUCTIE. A reduction reads the chronicle of the cell that runs it, and only a cell runs one. The parameter of source.decisions: $<name> must then hold one article reference.

Schema v0.8.5 to v0.8.8 allowed implements on a REDUCTIE. The loader still accepts it in a reduction whose $schema is one of those versions, but gives it no meaning. A reduction without $schema must follow the current version.

A REDUCTIE with a competent_authority does not load (schema v0.8.12). A cell reads the reductions it keeps from reductions/ in its directory: one directory per $id, with a file per version. It does not open when its catalogue names a reduction it does not keep. The cell refuses to answer from a reduction in two cases:

  • the service does not hold the reduction;
  • the rulework is not a REDUCTIE.

The cell gives the engine the rows for every reduction in the execution, through the call (Call::chronicle). The service does not know where a reduction sits, so the loader of the corpus checks that no reduction calls one of another cell. corpus/cells/reductions/ is not a cell, and a cell of that name does not open. Before the first valid_from of a reduction the cell gives no answer. A decision taken before that date therefore replays with the authority’s finding, as it was taken. Cell::answers lists the catalogue. Declaring a catalogue is a RegelRecht addition (RFC-022 §4.1). In the paper a cell reduces when asked and declares nothing in advance.

4. One question goes to one competent cell

A decision may take other cells along, such as the GGD for the parking card. Which cell the engine asks for the answer of a binding depends on the term that the binding fills:

  • When the term names a competent_authority, the engine asks the answerer in the call that the authority matches. An INSTANCE matches by name and a CATEGORY by category.
  • Otherwise the engine asks only the cell of the policy’s holder.

This holds wherever the binding runs. RFC-052 used competence to choose cells only for a term reached through source.regulation. Now that the policy names the answer, that limit no longer serves a purpose. Whether to keep the narrower rule is an open question.

One question goes to one cell. If the call holds more than one cell that the term names, the input is an error and the engine asks none of them. A cell whose catalogue lacks the answer gives no answer. Neither does a cell that answers null. The input is then null, as in §2.

Synthesis happens in the article. A policy article or a law article takes the answers of different cells, each to its own question, and makes one outcome of them. The decision on the parking card takes the GGD’s answers on the examination and the advice, and the municipality’s own answer on an earlier card.

Note (2026-10-27): the first version of this section asked every cell that the term named and merged their answers with combine, the term’s (RFC-051 §3) or else the binding’s (source.combine). #1828 removed that mechanism, and schema v0.8.13 drops both fields. How one question would reach several cells of a category in practice, and which cell answers it, is an open question.

Note (2026-11-17): the engine took the competent authority of the first term the binding filled that named one, and used it for every input of that binding. A binding that filled two terms of different authorities then sent both questions to one cell, and the other input stayed null. #2008 routes each input by the terms it feeds, as this section intends; Competent Authority describes the rule, including an input that feeds terms of different authorities.

5. Who answered is in the result, why is with the cell

The result of an execution says who answered. ArticleResult.open_terms reports filled_by: {answer: {law_id, article, answers}}. That holds the policy and article of the binding, and for each answer:

  • the cell that gave it;
  • the name of the answer;
  • the reduction, with its version;
  • how far the reduction read the chronicle.

The trace has a node for each answer under the input of the binding, also for an answer that is null. A cell that lacks the answer is named in the message of the input.

The result does not say why a cell answered as it did. The cell shows that itself (Cell::explain_answer), including the steps of the policy that the reduction calls. That explanation is not stored.

6. Replay and reconsideration

A cell explains a decision by taking it again on its own day (RFC-046). In that replay the cell answers from its chronicle as it stood just before the decision. The other cells the decision takes along answer from what they had recorded up to the day of the decision. Only that day is stored, because each of those cells can answer again from its own chronicle. What happens to a replay when a cell records something late is an open question.

When Awb 7:11 calls a decision again on objection, the binding runs within that call. The cell then answers as if the contested decision did not exist. Revoked and annulled decisions stay in the rows the reduction reads. The reduction of the Awb leaves them out.

Why

Benefits

  • Law and policy say nothing about the chronicle. A jurist can read both without knowing what a cell is. The policy names the answer in words.
  • An answer is not tied to one question. The consumer binds it wherever it needs it.
  • A norm such as the school year is written once, in policy, and the reduction applies it.
  • Anything can answer, however it reduces. A cell can, and so can a test scenario that gives the authority’s finding.
  • The engine type-checks and traces a reduction like any article.
  • The engine knows nothing about cells. It asks for an answer by name, and compares names.

Tradeoffs

  • A policy that wants the authority to judge a case needs an open term of its own, next to the term of the law. The authority then gives its finding under the name of the policy’s term, not under the name of the law’s term.
  • The trace of a decision shows who answered, but not why. To learn why, ask the cell.
  • The catalogue is the only record of which answers belong to a cell. Suppose a cell is opened from the wrong directory, and its catalogue lacks the answer. The cell then replays the decision with the authority’s finding instead, and the outcome stays the same, so the mistake does not show.

Open questions are listed in Open Questions in Chronolexography.

Alternatives Considered

  • The reduction returns a list, and the policy does the computing. The policy would then hold logic that exists only because of the chronicle.
  • A language for reductions or bindings in the cell configuration (PR #1689, RFC-022 §4.1). That is a second language, with no type checker and no trace.
  • The article receives the answer as a parameter (the first version). The answer got lost in nested calls, and the trace did not show it.
  • The engine runs the reduction as policy that fills the term (16–17 October 2026). The FOREACH of the reduction then ended up in the trace of the decision.
  • The reduction fills the term itself with implements (schema v0.8.5 to v0.8.8). This works, but ties the answer to one question of one law.
  • The policy reads the chronicle itself. That erases the line between consumer and source.
  • The cell leaves revoked decisions out of the rows. The reduction would then not see the whole picture.
  • A list of answers as a value, with a FOREACH in the law. The law would then have to know about cells.
  • One answerer in packages/cel that combines the cells. The rule for combining and the check on competence would then sit in Rust, and the engine would see only one source.

Implementation

SchemaAdds
v0.8.2REDUCTIE, source.decisions
v0.8.5implements on a REDUCTIE
v0.8.6combine: ONLY (and source.executograms, replaced in v0.8.7)
v0.8.7source.facts
v0.8.9no implements on a REDUCTIE; source.reduction and source.combine in a binding; a root competent_authority for the holder
v0.8.11source.decisions names its article by a parameter ($<name>); the rows carry the article, and a decision value in a row is a row
v0.8.12the article of a decision value and of a row is basis; a REDUCTIE names no competent_authority, since it sits with its cell
v0.8.13no combine on an open term or in a source: one question goes to one cell

The engine has answer.rs (OpenTermAnswerer::answer, AnswerRequest, Answer, AnswerProvenance, Call, Authority, Chronicle, ChronicleRead), resolve_chronicle_read, resolve_open_term, resolve_answer, combine_only, FilledBy::Answer, load_check::chronicle_read, load_check::reject_misplaced_reduction, LawExecutionService::decision_terms (the open terms a decision may need, including those of the policies that fill its terms, and who answers each one). Its tests are in packages/engine/tests/reduction.rs and synthesis.rs. The cell has cel.yaml with answers, reductions/, Cell::answers, Cell::reductions, reading (bindings, Reader, Reader::chronicle_rows, rows), Cell::explain_answer. The corpus has eight reductions with their cells under corpus/cells/<cell>/reductions/, and that of the Awb under corpus/cells/reductions/. They are bound in fictief_beleid_vakantieverlof_obs_de_klimop and in the policies of Wilgendaal on the parking card and the business parking permit. Not built yet: calling an article once per FOREACH element. A reduction therefore asks the policy once for the case, and compares each row with that one result.

References

RegelRecht

An exploration into transparent, executable legislation, and one of the three projects in the starting selection of the Nederlandse Digitale Dienst.

Links

GitHub repository
How it works
Demo walkthrough
Stay informed
Roadmap (Dutch)
Documentation
Research
Basiswerk recht (Dutch)

Contact

regelrecht@minbzk.nl

Part of

Nederlandse Digitale Dienst
Ministry of Economic Affairs and Climate Policy