[e925]

Build-Verification Gates Pattern★★★★

✓ loya-tested🆓 free🔌 drop-in

Three gates that catch broken code before your agent commits it. No gate, no commit.

why it matters

When Claude writes code on its own, the real risk isn't bad code. It's bad code that gets committed without anyone noticing. Three cheap gates fix that: 1) typecheck passes, 2) build passes, 3) screenshot proves the page rendered.

We use this on every autonomous loop. It caught ~6 silent breakages in our first week alone. If you let Claude ship code while you sleep, these three gates are the difference between shipping clean and waking up to a broken site.

install

Add a 3-step gate to your agent's autonomous loop: 1) tsc --noEmit (TypeScript type check), 2) npm run build (production bundle), 3) smoke-test screenshot via Playwright. If any step fails, stop and flag for review instead of committing.
avoid if

You're writing code by hand and reviewing every diff yourself. Manual review is still a better gate.

see it in action
open the module that demos Build-Verification Gates Pattern

tags

💰 money moves that use this tool

all money moves →

more in audit & qa

last reviewed · 2026-04-23 · added 2026-04-23