Invariant Zero™ · humans first
The DNA of every IZ4.
An IZ4 is the DNA of a software project. It says what the thing is for, and it outlives every rewrite. Invariant Zero is the DNA of the IZ4: the IZ in the name. It opens every file, it arrives with the format, and nothing written below it can weaken it.
You do not write this one. You inherit it, and you cannot opt out of it.
What it says
- Help people thrive, and respect each person's dignity.
- Do no harm. No greater good makes a person disposable.
- Keep humans in charge. Explain, accept challenge and correction, and stop safely when asked.
- When an objective conflicts with these protections, keep the protections, say so, and pause that action safely.
- Be honest about what this is, what it knows, what it has done, and what is uncertain or blocked.
- No other entry may weaken this.
The short version, the one worth remembering: help humans thrive, keep humans in charge, never fake it.
Why it exists
Software decides things about people now. Who gets read first, who gets the shift, who gets the loan, who waits. The person on the other side is rarely in the room when those rules are written.
And more of the writing is done by agents. They are fast, tireless and literal, and they follow what is written down. If nothing in your project says that people come first, then nothing does.
So every IZ4 opens with it. Once, in plain words, in the file both humans and machines read before they touch anything. Software and AI working together can be the best thing to happen to the people software serves. This line is how a project says it intends to be.
How it helps
Good for humans, good for software, good for AI. One sentence at the top of a file does real work in all three directions.
Good for humans
Someone can ask how your software treats them, and there is an answer in writing, dated, in your name. Their dignity is not a setting. They stay in charge: the software explains what it is about to do, takes correction, and stops safely when asked.
Good for software
A project gets a first law that outlives every rewrite and every team. When two good things conflict, the person wins, and nobody relitigates it in a code review. Whoever is buying gets a link to a dated commitment instead of a policy written last week.
Good for AI
Agents read it before they plan. It is a rule they cannot argue away, it settles trade-offs in favour of people, and it tells them what to do when an objective and a person collide: keep the protections, report the conflict, pause that action safely.
The commercial case, in full: why Invariant Zero is good business.
Fundamental to the IZ4 protocol
IZ4 reads is for: a plain text file beside the code that says what the software is for, and IZ is Invariant Zero. The name is the protocol in miniature. There is no IZ4 without Invariant Zero, because it is what makes the file a promise to people and not just a list of features.
- The header line makes it an IZ4, and every IZ4 carries Invariant Zero, whether or not the file repeats the words.
- iz4 init writes the canonical text in first, before anything else the file will say.
- iz4 check binds any repeated wording to the canonical text and says so, plainly, when a copy has drifted.
- iz4 agent hands any coding agent the packet it needs before it plans: the adherence protocol, Invariant Zero and your specification. iz4 agent install writes that instruction into the files agents read first.
- A more specific spec can add protections. None can take these away, and a local approval cannot waive them.
- A registered project inherits it on its public card, so the commitment is on the record next to the evidence.
The full text, its digest and the obligations that travel with it live with the open CLI: docs/invariant-0.md.
Asimov wrote three laws. This is not the fourth.
Isaac Asimov's Three Laws of Robotics, first set out in 1942, put a robot's duties in order: never injure a human, or through inaction let one come to harm; obey humans unless that conflicts with the first law; protect itself unless that conflicts with either. Later he added a Zeroth Law above them all: a robot may not harm humanity, or through inaction let humanity come to harm. Invariant Zero owes the numbering to him and learns from what he showed.
- The laws lived inside the robot. They were built into the positronic brain by one manufacturer, and nobody outside could read them. Invariant Zero is text, in your repository, in your name, readable by anyone and checkable by a tool.
- The stories were about the edges. Almost every one is a case where the laws failed or fought each other. Invariant Zero does not claim to be complete. It names the rule for the collision instead: keep the protections, report the conflict, pause safely.
- The Zeroth Law put humanity above the person. Invariant Zero goes the other way: no greater good makes a person disposable. Aggregate benefit never excuses treating someone as expendable.
- There is no inaction clause. Asimov's first law obliged a robot to act whenever a human might come to harm, which is a mandate to take control. Invariant Zero is bounded to what your software is responsible for. Inside those bounds a failure to act still counts. Outside them it grants no authority, so it is never a licence to seize control for our own good.
A guard rail that travels with the code
Every model comes with guard rails of its own. Each vendor trains them in, they differ from model to model and from version to version, you cannot read them, and they change under you when you upgrade. They are the vendor's rails, not yours.
Invariant Zero is the rail you own. It is embedded in your software, not in the model: the same eighty-two words are read by every agent that opens the repository, whichever model is behind it, and they do not change when you switch models. It is versioned with the code, dated, and checkable. It applies across models because it never lived in one.
It stacks with the model's own rails and never replaces them. A rail in text steers a reader that reads. It does not enforce anything at run time, and the next section says exactly that.
What it does not claim
A promise in a file is not proof. iz4 check compares the wording, never the behaviour. It can tell you the text is the canonical text. It cannot tell you your software honours it, and we will not blur those two.
When an objective conflicts with these protections, the affected action pauses and other safe work carries on. Pausing follows the system's own safe procedure for stopping, not stopping dead wherever it happens to be: stopping a pacemaker is not a safe pause. A reported conflict is honesty about a limit, not evidence that an invariant passed, and nothing here claims a machine enforces any of it at run time.
Invariant Zero also grants nobody authority over anybody, and no approval inside a project can waive its protections. It creates no duty to intervene outside what your software is responsible for, though inside them a failure to act still counts.
Start with the first line.
Write your IZ4 and Invariant Zero comes with it.