Ship It With AI Mihai Cvasnievschi

Should the agent touch this code?

7 min read

By the end you can establish a task's prerequisites, identify preparation gaps and decide what work can proceed within tested boundaries.

TL;DR


When should you not use AI coding agents?

Some codebases should not get an agent yet, and saying no there is what lets you say yes everywhere else.

The reason is not that the agent or the team is bad: a proposed change can exceed the team's ability to evaluate it, verify it or contain its consequences. Establish those prerequisites first. The eight signals then help prioritize preparation; they are a discussion aid drawn from practice, not a validated risk model.

Before scoring: define the task

Prerequisite Evidence needed
Scope Named behavior, affected module and environment; permitted actions
Evaluability A qualified person who can recognize a plausible but incorrect result
Verification Checks that expose consequential mistakes in this change, with meaningful assertions and interpretable failures
Boundaries and recovery Appropriate access, approval, deployment and recovery arrangements for the consequences

If any answer is missing or unknown, restrict that work until the gap is addressed. An agent can still investigate an untested module or draft characterization tests under supervision. That does not authorize it to change the module's business behavior. The restriction follows the affected task, not every activity in the repository.


The eight kill signals

Each signal breaks agent work in its own way, and each has a first fix.

Signal What it looks like Example First fix
1. No tests No suite, or one nobody runs An edit broke an untested reconciliation module; it surfaced two months later Characterization tests
2. No documentation Only the original author knows why The agent "simplified" a fee tier that had a 2017 regulatory carve-out Architecture review (Chapter 7)
3. Tight coupling Edit one file, three others break Three modules in a 14-year-old import cycle Break the worst coupling
4. Scattered rules One rule lives in several places Transfer limit in a UI config, a service constant and a database trigger One source of truth
5. Regulatory constraints Every change needs a traceable approval Anti-money-laundering changes need three sign-offs the agent cannot route Approval workflow
6. Team cannot evaluate output No one can judge the result in some domain A junior ships agent-written encryption (below) Restrict scope or add an expert reviewer
7. Model-context fit Thin public corpus (COBOL, proprietary DSLs) An in-house workflow engine; the agent applied another framework's patterns Add docs and skills, or a better-fit model
8. Velocity-of-change A framework is moving under the agent React 18 idioms in code that needed 19 Name the target version in AGENTS.md; slow the agent on touched paths

Signal 1: no tests

Establish relevant verification before behavioral changes; let the agent help prepare it.

Ask the agent to draft characterization tests of current behavior, then have a qualified reviewer distinguish intended behavior from existing bugs. Check important outcomes, failure cases, reliability and whether the team can interpret failures. If no available evidence would expose a consequential mistake, restrict the affected work to investigation or supervised preparation until that evidence exists. The tests are a regression net, not proof of correctness (Chapter 5).


Signal 6: the team cannot evaluate the output

This is the most important signal, and the one teams misread most often.

A junior is assigned a story to add a cryptographic verification step to the payment flow and dispatches the agent. It produces a module using AES-256 in CBC mode with a hardcoded initialization vector. To someone new to cryptography it looks right: it compiles, the unit tests pass, and the senior cryptographer is on parental leave for three months. The junior ships it, and the vulnerability sits in production for six months until a penetration test finds it.

The agent did exactly what was asked. Its output looked right and was wrong, and nobody was placed to see it.

Teams read this as "we need more senior engineers", which does not scale on a six-month timeline. Make qualified approval a required server-side review for the sensitive paths, with agent credentials unable to bypass it. Enforced tool policy can also keep the agent from editing those modules. AGENTS.md can explain the restriction and agent reviewers can assist, but neither substitutes for the missing expertise or makes approval unavoidable.

This signal fails the evaluability prerequisite regardless of the total. Several other signals can also block a particular task, including absent verification or an unavailable approval path. Build the missing capability, bring in someone who has it, or restrict the affected work. A low total never overrides a missing prerequisite.


Are AI coding agents production-ready?

Readiness belongs to a task and its controls; a repository color only helps prioritize preparation.

Before scoring: define the task, a qualified evaluator, evidence of consequential errors, and appropriate permissions and recovery. Missing or unknown? Restrict that task to investigation or supervised preparation.

0 - 1GREENFew preparation gaps
2 - 3YELLOWSubstantial preparation
4 +REDBroader preparation
Preparation signals (count known gaps)
  1. 1Weak verification of affected behavior
  2. 2No documentation
  3. 3Tight coupling
  4. 4Scattered rules
  5. 5Regulatory constraints
  6. 6No qualified evaluator
  7. 7Model-context fit
  8. 8Velocity-of-change

A green repository score does not authorize every task. Investigate unknown signals (?); never count them as zero. With no unknowns, sum and round halves upward before applying the color.

Figure: The kill signals and the traffic light preparation guide. Missing task prerequisites override the color; unknown answers require investigation.

Apply the guide to the relevant area of a project. A green repository score supports choosing a starting point. It does not authorize every task in that repository.


Count by intensity, not presence

Score the evidence for the affected area; leave uninvestigated properties unknown.

Use 0 for an absent preparation gap, 0.5 for a partial gap and 1 for a substantial gap, with a short evidence note. Use ? when uninvestigated; do not calculate a reassuring total by counting it as zero. With no unknowns, sum and round halves upward before applying the 0-1 / 2-3 / 4+ bands. These are author heuristics, not measured safety thresholds. Appendix B.4 gives behavioral anchors; a line-coverage percentage is supporting information only.


What the colors look like

Each color changes how you use the agent.

Project and evidence Count Preparation What to do
Customer-profile service: relevant outcomes and failure cases tested reliably, current overview, canonical rules, qualified reviewer 0 Green Choose a bounded task and establish its remaining prerequisites
Legacy payments: relevant failure cases absent (1), stale docs (0.5), costly coupling (1), scattered rules (0.5); approval and expertise available 3 Yellow Prepare verification first; supervise bounded investigation and refactoring
Custom encryption library: undocumented, no qualified cryptographic reviewer Not decisive Prerequisite failed Restrict cryptographic changes; obtain expertise or evaluate a vetted replacement
Greenfield API: clear request, verification and deployment not investigated ? Unknown Define behavior, checks, reviewer and recovery before choosing a mode
Internal tool: relevant checks established, some documentation and coupling gaps (0.5 each), low exposure 1 Green A possible pilot, subject to task prerequisites and spending limits

When it breaks


Do this Monday


Go deeper