Books / Law as Code in Practice: French Family Benefits / Chapter 4

Part II · Chapter 4

One Family, One Decision: The Garnier Household in April 2026

11 min read

Full-page risograph illustration: a tall stack of blank sheets on a grid, tied with a blue thread in a bow.
Contents of Law as Code in Practice: French Family Benefits

On a first read, follow the family’s questions and answers and come back to the code afterwards. By the end of this chapter you will be able to read one decision from the model: the facts it used, the rule that applied, the article behind it, the duties it creates — and what moves when a fact or a reading changes.

Lawyer: which article fixes each answer, and where the text leaves a choice.
Analyst: which facts the answers depend on, and how a change in May moves the dates.
Developer: how a case holds facts and questions, and what comes back.

1. The question

You met the fictional Garnier family in Chapter 0: Nadia and Thomas, three children aged 15, 10 and 5, renting a five-room house in zone II for €1,320 a month since 14 March 2026, with resources of €24,600 a year — two separate bases, for family allowances and for housing aid, entered with the same value. They applied for housing aid on 20 March.

Make two predictions before you read on:

  1. Their family allowances in April 2026 — closer to €350 or to €425 a month?
  2. Thomas loses his job on 18 May, and the teaching file treats this as a change affecting the right. From which date does the model count that change for their housing aid?

2. How the case is built

A case holds the facts of one situation and the questions asked about it. The rules are not in the case: they come from the canons it depends on — the family-allowance canon, the housing-aid canon, the common vocabulary of family benefits and the payment stage; a fifth canon lends its deadline calendar. The case records who the family is, what is known about it, on which date, and which readings it chooses.

This excerpt shows the date, the selected readings and a few facts; the full case also sets the decision and knowledge times and lists every fact.

case Garnier2026Avril {
    context {
        legal_time @2026-04-15;
        …
        timezone "Europe/Paris";
        deadline_policy fr.pf.cmg::CMG_MOIS_CALENDAIRE;
        interpretation fr.apl::PpPlancherFinal;
        interpretation fr.apl::ArrondiCentimeHalfUp;
        interpretation fr.pf.af::ArrondiLignesDss;
    }

    assert "af-enfants": fr.pf.af::nb_enfants_charge(entity_ref("urn:law:examples:fr:garnier:nadia"), 3) { origin case_input; }
    assert "af-bmaf": fr.pf.af::bmaf_retenu(entity_ref("urn:law:examples:fr:garnier:nadia"), 478.16 EUR) { origin case_input; }
    assert "al-conditions": fr.apl::date_conditions_reunies(entity_ref("urn:law:examples:fr:garnier:menage"), @2026-03-14) { origin case_input; }
    assert "al-demande": fr.apl::date_demande(entity_ref("urn:law:examples:fr:garnier:menage"), @2026-03-20) { origin case_input; }
    …
}

Three things to notice:

  • The date of the question is part of the case. legal_time says which law applies: the editions in force on 15 April 2026.
  • Every fact says where it comes from. Here all of them are case inputs. Published amounts such as the BMAF — the monthly base most family benefits are a percentage of, €478.16 from 1 April 2026 — enter with a note pointing to the line of the yearly instruction they were copied from. In this case the number of age supplements — one, for Inès — is also entered as a fact.
  • Readings are chosen openly. Where the text leaves a choice — how to round — the case names the reading it adopts, so the choice is visible in the case itself.

3. One article, two rules

Take the start date of the housing right. Article R. 823-10 of the construction and housing code says, in its edition in force in April 2026:

Les aides personnelles au logement sont dues à compter du premier jour du mois civil suivant celui au cours duquel les conditions d’ouverture du droit sont réunies. Toutefois, lorsque ces conditions sont réunies antérieurement au mois de la demande, l’aide est due à compter du premier jour du mois au cours duquel la demande est déposée.

In English: housing aid is due from the first day of the calendar month after the month in which the conditions are met — but if the conditions were met before the month of the application, it is due from the first day of the month of the application.

Two sentences, so the model has two rules, each tied to the article and to every edition of it:

rule OuvertureApresConditions(m: Menage, conditions: Date, demande: Date) strict {
    when date_conditions_reunies(m, conditions) and date_demande(m, demande)
        and month_start_of(conditions) >= month_start_of(demande)
        and hors_hebergement_temporaire_823_11(m)
        and hors_insalubrite_peril_823_11(m);
    then droit_commence_le(m, add_calendar_period(month_start_of(conditions), 1 calendar_month));
}

rule OuvertureMoisDemande(m: Menage, conditions: Date, demande: Date) strict {
    when date_conditions_reunies(m, conditions) and date_demande(m, demande)
        and month_start_of(conditions) < month_start_of(demande)
        and hors_hebergement_temporaire_823_11(m)
        and hors_insalubrite_peril_823_11(m);
    then droit_commence_le(m, month_start_of(demande));
}

