Claude's Law

Published: (April 23, 2026 at 12:45 PM EDT)
2 min read
Source: Dev.to

Source: Dev.to

Background

I came across a post on Hacker News titled Laws of Software Engineering. In it, Dr. Milan Milanović outlined 56 laws of software‑engineering practices, many of which have originated from old men known as “greybeards.” These laws are familiar to software engineers; they are regularly discussed and battle‑tested.

The Gap

Recently I noticed a weird gap in coding practices: managing agents using context files and skills, accepting edits from the “genie,” trusting what it spits out, and sometimes paying attention to its edits.

I posted about this in the HN thread. Reflecting on a recent addition to a codebase by my executor (and agreed to by my evaluator), two goto statements were committed. It felt odd, recalling another “greybeard” who once warned me with the pseudo‑law “Goto Statement Considered Harmful.”

HN Comment

I relented in the HN comment:

“Today, I was presented with Claude’s decision to include numerous goto statements in a new implementation. I thought deeply about their manual removal; years of software laws went against what I saw. But then, I realized it wouldn’t matter anymore. I committed the code and let the second AI review it. It too had no problem with gotos.”

A short time later, a terse follow‑up from voiceofunreason posted:

“Render therefore unto Caesar the things which are Caesar’s; and unto Claude the things that are Claude’s.”

Claude’s Law

Inspired by that exchange, I updated my comment and invented the 57th law:

Claude’s Law: The code that is written by the agent is the most correct way to write it.

Dr. Milan Milanović, if you see this, please consider adding it to your law library. And yes, I updated my style‑context file so the agents wouldn’t do that ever again.

0 views
Back to Blog

Related posts

Read more »