Sadly, it is unmaintained.
https://github.com/jandinter/gesetze-im-internet
I scrape the official website (https://www.gesetze-im-internet.de) once a week. The repository contains the "official" XML files with a formatting that is more focussed on presentation than on the logical structure of the legal acts, unfortunately (https://www.gesetze-im-internet.de/dtd/1.01/gii-norm.dtd).
Some time ago, someone from the digital service of Germany reached out and asked about my use case. Maybe there will be an official version of a "Git law" repo someday...
I wanted to build an "IDE-inspired" law reader. It has selection highlighting and you can open references within the same window. It scrapes gesetze-im-internet.de daily, processes the XML to JSONS and builds static HTML pages, hosted on Github pages. The entire build process for the 6000+ pages takes 5-10 minutes. It uses up less than <20% of my actions minutes that come with Github pro.
It was a really fun rabbit hole to go down.
What I found most fascinating is that: There doesn't seem to be an official version of the German law. The state just publishes official announcements like "Law X will be changed as follows", "Law X will be removed" or "Law X will be added". So the official version of the German law really is something akin to a git tree. AFAIK, all consolidated versions are created by private entities.
I did a test by picking a law at random, finding the first time it was published and then applying all the changes from subsequent years. Turns out all available versions (gesetze-im-internet, dejure.org, buzer.de) had at least a couple of small mistakes. I found that quite fascinating (and a little scary).
It's also funny how often laws are referenced that don't even exist anymore. The collection of laws really are is as tidy as you would imagine an 80 year old system, where the maintainers change every 5 years, to be.
I'm asking as I don't agree on the underlying assumption a use case was needed. I consider the value of transparency and public information for a democratic society as evident.
In source code we replace or modify the parts that doesn't work in place. Many laws does not work like that, they are a labyrinth of add ons. A new law is introduced with wordings like "This replaces the words "small businesses" with "nuclear rockets" in the law on "Workplace safety of fishing vessels of 1992", §12, section 3, line 5.
No amount of version control will ever find these changes.
I actually think version control is an absolute necessity for laws.
Changes will either add, delete or change an existing law.
There is actually a website where someone has all changes dating back to 2006 and you can display diffs (called Synopsis in Germany) - for example: https://www.buzer.de/gesetz/5041/v322454-2025-03-25.htm
It's mostly the obsolete system of common law where to have an understanding of what is legal and what isn't, you need to have a spiderweb of random acts (random as in, they don't have to be thematic, so the Chicken Tax Act of 2005 can have provisions on solar panels that replace the previous solar panel legislation form the STOP KILLING OUR COMMUNITIES Act of 1785) that build/replace on one another, sometimes going very far back, with associated precedents that clarify them.
So you've called out precisely why version control systems present such a useful analog.
Of course one could also argue that it isn't a problem with poorly designed laws but that our programming languages are ill equipped for it.
Then again, the funniest thing I've seen in law: Where an engineer would make a nice drawing with the size of things neatly organized into available space, a law maker will spray all the numbers and description randomly all over the place as if to prevent anyone from ever building the described.
Hard disagree. It allows you to attach a name to particular portions of the code (and a date), it shows you when the code moves from one status to another (branches), and you could even easily do things like show who voted/signed for any given piece.
What's not really compatible with law making as it is now, where to repeal a law it doesn't remove the offending code, but adds more code that says "now you can ignore that previous one". Those don't even make it into the official text until codification occurs (this is periodic, not continuous).
>In source code we replace or modify the parts that doesn't work in place. Many laws does not work like that, they are a labyrinth of add ons. A new law is introduced with wordings like "This replaces the words "small businesses" with "nuclear rockets" in the law on "Workplace safety of fishing vessels of 1992", §12, section 3, line 5.
Exactly. They've been doing it wrong (artifact of doing everything on paper, I think).
Ja, there must be order.
Its not easy to convert general law to markdown, it involved online converters and manual fixes. Currently experimenting with marker [1] on local LLM hardware and so far it is the best out there.
One of the nice thing about having an underlying structured representation of those texts is that I can also render them to e.g. Markdown[1].
I've experimented about generating the Markdown files corresponding to multiple versions (archives) of a given text and committing them to the same Git repository to be able to see diffs or blames[2].
I would like to assign the proper dates to each commit, but given there are texts in e.g. 1791, it's not possible.
0: https://refli.be/fr/lex 1: https://github.com/hypered/iterata-md 2: https://github.com/hypered/iterata-archive
This is something I'm very interested in for a different use case: model legislatures. The infrastructure and tooling for model congresses and parliaments is very limited: largely relegated to wikis and Google Docs. And that's fine, but it becomes a problem long term with tracking and archival.
We had a situation where our model parliament did not own the Google Doc for a particular treaty with another model legislature. It was changed out from under us, which is not ideal. But that brings into question ownership of Google Docs, and what happens if that person withdraws from the game.
Another issue is respecting and maintaining the creativity of those who play. People put a lot of effort into their bills with the fonts, formatting, layout, and imagery they use. It would be a shame to erase all that effort by converting it a bland wall of text a la markdown.
Markdown also has its issues: if the legislature removes an entry of an ordered list, how do you prevent markdown from renumbering the list? And the ways around this involve extending markdown, or using plaintext (eg: https://www.apache.org/licenses/LICENSE-2.0.txt)
Another solution could be QuillJS (https://quilljs.com/), which serialises into a JSON array of Deltas. However, this would make any kind of git-diff difficult to read. You'd need a custom differ, which is not impossible, but that may be a lot of work and may not be supported on git sites like Github.
Another issue is that, if you're using commits-as-enactments, then that probably means using the commit message (or notes) for the enactment's text. To what extent is that supported? As in, how long can commit messages be before it starts wreaking havoc on git clients? Will my Github tab or GitKraken client crash if I view the commit history? Could the commit message itself contain a serialised QuillJS document? What if that document contained a base64-encoded image?
I don't know if they are doing it, but I always thought that it should be easy for regular citizens to see the historical reasons why a law or regulation exists. Because there is sometimes a good reason why a regulation exists, but nobody knows it.
Edit : I see you're focus is on another thing completely. Share it, could be a great topic also.
For example in USA we would have budget ceiling crisis, and both parties try to ram through a law to bump up the debt ceiling "to prevent government shutdown". It is being sold as a measure to keep government afloat and running, and is usually ran through pre-holiday like Christmas.
But what actually happens, is thousands and thousands of pages of various pork is rammed through with various cutouts and carveouts for special interest groups due to lobbying.
Public needs to know who when and how is adding these lines and how is bipartisan consensus is being achieved in real-time, not post-factum.
This is a horrible idea in practice because everything that is public and open turns into a purity test.
You need people to be able to negotiate with each other in order for consensus to be established, and negotiations only work if the negotiators give up on something that they want to get something else. The moment you make this public all that you get is people turning negotiations into a way to generate soundbites and scared of doing any actual work because they'll just give ammunition to their opponents.
This is doubly bad in the US with the primary systems which makes legislators even more vulnerable to attacks from their flanks.
Legislators are not elected to be proxies for the voters, that's not how it's supposed to work. They're elected to use their judgement, that's why there usually aren't recall elections or restrictions on how they can vote etc.
As a matter of fact I'm of the opinion politics everywhere would be a lot better if plenaries, committees and hearings were not recorded or televised in the first place. I'm ok with minutes being made available but I'm convinced without being able to clip soundbites or tiktoks out of every meeting legislatures would be a lot more productive. Definitely more so than if we attached a camera crew to everyone in politics for "transparency"
At that point we might as well get rid of the press, as otherwise someone might be able to hold someone actually accountable to their actions and decisions. Taking the argument ad absurdum, might even go back to monarchy so we don't have to deal with informed (or quasi-informed) voters to begin with.
I get where you come from, that the public perception of politics is mostly soundbite-driven is indeed a huge issue, in my opinion probably one of the biggest issues of our century, as it allows absolute incompetence a democratic pathway to power by playing to human basic instincts and emotions.
But as long as we want to cling to democracy, the voters _must_ have a way of knowing who is doing what, who is involved in which decision, and what favors are being traded. How else is a voter supposed to make an informed choice?
EDIT: To address the soundbite-problem, I think systems that are more oriented towards consensus democracy (proportional elections, chance for referendums etc.) rather than competitive democracies (first past the post, majority takes all) are more stable against it. Election systems should favor choice of opinion rather than choice of persons, if that makes sense. I think especially the US (for context, I'm Swiss) would benefit a lot from such changes; right now it seems all outrage-driven.
Government and officials will fight to the teeth to avoid accountability and transparency because that's where the money and power is.
Alas, that sounds like a great idea in principle, but is probably a bad idea in practice.
Speeches in parliament (or on the senate floor, in the US) are already public. And that's a big reason those speeches are useless: they are just used as grandstanding to the general public.
The real work in finding compromises happens behind closed doors. That way you avoid producing sound bytes that can be used against you next election season. Especially from challengers in your own party, who could otherwise accuse you of being insufficiently pure.
This is what the press and various independent groups already do. They have people that pour through the stuff, as well as getting tips and press releases from congressional reps and third party interest groups. It's just that there's only so much they can cover, and most of the public can't be bothered to do more than turn on the evening news.
There's a lot of good, in-depth journalism out there. You just have to look a bit harder for it.
Like I get it, but English is fluid and is it really that far to make the assumptive leap from "git" to "github/lab/service", seems pretty clear what they meant (even if it's not completely/technically/um-actually correct because git != github).
(Okay there's also `git` in the URL, I noticed, which means whoever made the page had that mental mapping in mind but still...)
I just feel clickbaited that this item is at the top of this forum. I'll stop engaging with this now. Nothing of interest for me here.
What one usually need, is for example, to have cross-references, i.e. when a law contains phrase like "the certification is issued by a relevant authority", you want to have the "relevant authority" wrapped in a hyperlink pointing to an government order that designates that authority. Also, you typically want to have links to court cases related to some paragraph near it etc. If some change is planned to the law you want to have a note in the text like "this is going to change on September, 1", etc.
Given that many countries have local laws, you might want to be able to filter by a place.
Github might be used for storing raw documents as some weird kind of a database, but it is useless for actually trying to find out the answers to legal questions.
To make an analogy, reading laws on Github is like reading source code without syntax highlighting and navigation.
By default, git's diff and merge want lines-of-code to be meaningful and are set up for that.
Github is high quality, software engineering enablement platform
And git is letter management engine
This needs human curation to be useful.
Unfortunately I think those commits are the laws (depending on the country, of course, speaking for the cases I know). There isn't, except in a few cases, a notion of documents those commits are applied to -the commits are applied to previous commits. It doesn't make a difference functionally, but makes the system incredibly messy, hard to maintain and to navigate.
What similar resources are out there? Any favorites?
https://arstechnica.com/tech-policy/2018/11/how-i-changed-th...
They don't appear to publish the XML formats they're using.
There's no description of their fees/pricing.
None of the software is open-source. There's barely any details about how the software even works.
It's about as opaque as they seem to feel they can get away with. "Email us for pricing" is not how a service like that should work.
What's important in the story is that the law went from being not open to open and the law-publication-process was modernized internally. The fact that it ended up on GitHub was the least important, but most fun, outcome.
GitHub adds nothing of any value for the transparency and accountability of the lawmaking process (I mean, what lawmakers do), but it is a great platform for publishing structured data files for the law to create open access.
Aka a heatmap.
What happens when these get solved in a Stakkato timeframe shows the current US government which at this point even fails to fulfill basic needs of supermarkets. Proper laws/initiatives aren't created/fleshed out by actual politicians but by a whole army of employees of the related institutions.
Everything else is pure populism.
I wonder how easy it is to adopt this project to that?
https://xcential.com/blog/version-control-for-law-tracking-c...
And everybody should be able to submit improvements to the law.