OTAKU / Guide index

Chapter 03 — the guide

How to apply it

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

  1. Read the rule. It is one sentence and it is not negotiable.
  2. Find the violation. Look at the smallest example that breaks it.
  3. Apply the smallest fix. Not a redesign — the smallest change that satisfies the rule.
  4. 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

TrackPillarWhat you learn
DisciplineOThe forty measurable rules, cyclomatic complexity as the primary metric, and the misread rules.
CompositionTSmall parts, explicit inputs and outputs, the application as a data pipe.
ArmorADependency direction, ports and adapters, architecture tests.
SilenceKRepositories, plain objects, and keeping the database a detail.
ContractsUUbiquitous 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.