Top
Best
New

Posted by alansaber 6 hours ago

Git for the US Code(lexifina.com)
211 points | 109 comments
kfogel 3 hours ago|
NYT, 2007:

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

jonahhorowitz 2 hours ago||
I've always wanted this. It's such an obvious idea when you're a software engineer.
sixdimensional 2 hours ago|||
Same. What I would like to see is Git for non-technical users, built as a public platform that is open source, hosting this.

I do think there are some Markdown-based open source projects that might fit the bill.

unsnap_biceps 1 hour ago|||
Wouldn't a wiki basically be exactly that?
p-e-w 1 hour ago|||
There are a million frontends designed to simplify Git for non-programmers. In fact, lots of office software now has version management built-in. Very few people use it. This isn’t a technology problem.
refurb 1 hour ago||||
The system would be gamed by the politicians.

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

somenameforme 6 minutes ago|||
This is already regularly done. One side or the other will propose or amend a bill that they claim does [popular thing x] and then add in some clause that they know will get voted against, so they can then claim that [other side] voted against [popular thing x].

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.

DavidSchor 24 minutes ago||||
But there would be a papertrail that can be revisited. And journalists can access to keep people informed of systemic or major issues.
xmprt 8 minutes ago||
There already is a papertrail. It's just that it's extremely convoluted to navigate. This isn't a technology problem.
3form 35 minutes ago||||
Every system gets gamed, and so is the current one. The goal is that the people can more easily stay informed. Even with mixed authors problem you highlight would be still an improvement.
lopis 52 minutes ago|||
Git does allow multiple contributors on each commit. Of course people can lie, but it's a matter of policy in the end. Make it a crime to not add all contributors to a diff.
p-e-w 1 hour ago||||
We don’t need version control for legislative bills. We need journalists that track down who tried to insert what, summarize it, and present it to the public with context. That would satisfy the oversight purpose without getting lost in technicalities.

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.

aspect0545 1 hour ago|||
Why not both. I'm sure that more visibility would result in more requests for press inquiries.
msdz 1 hour ago||
Exactly, it’d make the press’ work easier, and maybe enable more people or entities to look into this topic over all, too.
safety1st 55 minutes ago||||
We need that too, but the ability to git diff changes to the law is a great win for democracy and transparency in 2026 because git is an interface that agents are experts at using. If you're a journalist, activist or anybody else doing the type of research you just described this makes it faster and easier.

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.

bahmboo 1 hour ago||||
I am confused. Someone put in place a system that would allow journalists or citizens to meaningfully engage with the law in a much better way than they can now.

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?

callmeal 1 hour ago||||
>Our problem is that the press isn’t doing their job ...

Well, it's practically impossible to get a person to do something when their paycheck depends on their not doing it.

faangguyindia 1 hour ago||||
Until journalists can be paid under the table to mislead the public, the problem will persist. Almost anyone can be bought on a Friday night for the price of a few drinks and benefits.
mschuster91 46 minutes ago||||
> Our problem is that the press isn’t doing their job

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.

teiferer 1 hour ago|||
A revision control system is a tool the journalists could use to achieve this. Commits to the 'enacted' branch could have commit messges documenting the context (when, how, why, who). Unmerged branches could represent proposed but ultimately rejected (or still in progress) changes with the same amount of meta data.

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.

lily121 2 hours ago|||
[dead]
JumpCrisscross 2 hours ago|||
> it would shame legislators from inserting language against the public interest and only meant to reward political contributors

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

citizenpaul 1 hour ago|||
99% of the legislation changes are made by 20 something interns, on behalf of someone.
Henchman21 1 hour ago||
Indeed, both the name of the intern and the attribution on behalf-of should be required in the signed commit.
kelseyfrog 2 hours ago||
Such a requirement would not do what you think it would. There would not be names legislator or even aids as commit authors. The commit authors would be members of the House Office of the Legislative Counsel[1].

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.

1. https://legcounsel.house.gov/

zoobab 1 hour ago||
The authors are lobbyists of big corporations nowadays.
Ericson2314 4 hours ago||
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.

JumpCrisscross 4 hours ago||
> it benefits almost everyone

I want to see a practical benefit to maintaining this with public funds versus the usual redlines.

AdieuToLogic 2 hours ago||
>> 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.

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

JumpCrisscross 2 hours ago||
> changes made to the US Code over time must be traceable, discoverable

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.

danielmarkbruce 4 hours ago||
why not just do it?
Ericson2314 3 hours ago||
Because I have want my government to use the right tool for the job.

I don't want to privatize this core civic function to some NGO.

danielmarkbruce 1 hour ago||
It sounds lazy tbh. No one said privatize. It can be open source can't it?
ekns 26 minutes ago||
I'm doing this as open source for all amendment-driven law for the world. Finnish/Estonian law basically solved now but US/UK are a lot more complex to do correctly for some reason.

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.

https://github.com/eliask/lawvm

TomAbel 5 hours ago||
Reminds me of a similar project for french law

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)

Xirdus 2 hours ago||
Poland has an official, somewhat manual version of this - the ISAP system.

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.

sam_lowry_ 1 hour ago||
It's the European law, inspired mostly by French, IIRC. Belgium has the same, for instance.
Xirdus 1 hour ago||
I mostly meant the web app. Forgot to link it. https://isap.sejm.gov.pl/isap.nsf/home.xsp Unfortunately it's only in Polish.

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.

LelouBil 1 hour ago||
And the officially maintained website (that only tracks the final law changes instead of the whole process): https://www.legifrance.gouv.fr/
verytrivial 16 minutes ago||
"TeraText for Legislation"[1] has done this, specifically point in time reconstruction per amendments, for a couple of decades.

It uses a very 90s set of technologies, esp. XML, and is the golden source for legislation is a number of places around the world.

It is/was a very consulant-driven product and tightly coupled to a "secret sauce" database backend that no one really wants to use, but still, kind of cool.

[1] https://www.leidos.com/products/teratext

pcblues 4 hours ago||
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.

kneyed 3 hours ago||
https://theyvoteforyou.org.au/

> How does your MP vote on the issues that matter to you?

previously covered on hn:

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

chrysoprace 3 hours ago|||
https://theyvoteforyou.org.au/ is a good resource at a federal level, but I don't know of a state or local equivalent.
awesome_dude 3 hours ago||
> 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.

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

demibabs 2 hours ago||
When I read AI-generated text, my eyes just start glazing over… it really is hard to read.

The idea is cool though.

silisili 2 hours ago||
Same. I don't know if it's the word choices or just me recognizing it as AI and subconsciously feeling cheated.

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.

mrinf1nity 2 hours ago||
My brain instantly turns off from reading it too, you're not the only one.
holtwick 49 minutes ago||
German Constitution "Grundgesetz" on Github with proper time stamps https://github.com/c3e/grundgesetz
aizk 3 hours ago||
If you're like me and also eager for cool uses for git, I'll share a cool one I use -- try out git for your resume! Commits change as you progress in life, and make branches for individually tailored resumes.

Blew my mind when I realized I could do that.

scronkfinkle 1 hour ago|
I've been working on this problem for several months now: https://www.wordstodata.com/

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.

More comments...