Books / Law as Code in Practice: French Family Benefits / Appendix E
Appendix E
Solutions to the Exercises

Contents of Law as Code in Practice: French Family Benefits
Chapter 0 — What CNAF Pays, and Why It Is a Law-as-Code Problem
- Article R. 823-10 of the construction and housing code: the right starts on 1 April 2026, the first day of the month after the conditions were met (the lease began on 14 March; the application followed on 20 March). So the answer to the prediction is April, not March.
- The household must attach supporting documents (R. 823-2 CCH). The fund must pay the net family allowances (L. 521-1 CSS) and inform the recipient (L. 583-1 CSS).
- Article D. 521-1 gives percentages of the BMAF: computed exactly they give €425.5624 a month. Rounding that total to the cent gives €425.56. The yearly instruction prints each line rounded first (349.06 + 76.51), giving €425.57. The model reports both, and marks 425.57 as the result of a named reading.
Model counted on 11 October 2026: 27 packages, 2,662 rules, 1,945 scenario files.
Chapter 1 — Sources and Editions: Which French Text Applies on Which Date
- No: it is the resource base counted by the model.
- The legal date of the question.
- The inputs that the new edition requires, here the monthly resource records and relevant household facts.
Chapter 2 — The Birth Grant: First Rule, First Answer
- Yes:
ressources <= plafond. - No. There is no annual-resource fact from which to make that comparison.
- The annual resources under the applicable resource rules, represented here by
ressources_annuelles.
Chapter 3 — Parameters and Revaluation: The BMAF and the Yearly Instruction
- 2.2975: 229.75% of the base.
- No. The base is a supplied input in each cohort file.
- The source anchors, together with the row’s validity window and pinned publication records.
Chapter 4 — One Family, One Decision: The Garnier Household in April 2026
- The conditions were met in March, before the month of the application (May). The second sentence of R. 823-10 — rule
OuvertureMoisDemande— applies: the aid is due from the first day of the month of the application, 1 May 2026. The ruleOuvertureApresConditionsdoes not apply, because its condition “conditions month ≥ application month” is false. - The housing allowance: the model refuses with
INEXACT_DIVISION, because D. 823-16 makes the aid decrease in proportion without saying how to round, and the quotient has no finite decimal value. - The duty to justify the change with the request for review (
JustifierChangements), created by R. 823-3 of the construction and housing code.
Chapter 5 — How a Scenario Is Written
given.- The annual-resource input equals the constructed ceiling, and the test expects
TRUE_ONLYfor the right. - The same status could be reached on unintended grounds; the proof identifies the rule and facts used.
Chapter 6 — Housing Aid: The APL Formula and the K Coefficient
- Downward to two decimal places.
- No. Af is the formula component; subsequent adjustments are separate steps.
- They contain the text used for the working reading of the image-published formula.
Chapter 7 — When the Text Does Not Specify Rounding
- €164.76 under the selected reading.
- No. It reports a calculation that requires a rounding choice.
- Both return
RUNTIME_ERRORwithINEXACT_DIVISION. The unchangedPpPlancherFinalbelongs to a separate reading group; this refusal does not decide entitlement.
Chapter 8 — One Text, Two Readings
INTERPRETATION_REQUIRED.- No. The above-threshold file does not exercise the floor’s effect.
- No: they are the personal contribution and formula aid component in an isolated test.
Chapter 9 — A Human Must Decide: Decent Housing
- Not established, with the status requires judgment. The request concerns
logement_decentfor the Garnier household and is addressed to the paying body (OrganismePayeur). - The end of the third sentence: the rent reduction gives the owner no ground to seek termination of the lease. The household holds the immunity (
NonResiliationBailNonDecence), against the landlord. - The calculated amount, €189.95295 a month, is established. Whether it is paid waits for the decency assessment.
Chapter 10 — Duties of the Fund and the Household
- No: existence and performance are distinct.
- No: its recorded expectation is undetermined.
- The fund’s duty to inform recipients about the nature and extent of their rights.
Chapter 11 — A Family Over Time: Overpayments, Deductions, Prescription
- No: the gross grant is a supplied input.
- March 2026: €318.40, because recovery of the AF overpayment is supplied as time-barred and both carry-over amounts are zero.
- No: the served PA amount is supplied; that entitlement calculation belongs to a separate scenario.
Chapter 12 — Remission of a Debt, Prior Review and Deadlines
- No: the debt’s grounds are not contested in this remission procedure.
- No: it is a notification deadline; the text also provides an implied rejection for silence.
- No: it demonstrates grounds affecting recovery during challenge.
Chapter 13 — Explaining a Decision to the Recipient
- This is a different file, without the age supplement and with different resources.
- The degree and manner of the algorithm’s contribution, including the human role.
- No. It still needs native French legal and editorial qualification.
Chapter 14 — Testing a Reform Before It Is Signed
- One expression in one rule:
CoeffNominalretainsc * 1.05instead ofc, so the 2026 coefficient becomes 1.008 × 1.05 and the BMAF €502.07 instead of €478.16. - The recorded impact run compared the two versions of the package and evaluated no scenarios, so an unchanged outcome there is an absence of observation, not a conclusion — which is why the draft is executed in Step 2 and the family files are run in Step 4.
- By €27.26 (from €545.10 to €572.36). The allowance is a percentage of the BMAF that grows with the number of children — 114% for four children against 32% for two — so the same 5% on the BMAF moves a larger amount.
Chapter 15 — Finding Families Who Do Not Claim
- No. It identifies a row for a complete question and review.
- No. It should pass for further examination.
- Nothing: its full entitlement was not evaluated in this scene.
Chapter 16 — An Assistant That Answers With Proof
law_ask; search and rules prepare the question.- Ask for the information and inspect the missing-premise response.
- No. It was the recorded compatible MCP client.
Chapter 17 — Audit and Reproduction
- No. It establishes repeatability of this saved computation.
- No. Preserve the request, executable bundle and supporting materials.
- No. It is a new case question.
Chapter 18 — Migrating a Rulebook: Other Tools’ Tests as Acceptance
- Preserve it. A justified correction needs its own evidence and review.
- Inputs, date, units, components, parameters, defaults and readings.
- Sourced external tests, explicit mappings, execution of both sides and qualified differences. This chapter has not completed that work.