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

Part II · Chapter 2

The Birth Grant: First Rule, First Answer

3 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

By the end you can read the premises of one rule and distinguish an unestablished right from a refusal.

Lawyer: what “do not exceed” includes.
Analyst: what fact is missing.
Developer: how the same query works on neighbouring files.

A different family card

We switch from the Garniers to the fictional Moreau household, expecting a child in July 2025. To make the first arithmetic easy to inspect, this case uses the canon’s teaching inputs: a €30,000 base ceiling and a €400 BMAF. These are artificial inputs, not the published annual barème for this household.

The question: “Our resources equal the ceiling. Does equality qualify?” Predict the answer; then consider what happens if the resource record is absent.

The text and vocabulary

Article L. 531-2 CSS, pinned edition from December 2020, says:

dont les ressources ne dépassent pas un plafond, pour chaque enfant à naître

English gloss: whose resources do not exceed a ceiling, for each expected child. Prime à la naissance → birth grant → droit_prime_naissance; plafond → ceiling → plafond_prime; ressources annuelles → annual resources → ressources_annuelles.

Article D. 531-2 I, pinned April 2021 edition, sets the rate at 229,75 % de la base mensuelle de calcul des allocations familiales. English gloss: 229.75% of the monthly family-benefit base. The 2026 DSS table also prints that rate; this chapter does not use its published grant amount.

The common family-benefit vocabulary defines people and households; the income model supplies resources under the applicable reference-year rules, often N−2. In this small case, the annual resource figure is an input. It is not interchangeable with the twelve-month housing-resource method from Chapter 1.

The rule

rule DroitPrimeNaissance(m: Menage, e: Enfant, ressources: Money, plafond: Money) strict {
    effective [@2021-01-01, infinity);
    when attente_naissance(m, e)
        and ressources_annuelles(m, ressources)
        and plafond_prime(m, plafond)
        and ressources <= plafond;
    then droit_prime_naissance(m, e);
}

Labels and source anchors are left out. Read when as a checklist: pregnancy, annual resources, ceiling, comparison. The amount rule then uses the established right and the BMAF:

rule MontantPrimeNaissance(m: Menage, e: Enfant, bmaf: Money) strict {
    effective [@2021-01-01, infinity);
    when droit_prime_naissance(m, e)
        and bmaf_applicable(m, bmaf);
    then montant_prime_naissance(m, e, montant_prime_calcule(bmaf, TauxPrimeNaissance));
}

Labels and source anchors are left out. The parameter TauxPrimeNaissance is 2.2975; Chapter 3 shows how that rate carries a source and a validity window.

Three answers

Moreau file Annual resources Right / €919 award claim
PlafondEgal €35,841 Established / established
PlafondDepasse €35,841.01 Not established / not established
RessourcesAbsentes No resource record Not established / not established; the separate why_not graph identifies ressources_annuelles

Recorded on 11 October 2026 with law 0.1.12. Under the model, 119.47% of the teaching base gives the €35,841 ceiling; 229.75% of €400 gives €919. The award file also supplies the examination date. No authority’s judgment is invented here.

“Not established” means the query has neither support nor support for its opposite. In the second file the comparison fails; in the third, the comparison cannot be made from the supplied facts. The accompanying why_not question identifies the unsupplied annual-resource premise in its explanation graph; the truth answer itself has an empty missingInputs list. Neither answer is a complete administrative rejection notice.

Change one thing

The second file adds one cent to resources and keeps the other facts. The third removes the resource assertion. Compare the grounds, not the status label alone: the fund needs a different next action in each situation.

What this gives the fund

A rule becomes a readable checklist. Equality is handled consistently, the amount has explicit grounds, and an incomplete file can name the information it needs before someone treats it as an adverse decision.

Where Catala stands on this

Catala 1.3.0 supports exact decimals, money and optional values, so missing information can be represented explicitly (Catala book, ch. 5.2). Arxo provides a built-in truth status and a separate why_not query. Here, truth returns NEITHER; the why_not graph identifies ressources_annuelles as an unresolved premise. The Catala 1.3.0 book does not describe this query interface; applications can define their own result types and explanations. For the fund, the two questions distinguish whether the right is established from why it has not been established, and identify the next evidence to request.

How the answers were recorded

From a local checkout with law and Python 3.12+ installed, start at the repository root:

cd corpus/laws/fr/pf-paje/examples/prime-naissance-moreau
law ask . --case RessourcesAbsentes --query-json queries/droit.json --out "$(mktemp -d)"
law ask . --case RessourcesAbsentes --query-json queries/pourquoi-droit.json --out "$(mktemp -d)"
python3 check.py --law "$(command -v law)" --out "$(mktemp -d)"

The case package includes all three files, saved questions, declared tests and a hand computation. These commands assume a checkout of the Arxo repository and a suitable Python interpreter (Appendix D).

Exercise

  1. Does the displayed comparison include equality?
  2. Does the absent-resource file establish that resources exceed the ceiling?
  3. What evidence should the caseworker request next?

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.