Mo's Blog

Law is Code—Maintain a Lawbase in Git

The phrase code is law highlights how programmers, by writing code, shape the functioning of significant parts of our world. But what if we reverse the equation? What if law is code? Laws, like code, are declarative constraints. They are the operating system on which societies run. Without laws enabling governments to establish central banks, for instance, the modern economy would be unrecognizable.

In democracies, the legislative process is often opaque. Laws emerge from closed drafting sessions, only to be debated openly in parliament. Outcomes are typically preordained, with ruling coalitions ensuring majority support. Now, imagine the entirety of law maintained on Git and managed like an open-source project on GitHub. Every citizen gets an official account. Citizens could propose laws (pull requests), comment on proposals, or discuss the legal codebase. But only the parliament would be able to merge a pull request into law. This concept isn't as radical as it sounds. We could initiate such a system today: a repository of the country’s laws could be created, contributors verified, and thresholds established—for example, if 10% of verified citizens endorse a proposal, parliament must vote on it. I don't see that we need to change much constitutional law for that.

It's a utopia for all programmers who have encountered how easy it is to fix open-source software. So, if we can debug software collaboratively, why not society itself?