Validation-driven AI coding

What gates run

  • Typecheck. Static types are the cheapest place to catch hallucinations.
  • Lint. Catches dead imports, unused symbols, style drift.
  • Test. Vitest / your project's test runner; pre-existing suites become AI guardrails.
  • Build. Output must compile and bundle cleanly.
  • Smoke. Playwright smoke runs verify the running app didn't break.

Why checkpoints matter

An agent that broke something three loops ago has buried the failure. File-level checkpoints reverse that: every chat:send creates a local snapshot, capped at 500 files / 5 MB / 256 KB per file. The Restore pane lets you rewind to any of them. Git-independent, so the rollback works even when the agent forgot to commit.

P0 filter

Some intents are low-signal: vague requests, missing context, broken acceptance criteria. The P0 filter blocks those at the door instead of letting them consume a validation cycle that will fail anyway.

Frequently asked

Which validation gates run before work is declared done?
Typecheck, lint, test, build, and a Playwright smoke run, where the project defines them. The agent allowlist can invoke that fixed subset directly; a full build stays in the embedded terminal under user control.
How is a checkpoint different from a Git commit?
A checkpoint is a Git-independent local snapshot taken on every chat send, capped at 500 files / 5 MB / 256 KB per file. It lets you rewind even when the agent never committed, so a regression is one rollback away.

Related