Lauren Tan, speaking at AI Engineer, describes her team’s approach to constraining and verifying coding agents.

Build trust into the environment

  • Put architecture, well-designed APIs, types, linting and tests ahead of prose instructions when a rule can be enforced.
  • Treat the codebase as a garden: agents copy existing patterns, so deprecated workarounds can spread as quickly as good ones.
  • Replace recurring corrections with checks that explain the underlying problem and how to fix it.

Examples from the team’s desktop app

  • Restrict React’s useEffect in product code, exposing supported patterns through framework APIs instead.
  • Separate Electron’s main and renderer directories and enforce import boundaries to prevent jank.
  • Tan says the team heavily restricts comments because explanations can become stale or excuse workarounds; that is a team-specific choice, not a general proof that comments are bad.

Verify the behavior

  • Give agents runtime tools, reusable command-line drivers and a feature map describing the app from the user’s perspective.
  • The team is experimenting with TLA+ model checking for cross-device flows, Lean proofs for a virtualization algorithm, and property-based UI tests.
  • Review screenshots, recordings, diagrams and verification results alongside the code; Tan says much of her own token usage goes to verification.

What the team reports

  • Tan reports 11,000 team pull requests in one month, about 227 contributors in October, and a roughly 0.5% revert rate; she attributes 3,000 of those PRs to her own work.
  • She says app responsiveness improved on several measures while release frequency increased. These are team-reported outcomes, not an independent comparison or proof of overall quality.
  • Her recommendation: fix the inner coding loop before automating it, or automation can multiply the problems.

“Whenever you correct your agent, try and do it by improving your codebase first.”