What Git Can Reveal About the US Code's History


Reading a federal statute today is usually straightforward: find the section and read its current text. Reading the same section as it applied to an event years ago is a different task. The answer may depend on a later amendment, an effective-date note, or an Act that reaches back to pending cases. The current wording alone cannot tell that story.

Lexifina’s Git for the US Code tries to make that history inspectable. It places statutory text in a Git repository and represents changes as commits tied to the laws that made them. A reader can choose a date, compare versions, and trace words back to an Act. The work currently covers nine titles, not the entire United States Code, and its authors publish the reconstruction checks and known gaps alongside the data.

This is a useful experiment because law has the same question that Git answers for software: what did this file say at a particular point, and which change put these words here? Law adds a harder question: which version governs a particular set of facts? A timestamped text history helps, but it cannot settle that question by itself.

The Office of the Law Revision Counsel organizes the general and permanent laws of the United States by subject in 54 titles. It publishes current and prior release points, each current through a specified public law. A section includes source credits, amendment notes, and, where needed, effective-date notes. Those notes are part of the route back to the law Congress enacted.

There is also an authority distinction. Congress has enacted some titles as positive law, making their Code text legal evidence of the law. Other titles are editorial compilations and are prima facie evidence; the underlying Statutes at Large control if they differ. A versioning tool cannot erase this distinction. It has to preserve the source of each change and let a reader reach the enacted text.

For a historical question, three dates may matter:

  1. Enactment: when a public law was signed or otherwise became law.
  2. Effective date: when a particular amendment took force. This may be enactment day, a later date, or a date set by another condition.
  3. Fact or case date: the moment the user’s question concerns. A later law can sometimes reach back to that date.

The Code’s official release point adds a fourth timestamp: when the compiled text was published. A release point is a valuable check, but publication time is not necessarily the date a rule first applied.

Four cards distinguishing enactment, effective date, case date, and publication of a Code release point.
Version history needs legal effective dates as well as publication dates.

The bankruptcy threshold makes the difference concrete

Lexifina uses the small-business debtor definition in 11 U.S.C. § 1182(1) as its example. The Small Business Reorganization Act of 2019 created the framework. The CARES Act raised the relevant debt ceiling to $7.5 million in March 2020, temporarily. Congress extended that increase, then let it lapse in March 2022. A June 2022 Act restored the higher ceiling for another period and applied it to qualifying cases commenced on or after March 27, 2020 that were still pending. The temporary increase expired again in June 2024. After the 2025 triennial adjustment, the US Trustee Program lists the threshold as $3,424,000.

Suppose a case began in May 2022. The Code release point available that month reflected the lower ceiling during the gap. The June Act then reached back to certain still-pending cases. A tool that simply asks “what did the Code print on May 1?” returns a historically accurate snapshot of the printed text, yet may give an incomplete answer to “what rule ultimately applied to this case?”

That distinction is the project’s most instructive limit. The repository records a later law’s reach back in commit information, but the project says its date-specific text view does not yet rewrite earlier snapshots to show retroactive application. It also warns that unusual effective-date language can fall back to enactment date when the pattern reader does not recognize it. The original Act remains the final place to check a consequential answer.

Turning amendments into commits

The source material is not a sequence of ready-made Git patches. Congress writes amending instructions: replace a phrase, insert a paragraph, strike a subsection, or change a cross-reference. Lexifina starts with an older official Code release point, applies intervening public laws in date order, and compares the result with the next official release point.

The authors report 365 changes across nine titles in the checked 2017-onward release-point pairs. Their reconstruction matched the next release point exactly for 361 changes; the other four carry labels describing how far they could be confirmed. For change timing, they classify 261 as effective on enactment by default, 72 by an effective-date note, and 29 by a date in the amendment itself. They leave one change dependent on an agency determination out of the text rather than assign it a guessed date. These are the authors’ published validation results, not an independent audit of every legal edge case.

Official release point and intervening public laws feed an amendment replay, which is compared with the next official release point before a dated Git commit is published.
Replaying an Act is useful only when the resulting text can be checked against an official release point.

The resulting Git history has a natural division of labor. Each jurisdiction’s law is kept in its own repository; the global-law repository pins these corpora as submodules and interleaves their changes by in-force date. A commit identifies the Act behind a change. Git can then show a section at a given commit, display a diff between two moments, or use blame to attribute a changed line.

Line blame is coarse when a paragraph changes by a few words: it credits the whole line to its latest edit. The project’s law.py words command compares successive versions at word level for finer attribution. Its manifest states each corpus’s coverage and whether its history comes from dated official versions, replayed amendments, or only a current snapshot. That metadata matters as much as a polished interface: a missing file can mean the provision was absent, or merely that the dataset has not reached that date.

The project also offers read-only tools for asking date-specific questions through an MCP server. A model can retrieve a provision, compare two dates, or find an amendment. The tool reports where its record starts and ends. The legal analysis still needs to test the facts against effective dates, exceptions, and the original legislation.

Why retrieval needs a date filter

A language model can quote a current statute accurately and still answer a historical question incorrectly. It may use a rule learned before an amendment or prefer a recent provision when an older version governs. A 2026 study of German statutory questions identifies both failure modes and finds that retrieval improves results when it filters for temporal validity. Simply searching the web produces unstable gains for historically anchored questions.

Nor is asking a model to reconstruct the old law from amending instructions a safe shortcut. In a separate consolidation study, generated text was 93–99% similar to reference text, but exact matches reached only 50.3% for individual amendments and 20.51% for chains. A tiny textual difference can change the legal meaning. Lexifina’s replay-and-compare approach treats exact text as a testable artifact instead of relying on plausible prose.

A date-filtered repository gives a research assistant a better starting point: retrieve the provision from the relevant period, carry its source Act and coverage boundaries into the answer, and show the diff that explains how it changed. It does not remove the need to check retroactivity or whether the Code text has the evidentiary status the question requires.

What the history can and cannot promise

The central gain is traceability. A section becomes a sequence of attributable edits rather than a present-day page with amendment notes that the reader must mentally replay. Date views, word-level attribution, and links back to public laws make it easier to inspect an answer and spot the moment a rule changed.

The present dataset is narrower than the ambition. Its US corpus covers nine titles; effective-date parsing has known fallbacks; and a later retroactive law is not yet reflected in an earlier date view. Official release points and currency information remain essential for checking coverage. For any important legal question, the enacted law and its applicability terms still decide the result.

That is the right way to read this project: as a transparent, reproducible historical layer over official sources. Git gives legislation useful tools for diffing and provenance. The hard part is still legal time—knowing exactly when a text took force and whom a later change reaches.

100%