Projects The Agent-Built Stack

The Agent-Built Stack

The checks that review, test and limit the agents that write the code for all of my projects.

I can’t review every line, so the rules that matter run as automated checks that can fail a build.

Security Review

Every week, a model reviews that week’s commits plus one rotating area of the code. It can read the code and nothing else. It has no shell, no web access and no way to write files. A script prepares the week’s changes and hands them over as a file.

The review assumes the code could try to manipulate the model. So the model holds only its own key, and separate steps that run no model send the email and open any pull request. The review never merges anything itself. Code also caps scores for low-confidence findings and strips anything that looks like a key from the report.

Design Rules

A written DESIGN.md is a merge-blocking check in CI, so every UI change is held to the same standard.

One file of color tokens generates the styles for the web and iOS. A check fails if the generated files drift or if a raw color value shows up in dashboard or iOS code. Other tests confirm that rules like reduced-motion support are still in place.

AI Models

Agents will type model names from memory, and those names can be out of date. So outside tests, docs and the policy script, only one file may contain a model ID. A CI scan fails on any other, and on any model older than an approved floor.

Tests and Cleanup

Known issues: old dead code is allowed on a reviewed list. Any new finding fails the run, and the update command can only shrink the list.

Large refactors: when the API was split into feature folders, the tests checked that every database query and the order of the routes stayed the same. That made it safe to move the code around.

Credentials: a hook blocks commands and file writes that match credential patterns before they run.

Deploys

Each deploy updates the database first and then ships the code, so for a short time the old code runs against the new database. A change that removes a table therefore goes out in two steps: first the code stops using it, then a separate pull request drops it.

Tests have also had gaps here. A Lambda handler once passed CI and then failed at startup in production, so that workspace now has a test for that exact mistake.