← Brakes: coding with AI agents

Brakes: coding with AI agents · Part 10

Your agent imported the database into the core

· by Tony Tang

The agent takes the shortest path and imports the database into the pricing core. Types pass, tests pass, and the wall from Part 5 has a hole. Review would have to catch every import in every PR, and reviewers get tired. Write the rule as code: ESLint's no-restricted-imports, the core never imports infra, on every save and in CI. The agent sees the red line as it types and takes the port instead. Architecture you can't break by accident.

Comment below: What rule would you never let an agent break?

Brakes: a series on the checks that let an AI coding agent go fast without shipping bugs. Every best practice shortens the time between writing a bug and finding it. Brakes are why race cars go fast. All code is real TypeScript on Node 24, typechecked and tested before it went on screen.

More from this series