I made AI slower and increased the throughput of the whole system.

My Codex used the AGENTS.md file shipped with Phoenix. It told AI to end every run with mix precommit, which ran the complete Elixir test suite with mix test.

After watching the process, I saw a way to save tokens: move the routine commands out of the AI prompt and expand the verification stage. That stage eventually grew to ten checks, including Playwright, linters, and a security audit. When a check failed, AI fixed it and restarted the suite.

The faster loop

human → AI running mix precommit inside

Running all ten checks after every AI response seemed slow, so I tried moving the complete suite into CI:

human → AI without mix precommit → deployment verification

AI returned sooner. I could review the result sooner, give the next instruction sooner, and reach something worth deploying sooner. That worked. It also moved the constraint.

Midva is used to develop itself, currently for one person. Production matters most as a development environment because it contains the current data, so every meaningful iteration goes there.

Faster development produced more deployments. They ran one at a time, and the release path still ran the complete check suite. Failures returned to AI, the checks restarted, and later deployments waited in the queue. A deployment took about 15 minutes on average.

Protecting the actual constraint

The first fix was simple: put all ten checks back after every AI run. Each AI iteration became slower, but work entered the deployment queue with expensive failures already resolved. Releases stopped looping through automatic fixes, deployments finished faster, the queue shrank, and the human became the constraint again.

This does not mean every team should run every check after every AI change. It shows why local speed is not enough. The question is whether a change helps the whole system move more work through its current constraint.