Coding agents do not fail by writing syntactically invalid code. They fail by being confidently wrong in a way that reads well: a test that no runner imports, a suite that reports zero failures because zero ran, a fix whose stated reason is false, a migration that drops a column the code still reads.
senior-mode is the set of hooks, rules and reviewers we run on our own work, extracted and made portable. It is not a prompt. It is enforcement at the tool boundary: the agent gets blocked, gets told why, and has to come back with evidence.
How it stays portable
One canonical hook contract, then thin adapters per agent. Two shims translate for the agents whose event model differs, and a plugin covers the one that denies by throwing. The 60-case harness runs the same assertions against all of them, on three operating systems, on every push.
The first CI run went red on macOS only. Two shims used a GNU-only sed alternation, so on BSD sed every parsed field came back empty and a deny turned into an allow. That is the exact bug class the doctrine is about: a detector that cannot fail is not a detector.