LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

Softwaregitlawopen-datamcplegal-techversion-control

Global Law Puts the World's Statutes in One Git Repository, Where Every Commit Is a Law Taking Effect and git blame Names the Law That Wrote Each Line

Lexifina's CC0 global-law repository pins 107 corpora of national law as git submodules, interleaved by the date each change took force, with a read-only MCP server so an AI model can quote what a statute said on a given day.

Chris Pirillo as an illuminated manuscript painting, tracing a branching line of colored threads through a huge open book of laws beside a globe
Illustration: LockerGnome

The repository’s README calls it an expansion of an earlier project that did the same thing for the US Code. The structure is folders for the world: a jurisdiction.json covering “193 UN members, other territories with their own ISO code, and the EU,” and under each country, its law as a git submodule. The manifest lists 107 corpora. Countries with no law loaded yet get a folder with their sources listed and nothing pinned, because “only real law is pinned.”

The commits are the clever part. “Every later commit moves exactly one corpus to its next commit. Its author is the law,” and trailers name the corpus, the law and the in-force date. So git log --first-parent becomes, in the README’s words, “a world chronology of laws taking effect,” and git grep at any commit searches “all the law in force at that moment, in every country.”

Git has an opinion about history, though. “Git cannot store dates before 1970, so changes to the Grundgesetz that took effect earlier carry 1970 commit dates, one second apart, in the right order.” The real date lives in an In-force trailer, which the repo’s own law.py tool reads instead. The README warns that plain git log --before=1960-01-01 “gives a wrong answer without saying so.”

Coverage is uneven, and the README says so plainly. Czechia, Spain, Switzerland, Georgia and Malta have whole statute books, while “the US corpus is nine titles of the United States Code, and the UK corpus is the special educational needs law.” The manifest marks each corpus as in-force (dated official versions), replayed (rebuilt by applying each amending act) or current-only.

The AI angle is in two places. tools/mcp_server.py gives Claude or any MCP client “18 read-only tools,” uses “only Python 3.10+ and git,” and “makes no network calls.” You can ask it which text of a bankruptcy provision applied on a given day, or have it “Check every citation in this brief against the law in force today.” And the repo’s REPRODUCE.md says the repository itself “was built on 28 October 2026 in Claude Code” by Claude Opus 5.5, which “Chose the design” and “Wrote all the code and text,” but did not “Write or change any legal text.” It closes with a caveat a law firm would want in writing: “The work was not reviewed line by line by a lawyer.”

Developers have joked for years that law is just code nobody can compile. This takes the joke literally, and the result is more useful than funny. The 1970 workaround is my favorite detail, because it’s exactly the kind of seam that shows up when you force one domain’s history into another domain’s tool: Germany’s constitution is older than Unix time, so its early amendments line up one second apart in 1970 like people waiting at a door. The project didn’t hide that. It wrote it down, built a tool around it, and told you which command will lie to you.

More Software

Every Software story →