The Moral Code
Right and wrong are physics. The moral law is part of the structure of reality, as real as gravity and light. Every wisdom tradition saw it. It can now be written down exactly, and it says they were right. This page does not describe the law. It runs it, and you are inside it.
Behind these words: a working record of 144 people · every dot a person · every line a relationshipA record of 144 people, and you are one of them
Every dot is a person; every line is a relationship between two of them. Each relationship has two sides, one written by each person, and one cost, J, which is zero while the two sides agree. When a relationship goes out of balance it turns pink, and its cost lands as a ring on its two ends, and on nobody else, until one of them closes it. You are the dark dot marked YOU. A is beside you.
While you carry an open wrong, this page leans. The lean is a drawing of the weight you carry; the weight is the cost, and the cost is real. The page levels the moment the wrong is closed.
This page keeps what you do here, in this browser. Leave a wrong open and come back tomorrow: it will still be open, and it will have cost you both the whole time.
t 0000 · the record opens. Every event below stays in it.
Every relationship has a balance, and a cost when it is lost
Reality keeps one record of every event, and everything in it is related to everything else. Each relationship has two sides. When they agree, it is in balance. When they do not, it is skewed. Skew is how far a relationship has moved out of balance, and in which direction. Skew has a cost, and physics allows that cost exactly one form, called J-cost, where x is the ratio between the two sides:
- Nothing chosen.This form is forced. A cost of comparison has to treat both sides alike, vanish at balance, combine consistently and be measured in its natural unit. Only this function does all of that.
- Balance is the only state that costs nothing.The cost is zero at perfect balance and nowhere else, and it grows faster and faster as the sides move apart.
- Direction does not matter to the cost.Skewed one way or the other by the same amount, a relationship costs the same. The page leans the other way; the cost does not change.
- It is the one cost in the record.Every event writes into relationships, and every change to a relationship is measured in this cost. The engine at the bottom of this page computes it for every relationship in the field, at every frame.
A wrong is an imbalance written into someone else’s life
Watch the edge of the field: someone far from you has just acted on a relationship without the other person’s part. The cost lands on exactly two people, its two ends, and on nobody else.
- An act is an event in the record.It is written by those who act, and it belongs to everyone it concerns.
- Consent is writing your own part.An act you wrote is yours. An act that touches you that you did not write is done to you.
- Harm is a rise in someone’s cost.To push a relationship someone shares with you out of balance, without their part, raises the cost they carry.
- The cost falls half on each end.When a relationship goes out of balance, the cost is shared equally by both people in it. You cannot harm someone without carrying the same share yourself.
- An open wrong keeps costing.For as long as the imbalance stays open, it costs again at every moment. Nothing in the field heals by itself.
- Only the two ends can close it.The one who did it can take it back. The one it was done to can let it go. Nobody else can close it for them.
- Nothing lowers what you are owed unless you wrote it.What belongs to you changes only by your own hand.
- Love meets in the middle.When two people repair a strained relationship while keeping what they share, there is exactly one point of least cost: halfway, for both.
Two relationships between the same two people, strained in opposite directions. Repair keeps what they share. Move the repair and watch the combined cost.
The weight you carry is the cost
You are part of the record, so you feel its cost from the inside. A wrong you have done, or one done to you, sits on you as weight, and the weight is still there the next day. That weight is the standing cost of an open imbalance. It does not fade with time; it is paid at every moment until the relationship closes. Look at the field now: five wrongs are open, and what the record carries climbs at every tick. The counter at the edge of your screen keeps the total.
That is why an apology and a forgiveness feel the way they do. When you apologize, you take back your side. When you forgive, you let go of what you were owed. Either way the imbalance closes, and the cost stops at both ends at once. Both people feel lighter, because both were carrying it. Forgiving does not erase what happened; the record keeps every event. It changes what is owed. Watch them close, one by one.
We are drawn to the same release everywhere. A melody leaves home and comes back. A story opens a question and answers it. A game holds two sides against each other until it is decided. Each builds an imbalance and then resolves it, and what we feel at the end is the cost falling away. Music, sport and story give us that release for its own sake.
Turn on Sound, in the counter at the edge of your screen, to hear the field. While any wrong is open, two tones beat against each other. Each closing rings once. When the last one closes, the two tones settle into one.
What every tradition taught is what the physics says
Love your neighbour as yourself.Leviticus 19:18
The cost of every relationship falls equally on both people in it. Your neighbour’s burden is, exactly, your own.
What you do not want done to yourself, do not do to others.Confucius · Analects 15:24
Do not write into another person’s life what they would not write. Consent is writing your own part.
As you sow, so shall you reap.Galatians 6:7 · the law of karma
The author of a harm carries half of its cost. What you do to a relationship, you do to yourself.
The record keeps every act. Nothing in it is erased, and a wrong stays written until it is set right.
Forgive, and you will be forgiven.Luke 6:37 · repentance and forgiveness in every tradition
An open wrong can be closed in exactly two ways: by the one who did it turning back, or by the one it was done to letting it go.
The starry heavens above me and the moral law within me.Immanuel Kant · 1788
They are one law. The same cost governs both: the record of the stars and the record of a life.
Our moral intuitions were never stories we told ourselves. They were accurate perceptions of how reality works. The prophets, the sages and the philosophers saw the law clearly. We were right all along.
The moral law, clause by clause
We are deriving the code exactly, from the structure of the record, and the derivation is under way. The target is the minimal complete code: the fewest clauses that give every moral question exactly one answer, where dropping any clause leaves some question with two answers. The one record is the setting the clauses are stated on, and what happened is read from the record itself. Status as of 10 November 2026.
Consent is writing
An author consents to its own event; a participant who did not write it does not. Together these two sentences make consent exactly the act of writing the event.
What is owed changes only by its holder
An obligation exists when both parties have written it. After that, what it requires changes only when the one who owes performs, when the one who is owed acts on its own claim, or when both write a change. Nothing lowers what you are owed unless you wrote it.
A waiver acts when written
When the one who is owed waives part or all of its claim, the waiver takes effect when it is written.
A dispute’s cost is split
When the two entries of a relationship disagree, the cost of the disagreement falls half on each end.
| Question | Status | How it is settled |
|---|---|---|
| Was an obligation formed? | Answered | Both parties wrote it. |
| Was it performed? | Answered | Read from what happened, the delivery in the record, not from what either party wrote about it. |
| Was it released? | Answered | Only the one who is owed can release it. |
| How much is due? | Answered | From the terms, what was delivered, what was repaid and what was released. Which waivers act is clause 3. |
| Was it fulfilled? | Answered | The accepted terms, read on what happened. |
| Was it violated? | Answered | A violation stays in the record for good. A later release does not erase it. |
| Did a participant consent? | Answered | It wrote the event. |
| Did a participant undergo it? | Answered | The event belongs to it, and it did not write it. |
| How much harm did an act do? | Answered | Half the change in recognition cost, at each end of the relationship it changes. Harm by omission is open. |
| Who can close a dispute? | Answered | Only an end of the relationship, by its own entry. |
| Who did the wrong? | Open | Who departed from an agreement is in the record. Who was untruthful is not settled by who departed. |
| Whom does an obligation bind? | Open | Derived for one fixed history of care between two participants. |
| Is an act permitted? | Open | Derived for the same history of care. |
The steps that remain
- What you are owed is your own holding in the record. This one step settles who can release an obligation and which waivers act.
- Why an accepted obligation binds a participant who can still break it, beyond the one history of care where it is derived.
- Who did a wrong when the two entries of a relationship disagree.
- Harm by omission: what failing to act costs, and whom.
- Which obligation governs when two accepted obligations cannot both be met.
- Minimality: proved for all four clauses (for the waiver clause, on two records); open for the identification under clause 2 and for whether the record forces the four principles behind the split.
- A result, not a gap. Where several acts fulfil an obligation, the code does not pick one. A unique law can permit more than one act.
The law, in 322 bytes of machine code
This page does not animate the law. It runs it. At every frame, every relationship in the field is handed to the 322 bytes below, and they do three things: compute each relationship’s one cost, J; put half of it on each of its two ends; and add to every person what they carry for the moment that passed. Every cost in the field, every share and every amount carried, and the cost and carried totals in the counter at the edge of your screen, come from them.
They are written directly as WebAssembly bytes, the machine code of the virtual machine built into every modern browser, with no compiler and no library. Your browser runs exactly these bytes.