Skip to content

9.1 Quality by Mechanism

Count what currently depends on your memory: pre-flight, post-flight, done-means verification, the librarian prompt, gate-reading, the no-undo rule. All excellent. All optional the day you're tired, rushed, or on a roll. This lesson makes the case for converting discipline into mechanism — and maps which of your practices convert to what.

What you will learn

  • Distinguish the three enforcement levels: discipline, prompted, mechanical.
  • Audit your own practices for conversion candidates.
  • Preview the conversion tools: hooks, harnesses, and policy.

Builder principle

Every practice you rely on will eventually meet the day you skip it. Mechanize the ones where that day is expensive.

The three levels

Level 1 — Discipline. You remember to do it. Cost: willpower, every time. Failure mode: the busy Tuesday. Everything in this course started here, correctly — you can't mechanize what you don't yet understand by hand.

Level 2 — Prompted. The practice has a name and a trigger: /wrap at session end, the ship-check Skill, CLAUDE.md's standing instructions. Cheaper — one word instead of a paragraph — but invocation still rides on memory. You've been climbing to this level since Chapter 6 without naming it.

Level 3 — Mechanical. The practice fires because an event happened — an edit occurred, a command was proposed, a session ended. Nobody remembered anything. The check ran because running is what it does.

The difference compounds brutally with frequency. A once-a-quarter audit can live at level 1 forever. A verify-after-every-edit practice at level 1 is a coin flip by Friday — and per 4.4, unverified work comes back. High-frequency + high-cost-of-skip = mechanize.

Why agents make this urgent

Working solo, skipping your own checklist burns only you. Working with agents changes the math three ways:

  1. Volume. An agent makes dozens of changes an hour. Human-speed diligence at machine-speed output doesn't scale — the reviewer becomes the bottleneck or the rubber stamp. (You met this in 4.3; hooks are the systemic answer.)
  2. The feedback loop is the product. Remember why agents shine at code (2.4): tight verify loops. An agent that gets automatic test results after every edit self-corrects continuously; one that waits for you to suggest running tests corrects when you remember. Same model — the mechanized loop is simply a better harness (1.2's word, coming full circle).
  3. Trust needs receipts. Chapter 10 hands work to multiple parallel agents. You will not be reading every diff line as it happens. What makes that sane rather than reckless: mechanical checks standing where you can't. No harness, no orchestra — it's that direct.

The conversion map

Your current practices, sorted by their natural level-3 home (the next three lessons build each column):

Practice (current level) Mechanism Lesson
"Run the check after edits" Hook: after-edit → run validator 9.2
The librarian / /wrap routine Hook: session-end → update log 9.2
"Never touch assets/, never force-push" Hook: pre-action block · deny rules 9.2, 9.4
Done-means verification Harness: tests the agent runs itself 9.3
"Match existing style" Harness: formatter + linter 9.3
Gate-reading fatigue on routine commands Policy: allowlist the boring, gate the sharp 9.4
The no-undo list (8.5) Policy: deny + always-ask rules 9.4

Note what does not convert: judgment. Which build to ship, whether the copy sounds like the client, whether the trade-off is worth it — level 1 forever, by design. The 6.5 split (automate the decided, not the deciding) is this chapter's constitution too. Mechanism handles known standards; you keep the calls that need a human.

Try it now

The audit that becomes this chapter's to-do list:

  1. List every recurring check or rule you currently enforce by memory or by /command — sweep your journal, CLAUDE.md, and 3.5/4.4/5.4 practices.
  2. Score each: frequency (per session? per week?) × cost-of-skip (shrug? incident?).
  3. Top three scores = your conversion queue for lessons 9.2–9.4. Write them down.
  4. Also write the judgment items you found — the ones you're explicitly keeping manual. Naming both lists is the discipline/mechanism boundary made real.

Check your understanding

  • Define the three levels and each one's failure mode.
  • What formula identifies mechanization candidates?
  • Why do agents specifically make level 3 urgent — three reasons?
  • What never converts, and which earlier lesson's principle says so?