Skip to content

kanywst/hammurabi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hammurabi — Laws Every Engineer Should Know

A codex of engineering laws — each with its counter-force, a field guideline, and a source.

stars forks license

English日本語


What is Hammurabi?

In a world of increasing complexity, the primary bottleneck in engineering is no longer code, but decision-making under uncertainty.

Hammurabi is a curated codex of engineering laws drawn from Cognitive Psychology, Safety Engineering, and System Design. Every law is paired with its counter-force (the principle that keeps it from becoming dogma), a field guideline you can apply tomorrow, and a primary source. It is named for the first written code of laws.

The Laws

Category Law The Core Idea
Decision Type 1 vs Type 2 Reversible vs irreversible doors.
Safety Normalization of Deviance Don't let anomalies become your new normal.
Safety Swiss Cheese Model Accidents happen when holes in layers align.
Systems Chesterton's Fence Understand the 'Why' before you delete.
Organization Hanlon's Razor Never attribute to malice what is explained by context.
Organization Conway's Law Your software mirrors your org chart.
Cognition Survivorship Bias The dead don't write blog posts.
Cognition Dunning-Kruger Effect The unskilled cannot see they are unskilled.
Incentives The Cobra Effect Solutions that create worse problems.
Safety Murphy's Law Anything that can go wrong, will.
Systems Tesler's Law Complexity is conserved, only relocated.
Distributed Systems CAP Theorem You can't have consistency and availability under a partition.
Organization Peter Principle People rise until they reach a role they're bad at.
...and more Explore the full codex →

The Site

An engraved, editorial companion site renders the full codex as a numbered code of articles (§ 01 onward), framed by a prologue and an epilogue.

cd website
npm install
npm run dev

Visit http://localhost:3000 to read the codex.

Contributing

We welcome laws that have a strong basis in Cognitive Science or Engineering History.

  1. Check the existing codex.
  2. Ensure your proposal follows the Concept / Mechanism / Counter / Guideline / Source structure. The Source line must cite the original author, paper, or book — not a blog post that summarizes one.
  3. Add the entry to both content/en.md and translations/jp.md, then append the short form (title / tag / mechanism / counter / guideline / source) to the en and jp arrays in website/src/translations/index.ts.
  4. Open a PR.

License

MIT © 2026 Hammurabi.

Releases

No releases published

Packages

 
 
 

Contributors