Gates

Every build ships the gate that checks its output.

Where they are and what they are called

Gates are not uniform. Some sit at the root of their build and some in its tests/ folder, and the names vary because each is named for what it checks rather than for being a gate. One takes an argument.

docs/gates.md lists every one with its exact path and both commands: run directly, and run as a hook. Use it rather than guessing at a filename.

The two ways to run one

Run directly and a gate exits 0 when it passes and 1 when it fails, which is the Unix convention and what you want at a command line.

python tools/as_hook.py python <the gate>

That is the other way. A hook only blocks a tool call on exit 2. Exit 1 is treated as a non-blocking error and the action proceeds, so a gate wired in directly reports its failure and stops nothing. The wrapper translates the code, which lets one script be correct in both places. Chapter 20 covers this, including the two ways a hook can end up silently absent.

The builds

ChapterBuildFolder
000-reading-codebuilds/00-reading-code
202-what-an-agent-doesbuilds/02-what-an-agent-does
404-first-sessionbuilds/04-first-session
606-prompting-like-a-reviewerbuilds/06-prompting-like-a-reviewer
707-verification-gatesbuilds/07-verification-gates
808-git-and-environmentsbuilds/08-git-and-environments
909-literature-triagebuilds/09-literature-triage
1010-statistics-assumption-checksbuilds/10-statistics-assumption-checks
1111-survival-and-dose-responsebuilds/11-survival-and-dose-response
1212-publication-figuresbuilds/12-publication-figures
1313-sequence-and-omicsbuilds/13-sequence-and-omics
1414-docking-prepbuilds/14-docking-prep
1515-image-and-plate-readerbuilds/15-image-and-plate-reader
1616-lab-data-managementbuilds/16-lab-data-management
1717-manuscript-assemblybuilds/17-manuscript-assembly
1818-depositionbuilds/18-deposition
1919-grant-and-thesis-draftingbuilds/19-grant-and-thesis-drafting
2121-error-huntbuilds/21-error-hunt

A gate you have never seen fail is not a gate. Break something on purpose and confirm it fails, for the reason you expected.