A row of outlined squares on a dark grid passing through a narrow red gate and emerging as filled squares

How to govern AI coding assistants in an engineering organization

AI in engineering

Published
Reading time
4 min read

How we govern AI coding assistants in practice: a short approved toolset held centrally, a written boundary on what an assistant may do, the gates every change passes whether or not a tool drafted it, the internal data tier the tools sit in, and review depth as the number to raise.

Most engineering organizations we talk to brought coding assistants in team by team, and control never caught up with the tools.

Standardize the toolset before you scale seats#

We approve a short set of tools and hold every seat centrally. The primary coding assistant is on a team plan that the company administers and reports on, so the organization knows who holds a seat, can add or remove a person, and can read what the seats get used for. An established automated code reviewer, independent of the assistant, reads every meaningful change. Inline completion tools are optional, and an engineer picks from the approved ones.

An engineer who wants anything else files a documented request and waits for the review. Personal and free AI accounts stay out of company work, because no agreement with the company covers code that passes through them. We don’t allow browser AI extensions.

What an assistant is allowed to do, and what it never does#

The assistant works under an engineer’s direction. It drafts code and reworks it, writes tests, digs into a bug, drafts a design document or a ticket, writes documentation and reviews a change. The engineer decides what it works on, reads what comes back and signs the result.

The assistant ships nothing on its own, and a customer-affecting decision stays with a person, who takes it after the assistant has prepared it. Every finding an assistant or the automated reviewer raises stays advisory until an engineer has checked it against the real code, and nobody applies a finding automatically, because these tools are confidently wrong often enough.

The gates an AI-drafted change passes#

A change meets the gates in this order. The engineer drafts the change with the assistant. Linting runs first, then strict type-checking, then the full test suite, on the order of a thousand-plus tests, then a domain-specific regression check on a small canary corpus. The independent automated reviewer reads the change next and raises its findings. The engineer checks each finding against the real code, applies the ones that hold and rejects the rest. The engineer then names the tools used in a pull request template field, a human reviewer reads the change and signs off, and a person pushes it.

If the change touches authentication, secrets, build and deployment, or infrastructure, a senior engineer reviews it, whether or not AI was involved. If a check fails, the engineer fixes the underlying issue; nobody switches a quality or security check off to push a tool’s output through.

What the assistant is allowed to see#

Developer tooling sits in the internal tier of the data classification: source code, architecture documents and tickets. Customer data stays inside the company’s own cloud account and never reaches a developer tool, and a production secret never enters a prompt. An assistant with terminal access can save approval rules for the commands an engineer told it to stop asking about. Check your AI coding agent’s saved approvals for secrets shows how to keep a credential out of those rules.

The vendor’s terms bar training on the company’s code. The automated reviewer has its own data agreement and reviews the change in front of it, reading other files in the repository for context. The code itself stays in private repositories. An AI usage policy for software development teams: what it has to cover states which data tier may reach which tool, across all four tiers, and the rest of what the written policy has to contain.

How seats keep the spend bounded#

Every assistant seat is a per-person plan on the company’s central bill. Usage reporting shows who is on the plan and who uses it. Where a plan bills usage beyond what the seat includes, the administrator caps that paid usage per person or switches it off, so the seat count and any cap bound assistant spend. At each gate the organization removes any seat unused for the whole period since the last gate; it can be requested again through the tool-request path. How to cap and control AI spend in an engineering organization covers the product side, with a fixed monthly budget per feature and an automatic shut-off when a day’s spend spikes.

What to measure, and the number to refuse#

We watch review depth and escaped defects, both against the baseline measured before the tools scaled.

Review depth is the share of non-trivial changes that receive a substantive human review comment. In a measured case that baseline was under 7 percent. A 90-day target of 40 percent or more is reasonable. The automated reviewer makes the target reachable, because it surfaces findings a busy reviewer would skim past, and the engineer who triages them reads the change closely.

Escaped defects come next. The go or no-go criterion at the 90-day gate is that the rate of defects reaching production, and what error monitoring reports, have not risen as assistant use scaled.

The number to refuse is the percentage of code written by AI. Lines of code reward verbosity, and after an engineer has edited a draft nobody can say which lines were the tool’s. Is “percentage of code written by AI” a good metric? explains why, and what to measure instead. Running AI under governance sets out the whole operating model, exit ramps and gated program included.

Frequently asked questions

Which AI coding assistants should an engineering organization approve?

Approve a primary coding assistant on a team plan that the company administers and reports on, plus an established automated code reviewer, independent of the assistant, that reads every meaningful change. Inline completion tools are optional. An engineer who wants anything else files a request, and personal or free accounts stay out of company work.

Does AI-generated code get a lighter review?

No. It passes the same linting, type-checking, test suite, regression check, automated review and human sign-off as any other change, and the engineer names the tools used in a pull request template field at review time. If it touches authentication, secrets, build and deployment, or infrastructure, a senior engineer reviews it.

What is an AI coding assistant allowed to see?

The assistant sees source code, architecture documents and tickets in the internal data tier, under vendor terms that bar training on them. Customer data stays inside your own cloud account and never reaches a developer tool, and a production secret never enters a prompt.

How do you measure whether AI coding assistants are helping?

Watch review depth against your own baseline, meaning the share of non-trivial changes that get a substantive human review comment, and check at the 90-day gate that the rate of defects reaching production has not risen. Don't count the percentage of code written by AI; it says nothing about either.

  • ai
  • governance
  • code-review
  • engineering-leadership
  • metrics
Share
Portrait of Srđan Marković

Srđan Marković

CTO

Srđan Marković is the CTO of Red Black Tree. He writes about running AI in an engineering organization under governance, developer security and the operating decisions behind both.

Related articles