*Edit*: Woah ! The French crew is here. We are at least 5 quoting a variation of <https://www.legifrance.gouv.fr/> for versioning.
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.
Is the parsing/uploading code shared somewhere else?
Definitely the kind of idea that would have been below my activation energy pre-Claude.
I think this approach should be standard, I have always wondered why the source of truth for these documents is not moved to a repo like git.
For others wondering, while most of the Franco-era laws were nuked in 1978, this does include lots of old laws (ie pre-20th C).
However, the source material starts with a sqashed commit in 1960 :) So no changelog before that. The BOE source though is pretty phenomonal, they've scanned files going back to the 1600s so far.
You can see how certain articles have the option to check "how that particular article was at each moment in time". That would be way harder to track, but it would be awesome if not only could you "go back in time and see what the law was" but also "how its been evolving".
In Brazil we have lexml, a standard to describe the law and their changes over time. It's surprisingly complex.
Useful for alerts in our concern area, and monitoring proposed legislation iteration and flow through committees to keep ahead.
I can imagine quite a few other more civic interest uses as well!
Hoping to open source some later myself, seems an area ripe for some open civic citizen/hacker projects. Bet some fun startups could be made on top too, gl.
Testing may not exhaust all scenarios but it is useful to see where loopholes may exist or whether a bill that sneaks in while you aren't paying attention is unfavorable to your values.
https://github.com/righttoprivacyact/bill/blob/main/tests/te...
Well done and great to see items like this and great to see the comments.
I'm sure I won't be the only one curious, please enlighten me.
[1]: <https://github.com/EnriqueLop/legalize-es/commit/424cbc96507...>
It left out the tables (e.g. under 2.1 Materiales.) and the images (e.g see the very bottom).
I'll take a look at data to enrich it :).
https://www.legislation.gov.uk/ukpga/1990/18/section/9
Laws being passed are these ludicrous sets of patches:
$ git commit --amend --author="Author Name <author@spanish.gov>" --no-edit
.. with the details for the author of each commit.Then, it would be simply amazing to run gource, sit back, and watch where all the noise is coming from.
Gource:
https://github.com/acaudwell/gource
What gource looks like:
I’ve long wanted to see gource applied in other sociologically-relevant contexts and this’d be a real good one ..
P.S: Sadly my PR amendment was repealled