WADA-DEV(7) $ /en/blog/houritsu-guide-without-git/

NAME

houritsu-guide-without-git — Reading Japanese Law Amendments in houritsu Without Knowing Git

SYNOPSIS

houritsu turns every Japanese law into git history. This is how to read it with nothing but the GitHub web UI: the diff of one amending law, every amendment to a law, amendments not yet in force, and how to ask for what the UI cannot show.

DESCRIPTION

houritsu is every Japanese law as a git repository, with one commit per amending law (how I built it). This post is a guide for people who don’t use git: how to read it in the GitHub web UI alone. No install, no login.

I built it purely out of my own curiosity and never thought about who would use it. But more people looked at it than I expected, including a certified public accountant and a former judge. People like that probably don’t use git, so I thought a how-to would help.

The screens are GitHub’s as of 2026-11-05. The example law is the Act on the Protection of Personal Information (個人情報保護法). I took the screenshots logged in to my own account, so they show a Settings tab and edit buttons that other people won’t see.

Start here: what one amending law changed

This is the one thing I most want you to try. When Mado no Mori (窓の杜) covered houritsu, this was the part that landed.

1. Open a law’s file

The Act on the Protection of Personal Information is laws/act/415/415AC0000000057.md. How to find other laws comes later.

The Act on the Protection of Personal Information opened in houritsu on GitHub. A table at the top lists the law number, title and short title; History is at the top right, with Raw and download buttons below it A law’s file. Press History at the top right

The table at the top is the law’s metadata; the text of the law follows.

2. Press History

The amending laws that touched this law are listed, newest enforcement date first.

The History of the Act on the Protection of Personal Information: the act implementing the Disaster Management Agency Establishment Act on 2026-11-02, the Science Council of Japan Act on 2026-10-01, the amendment to the Act on the Protection of Personal Information on 2026-07-17, and more History. The date is the enforcement date; the title is the amending law’s name

3. Click an amending law

Here I open “日本学術会議法 施行” (the Science Council of Japan Act coming into force) on 2026-10-01. The top half is the commit message: the amending law’s number, its promulgation and enforcement dates, and the laws it rewrote.

The commit for the Science Council of Japan Act: amending law 令和七年法律第七十号, promulgated 2025-06-18, enforced 2026-10-01, and the 14 laws it changed, including the National Public Service Act, the Income Tax Act and the Act on the Protection of Personal Information The commit message. This one amending law rewrote 14 laws

The list ends like this:

Amendment-Law-Id: 507AC0000000070
Enforced: 2026-10-01
Bill: 閣法 第217回国会 第36号
Bill-Submitter: 内閣
Bill-Url: https://www.shugiin.go.jp/internet/itdb_gian.nsf/html/gian/honbun/g21709036.htm

Bill-Url is the bill’s page on the House of Representatives site, where the bill’s stated reasons are.

4. Scroll down to the diff

Each rewritten law gets its own diff. Red is before the amendment, green after.

The diff of the National Public Service Act. On the red left side, item 12-2, members of the Science Council of Japan, is deleted, with nothing on the right Item 12-2, members of the Science Council of Japan, leaves the National Public Service Act

The Science Council of Japan became a corporation instead of a state body, so it seems its members are no longer special-service national public employees. In the diff of the Act on the Protection of Personal Information, the Council was added as a line in a schedule.

When articles are renumbered, a deletion and its addition can appear far apart. Then look for the same sentence on both sides.

Don’t bookmark or share a commit page’s URL; I explain why below. To point someone at a law, send the file’s URL or its History URL.

What a law got swept up in

The History list is worth reading on its own.

What surprised me most when I built this was how many laws get rewritten as a side effect of amendments to other laws, whether or not those should be called amendments. The History of the Act on the Protection of Personal Information lists 30 amending laws, and only 8 have 個人情報 (personal information) in their titles. The rest rewrote it along with the Science Council of Japan Act, the Disaster Management Agency, the Financial Instruments and Exchange Act, the Code of Civil Procedure, the Penal Code, the Basic Act on the Formation of a Digital Society and others.

You can narrow it by date. Pick a range under “All time” at the top right of History, or add ?since=2020-01-01&until=2020-12-31 to the URL to see only the amendments enforced in 2020.

https://github.com/Kohei-Wada/houritsu/commits/main/laws/act/415/415AC0000000057.md?since=2020-01-01&until=2020-12-31

The <> button at the right end of each row (View code at this point) opens the law’s text as of that amendment. To read the text on some past day, press <> on the newest row before that day.

Amendments not yet in force

Amendments that are promulgated but not yet in force are on a branch called upcoming. Press main at the top left of the file’s page and switch to upcoming.

A file&#x27;s page with the main button pressed. The Switch branches/tags list shows main and upcoming Press main and choose upcoming

Then press History. For the Act on the Protection of Personal Information, amendments come into force on 2027-04-16, 2028-07-16 and 2028-12-23. An amendment whose enforcement date is not fixed yet sits at the top, dated 2117-12-31, the placeholder e-Gov uses.

