Live data from Hacker News

Spanish legislation as a Git repo

github.com

211–220 of 246 posts

Re: Spanish legislation as a Git repo

#211
post #69

Earlier quoted context omitted.

I wonder how true this is, we have the same system in Sweden, that court judgement are not legally binding precedent for lower courts. But in practice lower courts will follow the rulings made by the high court. Is it not the same in Spain at all?

Would be nice if someone did it with Swedens laws too!

I built it with Claude Code last summer :) Check it out: https://github.com/se-lex/sfs

It’s generated by this CLI: https://github.com/se-lex/sfs-processor (md with temporal tags, html or Git commits as output format)

Re: Spanish legislation as a Git repo

#212

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…

Would love to get the U.S. tax law as a dump of markdown files. Then everyone can build their own TurboTax.

https://www.irs.gov/privacy-disclosure/tax-code-regulations-...

Re: Spanish legislation as a Git repo

#213
post #29
post #4

This is brilliant. I wish this were available for all legislations. There's so many inefficiencies that are trivially solved with existing tech frameworks.

Everyone in government knows what Track Changes is. The standard format of a piece of legislation in British-influenced systems is a diff. The tech field does not have secret knowledge that the rest of humanity lacks.

> Everyone in government knows That's part of the point good rafram, I'm not in government but I've looked up laws for at least three jurisdictions and have never encountered version control. A tool at the bottom of a drawer or in only one person's belt is not a tool to anyone else.

Re: Spanish legislation as a Git repo

#214
post #4

This is brilliant. I wish this were available for all legislations. There's so many inefficiencies that are trivially solved with existing tech frameworks.

> so many inefficiencies that are trivially solved with existing tech frameworks. Out of curiosity, like what specifically? Didn’t DOGE’s failure highlight that it actually wasn’t trivial? I’m skeptical at first glance but open to being proven wrong.

To be clear, I wasn't exclusively referring to government. I was actually only thinking of the use of git-like version control across a number of different technical domains, law, design, book writing, architecture, etc

Re: Spanish legislation as a Git repo

#215
post #214

Earlier quoted context omitted.

> so many inefficiencies that are trivially solved with existing tech frameworks. Out of curiosity, like what specifically? Didn’t DOGE’s failure highlight that it actually wasn’t trivial? I’m skeptical at first glance but open to being proven wrong.

To be clear, I wasn't exclusively referring to government. I was actually only thinking of the use of git-like version control across a number of different technical domains, law, design, book writing, architecture, etc

Oh, I gotcha.

Yes, I’ve noticed that software like MS Word and Atlassian Confluence now has version control built in

Re: Spanish legislation as a Git repo

#216

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…

> 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.

Verrsioning+search is like feature zero of any law software. In many countries (such as next door Portugal) it's even part of the standard public website provided by the state. Not to diminish your effort but yeah, people have thought of that before x)

Re: Spanish legislation as a Git repo

#217

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…

I’ve thought of this of many times! But you’re missing the most important part: every reform should be a PR. With discussions and all. That would be the purest form of voting. And all decisions to reach the current state of a law would ve registered and available for everyone to read. Democracy 2.0. Dreaming costs nothing.

This is already the case since parliamentary minutes are typically on the web as well. Unfortunately of course, this only includes the "official" discussions, not those taking part in corridors, offices, or lobbies... :)

Re: Spanish legislation as a Git repo

#218

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…

the problem with Roman-Napoleonic systems is that this will let you find changes to articles in law codes, but large swathes of the law are just declared out of context, and its interaction with the rest of law is for lawyers and judges to interpret - which is what makes them inherently different to case law systems

note that even in case law systems, legislators can still pretend to be clarifying or reinterpreting things to essentially change law, but at least the supposed principle is that law has to stay coherent and go through all the pertinent checks and balances

in the UK legislation traces back to its origin, with all relevant amendments, see for example:

https://www.legislation.gov.uk/ukpga/1990/8/contents

Re: Spanish legislation as a Git repo

#219

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…

It would be a good place to start if you wanted to hard fork the government.

You need some land to host your own legislation

Re: Spanish legislation as a Git repo

#220
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.

Catala is not at all about "proving the law" formally (I'm not even sure what it would mean?). It's about having a formal language to translate law into that both matches the way law is usually written ("default logic") and allows to make numerical computations on. This can typically be used to implement tax or benefits law so that it is way easier to check that the algorithm computing taxes/benefits is correct compared to the actual state of the art of using general purpose programming languages.
Post reply on HN