Architecture diagram — a client plane of advisory git hooks (lefthook pre-commit, pre-push) that any agent can skip, and a server plane where a GitHub ruleset enforces required checks, linear history, signed commits and no force-push before a merge reaches protected main

Hooks are advice, rulesets are law

Defense-in-depth for a solo developer running several coding agents against one deployable branch: advisory client-side git hooks (lefthook, pre-push) for latency, a binding server-side GitHub ruleset for integrity. Hooks are bypassable; rulesets are enforced. Pattern + the fitness function that proves the law is still on the books.

 · 9 min · Pedro Balbino