(Labels and source anchors are left out here.) The two lines about R. 823-11 keep the exceptions of the next article out of this rule: temporary accommodation and housing declared unfit have their own start dates.

The Garniers met the conditions on 14 March and applied on 20 March — the same month. The first rule applies. Asked whether the right starts on 1 April 2026, the model answers that this is established and the opposite is not, and gives its grounds: the rule OuvertureApresConditions with the pinned text of R. 823-10, and four facts of the case — conditions met on 14 March, application on 20 March, and the two exclusions of R. 823-11 ruled out. So the right starts on 1 April 2026 — not in March, when they moved in.

4. The decision

Here is what the model answers for April. Established means the model derives the claim from the facts and the rules; not established means that neither the claim nor its opposite is derived — which is not a refusal. Some amounts below carry more decimals than a bank transfer: that is deliberate, and explained right after the table.

Question Answer Rule — article
Resource band for family allowances band 1 (24,600 ≤ 86,644) Bande1 — D. 521-1 I 1° CSS
Family allowances, by the lines of the yearly instruction €425.57 a month — established; €425.56 under this reading — not established MontantMensuelLignes, ArrondiLignesMetropole — D. 521-1 CSS; MontantDu — L. 521-1 CSS
Family allowances after the CRDS deduction (a 0.5% levy taken before payment) €423.44215 RetenueCRDSAF, NetApresCRDSAF — ordinance 96-50, art. 14 and 19
Personal contribution to housing costs €402.1515 ParticipationPersonnelle — D. 823-17 CCH
Housing allowance (ALF), as calculated €189.95295 a month; €190.59 without the step down to the euro — not established DegressiviteProportionnelleArrondie, MinorationForfaitaireAppliquee, AideMensuelleMetropole — D. 823-16 CCH and the ministerial order
Housing allowance after the CRDS deduction €189.00318525 PrecompteCRDSMetropole — ordinance 96-50
Start of the housing right 1 April 2026 OuvertureApresConditions — R. 823-10 CCH
Duties active in April the household attaches supporting documents; the fund pays the net family allowances and informs the recipient JoindrePiecesJustificatives — R. 823-2 CCH; PayerAfNet — L. 521-1 CSS and ordinance 96-50; InformerAllocataires — L. 583-1 CSS

Three things stand out.

The amounts keep their digits. €189.95295 is not a typo: the model rounds where a rule or a selected reading says so, and nowhere else.

The other amount is answered too. The model establishes €425.57 under the selected reading; asked about €425.56, it answers not established. In the same way it applies the step “rounded down to the euro” written in D. 823-16: the €190.59 that skipping the step would give is not established. A refusal to compute is a different outcome — section 6 shows one.

The decision includes duties. The answer to “what must each side do now?” comes from the same model as the amounts: the household must attach supporting documents; the fund must pay and inform. The full answer also lists the fund’s duty to pay the family allowances due, and its freedom to help collect child maintenance (L. 581-1 CSS). The fund’s duty to pay housing aid is not among them yet, because that right also needs the paying body’s assessment that the housing is decent — the subject of Chapter 9.

5. Why this answer

Follow the family allowances from facts to amount:

  1. Band. The ceiling of band 1 for three children is 66,652 + 3 × 6,664 = €86,644, both figures from the published instruction. €24,600 is below it: band 1, the full rates.
  2. Lines. Under the chosen reading, each line of the instruction’s table is rounded to the cent before adding: three children, 73% of €478.16 = 349.0568 → 349.06; one age supplement, 16% of €478.16 = 76.5056 → 76.51.
  3. Total. 349.06 + 76.51 = €425.57. That settles your first prediction: closer to €425 than to €350.
The same household facts give two amounts. By the lines of the yearly instruction, under the reading ArrondiLignesDss: 73% of €478.16 is 349.0568, rounded to 349.06; 16% is 76.5056, rounded to 76.51; the sum €425.57 is established. Rounding the total in the file without rounding readings: 349.0568 plus 76.5056 is 425.5624, giving €425.56.
Where one cent comes from: the same facts, rounded line by line or as a total.

The rule behind steps 2 and 3, shortened:

rule MontantMensuelLignes(p: fr.pf.core::Personne, n: Integer, kp: Integer, kd: Integer, b: BandeRessources, bmaf: Money) strict {
    effective [@2015-07-01, infinity);
    when af_droit_ouvert(p) and nb_enfants_charge(p, n) and n >= 2
        and nb_majorations_pleines(p, kp) and nb_majorations_demi(p, kd)
        and bande_ressources(p, b) and bmaf_retenu(p, bmaf);
    then montant_mensuel_af(p, ligne_base_af(n, taux_rang2(b), taux_rang3plus(b), bmaf)
        + ligne_dss(taux_majo(b), bmaf) * kp + demi_ligne(taux_majo(b), bmaf) * kd);
}

