Who this is for — the reader with five minutes, and the agent that needs the whole book compressed into a checklist.
Read this if — you want every normative rule in this book on one page.Skip this if — you want the reasoning; each rule links to the chapter that argues it.
Takeaways
Every rule in this book appears here exactly once, with exactly one home chapter.
Rules with a command in the last column are enforced by machine; the rest are enforced by attention.
If a rule is not here, it is not a rule — it is an opinion in a paragraph.
Last updated: 2026-08-09.
# Rule Home Enforced by
P1 Never ask an agent for feature code that has no automated way to be checked. Manifesto judgement
P2 Write the harness, canary, or test suite before the feature. Manifesto judgement
P3 The repository is the only source of truth; if it is not in a file, it does not exist. Manifesto judgement
P4 Keep the harness lightweight and transparent; the human triggers steps and stays accountable. Manifesto judgement
P5 Prefer strict, self-contained tools and static binaries over resident daemon architectures. Manifesto judgement
P6 Every line you do not write is a line no agent can misunderstand — keep it minimal. Manifesto judgement
# Rule Home Enforced by
L1 When a check is green but the result is wrong, add the missing check before fixing the bug. Golden Path judgement
L2 A commit carries code, tests, and spec together, in conventional-commit form. Golden Path review
L3 Record which model helped in a Co-Authored-By: trailer, not in prose. Golden Path git log
L4 Run the preflight gate before ending a turn or handing over. Agentic Dev Patterns make preflight
L5 Before a context compaction or session end, write state, warnings, and next steps into issues/. Agentic Dev Patterns judgement
# Rule Home Enforced by
C1 If you cannot verify a mechanism with a fake, write a canary before writing the feature. Canary-First judgement
C2 A canary isolates one external mechanism — no application logic, no abstractions. Canary-First review
C3 Run the canary against the real environment and inspect its output directly. Canary-First make canary
C4 Document what the canary found; the finding is the design input for the feature. Canary-First review
C5 Never delete a canary — keep it as the cheapest regression check you own. Canary-First make canary
# Rule Home Enforced by
S1 No layout constants, UI labels, key bindings, or colors inside application code. Agentic Dev Patterns review
S2 Declare them in spec/ files and embed them at compile time (//go:embed, @embedFile). Agentic Dev Patterns review
S3 Generate every derivative format from the master spec; never hand-maintain a copy. Agentic Dev Patterns review
S4 One component, one language — never maintain the same logic twice in two languages. Agentic Dev Patterns review
S5 Prefer self-contained binaries that exit and clean up over background daemons. Agentic Dev Patterns review
# Rule Home Enforced by
G1 Shrink the repro to the smallest failing input, and find a control that does not fail. Golden-Change Playbook judgement
G2 Prove the root cause with numbers, not screenshots; state it as a formula. Golden-Change Playbook judgement
G3 Run the real production code in diagnostic scripts; never reimplement it. Golden-Change Playbook review
G4 Write down which goldens will change before editing code. Golden-Change Playbook judgement
G5 If the actual diff set differs from the prediction, revert and re-diagnose. Golden-Change Playbook test diff
G6 Fix the layer where the wrong value originates, and delete downstream band-aids. Golden-Change Playbook review
G7 Assert the underlying invariant in a unit test, not just the output string. Golden-Change Playbook test suite
G8 Regenerate goldens deliberately, revert unpredicted changes, and inspect the new values. Golden-Change Playbook git diff
G9 Never use the update flag to make a red suite green. Golden-Change Playbook review
G10 Commit tests, code, docs, and issue references together. Golden-Change Playbook review
# Rule Home Enforced by
T1 Every exit path — selection, cancel, SIGINT/SIGTERM, panic — runs the full teardown sequence, in order. TUI Restoration PTY harness
T2 Disable mouse tracking first, then drain in-flight input with a CPR (\x1b[6n) handshake. TUI Restoration PTY harness
T3 Restore termios before erasing anything. TUI Restoration PTY harness
T4 Erase only the rows the TUI occupied (\x1b[2K); never \x1b[J or \x1b[2J. TUI Restoration PTY harness
T5 Park the cursor at the recorded start row and emit nothing after it. TUI Restoration visual check
T6 Emit ?1049l only if you emitted ?1049h; keep separate inline and alt-screen restore sequences. TUI Restoration visual check
T7 Keep the ? in DEC private modes, and disable auto-wrap (\x1b[?7l) during inline renders. TUI Restoration review
T8 Parse mouse input with a ≥512-byte buffer, a multi-event loop, and a carry buffer for split events. TUI Restoration PTY harness
T9 On full-width rows, skip trailing \x1b[K — pending wrap makes it erase the last drawn cell. TUI Restoration golden ANSI
T10 Verify teardown visually on a VTE terminal, on Foot, and under tmux. TUI Restoration manual protocol
T11 Parse CPR responses with a character-by-character state machine so user keystrokes are never eaten. TUI Restoration PTY harness
T12 Distribute grid remainder cells across the first R columns so widths sum exactly to W. TUI Restoration unit test
T13 Write sandboxed tool output under the user’s home, never to the system /tmp. TUI Restoration make canary
T14 Set PDEATHSIG immediately after spawning a subprocess so no child outlives its parent. TUI Restoration review
# Rule Home Enforced by
V1 Before marking version-gated behavior Resolved, confirm its regression test actually ran — a test that can silently skip is not a check. The Canary That Skipped Itself AGENTS.md
V2 Never infer an external tool’s version threshold from one installed copy — probe the binary that will actually run. The Canary That Skipped Itself review
V3 Shared process state a test forces (a sync.Once, a package-level flag) must be reset on cleanup, or later tests silently inherit it. The Canary That Skipped Itself test suite
V4 When a bug’s only symptom is inside a GUI the agent cannot observe, ask a human to check one change at a time. The Canary That Skipped Itself manual protocol
# Rule Home Enforced by
I1 Review generated code’s success paths first — a fallback that reports success is more dangerous than a crash. The Single-Prompt Miracle review
I2 When a fix makes an operation fail closed, verify the operation is still reachable on a stock install. The Single-Prompt Miracle manual protocol
I3 Write the issue spec — Summary, Motivation, Proposed Solution, Alternatives Considered — before handing a fix to an unfamiliar agent or harness. The Single-Prompt Miracle review
I4 Audit the documentation a template brought with it in the same session, or file it as an issue. The Single-Prompt Miracle review
# Rule Home Enforced by
GO1 Default to the standard library; get approval before adding a dependency. Go review
GO2 No ORMs, no logging frameworks, no DI containers; cobra is the one permitted CLI library. Go review
GO3 No package-level mutable state — pass state explicitly via arguments or a state struct. Go review
GO4 init() only for static, side-effect-free registration.Go review
GO5 Wrap errors with fmt.Errorf("module: %w", err) and let them bubble to main(). Go review
GO6 Never panic() outside unrecoverable boot-time configuration. Go review
GO7 Functions return values; only explicit printer helpers write to stdout. Go review
GO8 Table-driven tests with t.Run, standard testing only, in the same package. Go make test
GO9 Go sources stay gofmt-clean. House Rules make preflight
# Rule Home Enforced by
Z1 Never hide allocations; pass an Allocator explicitly. Zig review
Z2 Hot paths get a zero-allocation core (stack buffers, prefetched data). Zig benchmark
Z3 Build utility binaries with -O ReleaseSmall; keep them under 1 MB and 5 MB RSS. Zig build check
Z4 Split helpers into dedicated files and run them via std.testing.refAllDecls(@This()). Zig zig test
Z5 Treat pinned 0.16.0 API shapes as dated notes — re-verify against the current release. Zig compiler
# Rule Home Enforced by
B1 Every script starts with #!/usr/bin/env bash and set -euo pipefail. Bash review
B2 Use if test …; never [ … ] or [[ … ]]. Bash review
B3 Put then/else/do on their own lines and avoid semicolons. Bash review
B4 Double-quote every expansion, and fail loudly on missing arguments ("${1:?usage}"). Bash review
B5 Declare local first, assign second, so command substitution exit codes survive. Bash review
B6 Use alignment continuation for long pipelines and conditions instead of fixed indents. Bash review
B7 Use printf over echo for variables, and route pass/fail messages through helper functions. Bash review
B8 Stay mawk-portable: no 3-argument match(), no strtonum(), no gensub(). Bash review
# Rule Home Enforced by
M1 help is the first target; bare make prints usage.Make make
M2 Mark targets phony with the ⚙️ sentinel dependency instead of per-target .PHONY lists. Make review
M3 Every user-facing target carries a #/## description and is scraped into make help. Make make help
M4 Use := for immediate values, ?= for overridable ones, and align the assignments. Make review
M5 Express build order as target dependencies, not as a script of steps. Make review
M6 Always invoke the locally built binary (./$(BINARY)), never one from $PATH. Make review
Rules with no command in the last column are the ones an organization has to
staff. That gap is not an oversight; it is the honest boundary of this
approach, and it is the subject of The Solo Fleet, Reviewed .