
Claude's Law
I came across the post on Hacker News titled Laws of Software Engineering. Within, 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. But now there is this weird gap in coding practices, lacking laws: managing agents using context files and skills, accepting edits from the genie, trusting what it's spitting out, and sometimes paying attention to its edits.
So, I posted to 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 weird as I remembered another "greybeard" engaged my allergic reaction: a pseudo-law called Go To Statement Considered Harmful.
I relented in the HN comment:
"Today, I was presented with Claude's decision to include numerous
gotostatements 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 withgoto's."
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."
This gave me the idea. 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 yeah, I updated my style context file so the agents wouldn't do that ever again.
Source: Dev.to


