An AI agent writes fast and is wrong with full confidence. I show what stops its mistakes in my work, with numbers counted across two repositories.

The short answer

AI-generated code is as secure as the process it goes through. An agent writes fast and can be wrong with full confidence: it claims something works when it does not. That is why I do not take its word for it. Someone or something has to refute or confirm every claim it makes about the state of the code with a measurement.

All the numbers below come from the How I build page. I counted them with a command on the repositories as they stood on November 13, 2026; the controls on the agent's work in BlueCode are counted on my tool as of November 16, 2026. They cover two projects: the repository of this website (BlueCode) and Aelo, a SaaS platform where I am CTO and co-founder.

The skeptic: an agent whose job is to find the mistake

Alongside the agent that writes the code there is a second one, whose only job is to look for holes in someone else's work. It reads a plan or a change and checks every claim against the code. It does not judge whether a solution "looks good", only whether it can be refuted.

In Aelo the skeptic wrote 520 reports and refuted 1,015 claims made by agents. In the younger BlueCode repository that is 5 reports and 16 refuted claims. Each refutation is a mistake that never reached the code, because it was caught at the plan or review stage.

Acceptance criteria you can check with a command

Before the agent writes a single line, a phase of work gets a list of acceptance criteria. Each criterion has a command that checks it and a number that command has to return. "The page looks good" is not a criterion. "This command returns 4" is.

In the closed phases of Aelo there were 2,197 such criteria across 277 phases. In BlueCode: 34 criteria across 5 phases.

Automatic controls on the agent's work

Some mistakes do not need a review, they need a guard. The agent works on one phase and has directories assigned for writing: a write outside them through the file editor is stopped by a guard. Passwords and keys are kept out of the code history, and the project documentation lists only their names. These controls fire on their own, on every attempt, not only when someone remembers them.

BlueCodeAelo
Automatic controls on the agent's work3441
Controls with their own test3428
Process gates2869

A control without a test is a promise. A control with a test is something I have verified: I give it a case it is supposed to block and watch whether it blocks.

Tests

Automated tests check that the code does what it should on every change, not only when someone remembers. Aelo has 15,512 test cases, BlueCode has 63. A number alone guarantees nothing, which is why tests go through review too: a test that cannot fail is worse than no test.

What I do not hand to the machine

Some decisions the agent does not make at all: deploying to production, the scope, the price and the priorities of a project, or starting the servers on which I check a change before deployment. The agent prepares the material, and I make the decision myself.

So: secure or not?

I do not promise that the process catches everything. I promise that every change goes through the same controls, and the numbers show how much they actually catch. The full description of the steps, roles and numbers is on the How I build page.