I put all 8,642 Spanish laws in Git – every reform is a commit

https://github.com/EnriqueLop/legalize-es

Commits · EnriqueLop/legalize-es

Spanish legislation as a Git repo — every law is a Markdown file, every reform a commit. 8,600+ laws. - Commits · EnriqueLop/legalize-es

GitHub

I built a pipeline that converts all Spanish state legislation into version-controlled Markdown. Each law is a file, each reform is a real git commit with the historical date. 8,642 laws, 27,866 commits.

The idea: legislation is just patches on patches on patches. Git already solves this. Instead of reading "strike paragraph 3 and replace with...", you get an actual diff.

The repo is the product. Browse any law, git log to see its full reform history, git diff to see exactly what changed.

Built the pipeline in ~4 hours with Claude Code. Source is BOE (Spain's official gazette) consolidated legislation API.

Exploring whether there's a business here — structured legislation API for legaltech/compliance, or just a useful open dataset. Curious what HN would build with this data.

cool idea, how far back (in time) do those 27k commits go?

Just thinking how this could maybe used for (automated) research / visualization on the evolution of (spanish - in this case) law

> how far back (in time) do those 27k commits go

Looking at the commit dates (which seem to be derived from the original publication dates) the history seems quite sparse/incomplete(?) I mean, there have only been 26 commits since 2000.

It seems the commits aren't in proper date order. Here are some newer changes, placed before the latest commits:
https://github.com/EnriqueLop/legalize-es/commits/master/?af...
Commits · EnriqueLop/legalize-es

Spanish legislation as a Git repo — every law is a Markdown file, every reform a commit. 8,600+ laws. - Commits · EnriqueLop/legalize-es

GitHub