This rule belongs to a declared reading. The reading is marked as disputed, and it lists exactly which rules it switches on:

pub interpretation ArrondiLignesDss {
    status disputed;
    …
    include ArrondiLignesMetropole;
    include MontantMensuelLignes;
    include MajorationMontantPleinLigne;
    …
}

Every answer carries this chain: the facts with their origin, each rule applied, and the article behind each rule with the pinned editions of its sources. The case also comes with a hand computation of every amount, so a reviewer can redo the arithmetic on paper. That is what a reviewer needs to retrace the decision; Chapter 13 shows what a notice to the family must contain and how the file attaches it.

6. Change one thing

The case package has two more versions of the Garniers’ file: one removes the rounding readings, the other moves to May.

Remove the rounding readings. The file Garnier2026AvrilTexteSeul keeps a single reading — the one the housing canon requires a choice for (Chapter 8 explains why) — and drops the two rounding readings:

  • family allowances: the exact monthly product is €425.5624; the amount due, which the model rounds as a total, is €425.56;
  • housing allowance: the model refuses with INEXACT_DIVISION. Article D. 823-16 says the aid décroît proportionnellement au dépassement de ce plafond — it decreases in proportion to how far the rent exceeds the ceiling — without saying how to round that proportion. The quotient has no finite decimal value, so the model stops and says why, instead of picking a rounding for you.

Move to May. In the file Garnier2026Mai, Thomas has lost his job on 18 May, and the case records this as a change affecting the right. That qualification is an assumption of the teaching file, not a legal finding: the specific provisions on how unemployment changes the resources taken into account, such as R. 822-14 CCH with its own conditions and dates, are not modelled in this case. On that assumption, the model derives the effective date: 1 June 2026. Article R. 823-13 applies the opening rule of R. 823-10 to any change that modifies the right: the first day of the following month. A new duty appears: the household must justify the change with its request for review (R. 823-3 CCH), while the duty to attach supporting documents stays active. That settles your second prediction. The May file does not recompute the amount: it shows the date and the duty.

A timeline from March to June 2026: the lease begins on 14 March and the application follows on 20 March; the housing right starts on 1 April under the timing rule of R. 823-10; the question is dated 15 April; Thomas loses his job on 18 May, which the teaching file treats as a change affecting the right, and the May file adds a duty to justify the change; the change counts from 1 June under R. 823-13.
The Garniers’ dates: the right starts on the first day of the month after the conditions are met, and a change counts from the first day of the following month. That Thomas’s job loss is such a change is an assumption of the teaching file. The right still awaits the decency assessment of Chapter 9.

7. What this gives the fund

One case, one place: the amounts, the articles behind them, the start date, the duties of each side, and the points still open — the decency assessment and the reading behind each rounding. A caseworker can see what is established, what is pending and who must act next. The same answer is the raw material for the notice the family receives (Chapter 13) and for testing a reform on case files before it is signed (Chapter 14).

8. Where Catala stands on this

Catala’s pioneering work brought legal text and executable rules together, and Catala 1.3.0 handles amounts like these with exact arithmetic, exceptions written beside the text, dates and execution traces. What Arxo adds on this case is the decision around the amount, as built-in declarations: the duties of the fund and the household — who owes what to whom, and in what state — and the selected reading behind €425.57. In Catala 1.3.0 these have no dedicated built-in form and need modelling written for each application; its money type has cent precision, and converting a decimal to money rounds to the nearest cent (Catala book, ch. 5.2). Where D. 823-16 gives no rounding rule, this model stops with a reason instead. For a caseworker that is the difference between a number and a file: who must act next, from which date, under which reading. France’s published legal texts are what make a worked example like this possible.

9. Explore the recorded case

The Garnier case in the French Benefits Lab shows these answers as recorded runs, with the facts, the rules and the articles. Every answer in this chapter was recorded with the same command form:

law ask <case package> --case Garnier2026Avril --query-json queries/al-mensuelle.json
law ask <case package> --case Garnier2026Avril --query-json queries/positions.json

The first asks one question — here, the monthly housing allowance. The second asks for every active duty, power and freedom, with who holds it and towards whom. The text-only and May answers use --case Garnier2026AvrilTexteSeul and --case Garnier2026Mai. These answers were recorded again on 11 October 2026 with law 0.1.11.

Exercise

  1. Suppose the Garniers had moved in on 14 March but submitted their application on 5 May. Using the text of R. 823-10 and the two rules in section 3, from which date would the housing right start?
  2. In the file without the rounding readings, which answer shows that the model does not guess a rounding, and what does it return instead?
  3. In May, which duty is new for the household, and which article creates it?

Contents · PDF · EPUB · Free under CC BY 4.0

Law as Code in Practice: French Family Benefits

Contents

You’re reading · Part II

How the Model Is Built

Reading settings

Text size
Appearance

Preferences and your reading place are saved only in this browser.