[French Benefits on Arxo — executable rules, traceable sources.]
arxo-cnaf
[Smithery]
Explore French benefit rules as executable models, and trace their answers
back to published legal sources.
Explore the demo ·
Run an example ·
Read the book
First of all, a demonstration. This repository shows what modelling legislation with Arxo can do:
French family-benefit law written as executable canons, with the source of every answer. It is an
independent model built from published French law for teaching and demonstration. It does not claim
legal accuracy or completeness, it is not an implementation by or for the Cnaf or any French
authority, and its answers are not legal advice. For a real file, rely on the official texts and the
competent bodies.
Choose your starting point
[French Benefits Lab overview: saved family-allowance cases for March and April 2026, with links to their evidence.]
French Benefits Lab, captured on 12 October 2026. Open the demo and choose
“Explore a saved family case” to inspect its inputs, answer and French sources.
The lab presents its own recorded evidence release; its coverage and version
are separate from this repository's export.
What it answers
The browser examples belong to the lab's recorded release. The local APL
example below belongs to this repository's pinned model.
Use from Node.js
Node.js 20+. The pinned models are available as
@arxo/canon-fr-benefits.
Load one world and ask it through the common @arxo/law API:
The input is the technical APL case below, with PpPlancherFinal selected.
The answer includes the engine's canonical document, proof and hashes.
This is a formula amount, not a final payable benefit. The package contains
all 21 models; loading a subpath parses only the selected world.
Package API, model exports, TypeScript and verification limits.
For maintainers: how to ship a canon with several models.
Source models are pinned to the original public export; npm delivery checks
are separate from full corpus acceptance, which remains not checked.
Quick start
You need Git, Node.js 20+ and npm. This example uses the released
law 0.2.2 command-line tool, which executes the models. The package
already includes its pinned dependency; no Python, source restoration or
registry installation is needed for this scenario.
This runs seven scenarios about the personal contribution in housing aid
(article D. 823-17). Success means the command exits with code 0 and the
JSON report records no failed scenarios. These are checks against the
model's declared expectations, not certification of legal accuracy.
The successful report includes these fields:
What to explore next: compare the readings,
then open the scenario file.
Need help getting started? See Troubleshooting.
Example: one case, two readings
The model records two readings of the personal contribution in article
D. 823-17. The choice enters at SensMinimumPp, an interpretation group
that requires exactly one of PpPlancherFinal or PpLitteral.
The scenario fixes a single
person with no dependants, zone II in metropolitan France, legal date
15 June 2024, supplied resources of €4,000 and zero rent.
It also supplies ordinary housing, sole tenancy, zero solidarity rent
reduction and no AAH/AEEH beneficiary. Zero rent deliberately isolates the
reading difference; this is a technical probe, not a realistic aid claim.
The pinned parameters used in this probe are P0 = €37.91, Tp = 0.0283,
R0 = €5,186, L = €0 and C = €58.08.
Both readings feed the same participation_personnelle relation. The same
AideFormule rule then uses Af = L + C − Pp. These are exact formula
amounts in the probe; neither is presented as the final payable benefit.
The model leaves the choice explicit rather than selecting a reading for you.
The rules behind the amount
This is the native unfold response for aide_formule, rendered as a tree
from the published [email protected] world. Each rule exposes its premises,
strength and source anchors. The two contribution producers are both
visible: ParticipationPersonnelle and ParticipationPersonnelleLitterale.
[Native unfold tree for aide_formule: AideFormule depends on forfait_charges, loyer_eligible and participation_personnelle; their producer rules and source anchors are expanded to depth 2.]
No case, legal date or reading is selected. This shows the model's available
rules, not which rules applied to a particular answer. The depth-limit
markers come from the engine. Repeated article locators are grouped visually;
the JSON retains every dated source anchor.
Full native JSON ·
Native text and labels ·
Reproduce these trees
Follow the map in the actual model:
Rules and exceptions
The same view for droit_ouvert shows a defeasible opening rule alongside
its exception rules (defeater). Expanding surface_insuffisante exposes
its own producers and an exception to that condition. fact, derived,
judgment and test are distinct kinds of premise in the native response.
[Native unfold tree for droit_ouvert: DroitOuvert and its exception rules, including ownership, held shares, student exclusion, room occupancy and surface conditions, with source anchors and depth-limit markers.]
This is a map of declared rule structure across the published world, not
an eligibility finding for a person. No case, date or reading is selected.
Full native JSON ·
Native text and labels ·
Declared exception scenarios
How to read a model
Published text → executable rules → dated case facts → answer and evidence.
A canon is a package containing a legal model, its source references and
checks. A scenario supplies facts, dates and any selected interpretation,
then states the expected answer. A pinned source is a captured publication
identified by its provenance and a content hash, so the model's input can be
checked later.
The rules are data in .law files, executed by law. This repository carries
no separate implementation of the benefit formulas in application code.
Models have individual scope and date boundaries; read a package's source
and scenarios before applying its answers to a different case.
At a glance
Browse the models
The names below identify the subject of each model, not a claim of complete
coverage of that benefit. The version and scenario inventory
records the exported package versions and dependency counts.
Housing
Family and children
Disability and care
Income support
Shared rules and parameters
Formalization depth
Depth is recorded per model, against source revision
f2efcc6.
The unit is an article in a pinned publication edition: the same article
can occur in several editions. Identical document bytes are counted once per
package. Imports are excluded.
Executable / measured counts units with at least one deriving node.
The other levels are I — executable only under an explicit interpretation;
A — anchored without a deriving rule; S — source fragment only;
N — no model node. An executable unit can still be only partly expressed.
These counts describe the pinned excerpts, not the percentage of a benefit
or of French law that is completely formalized.
† Partial measurement: some own publications or declared documents are
outside the measured units; the report identifies them. Not measured
means no declared source-document division was available for this method,
not that the model has no executable rules. Rules / norms count own rule
nodes and norm templates separately. Scenarios are the recorded export
inventory; they were not rerun for this documentation update.
Method, boundaries and reproduction ·
Per-unit evidence
Find your way around the repository
The packages contain the public consumer kit; authoring reports and maintenance
scripts are excluded. See public package contents
for the preservation rules and the read-only guard.
For a case package that consumes these canons, follow
Install the book examples.
For compilation, scenario checks, replay and release rebuilds, follow
Rebuild a source package.
Release and verification
Published with Law as Code in Practice: French Family Benefits
(Law as Code by Country · Volume 1), available at Arxo Books.
The canons were exported on 12 October 2026 from Arxo commit
7206473829, with 1,985 scenarios passing on law 0.2.1
(law.core/0.2.11). The book's reproduction kit was checked with released
law 0.2.2. These are recorded execution results for this export.
The packages workflow compiles each package,
runs its scenarios on both evaluators, replays saved evaluations and rebuilds
from the release using pinned law-package-tools 0.3.0. The
registry workflow checks schemas, addresses
and hashes. See the reproducibility guide for
requirements and commands.
Found an error?
You do not need to know the rule language to report a problem.
Open an issue with:
- Where: the package, article or scenario, and the legal date.
- What happened: fictional or anonymized input facts, the selected
reading, your
law --version, and the returned answer or test report.
- What you expected: the relevant published source, its date/version,
and the reasoning that leads to a different result.
Use fictional or anonymized examples; omit personal records and identifiers.
If you mean the browser lab, include its page link and recorded release.
A difference between readings may need an explicit alternative rather than
a change to a shared rule. A confirmed defect should be accompanied by a
scenario that reproduces it.
Cite this snapshot
Arxo (2026). French benefit rules on Arxo: executable, source-linked models.
Canon export of 12 October 2026, public source revision
f2efcc6788465484f145146a3ed5f76b13d41703.
For a particular result, also identify its package version, scenario or case,
legal date and selected reading, and retain the execution evidence and hashes.
The source revision above pins the exported canons; the lab is a separate release.
Rights and contact
Code and model: Apache-2.0. Captured publisher texts retain their
own reproduction terms, listed per package in NOTICE; the code
licence does not cover those texts. Some source files are
withheld from redistribution.
Maintainer: Rifat Dzhumagulov · [email protected].