Agile Government (a proposal)

Rogelio Consejo
8 min readMar 6, 2022

Or “maybe I had too much coffee this morning”.

Keep game theory for games

Did you ever notice how a lot of countries have developed their laws following a “waterfall approach”?

We came up with a “big upfront design” constitution, that we signed, then we changed its details as we went along, adding and adding changes over changes, amending, and so on...

That sounds like a badly led development effort to me. I have seen that same thing happen on software development projects. Also: don’t the laws look like ugly, smelly codes, the way they read?

I am betting that if we did a SOLID analysis, we would find that, indeed, our legal systems are not… SOLID.

What about the Release/Reuse Equivalence Principle? Wouldn’t that make sense in a legal system? Common Closure Principle? Common Reuse Principle?

For all of you Muggles out there, I am talking about some tools that we Software Developers use to think about the structure of code, and the project itself, and make our code more resilient to changes.

You see, the main difference between a Code Goblin and a Grand Wizard Architect of code is the quality of their magic.

The Code Goblin spells never get too complex because goblins have very messy minds, so as their code grows in complexity, it becomes exponentially harder for them to cast it.

The Wizards, on the other hand, aren’t even THAT smart. We just structure the spell in a way that makes it very easy to understand, use and even extend (build upon). In a sense, the Wizards are actually kind of lazy, because we just do it that way so that we don’t have to think too hard about it and we can make complex spells with less effort.

Wizards don’t like effort, we like results (and sometimes we also like showing off).

And I would guess some of you fellow Wizards would agree that the way the current legal systems were built is probably making it so that we are doing too much effort and getting too little results.

To me, our legal systems look like code made by newbs.

And not to disrespect newbs (au contraire, we were all babies one day), but as Intellectual Homer once said: ontogeny recapitulates phylogeny. And in this case, because we are developers and not biologists, we want phylogeny to catch up with ontogeny.

Now take a deep breath…

I am guessing some of the people reading already know where I am going with this…

I am going to goldhammer this thing to pieces!

But first, I am aware that being self-referential does not make mistakes magically disappear, so let’s address the main sticking point: am I really just using a Golden Hammer (as in “I am trying to apply a solution that works on one thing to somewhere where it doesn’t belong”?).

And it is a valid concern because I do dream of electric sheep in BASIC and Golang.

So the question is, is developing software in any way like developing a legal system?

😶

YES, IT IS, IN MANY MANY MANY (MANY) WAYS!

As software developers, we make documents.

Those documents help guide the behaviors of complex systems. Not only that, but we work together to make systems of documents work together to achieve whatever we want to achieve without having to “break the rules” that we create ourselves.

We are good at not getting stuck by past decisions(or at least we get better at it with time, like wine).

As architects, we also define the boundaries and dependencies of the components of our system so that it is easy to change its implementations and that way we make our systems a lot more resilient to change.

Does that sound like it would be useful, in law?

So at least at an institutional level, there seems to be some sort of parallel.

But also, code is made of decisions and processes, the two main blocks of any legal system (you can have a legal system without a constitution, but I can hardly see one without decisions and processes).

So it really looks like we are actually talking about the same kind of thing here…

You know, as in, when you use math on more than one field to solve different problems, and it works…

And I think there may be a “mathematical” (or mathematically inspired) way of thinking about “the law thing” so that we could have a more “agile” legal system.

And I feel as if I was in the middle of the ocean and there was a whale swimming just under me.

So let’s do a mental experiment

Maybe we can define some founding principles so that we can segregate their definition to keep a basic interface and achieve a core system that is closed for change but open for extension.

And because I am not an expert designer in this case, and I don’t want to get into a philosophical debate, I will start with a template: La déclaration des droits de l’homme et du citoyen…

Article 1: Men are born and remain free and equal in rights. Social distinctions can only be based on common utility.

Here we even have an interface defined: Social distinctions can only be based on common utility.

Article 2: The aim of all political associations is the preservation of the natural and imprescriptible rights of man. These rights are liberty, property, safety, and resistance to oppression.

Again, I can see an interface: The aim of all political associations is the preservation of the natural and imprescriptible rights of man.

In the first case (article 1) we are defining “Social distinctions” as a signature that takes only “common utility” as an argument. And in that sense, we have a definition for the interface of “Equality” or “Égalité”.

type Equality interface {

SocialDistinction (CommonUtility) Equality

}

In the second case, we define “political associations” as having the aim of “the preservation of the natural and imprescriptible rights of man”, and we find a mention of 4 other interfaces: liberty, property, safety, and resistance to oppression.

