Books / Law as Code in Practice: French Family Benefits / Chapter 0
Part I · Chapter 0
What CNAF Pays, and Why It Is a Law-as-Code Problem

Contents of Law as Code in Practice: French Family Benefits
By the end of this chapter you will know what one family receives, which articles decide it, what each side must do next — and why one cent deserves a chapter of its own.
Lawyer: which articles decide a family’s answer.
Analyst: which facts the answer depends on.
Developer: what an answer from the model contains.
1. The fund
The Cnaf (Caisse nationale des allocations familiales) and its network of local funds, the CAFs, pay about €110 billion a year to more than 13.6 million households (Cnaf–Inria press release, 8 June 2026). Behind that figure sit many separate benefits, each with its own conditions, amounts, dates and procedure:
- family allowances (allocations familiales, AF), the family supplement (CF), the back-to-school allowance (ARS) and the family support allowance (ASF);
- early childhood: the birth grant and the basic allowance of the PAJE, and help with childcare costs (CMG);
- care: the allowance for a disabled child (AEEH), the daily parental presence allowance (AJPP) and the caregiver allowance (AJPA);
- housing aid: APL, ALF and ALS;
- minimum income and work: the RSA, the prime d’activité, and the allowance for disabled adults (AAH);
- and more: support after the death of a child, the collection of child maintenance, and specific rules for the overseas departments and Mayotte.
Each of these has its own package in the model this book follows. You do not need the acronyms today: the Garniers’ case uses two, AF (family allowances) and ALF (allocation de logement familiale, family housing allowance).
2. One family, one question
Meet the Garniers — a fictional family. Nadia and Thomas have three children: Inès (15), Hugo (10) and Léa (5). Since 14 March 2026 they have rented a five-room house from a private landlord in zone II — one of the three rent zones used for housing aid — for €1,320 a month, and they applied for housing aid on 20 March. The household’s resources are €24,600 a year. The file enters this figure twice, as two separate calculation bases — one for family allowances and one for housing aid — that happen to have the same value; how each base is built is not shown here.
Their question in April 2026: what do we receive, on which basis, and what must each side do next?
Before you read on, make a prediction: does their housing aid start in March, when they moved in, or in April?
| Question | Model’s answer (recorded 11 October 2026) | Rule and article |
|---|---|---|
| Family allowances, by the lines of the yearly instruction | €425.57 a month (349.06 for three children + 76.51 age supplement) | D. 521-1 of the social security code (CSS); age supplement R. 521-1 CSS, editions before and from 1 March 2026 (decree 2026-138) |
| Housing allowance (ALF), as calculated | €189.95 a month before the CRDS deduction | D. 823-16 of the construction and housing code (CCH) |
| Start date under the timing rule | 1 April 2026 | R. 823-10 CCH |
| Duties active in April | the household attaches supporting documents; the fund pays the net family allowances and informs the recipient | R. 823-2 CCH; L. 521-1 CSS; L. 583-1 CSS |
The housing calculation gives €189.95295 before the CRDS deduction, shown here as €189.95. The right itself still needs the paying body’s assessment that the housing is decent — Chapter 9 is about that.
In May, Thomas loses his job on 18 May. The teaching file records this as a change affecting the right; that is an assumption of the file, not a legal finding, and the specific rules on unemployment, such as R. 822-14 CCH, are not modelled in this case. On that assumption, the model answers that the change takes effect on 1 June 2026 (R. 823-13 CCH) and that the household must justify the change with its request for review (R. 823-3 CCH).
Look closely at the first line. Article D. 521-1 sets the allowance as percentages of a monthly base, the BMAF (€478.16): 73% for three children, and 16% as an age supplement for Inès. She turned fourteen before 1 March 2026, so she keeps the former age threshold; children who turn fourteen on or after 1 March 2026 qualify at eighteen (article 2 of decree 2026-138), and the model holds both editions of R. 521-1. Chapter 1 is about exactly such changes of edition. Computed exactly, the monthly amount is €425.5624. The model returns €425.56 when it rounds the total to the cent, and €425.57 when it sums the lines of the yearly instruction of the social security directorate, which prints each line already rounded — 349.06 and 76.51. It keeps both answers apart and marks 425.57 as the result of a named reading. A one-cent difference, and a question every benefits programme meets: who chose the rounding, and on what basis? Chapter 7 is about exactly that.
3. What an answer contains
Every answer from the model carries four things:
- the data used — the family’s facts, each with its origin;
- the parameters applied — amounts and rates, each anchored in the pinned text of the instruction or decree;
- the operations — a proof graph, rule by rule, from the facts to the result;
- the article behind each rule and the pinned editions of its sources.
These records support the explanation French law requires when an individual administrative decision relies on algorithmic processing (article R. 311-3-1-2 of the code on relations between the public and the administration): the data and their sources, the parameters applied to the person’s situation, and the operations carried out. The administration must also explain how, and to what extent, the algorithm contributed to its decision. Chapter 13 shows what a notice must contain and how the file attaches it. The model shows the content of an answer; it does not by itself certify that a decision is lawful.
4. Why this is a law-as-code problem
A family’s answer does not live in one article. In the Garniers’ case it draws on the social security code, the construction and housing code, an ordinance on the CRDS deduction, decrees, ministerial orders and a yearly instruction that revalues the amounts. On top of that:
- the text changes with time — the right answer depends on the edition in force on the date;
- the text is sometimes silent — it divides an amount without saying how to round;
- some conditions need a person — whether housing is decent is decided by the paying body, not by a formula;
- an amount comes with duties — the fund must pay and inform; the household must justify changes;
- decisions can be contested — a recipient can ask for a debt to be waived or challenge a decision.
The amount is one part of the family’s question. The rest — dates, silences, human assessments, duties, procedure — is what this book is about.
5. Standing on French shoulders
France is one of the best places to learn this. Its consolidated legislation is open data. OpenFisca has modelled French taxes and benefits since 2011. In 2021, the Catala team showed that a statute can be written as code beside its own text — and that doing so finds real discrepancies. The 2016 Digital Republic Act requires an administration to tell people when an individual decision about them relies on an algorithm, and to explain its rules on request. The acknowledgements give each of these its due.
6. What this book adds
New to law as code? Skim this table now and come back to it after Chapter 4.
Arxo makes these legal distinctions part of the executable model. The table says where each one appears in the book, and how Catala 1.3.0 — one of the founding tools of law as code — handles the same need. Catala’s strengths come first: exact decimals, money and dates, exception trees that make the general case and its exceptions explicit, literate files that keep the law beside the code, tests and execution traces.
| In Arxo | Chapter | In Catala 1.3.0 |
|---|---|---|
| A missing fact is not established, and the answer names the missing premise | 4, 9 | Optional values (absent or present) are built in (Catala book, ch. 5.2); the caller decides what to pass for an unknown fact |
| Two records that disagree give a contradiction status, kept for review (Appendix A); where grounds compete, a declared priority settles them | 12 | Two applicable definitions that are not exceptions to each other stop evaluation with a conflict error (Catala book, ch. 2.2); keeping contradictory evidence as a case status needs a data model written for it |
| A question reserved for an authority’s judgment becomes a request addressed to it — decent housing is for the paying body | 9 | Such a value is an input supplied by the caller; there is no built-in form for a pending decision or its addressee |
| Competing readings of one text are declared and chosen by name; when a choice is required, the answer says so | 7, 8 | Exceptions are expressed directly; competing interpretations can be modelled through inputs or separate scopes, but named readings are not a language construct |
| Amounts stay exact; where a division has no finite decimal result, the model requires a named reading that says how to round | 7 | Decimals are exact; converting a decimal to money rounds to the nearest cent (Catala book, ch. 5.2) |
| Duties, prohibitions and powers are part of the model, with states: satisfied, violated, undetermined | 10–12 | The language computes values; it has no built-in form for duties |
| Sources are pinned by the fingerprint of their bytes with the case materials; an answer carries fingerprints of the programme, the case and the result and can be replayed from them | 1, 13, 17 | The law text sits beside the code and execution traces are available; the Catala book describes no binding of an answer to the hash of a pinned publication |
Arxo builds missing facts, conflicting evidence, requests for human judgment, named readings and duties into the executable model, so a caseworker can see what is established, what needs review, which reading and text applied, and who must act next.
7. A few French terms
| French | English | Meaning in this book |
|---|---|---|
| allocataire | benefit recipient | the person the fund pays |
| foyer, ménage | household | the people whose situation and resources count together |
| ressources | resources | income counted under the rules of a given benefit — not one universal “income” |
| BMAF | monthly base for family allowances | the base amount most family benefits are a percentage of, revalued every year |
| APL, ALF, ALS | housing aid | three housing benefits with different conditions |
| CRDS | social debt repayment contribution | a 0.5% deduction taken from family benefits and housing aid before payment |
| indu | overpayment | an amount paid that was not due |
| remise | remission | waiving all or part of a debt |
8. Explore recorded scenarios
The French Benefits Lab shows recorded runs of the same model: the path from text to decision, the Garnier case, a decision notice built from an answer and an instruction checked before it is signed.
Exercise
Use the April table in section 2.
- Which article fixes the date from which the housing right starts, and what is that date?
- Which duty in April belongs to the household, and which two belong to the fund?
- Why does the family allowance have two amounts, €425.57 and €425.56?