Top
Best
New

Posted by alansaber 6 hours ago

Git for the US Code(lexifina.com)
211 points | 109 commentspage 2
cco 1 hour ago|
Given that chicken scratch in the margins gets into bills that are voted upon, it seems unlikely that this would be accepted by Congress. Love it though.
burnJS 5 hours ago||
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.
Ericson2314 5 hours ago||
Don't worry about that. Even if we only saw voted-upon revisions in the Git history, it will still be a huge improvement.

Version control for the public parts will make both public and secretive law-drafting better.

SoftTalker 5 hours ago|||
Why should any bit of the lawmaking process be secret?
dizzant 3 hours ago||
Transparency has a cost. There are several good reasons, but my favorite is intellectual freedom. Policy makers would be much less likely to explore bold reforms or risky bipartisan compromises if their draft quality notes and correspondences were publicly tied to their political reputation. It takes significant work to produce successful legislation, and much of that work can be productively and safely done without direct public oversight. This is the same reason an individual might value a private journal.

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.

autoexec 3 hours ago||
> Policy makers would be much less likely to explore bold reforms or risky bipartisan compromises if their draft quality notes and correspondences were publicly tied to their political reputation.

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.

EddieRingle 5 hours ago||
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.
barrrrald 5 hours ago||
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?)
timwis 2 hours ago||
DC did this years ago, too: https://github.com/DCCouncil/law-xml

Someone set it up for Philly and Baltimore too, but I can't seem to find it.

LPisGood 5 hours ago||
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”

BrokenCogs 4 hours ago|
Maybe at this point we should just git revert
zoobab 1 hour ago||
I proposed Git and Markdown instead of XML for EU law making in the European Parliament, they went with their own custom web editor to manupilate XML. And failed.
mushufasa 6 hours ago||
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.
tpmoney 4 hours ago||
Something akin to this is a big part of the products that companies like LexisNexis or Thompson Reuters charge your lawyers a whole lot of money for. Because for a lot of legal questions, you don't just need to know what the law says now, but what it said at the time of the incident in question. And every legislative body around the country (at least at the time I was working in this space a decade ago) publishes legislative changes in completely different and often times not easily parsable forms. Web scraping and PDF scraping was far more common than you'd think. Some state legislatures published changes in more reasonable forms, and some states contract their official legislative compilation to companies like LexisNexis or Thompson Reuters and work to publish an actual change stream with proper standardized references. There's a lot of manual work that goes into making stuff like this work, a lot of lawyers and other legal professionals manually reviewing that the right pieces were removed or added in the right places, matching up references to parts of the law that might have changed between the time the legislation was passed and the time the change was published and figuring out what order everything actually goes in. And the actual text of the law is only part of the equation. Legal decisions from courts can dramatically impact the reading of the law, or effect effectively strike laws from the books (even if the laws are technically still on the books, just not enforceable). So often the right way to represent a diff of two points in time depends on the question you're trying to answer.
lazyasciiart 3 hours ago||
I wanted to do something like this for a single section in Washington law, to show why a particular funding restriction had been added, but was no longer achieving the intended goal. Git alone wasn't enough of a UI, because the 'why' was only in the introductory text of the bill that changed the law, and not in the law itself - and then there was the move of that article to a different section, and a re-numbering of sections, and a change in definition in a different section that affected the scope of this one... fascinating stuff!

I thought legal document versioning software would cover some of these problems but it doesn't seem like a similar enough process.

tpmoney 3 hours ago||
Following renumbers has to be one of the worst parts of this. As an example, the text of the US code that was modified by the BCRA in 2002 has been renumbered / moved since Citizens United v FEC was decided. But the text itself is the same as it was since the BCRA passed, because courts don't remove the actual law text with their decisions. So if you want to know what parts of the current US code were ruled unconstitutional by the courts in that decision and are therefore unenforceable, you need to first find the text of the BCRA, because the ruling refers to the sections of that piece of legislation. Then you need to find the version of the US code that was on the books when the BCRA was passed to find the section references that the law talks about. Then you need to find the law that renumbered that part of the US Code and find the new parts. Then you need to see if any changes have been applied since (there hasn't really) and then you need to match the changes to the referenced sections in the old version of the code to the equivalent text in the current version of the code, modulo any changes to references that changed as part of the renumbering but are otherwise the same.

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.

tdhz77 5 hours ago||
You are correct the library of congress and the gpo do this.
nico 4 hours ago||
I love this, and I feel every legal document (of which there are many, for example, a random one: insurance companies' policies) should have something like this (and no, Word is not good for it)

Does it already exist?

xlayn 5 hours ago||
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...
Matticus_Rex 5 hours ago|
Legislation you can generally access for free. Case law you often cannot.
macintux 5 hours ago|||
Electrical & building codes are also paywalled, IIRC.
kooi 5 hours ago||
Its outrageous.

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

iAMkenough 5 hours ago|||
Should that change? In my opinion, in the age of AI, both should be generally accessible for free.
deathanatos 4 hours ago|||
Yes, it should absolutely change (both should be freely available), since ignorance of the law is not a defense, and case law is law (here, in the US, since we're a common law country). But the flip side of that is that the law has to be knowable, if ignorance is not a defense, or you're just going "lol too bad for you for not knowing the secret law".

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.

autoexec 2 hours ago|||
Even without AI it should be. Honestly the less AI has to do with giving people access to our laws and court records the better since the value of having that access would decline with hallucinated laws/interpretations/attribution. A post about how AI isn't even fit to write wikipedia articles just fell off the front page a few hours ago, and providing something like this to the public seems at least as important.
7kago_yomi 5 hours ago|
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.
deathanatos 4 hours ago||
> Unlike code, natural language laws have many exceptions and context dependencies,

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.

JumpCrisscross 5 hours ago|||
> 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.

jcranmer 5 hours ago|||
Nah, it's pretty damn common in any legal system.

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.

thenewnewguy 4 hours ago||
Yeah but none of this matters for the "git for legislation" idea right? The point here is to record the history of the text of the laws, not their meaning.
tpmoney 3 hours ago||
It depends on the question you're trying to answer. The text of the US law which Citizen's United struck down remains on the books today (though has changed since it was moved to a different part of the code, so references have been updated), but the actual effective law has most certainly changed from when it was written to now. Since courts can't write or modify the law, the literal text remains, even if some of that text is effectively stricken as if the text had been removed.

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.

beau_g 3 hours ago||
See my response to the parent, but git blame solves the issue of "what did they mean" because the person (if alive) can just be asked. The same way git blame is used all the time to ask why a programmer did something some certain way, there's more to code too than just how exactly does it compile/execute. The higher level idea should be to stop legislation seemingly written by nobody, that nobody wants to answer for, but is used to make important decision about lives and livelihoods. Having courts needed to interpret verbiage that was written by living people is completely preposterous. If it's written by dead people, sure, that's a harder problem.
7kago_yomi 5 hours ago|||
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.
beau_g 3 hours ago||
This brings us to my even more unlikely idea - when whoever wrote that line in the legislation dies or retires, the line enters a short review period where it's either renewed with a new author on the line to speak to it or is deprecated. This way someone would always be there to just answer for the intent. Also would help garbage collect legislation that is no longer useful.
autoexec 2 hours ago||
> when whoever wrote that line in the legislation dies or retires, the line enters a short review period where it's either renewed with a new author on the line to speak to it or is deprecated.

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.

More comments...