Which amending law last changed each line

Press “Blame” on the file’s page, and each line shows on its left the amending law that last rewrote it.

Blame of the Act on the Protection of Personal Information. Next to each line of Articles 1 and 2 are amending law names such as デジタル社会の形成を図るため… and 個人情報の保護に関する法律及び行…, with 4 years ago or 9 years ago Blame. The left column is the amending law that last rewrote the line

This is not when the wording was born. houritsu’s history starts around 2015, so text older than that all sits in the law’s oldest commit. Read it as “there by then”. “4 years ago” counts from the commit date, which is the enforcement date.

Comparing any two dates, following one article

The GitHub UI can’t do these. GitHub has a page for comparing two points in time, but in houritsu it mixes in the changes to every law, and even half a year was too big to show.

I just have AI type the git commands for me. Ask what you want to know. Have ChatGPT or similar do it first, and if you don’t trust it, check it mechanically with git.

There are two ways to ask an AI:

  • For one law, save its markdown with the download button next to “Raw” on the file’s page, hand it over, and ask. The Act on the Protection of Personal Information is about 100,000 characters.
  • With an AI that runs commands on your machine, such as Claude Code or Codex, clone houritsu and ask in that folder: “What changed in the Act on the Protection of Personal Information since 2020?”

When I asked Claude Code the latter, it listed the 2020 amendment, the 2021 digital society act and the 2026 amendment, with enforcement dates. But it didn’t look at the upcoming branch, though the main part of the 2026 amendment is not in force yet, and said it couldn’t tell what that part changes. Check an AI’s answer against the text and the Official Gazette.

For those who want to check with git, these are the commands I checked:

git clone --filter=blob:none https://github.com/Kohei-Wada/houritsu.git
cd houritsu
f=laws/act/415/415AC0000000057.md
# The diff between 2020-01-01 and now
git diff $(git rev-list -1 --before=2020-01-01 main -- $f) main -- $f
# How Article 16 alone changed
git log -L '/^##* *第十六条/,/^##* *第十七条/:'$f
# Find a law by its short title
git grep -l '^abbrev: "個人情報保護法"' -- laws

Finding a law

File names are e-Gov law IDs. Open a law on e-Gov Law Search and the URL ends in an ID such as 415AC0000000057. houritsu keeps it at laws/<law type>/<first 3 characters of the ID>/<ID>.md, and the type for Acts is act.

If you are logged in to GitHub, you can also search for a law’s title in the repository’s search box. Code search does not work without logging in.

Why commit URLs change every day

e-Gov often rewrites past versions of laws. houritsu takes in e-Gov every morning, so when e-Gov fixes an old version, every commit after it is rebuilt and gets a new ID (hash). Right now that happens almost every day.

I did wonder about changing past posts after the fact. That makes it hard to use.

So I made it possible to check that a rebuild did not rewrite the text. I figured a guarantee that the text is unchanged would be enough.

The check is houritsu-builder’s verify. It refetches today’s text from e-Gov, converts it the same way houritsu does, and compares it with the file byte for byte. It needs a Rust build, so, as with git, asking an AI is probably the quickest way.

git clone https://github.com/Kohei-Wada/houritsu-builder.git
cd houritsu-builder
cargo build --release
# in your clone of houritsu
cd ../houritsu
../houritsu-builder/target/release/houritsu-builder verify laws/act/415/415AC0000000057.md

On the Act on the Protection of Personal Information, it printed:

OK laws/act/415/415AC0000000057.md

Pass a past point as --revision, in the form of the frontmatter’s revision_id, and it checks that point’s commit. The text as of the amendment enforced on 2020-12-12 was OK too (the end is that commit’s ID at the time).

$ houritsu-builder verify laws/act/415/415AC0000000057.md --revision 415AC0000000057_20201212_502AC0000000044
OK laws/act/415/415AC0000000057.md at 32cc900e69c0

If they differ, it prints MISMATCH, the reason and a short diff.

An OK means only that the file matches what e-Gov serves now. e-Gov is not the official text either; the Official Gazette (官報) is.

Things to keep in mind

  • The official text is the Official Gazette (官報). houritsu shows the text and its diffs only; it gives no interpretation or advice.
  • History starts around 2015, because e-Gov’s amendment data starts there.
  • Amendments enforced before 1970 are dated 1970-01-02 because of a git limit. The real enforcement date is in the commit message’s Enforced.
  • The data is under CC BY 4.0. MIT is the license of the converter’s code (houritsu-builder). Statutes themselves have no copyright under Article 13 of the Copyright Act.

Source: e-Gov Law Search (https://laws.e-gov.go.jp/), PDL1.0. Converted to markdown by houritsu-builder.

SEE ALSO

AUTHOR

Kohei Wada, software engineer. I build things to try out ideas and write up the results here. wada-dev · about

COMMENTS