The manifesto says what is mandatory. This guide says what it looks like in code — one rule at a time, with the violation first, because most people recognize their own code faster in the wrong example.
The method
- Read the rule. It is one sentence and it is not negotiable.
- Find the violation. Look at the smallest example that breaks it.
- Apply the smallest fix. Not a redesign — the smallest change that satisfies the rule.
- Make it impossible to regress. A linter, an architecture test, a review checklist.
Every lesson ends with an enforcement step. A rule that only lives in a document is a preference; a rule that fails the build is a constraint.
Tracks
| Track | Pillar | What you learn |
|---|---|---|
| Discipline | O | The forty measurable rules, cyclomatic complexity as the primary metric, and the misread rules. |
| Composition | T | Small parts, explicit inputs and outputs, the application as a data pipe. |
| Armor | A | Dependency direction, ports and adapters, architecture tests. |
| Silence | K | Repositories, plain objects, and keeping the database a detail. |
| Contracts | U | Ubiquitous language, design-first, and what a contract really promises. |
| Audit | — | A review checklist you can run against a real repository in an hour. |
About the code examples
Examples are annotated as PHP, C#,Java, C++ or TypeScript. Where the rule is syntactic and the languages disagree only in punctuation, one example is shown with a note. Where the rule is structural, several are shown — because that is exactly where people assume their language is an exception.
The language tabs are rendered by CSS, not JavaScript. The site ships no client runtime at all, which is the same constraint the philosophy asks of your domain.
Languages covered
PHP, C#, Java, C++ and TypeScript share the object-oriented vocabulary this philosophy needs: classes, interfaces, exceptions, generics (or their approximation) and a package manager. Tooling differs, and the reference chapter lists the exact tool per language for each enforcement step.