Skip to content

Insights

Holding quality when AI writes the code

Kim Törnqvist6 min read

Short answer

When AI writes most of the code, responsibility for quality moves from review to automated gates. Strict type checking, tests, lint rules that encode architectural decisions, and a single verify command that must be green before every commit together catch what a human stops noticing after the third file.

The objection to AI-written code is rarely that it does not work. It is that it drifts — style, structure and decisions pulling apart over months until nobody can say why anything looks the way it does.

Review does not scale

A human reviewing their third AI-generated file within an hour is no longer reading with the same sharpness. That is not a character flaw, it is a predictable effect. The fix is to move as much judgement as possible to something that does not tire.

The gates that do the work

  • Strict type checking, including noUncheckedIndexedAccess
  • Lint rules that encode architectural decisions
  • Tests for the things that cost money when they break
  • One command that runs everything, required green before commit

The point of that last item is that a gate nobody runs is not a gate. If it takes four commands and a good memory, it will be skipped on a Friday.

Common questions

Does code get worse if AI writes it?
Quality follows the gates. With type checking, tests and lint rules in place, the code holds the same level regardless of who or what wrote it.

Websites, products and brands — built in weeks

Torn Studio builds digital products with AI tooling. You get the same quality in a third of the time, and you always talk directly to the person building it.