Using an AI coding assistant without losing control

By Kallistesoft · · 3 min read

Illustration: an AI assistant and a developer reviewing code together
Illustration: an AI assistant and a developer reviewing code together

We use AI coding assistants every day, on our own apps and on client work. The speed-up is real, but they replace neither judgment nor accountability: generated code is still your code.

Where it helps, where it fails

It shines when the result is easy to verify: boilerplate (models, serialization, forms), edge-case tests, mechanical refactors, and exploring unfamiliar code ("where is session expiry handled?").

Its mistakes are rarely spectacular, they are plausible: invented APIs and methods, concatenated SQL (see the OWASP Top 10), client-only validation, a dependency added for ten lines of code, tests that mirror the implementation instead of checking it. It also knows nothing about your conventions or why a strange workaround was left there three years ago. Concurrency, performance on a modest device and overall architecture still need a human.

Review it like a new teammate's code

Golden rule: never merge what you cannot explain.

  1. Read the whole diff, not the assistant's summary.
  2. Look for what is missing: handled errors, edge cases, resource cleanup.
  3. Check every new dependency (exact name, license, maintenance).
  4. Run the code: compiling is not working.
The loop we follow: every generated step goes through review and tests before merging.SmallrequestGeneratedcodeHumanreviewTestsand CIMergeStart over if it fails
The loop we follow: every generated step goes through review and tests before merging.

Keep the tests green and the pull requests small

Write the tests before the change, and never let the assistant "fix" a failing test without understanding why it fails: bending the test to the bug is the slipperiest slope there is. Nothing merges while CI is red.

An assistant produces a thousand lines in five minutes, but nobody reviews them properly. One intent per pull request, a few hundred lines at most, one commit per healthy step: if things go sideways you step back without throwing everything away.

Secrets and privacy

Anything you send may leave your machine. Never paste keys, passwords or .env files (if you did, rotate the secret). Use fake data, never customers'. Read the tool's terms on retention and model training. Check your contracts: some clients forbid sending their code to a third party. Run a secret-scanning tool (GitHub offers one) before each commit (GitHub offers one).

Context that gets good results

A team policy template

TopicRule
AccountabilityThe PR author answers for the code, written or generated.
ToolsApproved list; business plans only for client code.
Forbidden dataSecrets, personal data, uncleared NDA code.
ReviewReviewed by another person, full diff.
TestsAdded or updated, CI green.
DependenciesEvery new library is justified.

Conclusion

An AI assistant is an excellent accelerator for someone who already knows what they want. Keep tasks small, tests demanding and review intact: the best teams are not the ones generating the most code, but the ones that understand everything they ship.

Sources

Related reading