Coding with AI agents
How Controxity fits a team whose code is written by Claude Code, Cursor or Codex: evidence for the agent, proof for the fix, and a safe way to ship it.
Most new code is now written by AI agents. They are fast, but they work from what they're shown, and what they write still has to be proven and shipped safely. Controxity covers both sides.
The loop, with an agent#
| Step | What happens | How |
|---|---|---|
| 1. Production tells the agent | Your agent reads the real errors: every frame, what the error code means, how often, on which versions, the steps before it and the shape of what failed. | MCP server |
| 2. The agent writes a failing test | From the shape of the input that failed, it writes a test that fails the same way, before it changes anything. | The shape of what failed |
| 3. The agent says what must hold | It adds expect("total-not-negative", total >= 0) where a wrong result would otherwise go unnoticed. | Expectations |
| 4. It ships dark | New or risky code goes behind flag("new-checkout"): off until a person turns it on, for everyone or a share. | Switches |
| 5. CI says what the release carries | One step sends the source maps, says which commit the release is, and lists the fixes it carries. | Releases from CI |
| 6. Controxity watches | A switch that makes errors plainly worse turns itself off. A fix shows Running where it really runs, and a problem reopens if it comes back. | Versions |
Controxity's own fixer follows the same loop: it reads the same evidence, must prove a fix with a test, and nothing reaches production without people's yes (How a fix is made and proven).
Set it up once#
- Put the SDK in, with your framework's hooks: Node.js, Python.
- Write the first
controxity.ymland guide:node controxity.js initreads your repository and writes how your code is tested, and anAGENTS.mdthat the fixer and other agents read first (how). - Give your agent the MCP server, with a key of your own: Use it from your AI tools.
- Add
releaseto CI, after the build: Releases from CI.
What to ask your agent#
- "What's breaking in Basket right now? Fix the worst one: write a test that fails the same way first."
- "Put the new checkout behind a switch called new-checkout."
- "Add expectations to the pricing code: what must always be true about a total, a discount and a refund?"
- "Is new-checkout on in production yet, and how is it doing?"
- "Did the fix for the cart total ship? Where does it run?"
What the agent can't do#
Its key reads what you can read, and nothing more. It can't run the fixer, approve, deploy, or turn a switch on or off: those stay people's steps, each in the Activity record.
What leaves your server#
Everything above is sent as codes and shapes, never values: an error's type, where it happened, the key names and types of what it was given, the steps before it as codes, expectation and switch names with counts. See What never leaves your server.