Maintaining the law in a git repo

· kiko's blog

poorly researched idea #1:

# why isn't our law maintained in a git repo?

git, or any version control by extension, is what we consider to be the perfect medium to maintain a dynamic "knowledge" center. it is simply the golden standard in the software world due to its rich yet simple features. laws are by definition open source. they actually are pure open source, however, in a pre-git world where the 'programmers' were fetching the latest state of their repository from a shared in-house ftp server. i remember developing like this when i started working in web at the age of 15. i think there's some potential in looking at the legislation through the lens of an open source project, however, that is out of the scope of this post.


let's now instead imagine such a world where all of our legislation is maintained in a shared git repository:

simply seeing the history of any selected part of the law would allow citizens to better understand the historical changes and their respective context. we could easily see how an exact part of law has evolved in time; under whose rule, following which events; cross reference their domestic changes with changes in other countries' legislative, etc. the opportunities are endless - there's been a huge focus on working with data of all sorts in the last couple of years. semantically, nothing changes, however, suddenly, that which governs our lives would be insurrected as a dynamic organism, a truly collective effort, as opposed to its current invariable, rock-like form.

this also comes with a huge possibility of diff analysis - looking at which parts of the law change the most by frequency, which ones change the most by semantics (assuming we can do semantic diff); we could see the average activity of elected parliaments, how many laws are added vs amended per a certain period, etc. etc...

obviously, it's as incorrect to judge programmers by their lines of code throughput as it is to judge politicians by the amount of their diffs in the law book. with this in mind, there's still a huge potential in a static diff analysis. all of these are just off the top of my head, and, at least to me, they sound pretty interesting. i'm sure there are plenty of much better ideas and this is just a tip of the iceberg. of course, all of this is possible in the status quo as well, however, having a diff-based version control would make this incredibly easier to conduct.

moreover, pull requests suddenly become the main unit of our legislative progress. they could be a) completely public and b) submitted virtually by anyone (in theory, probably not in practice). not only would we see the proposed changes "in real time" as the parliament is debating a certain matter, we could also see discussions in the PRs themselves & how the diff is changing as a result of these discussions. having this process streamlined in the regular pull request fashion would make it more transparent and easier to follow for everybody involved, especially for regular citizens.


other fancy possiblities, ideas and benefits to this approach:

the first step in such a project would be to integrate all of the current legislation into a git repo. regular git interfaces (github, gitlab, ...) provide good enough GUIs for the proofs of concept. if succesful, we could then continue to build on top of it by providing an e.g. web GUI layer.

relevant europa.eu thread, seems like i am not the first one to have this idea: https://futureu.europa.eu/processes/Digital/f/15/proposals/991