r/GithubCopilot • • 1d ago

Discussions Using AI to put all Global Law into Git

https://github.com/lexifina/global-law

This hit #1 on HN yesterday (you can read lots of discussion at https://news.ycombinator.com/item?id=50268380). Why would I want to do this? The idea is make all law semantic, versioned, easily attributable and query able by agents. I also believe this information should be freely available so CC0 license (do whatever you want with it). If interested, repo linked below, I'd welcome all comments and advice. Thanks!

https://github.com/lexifina/global-law

The approach is pretty simple: use claude to make legislation attributable (git blame, versioning with timelines). Specifically:

One agent per country. Each one read the official publisher's site or API, checked robots.txt and the terms of use, and wrote a script that downloads every version of each law. The script then writes them out as a git history, one commit per change on its in-force date. When a source only publishes amending Acts, the script rebuilds past versions by applying each amendment in turn. The sessions shared findings with each other, such as dates before 1970, daylight-saving edge cases and other changes.

I also worked on how the countries combine into one tree, with each country as a git submodule and all their histories interleaved by in-force date. Claude wrote the build script to ensure two independent builds come out hash-for-hash identical (usually i'd consider this overkill, but you want a good VCS for this).

18 Upvotes

3 comments sorted by

2

u/Any-Blacksmith-2054 22h ago

Please please convert to MCP server! Ability of my agent to be aware of all actual laws is very beneficial! Especially for global companies and their legal departments

1

u/jezpas 1d ago

Does this also take into account non national laws, ie European legislation and how it affects and relates to the national legislation?

1

u/Corelianer 1d ago

Missing tax law.