The Source Code of Law: AI Agents Rewrite and Red-Team 30,000 Articles of French Law
Turning a political programme into enforceable law means amending a vast, interconnected corpus: statutes, decrees, tax annexes and future versions that often contradict one another. We study whether a policy-configurable pipeline of AI agents can make this translation coherent, verifiable and far cheaper than manual drafting. Case study: five major French codes in full (Labour, the General Tax Code and its four annexes, Social Security, Town Planning, Construction and Housing), 30,317 articles from the official LEGI database as of 18 October 2026, rewritten according to reforms inspired by David Lisnard's 2027 programme, in an independent project. The work ran in three passes and an open public review: a first draft of every article (14,115 rewritten, 16,199 retained with a justification), a complete coherence re-reading, then a separate red team that applied 1,285 corrections and measured reliability with blind random audits. On two fresh samples totalling 1,264 articles, audited blind on both texts with the same protocol, the rewritten law has 54% fewer gross defects than the law in force (95% CI 40-64%): 3.5% ± 1.0 against 7.5% ± 1.5 (paired test, p ≈ 2×10^-10). The project cost about US$1,400 in cash, against an order-of-magnitude estimate of €6 to 36 million for the same work by lawyers. The programme is a separate input: the coherence checks do not depend on it, and we invite other programmes to be run through the same pipeline. These results, produced and measured by AI agents alone, are released for verification by lawyers and citizens. Bilingual edition: English, followed by the French version from page 22. Code and data: https://github.com/AlexMasmej/liberer-la-france Corresponding author: Alex Masmej (@AlexMasmej on X): https://x.com/AlexMasmej. Original announcement thread (19 October 2026): https://x.com/AlexMasmej/status/2112088220804722917
Authors
- Nathalie Gouailhardou
- Kevin Primicerio (ORCID: https://orcid.org/0000-0001-6562-6280)
- Alexandre Masmejean (ORCID: https://orcid.org/0009-0000-0105-8368)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-16
- DOI
- https://doi.org/10.5281/zenodo.24276258
- Primary Topic
- Artificial Intelligence in Law
- Type
- preprint