"... Think of what version control software could mean for the Congress [...]. If bills were created under a system where strike-throughs and additions were carefully tracked, the public would know which legislator made which change to a proposed piece of legislation as it made its way through the Capitol.
At last, there would be transparency in the legislative process. Best-case scenario, it would shame legislators from inserting language against the public interest and only meant to reward political contributors; at worst, it would make such insertions public and allow the voters to punish the politicians who made them. ..."
(from https://www.nytimes.com/2007/07/23/business/media/23link.htm... )
I do think there are some Markdown-based open source projects that might fit the bill.
Insert language you know will never get enough votes
Don’t strike out but add language to make it useless
Plus the bill sponsor often makes changes others ask for, so the true author isn’t noted
It would be a mess and ignored by the public after a while
This is often especially cynical because [popular thing x] is often something that neither party wants to pass. So a very recent example of this was an act against insider trading by politicians, that was bundled with a voter id law. Neither side wants to clamp down on insider trading from politicians, so the entire act was DOA. It was nothing but bread and circuses.
Our problem is that the press isn’t doing their job, not that legislation doesn’t have a commit graph. The latter, even if it existed, would not fix the former.
However you are proposing that journalists as a homogenous group do some extra work. I think that's a great thing but I don't get why you say the press aren't doing their job when they are at an historical low of compensation and respect.
If sounds like you are outsourcing your rage at the legislature and the press and journalists are the problem?
Sticking to the FTA someone made a first step in version tracking legislative texts but you do not think they've done enough?
In the present day, mainstream journalists won't be meaningful advocates for democracy and the public interest any time soon. It's time to acknowledge that this idea is wishful thinking. The root cause is changes to the law like the Telecom Act of 1996 which allowed for the consolidation of old media under a few corporations.
For many years these mainstream journalists have been required to support corruption, cronyism, the centralization of power, and the increase of corporate power in order to retain their jobs. The law needs to be changed before they can become a net benefit to society again.
I'd actually argue that this is the wrong way around. Being able to git diff legislation is very good, but mainly for humans, who need tools to make work tractable.
An agent will use whatever interface is available, including no interference, won't give up due to the task being too onerous, and can be scaled by paying for more tokens. It could simply brute force diff the raw text, writing bespoke Python and regexes, etc.
LLMs make brute forcing intellect possible. It's humans who need finely crafted tools.
Well, it's practically impossible to get a person to do something when their paycheck depends on their not doing it.
The problem is, barely anyone is willing to pay the press for doing this job.
Outrage farming and clickbait make money, honest reporting does not.
Of course a tool itself doesn't solve the problem. You need somebody to use the tool. But the tool makes it easier to solve the problem.
You’d just got a system of favors for who inserts what language. You’d hand tough edits to your safe-seat colleagues and insert messaging amendments designed to get voted down for own comms.
When a measure becomes a target yada yada.
(Note: this proposal is for the U.S. code. Not bills. Git for the USC works.)
The House Office of the Legislative Counsel is non-partisan, impartial, and confidential. Whether transparency has merit or not, tracking provenance would make the office partisan. Is more partisanship in government not a concern?
The second issue with transparency is that communication between legislators and legislative counsel member is subject to the attorney-client relationship. Breaking attorney-client privilege is a serious decision. Knowing how such a change would affect the organization and its members is not something to be taken lightly.
A more convincing argument for transparency would address impartiality and confidentiality. This is pretty clearly a Chesterton's fence type situation where advocating to change a system should anticipate criticisms. Addressing opposition preemptively is an implicit demonstration of knowing why the system exists which is table stakes for changing it.
Tracking who added what language is in no way partisan.
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.
> I want to see a practical benefit to maintaining this with public funds versus the usual redlines.
The US government works for the people and, as such, changes made to the US Code over time must be traceable, discoverable, and therefore justifiable by or condemnable to those who are responsible for said changes without fear or favor.
That is as practical as it gets.
They are. The history of the USC is public. This is one way of visualizing it. It’s good. But I want to see the advantage of this presentation.
I don't want to privatize this core civic function to some NGO.
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)
Actual bills are written in the form of patches ("§1. In the law X paragraph 5, the words "such and such" are replaced with "this and that". §2. The law X paragraph 4 is striked. §3. After law X paragraph 8, a new paragraph 8a is added that says "etc. and so on".)
After a patch or a collection of patches are passed, they are combined together and a unified version of the law is published. These documents aren't technically the law, they just show a snapshot of what the law is at the specific moment.
ISAP system is an online collection of all bills that were passed, plus crosslinks between laws that change/supercede/otherwise interact with each other, plus current and archival unified versions, plus related administrative orders and other miscellanious documents. Makes looking up laws and changes to laws very easy.
Example page for the traffic code https://isap.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU19970...
First PDF is the original, second PDF is the unified version, then there's links - 4 others changed, 4 explicitly obsoleted, 12 implicitly obsolete, 707 administrative orders, 12 Constitutional Tribunal rulings, 11 previous + current unified versions, 212 patches, 14 relevant EU directives.
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.
> How does your MP vote on the issues that matter to you?
previously covered on hn:
That's an interesting project - I am guessing it's only targeting federal level, but could also include state level
The first problem I have in my mind is proxy votes, and votes that are made mandatory by the party they belong to - eg. a backbencher would struggle to go against the wishes of their party unless they felt it was worth risking their career over
> "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.
https://www.aph.gov.au/parliamentary_business/hansard and (linked from that page) https://www.aph.gov.au/Parliamentary_Business/Chamber_docume... would likely be good places to start
The idea is cool though.
As an aside, my city FB group(small town, basically the local forum and news) has been absolutely flooded with AI 'flyers', and I have the same reaction. I can't put my finger on the exact reason, maybe the busy-ness, but they're repelling to my eyes.
Luckily after about 6 months of this now they're starting to get heavy pushback.
Blew my mind when I realized I could do that.
Now major version coming within 1 month probably with many architectural changes. The thesis is that it's basically all doable as a compiler but there may be certain cases which are irreducibly ambiguous and need human/AI to adjudicate them. The rest must be deterministic.
it was built by academics deeply familiar with the security and usability of git and secure tools.
Version control for the public parts will make both public and secretive law-drafting better.
If you have a problem with your representative’s behavior, call their office and ask about it. They will certainly have a reason. Tell them if you disagree, and vote when you can.
Only if those bold reforms weren't in the interests of the people they serve. Risky bipartisan compromises should still be transparent along with what was gained in exchange for them. If the people feel that the compromise wasn't worth it they should be empowered to vote accordingly come election time. It's the job of representatives to assure the people who elected them that they are doing a good job and if they can't do that they deserve to lose their position. Refusing to support bold reforms that the people they represent want, or refusing to compromise when it would be beneficial to voters would become just as costly to their career.
> It takes significant work to produce successful legislation, and much of that work can be productively and safely done without direct public oversight.
Often most of that work is done entirely for them by corporations and lobbying groups and "law makers" just vote how they are paid to vote without even reading the bill put before them. Just because something can be done in secrecy doesn't make that the ideal way to do it. We've have extremely poor results with the system as it stands right now, so a change to introduce more transparency and accountability seems like a very good idea.
> This is the same reason an individual might value a private journal.
A public servant representing the people by making edits to laws and performing the duties they were elected to carry out is nothing at all like someone keeping a private journal. Their work is not their personal affairs, it is the public's affairs. How that work is being done matters to the public. Legislators would still remain free to go home at the end of the day and write in their private diary all they like.
> If you have a problem with your representative’s behavior, call their office and ask about it.
When their behavior is conducted in secrecy behind closed doors the public doesn't have the ability to hold them accountable for it, which is exactly why it takes place in secrecy. Increasing the public's ability to hold elected officials accountable by increasing transparency can only improve outcomes for voters, and it would certainty be inconvenient for elected officials who want to put their own interests above the interests of the people who elected them.
A surprising amount of tracking and diffing in legal texts is actually very different to git. It's a trap to assume software version control fits the needs for legal work.
For the record, and feel free to steal it if you like it, I called it “G(overnm)it-blame”
I thought legal document versioning software would cover some of these problems but it doesn't seem like a similar enough process.
I'm not saying lawyers aren't really really expensive, but you don't have to spend a long time digging into just a simple question like "what parts of the law are no longer enforceable after a supreme court decision" before you start to understand why they charge the prices they do.
Someone set it up for Philly and Baltimore too, but I can't seem to find it.
Does it already exist?
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).
Also, because how the judicial branch decides case law needs to be reviewable by the People, so that we can inform the various legislatures to adjust the law if the judicial system is not ruling to the will of the People.
In the interpretation of the law, yes, but that doesn't matter for version controlling the text of the law, and in that sense, you can absolutely manage the text pretty cleanly in git. Most laws are just text. Many bills are literal git-diffs, except in prose, which can make it hard to understand a bill.
> exception handling (hardcode-style responses)
This is basically non-sequitur (there no such thing as a "hardcode-style response" in git…), and again, I think you're misunderstanding the idea here.
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 you want to know the literal text (that may or may not be enforceable), then sure a plain text diff is sufficient to know that nothing at all has changed about federal communication laws since this section was last amended in 2002. But if you want to know what the actual law is, you definitely need more than just a text diff.
That seems like a great way to turn functional legislation into swiss cheese as one line at a time things are either kept or removed based on chance/circumstance and the whims of the current people in power.
Laws are collectively voted for as a complete package, and a law that worked and was passed as being acceptable can become useless, dangerous, and undesirable with a very small number of lines removed from them. I want lawmakers to spend their time focused on the entirety of a bill. Your idea would result in them fighting over who should or shouldn't be recorded as the official author of each and every line. We don't need nonsense like "Senator X will retire soon so Senator Y should author it!", or "I'll agree to author line 405 if you agree to author line 30!"
Your idea, like so many ideas where laws just fade away unless something happens to keep them, also sounds like a great way for you to lose longstanding freedoms and protections that should never be at risk of simply deprecating just because some one gets voted out or dies or retires.
The intent of a law should be clear from the text. It isn't always, but at least now it's possible. To have the intent of a law, or even worse the intent of specific lines within a law, subject to change at any time would make interrupting that law and establishing precedent a nightmare for the courts.
We really should have a system in place to help clear out old and unnecessary laws on the books, but this would be a terrible way to accomplish that.
https://news.ycombinator.com/item?id=47625366 - United States Code (federal laws) in Git (2026-04-03, 15 comments)
https://news.ycombinator.com/item?id=47621591 - Every Law a Commit – US Law in GitHub (2026-04-02, 32 comments)
I think it's parsing this data:
https://uscode.house.gov/download.html
Which was discussed here:
https://news.ycombinator.com/item?id=6135504 - The entire US Code is now online in XML (2013-07-31, 237 comments)
Why would one need a trustless distributed system to store document deltas published by an inherently trusted entity (federal government)?
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!).
Agentically this could be done now, but it would still just be the tip of the iceberg
You're looking at quantum states of law and regulations, and that's just for one jurisdiction
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.)
even then you have three-line whips and numerous reasons to vote for / against things that are wrapped up in party politics and other stupid games
once something is passed; the intent of the writer, the intent of those that voted for it and the meaning of the words in the final legislation can all be wildly different.
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.