I hadn't thought of using git to track the changes in legislation. This is a cool idea.
In Australia, I spent a bit of time trying to work out how to find which politician voted for what (both at state and federal level), so that when elections come, you can single out the individuals who voted for what legislation. I think AI may make this easier, but the challenge is in not spamming the "free and open" access to the online record of our legislation.
So far, it's probably a one-person $50K per year job to do this task manually, and the language of the public legislation record didn't lend itself easily to determining the laws or rights that actually changed when bills were passed into legislation. They are explicitly stated, but hard to distill with regexes, filters or other analysis tools (e.g. "Who voted to stop electric scooters going over 25km/h?") If you try reading the legislation, you will know what I mean.
"A complete and open record of the proceedings of our parliament" still needs people spend a good chunk of time interpreting and summarising it (e.g. the media, commentators, etc) which means it's a time-consuming hobby or a paid gig.
Wow! This is very cool. I had an idea for something very similar to this when I found out the US federal government offered API keys, maybe three or four years ago. I found that while Congress did list bill revisions as they were made the format and retrieval of these was not an easy task. The idea was that I wanted to look at any line of any bill and see who proposed it that particular line’s inclusion.
For the record, and feel free to steal it if you like it, I called it “G(overnm)it-blame”
The Hacker News Community (hah) needs to lobby hard to pass a law (what boostrapping!) to require the https://en.wikipedia.org/wiki/Office_of_the_Law_Revision_Cou... to maintain the repo as part of their duties, and do it retroactively for the entire history of the US Code.
It's a simple idea; it's cheap; there are no outstanding technical questions; it benefits almost everyone. Let's get this done.
The tl;dr is that doing git-style change-tracking of the legislation isn't as helpful in practice as you'd think (especially because a lot of the very basic change-tracking is already available in the existing tools that lawyers use!).
Cool idea but I can't find anywhere on the linked page to try it? It reads like a neat concept but it's not clear if this is a thing they've actually made or not (or am I just missing something super obvious?)
I'm not an expert in this domain but I'm aware there has been prior work to attempt this. I'd appreciate if someone knowledgeable could post some of that context.
I had this idea over 10 years ago but never finished it. I hope this takes off. I do fear it's not very practical for many big pieces of legislation which are often written in secret.
Likewise, a younger, more idealistic me thought it'd be great to use a GitHub-esque platform for laws. Pull Requests to suggest laws, gated behind reviews/approvals, branches so each house could work on their own versions before finally reconciling and merging into the Code, literally.
YES PLEASE, but I suspect it will degenerate into another paid service with 1000 tiers... I think you cannot access the US law without paying for it? odd... I will wait for claude law to appear and hope they share the torrent...
Unlike code, natural language laws have many exceptions and context dependencies, so trying to manage them cleanly with Git seems like it would be tough as data structuring costs and exception handling (hardcode-style responses) increase.
> natural language laws have many exceptions and context dependencies
The complexity is in common law, not natural-language laws.
The U.S. Code and Code of Federal Regulations can be completely presented through a Git-like system. The complexity comes in when attaching court cases.
If you've got a statute like "no vehicles in the park," the fundamental issue is that you have to interpret "what is meant by 'vehicle'?" and no legal drafting is going to be good enough to actually cover all the possible cases well enough. The main difference between a common law and a civil law system here is that in a common law system, you have to cite the previous similar cases (because precedent is binding) whereas in a civil law system, you're merely using those previous similar cases as persuasive evidence. At the end of the day, it boils down to arguing for your interpretation.
And in my experience working on language standardization (which is closer to a civil law system than a common law system), it's fairly often that I have to resort to looking up not just when a change in the text occurred, but dive deep into the discussions of the paper proposing the change to understand what the committee thought it was doing with the change. The complexity of law is fairly similar--the changes to the law themselves often require understanding the legislative and interpretative history of the law to understand what the intent of the drafter was to be able to rule on how the law is extended to an unanticipated scenario.
I see. The laws are completely different from my country, so this is very educational. My country uses civil law, but I see that is how it is under common law. Thank you very much.
Sounds neat, but not something a private company should be responsible for.
If transparency is the goal, the entire codebase for this should be public domain and not profitable. Otherwise there's a profit motive to rewrite history.
There's actually two kinds of changes here: changes to the law, and changes to your description of the-law-and-its-changes (metachanges). For example, if you make a mistake in recording a change to the law, you need to fix that (unlike eg a source repo where mistakes in a commit message are forever).
So to make this a git repo, I guess you'd make the snapshots be the law plus markup for all the changes, and the diffs are the metachanges. For each snapshot S, you could generate a git repo whose snapshots are the law and the whose diffs are the changes in the law (as described by S). However, this probably isn't the best way to query S.
Not really. It is arguing for version controlled legislation. So who’s responsible for what portions of literal laws and policy. I hope your "not clone-able" is in jest
That’s like saying that the code in a repo belongs to the whole team once a PR is merged, so it doesn’t make sense to track its provenance back to its original authors.
> so it doesn’t make sense to track its provenance back to its original authors
The legislative process is inherently collaborative in a way that's ordinarily undocumented. Who introduced an amendment and who supported it are entirely separate. Someone who introduced language can wind up not supporting it because of where the mix of trade-offs winds up.
At the level of a bill, knowing who wrote language matters. At the level of law, you should only care who voted for it. (I'm not even tackling the inherent subjectivity in tracing e.g. language in the CFR to specific language in a bill.)
In Australia, I spent a bit of time trying to work out how to find which politician voted for what (both at state and federal level), so that when elections come, you can single out the individuals who voted for what legislation. I think AI may make this easier, but the challenge is in not spamming the "free and open" access to the online record of our legislation.
So far, it's probably a one-person $50K per year job to do this task manually, and the language of the public legislation record didn't lend itself easily to determining the laws or rights that actually changed when bills were passed into legislation. They are explicitly stated, but hard to distill with regexes, filters or other analysis tools (e.g. "Who voted to stop electric scooters going over 25km/h?") If you try reading the legislation, you will know what I mean.
"A complete and open record of the proceedings of our parliament" still needs people spend a good chunk of time interpreting and summarising it (e.g. the media, commentators, etc) which means it's a time-consuming hobby or a paid gig.
French bills evolution versioned in git and visualized The Law Factory: french bills as git, opendata and dataviz https://www.lafabriquedelaloi.fr/
"Law is Code" on The Law Factory: french bills as git, opendata and dataviz - https://news.ycombinator.com/item?id=7817357 May 2014 (0 comments)
For the record, and feel free to steal it if you like it, I called it “G(overnm)it-blame”
It's a simple idea; it's cheap; there are no outstanding technical questions; it benefits almost everyone. Let's get this done.
I want to see a practical benefit to maintaining this with public funds versus the usual redlines.
The tl;dr is that doing git-style change-tracking of the legislation isn't as helpful in practice as you'd think (especially because a lot of the very basic change-tracking is already available in the existing tools that lawyers use!).
Version control for the public parts will make both public and secretive law-drafting better.
Thing which are public law should be publicly accessible.
There's an online portal for NEC code book, but they made it awful, no search, no hyper links, the bare minimum.
I used codex in computer mode to collect the relevant pages to my project. (Electricity to shed).
The complexity is in common law, not natural-language laws.
The U.S. Code and Code of Federal Regulations can be completely presented through a Git-like system. The complexity comes in when attaching court cases.
If you've got a statute like "no vehicles in the park," the fundamental issue is that you have to interpret "what is meant by 'vehicle'?" and no legal drafting is going to be good enough to actually cover all the possible cases well enough. The main difference between a common law and a civil law system here is that in a common law system, you have to cite the previous similar cases (because precedent is binding) whereas in a civil law system, you're merely using those previous similar cases as persuasive evidence. At the end of the day, it boils down to arguing for your interpretation.
And in my experience working on language standardization (which is closer to a civil law system than a common law system), it's fairly often that I have to resort to looking up not just when a change in the text occurred, but dive deep into the discussions of the paper proposing the change to understand what the committee thought it was doing with the change. The complexity of law is fairly similar--the changes to the law themselves often require understanding the legislative and interpretative history of the law to understand what the intent of the drafter was to be able to rule on how the law is extended to an unanticipated scenario.
If transparency is the goal, the entire codebase for this should be public domain and not profitable. Otherwise there's a profit motive to rewrite history.
So to make this a git repo, I guess you'd make the snapshots be the law plus markup for all the changes, and the diffs are the metachanges. For each snapshot S, you could generate a git repo whose snapshots are the law and the whose diffs are the changes in the law (as described by S). However, this probably isn't the best way to query S.
This makes sense for bills. It doesn't for laws. Once a bill is a law, it's the will of the Congress.
The legislative process is inherently collaborative in a way that's ordinarily undocumented. Who introduced an amendment and who supported it are entirely separate. Someone who introduced language can wind up not supporting it because of where the mix of trade-offs winds up.
At the level of a bill, knowing who wrote language matters. At the level of law, you should only care who voted for it. (I'm not even tackling the inherent subjectivity in tracing e.g. language in the CFR to specific language in a bill.)