Live data from Hacker News

Spanish legislation as a Git repo

github.com

101–110 of 246 posts

Re: Spanish legislation as a Git repo

#101

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…

Please! Can you make the same for Portugal? Laws here are a mess of reforms...

is there a similar API for Portugal?

Re: Spanish legislation as a Git repo

#103

The general sentiment here is that it's a great project. Could someone please explain why? All I'm seeing is that laws are updated with commits within markdown files.

The value is in the semantics git gives you for free once the data is in this shape. Right now if you want to understand how a law changed, you go to the official gazette website and read a document that says "strike paragraph 3 of article 12 and replace with the following text." You're doing the diff in your head.

With this repo, git log --oneline -- spain/BOE-A-1978-31229.md gives you every reform to the Spanish Constitution in one command. git diff between any two reforms shows you exactly what changed in context. git blame tells you which reform touched which article. These are operations that would take a lawyer hours of cross-referencing, and they're free once the data is structured this way.

The other great thing: you can build tooling on top of it and use it with the CLI.

Re: Spanish legislation as a Git repo

#105
post #45

Neat. I wonder if there are commercial products that are formal specifications of laws, decisions, etc. Such that you can reason on them via solvers etc.

https://news.ycombinator.com/item?id=46177022

Nice, now I just need to spend 5 years encoding it all and I can finally start my 'AI' tax evasion consultancy firm.

Re: Spanish legislation as a Git repo

#106

The general sentiment here is that it's a great project. Could someone please explain why? All I'm seeing is that laws are updated with commits within markdown files.

The why is that it's cool. Why it's not cool for you cannot be explained by us, only you.

Re: Spanish legislation as a Git repo

#107
post #104

In France, not only our law are versioned. It's formally proved too! https://catala-lang.org/ *Edit*: Woah ! The French crew is here. We are at least 5 quoting a variation of https://www.legifrance.gouv.fr/ > for versioning.

I find it ironic to have it named "catalan(g)" on a post about spanish law.

Re: Spanish legislation as a Git repo

#108

The general sentiment here is that it's a great project. Could someone please explain why? All I'm seeing is that laws are updated with commits within markdown files.

The value is in the semantics git gives you for free once the data is in this shape. Right now if you want to understand how a law changed, you go to the official gazette website and read a document that says "strike paragraph 3 of article 12 and replace with the following text." You're doing the diff in your head. With this repo, git log --oneline -- spain/BOE-A-1978-31229.md gives you every reform to the Spanish Co…

Thanks for a beautiful explanation. Makes sense now that this repo enables git diff, git base to reveal changes easier.

Re: Spanish legislation as a Git repo

#109
Nice! I was just implementing this for CA state bills.

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.

Re: Spanish legislation as a Git repo

#110

The general sentiment here is that it's a great project. Could someone please explain why? All I'm seeing is that laws are updated with commits within markdown files.

The why is that it's cool. Why it's not cool for you cannot be explained by us, only you.

I didn't say it's not cool. I was trying to understand the utility of it being great.
Post reply on HN