Turn every country's legislation into a versioned git history

A Redditor ran one Claude Code session per country to download every version of each law and rebuild it as git commits dated to when each change took force, then merged the countries into one tree.

Done withClaude CodeinGitHub· Oct 29, 2026

What they did

The poster, u/SnooPeripherals5313, wanted the world's statute law to be versioned, attributable with git blame and queryable by agents, and published it free under CC0 as the lexifina/global-law repo on GitHub. They set the goals, picked the official sources and made the design calls; Claude Code on Opus 5.5 wrote nearly all the code. They ran a separate Claude Code session for each country or group of countries. Each session read the official publisher's site or API, checked robots.txt and the terms of use, and wrote a downloader that pulls every version of every law and writes it out as one commit per change on its in-force date. Where a publisher only offers amending Acts, the script replays each amendment to rebuild past versions. The sessions passed findings to each other, such as pre-1970 dates and daylight-saving edge cases. Claude also wrote the build that joins the countries as git submodules with their histories interleaved by date, so two independent builds come out hash-identical.

How it went

The repo followed a US Code version that reached number one on Hacker News. Coverage is uneven: the README says some corpora hold a whole statute book (Czechia, Spain, Switzerland, Georgia, Malta) while others hold a few acts or a sample, and many countries have only a source list so far. It also ships a local MCP server so Claude can ask what the law said on a given date. The author calls it a work in progress and gives no figures for time or cost.

Worth knowing

Git dates start at 1 January 1970, so older laws need special handling; one commenter spotted Afghanistan pinned to that date because it was unfinished. Commenters asked how the data stays current and complete, and noted it covers legislation, not case law. Another builder doing US court rules said publishers often change format and file type, which breaks downloaders.

Try it

With Claude Code· 4 parts to fill in

Build a downloader for the official legislation of [country or jurisdiction] from [official publisher site or API]. First check robots.txt and the terms of use and tell me if bulk download is allowed. Then fetch every published version of each law and write them into a git repository at [path], one commit per change, with the commit date set to the date that change came into force. If the source only publishes amending acts, rebuild earlier versions by applying each amendment in order and record which dates you verified. Handle dates before 1970. Show me the history for [one sample law] and wait for my approval before running the full download. Stop when two clean builds produce identical commit hashes.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related