Skip to content
AI development

Keep the agent on a leash

AI coding tools are the fastest way to build and the fastest way to accumulate code nobody understands. The difference is entirely in the rules you set before the agent starts.

What is in this category

Rules, reviews and the audit before the rewrite

Written from experience of what these tools do well and what they do confidently but badly.

Project instructions

The standing rules your Claude Code sessions read every time: what the project is, what must never be changed, and what counts as done here.

Independent review workflow

A second model reviewing the first one’s work, with an output contract so it returns findings instead of a summary of its own activity.

AI coding governance

Who may run an agent against what, which changes need a human reviewer, and where the line is between assistance and autonomy.

Preventing destructive rewrites

The specific guardrails that stop an agent from “tidying up” a working subsystem it did not understand.

Repository AI-readiness

What makes a codebase workable for an agent: structure, naming, tests, and the context files that stop it guessing.

Audit before an AI refactor

Establishing what the system does today, so that afterwards you can prove the refactor did not quietly change behaviour.

How AI governance work runs

  1. Establish the baseline first

    What the system does now, recorded. Without it, “the AI refactor broke something” is unprovable and unfixable.

  2. Rules that fit your project

    Generic AI guidelines get ignored by the third session. Rules that name your actual constraints get followed.

  3. A reviewer that did not write the code

    Self-review by the model that produced the work finds almost nothing. Independence is the whole mechanism.

  4. Evidence over confidence

    Agents assert. The procedure requires them to point at the file and line, which is where most confident claims quietly die.

When this matters

Less urgent if

No AI tool touches your production code

Every change already passes human review

The codebase is small enough to read in a day

Urgent if

Most of your product was built with AI assistance

Your team ships agent-written code without review

You cannot tell which parts a human actually checked

An agent is about to be pointed at a legacy subsystem

Pick the category that matches your worry

Describe the situation in your own words and see the procedure — and its cost — before you spend anything.