So we get:

type PoliticalAssociations interface{

Preservation(NaturalAndImprescriptibleRightsOfMan)

}

And:

type NaturalAndImprescriptibleRightsOfMan interface{

Liberty

Property

Safety

ResistanceToOppression

}

Doesn’t this look clean already? Not a long constitution, but a set of interfaces (and data types).

Article 3: The principle of all sovereignty resides essentially in the nation. Nobody, no individual can exercise authority that does not emanate expressly from it.

Does this sound like the Stable Dependencies Principle or what?

Article 4: Freedom consists in being able to do all that does not harm others: thus, the exercise of the natural rights of each man has no limits other than those which assure the other members of society the enjoyment of these same rights. These limits can only be determined by law.

Did I just dream it? Do we have a definition for Freedom as an interface?

type Freedom interface{

Do(SomethingThatDoesNotHarmOthers func) Freedom

}

func (l Law) IsItPermited(action Freedom) bool{

return _, exists := l.text[action]

}

So it is a blacklist kind of authorization, which, by design, is one of the most permissive kinds of authorization, and it still allows us to block some “Freedoms” from being destructive. Which sounds pretty well aligned with the trade-offs of using a “Freedom” interface.

And look at that, Freedom is a partial Implementation of NaturalAndImprescriptibleRightsOfMan.

type Liberty interface{

Do(func) Liberty

}

I am starting to think that the guys that designed these articles were VERY SMART. 🤔

And I am not trying to say that this is the perfect interface for the core of a new legal system implementation, but it does look like a good starting point.

I am not going to do the whole 17 articles, because I think I proved my point.

It is not so much about the articles themselves, but the implementation of the process of developing a legal system in an agile manner.

A new constitution

What if, instead of our constitutions being about long definitions of abstract concepts, we made it about the “business logic” and the “interfaces” of what we want our countries to be all about?

What if instead of writing laws as Cascading Style Sheets (with weird “weighting” and “ordering” rules for law priorities), we wrote them as plugins? That would make it easier to try them out, maybe?

So we would need to define the Interfaces for what can be implemented, but at the same time leave it open to each implementation to handle things as they see fit. The “weights and balances” would be on the higher levels of the law (not the people running it, but the law itself) and would allow the lower level to act with a lot more flexibility.

This would mean that changing the constitution might require changing a lot of laws, which is not a bad thing.

Right now, the law works the other way. We don’t have “law cases” describing what we want to achieve and structuring and guiding every decision to achieve those (strictly speaking, there are, but it is not part of the main development cycle), what we have instead is mostly “precedents”, which are details of implementation in the purest form, being used as a basis for future decisions.

We are making decisions too early, by design. And then we are too slow to change them, also by design, because we are depending on them.

And if we did it the right way, we would be able to have only as little law as needed to get the job done and make our law deployments a lot more frequent, allowing the system to account for errors in a more efficient manner.

The principles are not new, a lot of institutions have them, it is just the Architecture that changes.

A New Constitution

So coming back to this idea of keeping it simple and Yagni’ing the heck out of it, and because I cannot be expected to come up with a whole new legal system on my own, maybe let’s start with three ideas that we can explore as interfaces:

type Law interface{

Liberté //Freedom

Égalité //Equality

Fraternité //Brotherhood

}

And let’s explore ways to make our legal systems more agile, not by using Scrum in court but by following the basic principles of Clean Code and Clean Architecture.

And that would mean that the core of it, in my mind, the core of the law should be built to find ways for each and everyone to have Freedom and Equal Opportunities and be able to live in Brotherhood, even above the sovereignty of the nations. Bros* before nations.

Also, I guess I am amending Article III from The Declaration of the Rights of Man and of the Citizen, but I am not the leader of a nation so it’s probably because I have nothing to lose there.

Or maybe choose something better, if you have it.

As Jack actually agrees with Ralph at some point: “We’ve got to have rules and obey them. After all, we’re not savages.” 🪰

Also, maybe we should start using git to keep track of the versions of the laws. Just saying.

But seriously, I know I had a lot of coffee this morning, but doesn’t agile and clean make sense for a legal system? IDK… 🤔

At least it’s a cute idea. And I would love for people that are smarter than me (you) to think about it.

Stay happy, productive, and smart, bro! ✊

PS: *Girls are also bros, obviously. It is NOT “a guy’s thing”. If somebody says it is “a guy's thing”, they are lying. Don’t believe them.🚫

--

--