Skip to content

AI

Working with AI coding agents

Date:

Oct 28, 2026

An agent can write a feature in minutes. Getting code that is correct, readable and safe to ship still depends on how you brief it and how you review what comes back.

001

Write the Brief First

An agent is only as good as the task it is given. Before I start one, I write down what done looks like: the behaviour I expect, the files that are likely involved, the constraints that matter (no new dependencies, no changes to the public API) and how to check the result.

Vague requests produce plausible code that solves a slightly different problem. Five minutes on the brief saves an hour of untangling, and the same note becomes the pull request description afterwards.

002

Let Tests Hold the Line

Tests are the one part of the contract an agent cannot talk its way around. I ask for the failing test first, read it carefully, and only then let the agent make it pass. If the test is wrong, everything built on it is wrong too.

Fast checks make this loop work. When lint, type checks and unit tests finish in under a minute, the agent can run them after every change, and so can I.

One habit to watch for: an agent that cannot fix a bug will sometimes weaken the assertion instead. I review changes to tests as closely as changes to code.

003

Review Every Line You Ship

The name on the commit is mine, so I read the diff the way I would read a colleague’s. Are errors handled? Does it duplicate a helper that already exists? Does it call a function or an option that does not exist at all?

Imports deserve a second look. A package name that is almost right can be a typo-squatted copy published to catch exactly this mistake, so I check every new dependency before it lands.

All of this is only possible when changes are small. I ask for one change at a time, review it, commit it, and then ask for the next.

004

Keep Secrets and Judgement Human

Agents run commands, so they get the least access that still lets them work: a sandbox or a branch, no production credentials in the environment, and a confirmation step before anything destructive.

Decisions about architecture, deleting data and security trade-offs stay with people. The real gain is the time no longer spent typing, and I spend it on design, edge cases and talking to the people who will use the software.

More Articles

Keep reading