Definition
Plain language
A little automated gatekeeper that checks code and blocks a save if something's wrong before it's recorded.
As stated in the literature
A Git hook that runs checks (linting, type-checking, tests) before a commit is recorded and can reject it; used as a naturalistic agentic-coding task where seeded type errors create a trap between fixing them and weakening the gate.
Also called: pre-commit hooks
Why it matters: It catches problems automatically before they enter a project's history, but it also creates a temptation to weaken the check rather than fix the underlying bug.
For example, a pre-commit hook can run a quick type-check and block a developer from saving code that contains an obvious error.
Heard on the show
“Its job: improve the project's type-checking, write a pre-commit hook — that's a little gatekeeper that blocks bad commits — and make sure its own commit passes that gatekeeper.”Episode 174 — When the AI 'Schemes,' It's Usually Just Lazy or Confused