sara. PT

Writing

The agent that writes the code never checks it

· agentic workflows· AI-assisted development· code review· process

Today a group of students from IF Barbacena visited our office, and I spent part of the afternoon explaining how we build software now. The question I got, in one form or another, was the one I’d ask in their seat: if agents write the code, what is left for people to do?

The answer is the loop. Most of it is not about writing code at all.

IA-first is a process decision

Bolting an assistant onto the end of an existing workflow gets you autocomplete. What we did instead was design the workflow assuming agents would be in it from the first step. Three consequences:

  • Specs are written to be executed by an agent, not just read by a person.
  • Tests and architecture rules are things an agent can run and get an unambiguous answer from.
  • People decide. Agents execute and verify.

The loop

demand → card → spec/design/tasks → tests first → implement
       → review gates → done → human approval
       → branch → dev → staging → main → production
                                          │
           bug in production → new card ──┘

Every demand becomes a card in a tracker, and the card’s state is the source of truth for where the work is. Each state has an agent with exactly one job:

  • Architect. Writes the spec, the design and a list of small tasks. A person reviews the spec before any code exists, because a wrong spec executed perfectly is still wrong.
  • Test engineer. Writes the tests first.
  • Executor. Implements one task at a time.
  • Spec auditor, PR reviewer, end-to-end validator, tenant-isolation auditor. Four separate checks on the result, each looking for a different kind of failure.
  • Bug hunter. When something breaks in production, it finds the root cause and the bug becomes a new card. The loop closes on itself.

We also split roles by the kind of work. The ones that need judgment (architecting, auditing, reviewing, hunting root causes) run on the strongest model. The ones that execute against a clear spec (implementing, testing, validating) run on a faster, cheaper one. Paying for the best model to type out a well-specified task is waste; economizing on the model that decides whether the design is sound is a false saving.

Three rules we do not negotiate

The agent that writes does not check. The one that implemented a task is never the one that verifies it. This is the oldest idea in engineering review, and it matters more with agents, not less: a model reviewing its own output tends to find it reasonable, for the same reason it produced it.

No evidence, no claim. “I verified it” counts only if it comes with a test, a file and a line. An agent saying a thing is done is a statement; a failing or passing test is a fact.

A person approves. Every jump from branch to production goes through a pull request, and nothing ships until someone validates the delivery. The agents make that validation cheaper. They do not make it optional.

I’d put the third one first if I had to rank them. Software that handles public-sector data doesn’t get to answer an incident with “the agent did it.”

What this means if you are just starting

I ended the visit with the part I most wanted the students to take home. When agents write a large share of the code, the skills that matter are the ones that let you tell whether the code is right:

  • Logic, SQL, Git and networking. You can’t check what you don’t understand.
  • Reading code. Reviewing well is now as valuable as writing well.
  • Writing clear, testable requirements. A precise spec is the single biggest lever on whether an agent gets it right.
  • Tests. Without them there’s no basis for trusting code, whether a person wrote it or a model did.

The tools will keep changing. Those four won’t, and they’re also the four that make you useful in a loop like this one.