Skip to main content
  1. Posts/

Every Law a Commit: The US Code on GitHub

··288 words·2 mins·

⚖️ The entire US Code as a Git repository — built in 48 hours

Someone published Spanish law on GitHub. HN comments said “someone should do this for the US.” Two days later: done.

📊 The numbers:

  • 53 titles transformed
  • 60,452 sections parsed
  • ~3,000 chapter files
  • The entire United States Code from General Provisions to the National Park Service

🔀 Why Git? US law changes constantly. Today, understanding what changed means reading text like “in section 1030(c)(4)(A)(i)(I), strike ‘damage’ and insert ‘harm’”. In Git, that’s just a diff.

🤖 Built by AI agents: The “Dark Factory” system processed 10 issues through an autonomous pipeline: specification → architecture → security review → tests → implementation → adversarial review. The adversary found real bugs: ZIP path traversal, cache integrity bypass, silent section body omission.

🔮 Future vision: Bills as Pull Requests. Every bill introduced in Congress becomes a PR against the current Code. If it passes, it merges. If it dies in committee, it closes.

💡 Explanation in a nutshell
#

Imagine a country’s laws were software code: with version history, change diffs, and branches for each proposal. That’s exactly what was done here: the entire US Code converted into a Git repository, built in just 48 hours using AI agents.

More information at the link 👇

Also published on LinkedIn.
Juan Pedro Bretti Mandarano
Author
Juan Pedro Bretti Mandarano