AI in technical strategy: agents in the codebase and what to standardise
Standardise the contract every agent must meet, not the product; write bans as a harm, a mechanism and an expiry; and put each rule where something other than the model's goodwill enforces it
You are writing the standard for how coding agents are used across a 300-engineer codebase. Which part will do most to keep the rules in force a year from now?
By the time you are a principal engineer, the question is no longer whether engineers use coding agents. An agent is a program that takes a task, edits files, runs commands and tests, and hands back a change; the AI Engineering course’s agents chapter explains the loop. Your question is what the organisation should agree on so that two hundred engineers using agents do not produce two hundred policies.
This chapter covers writing that agreement as a standard: what to standardise, how to write a ban, how to enforce it without authority over the teams, and whether to pick one tool. It assumes technical strategy and standards and code review at scale, and it does not repeat the head of engineering’s side of the subject, which is seats, spend, hiring and the board, in AI and the engineering organisation. The engineering manager’s side, running a team day to day with agents, is in managing a team that works with AI coding agents.
An agent is an author that can run commands
Treat the agent as a new kind of contributor with three properties that the rest of your standards were not written for.
It writes fast and in volume, so review becomes the constraint. Thoughtworks’ Technology Radar put “Complacency with AI-generated code” on Hold and observed that coding agents tend to produce larger change sets that are harder to review; its advice is to reinforce the old practices, test-first development and static analysis, and build them into the workflow. It can act, not only write: it runs commands, reads files and, if you let it, reaches the network and calls tools over MCP, so permissions matter as much as code quality. And it reads instructions from the text in front of it, including text it should not trust, which is the subject of the guardrails and injection chapter.
Those three properties give you three questions, and a standard that answers them is complete.
| Question | What it decides | Where the answer lives |
|---|---|---|
| What may the agent touch? | Files, commands, network, credentials, data | Permission baseline, sandbox, credential scoping |
| What must be true of what it produces? | Tests, change size, review, provenance | CI checks, CODEOWNERS, review rules |
| Who answers for it? | The author of record, the owner, the escalation | A named human on every change |
Notice what is absent from the table: which product. That is deliberate, and the section on choosing returns to it.
Diagnose from your own numbers
Technical strategy starts with a diagnosis, and the temptation here is to borrow someone else’s. DORA’s 2025 report on AI-assisted software development describes AI as an amplifier of what an organisation already has: strong practices get stronger and weak ones get worse. That is a hypothesis about Ojaline, not a finding. Test it on the data you hold.
Ojaline’s figures are deploys up from 2,500 to 3,050 and failed deploys up from 225 to 366. The arithmetic: 550 more deploys, a rise of 22.0%; 141 more failures, a rise of 62.7%; successful deploys up from 2,275 to 2,684, a gain of 409 or 18.0%. Two readings fit. More change is reaching production and the pipeline is catching a smaller share of the bad change. Or the work shifted to riskier services for reasons unrelated to agents. The numbers cannot tell them apart, and 180 seats out of 300 is a rate of adoption, not a cause.
So the diagnosis is narrower than “agents make us worse”. It is: the organisation is shipping more change per week and failing a larger share, review capacity has not grown, and no written rule says which services an agent may change without a human owner reading every line. Each part of that sentence supports a policy. Write it down before you write a single rule, and if you cannot say which observation a rule answers, drop the rule.
What to standardise
A standard that covers everything is ignored; one that covers nothing leaves the default in place. Test each candidate by the cost of variance. Standardise where differences between teams cost the organisation something that no single team pays. Leave alone where they cost only the team that chose.
Standardise: the contract. Every agent used on company code meets the same written requirements, whoever makes it.
- Data terms. What the vendor may retain or train on, which regions process the data, how deletion works. This is a gate in the sense of the principal and the business: fail it and the agent is out, whatever it does well.
- A permission baseline. The default for what an agent may run without a person approving it, and the list of things it may never do unattended.
- An instruction file in a known place. A file in the repository root that tells any agent how to build, test and follow conventions. AGENTS.md is an open convention for this, supported by many agents, which matters because a standard written around one vendor’s file name dies with the vendor. Whatever you choose, one file at one path, owned like code.
- The verification bar. A change an agent drafted passes the same tests as any other, is small enough to review, and has a human author of record who can explain every line. This is your existing code review standard applied without exemption; the agent is not a second approver.
- Logs. Enough record of agent sessions to reconstruct what happened after an incident.
Standardise: the way to add an agent or model. Not the answer, the procedure: a written evaluation on your own tasks, with the data terms as a gate, the exit cost written down and a rerunnable script. The AI Engineering course’s choosing a model and evals in CI chapters cover the mechanics. This is the part that survives the next model release.
Leave to teams. Which approved agent they use, how they prompt it, the shared skills and snippets a team builds for itself, and which tasks they hand over. Variance here costs the team, which learns from its own choices, and the organisation benefits from the experiments. Ask teams to publish what they learn.
Do not standardise. A target for how much code agents write, a rate of use per engineer, or a mandate that everyone use the tools every day. Counts of activity reward volume, and the head of engineering’s chapter explains why these figures should not appear in any report. A standard should constrain risk, not set a quota.
Bans, gates and defaults
A ban without its reason is the sixty-fourth rule on a wiki page. Use three tools, and choose the weakest that works.
| Tool | Use when | Example at Ojaline |
|---|---|---|
| Default | The right behaviour can be made the easy one | The service template ships the instruction file, the sandbox settings and the test command |
| Gate | The action is allowed but needs a condition or a person | A change to one of the 24 tier-1 services needs the owner’s approval on every agent-drafted change |
| Ban | The harm is serious and cannot be made safe with a condition | An agent session never holds credentials that can write to the seller wallet’s settlement job |
Write every ban in the same four parts, so a reader can judge it and an engineer can ask for an exception.
- The harm, in terms of what happens to a customer or the company. “Agents are risky” is not a harm. “A command run by an agent against the nightly capture sweep captures payments twice” is.
- The mechanism that enforces it. Credentials the agent’s environment does not contain. A network rule. A CI check. A branch rule. If the only enforcement is a sentence in the document, mark the ban as advice and say so.
- The exception route. Who may grant one, how it is recorded, and for how long.
- The expiry or review date. Tools change. A ban written for one generation of agents outlives the reason for it unless someone must re-read it.
Four bans are worth considering for most organisations, each tied to a harm.
No unattended access to money systems. The agent never holds write credentials to payment, ledger or payout systems. At Ojaline, five of the 24 tier-1 services have exactly one owner, and three of them are the seller-wallet settlement job, the seller payout batch and the nightly capture sweep. An agent that can run those with production credentials is a second operator nobody onboarded. Enforce it by not issuing the credential, not by asking the agent not to use it. The identity, access and secrets chapter covers how credentials are scoped.
No auto-merge on tier-1 services. An agent may open a change; a named human merges it. Passing tests show that the checks someone thought of passed; the owner is the person who reads what they did not check.
No data outside approved agents. Customer and seller data, transaction logs and secrets go only to agents that passed the data-terms gate. This is the ban engineers break most often, because the approval path is slower than a browser tab. A ban that is slower to comply with than to evade fails. Pair it with a fast route to approval, or you have only moved the use somewhere you cannot see.
No full trifecta in one session. Simon Willison coined the “lethal trifecta” in June 2025 for agents that combine access to private data, exposure to untrusted content and the ability to communicate externally. Text in the untrusted content can steer the agent to send the private data out. His advice is to avoid the combination by removing at least one of the three. At a marketplace, seller-written product descriptions and buyer messages are untrusted content, so a session that reads them should not also hold private data and open network access. Enforce it with sandbox network rules and by scoping which tools a session receives.
Gates carry most of the value: a gate says yes with a condition, so engineers use the path you can see. Make the common case cheap, with an exception that takes a day, not a quarter.
Enforcement without authority
You do not manage the teams that must follow this, so the enforcement ladder in standards and code review at scale applies, with one addition for agents: the instruction file sits between guidance and control. It shapes what the agent tries; it cannot stop anything. Use it for conventions, such as which test command to run, and never as the only thing between an agent and a harmful action.
From the bottom of the ladder up:
- Defaults. The repository template, the paved road of security champions and paved roads, ships with the instruction file, the permission baseline and the test command. A team that does nothing is compliant.
- Permissions and sandboxes. The baseline lives in configuration the team does not have to remember: which commands run without approval, which paths are off limits, no network by default for sessions that touch private data.
- CI checks. Fitness functions, as in architecture reviews and governance: fail a change that touches a tier-1 service without the owner, or that adds a dependency without review, or whose size exceeds the limit. Run the same tests as for any author.
- Review. For judgement: is this the right change and does the author understand it? The secure code review chapter covers what to distrust in code a person did not write.
- An exceptions register. Each exception has an owner and an expiry date.
You also need a sponsor, as technical strategy does. The head of engineering adopts the standard, funds the platform work it implies and settles the disputes. Without that, the standard is your opinion with a table in it.
Choosing the agent and the model: one or many
The question executives ask is whether to standardise on one agent and model. The answer depends on what you are protecting.
| One agent and model | Teams choose freely | Contract plus a short list | |
|---|---|---|---|
| Data terms to review | One | One per tool, growing | One per approved tool, two or three |
| Shared skills and instruction files | Work everywhere | Break between tools | Mostly portable through an open file format |
| Fit for different work | Poor: a search team tuning a ranking model and a team editing checkout screens differ | Good | Good, within the list |
| Exit when the vendor changes terms or retires a model | Costly, and you learn about it at the worst time | Distributed and invisible | You hold a tested alternative |
| Cost visibility | Clear | Opaque | Clear enough |
One agent is right when the organisation is small, one vendor passes every gate, and switching would cost days. Free choice is right at a few engineers, where the review burden of a contract exceeds the risk. In between, standardise the contract and approve a short list. Two or three is a rule of thumb, enough to hold a tested alternative, few enough that security can review each. Someone must run the evaluation script, and teams will ask for a fourth: say how it gets added, and answer within a fortnight.
A model is a vendor evaluation with a short half-life, as the principal and the business argues. The evaluation must run again when a model is retired or a price changes, so keep it as a script and keep an owner for it.
Measuring whether the standard works
Four measures show whether the standard is paying.
- Change failure rate by service tier, with counts beside rates. At Ojaline the starting point is 366 failed deploys out of 3,050, or 12.0%. Report tier-1 services separately, because a rate across 150 services hides the ones that matter.
- Review wait and change size, because agents move the constraint to review.
- The bypass sample. Each quarter, check thirty to sixty merged changes against the rules, as the architecture review chapter does: how many touched a tier-1 service without the gate, how many sessions held credentials they should not.
- Exceptions open, and how many expired on time. A register that only grows says the rules do not fit.
Do not measure the share of code an agent wrote, or rank engineers by usage: both measure activity.
Where practitioners disagree
Permit by default or ban until approved. Banning until a policy exists protects the data and, as the head of engineering’s chapter explains, pushes use onto personal accounts you cannot see. Permitting everything leaves the default in charge. Most organisations land on permitting an approved list quickly with a contract, which is the middle row of the table above.
Autonomy levels. Some standards define tiers: the agent suggests, the agent edits with approval, the agent runs unattended on a branch. Others forbid unattended running anywhere near production and leave the rest alone. Tiers give you vocabulary for gates; a single line is easier to audit. Pick tiers when services differ a lot in risk, as Ojaline’s tier-1 services do.
Instruction files in the repository or held centrally. In the repository, they are versioned with the code and reviewed in the same pull request; centrally, they are consistent and a single place to update. The common compromise is a short central baseline and a repository file for local conventions.
Where standards for agents go wrong
The wiki page. Sixty rules, no enforcement, no owner. It is the failure the standards chapter opens with.
The vendor standard. The rules are written around one product’s settings and file names, and break when the product, or the price, changes.
The ban nobody can comply with. The approved route takes ten weeks and the browser tab takes ten seconds.
The standard that ignores the legacy code. The rules assume tests exist. In a module nobody trusts, an agent’s change cannot be verified by the pipeline. Mark those modules and apply the stricter gate there until the tests exist.
Day to day
Weekly. Answer questions from teams: may this go to an agent, may that service be changed unattended. Repeated questions become a line in the standard or a default in the template. Read a handful of merged agent-drafted changes from teams you do not work with, looking for the pattern a rule or a check could remove.
Per request to add an agent or model. Run the evaluation script with a security colleague: the data terms gate first, then your own tasks, the exit cost and the price at volume. Write the result as an ADR. As a rule of thumb, allow two to three weeks for a new product and a day for a new version of an approved one.
Monthly. A forty-five-minute standards group meeting with the dashboard: change failure rate by tier, review wait, exceptions open. Decide proposals as short RFCs.
Quarterly. The bypass sample, a review of every ban against its expiry date, and one paragraph to the head of engineering: what the standard cost, what it caught, what you would change.
On demand. When a vendor announces a retirement, a price change or a breach, run the script before anyone schedules a meeting. After an incident involving an agent, ask the standards-chapter question in order: can a tool stop it, can a test, only then should a reviewer look for it. The influence and executive communication chapter covers the memo when the answer reaches the executive team.
There is no standard and there should not be a document. Pick the agent the team likes, write four lines in the repository’s instruction file about how to build and test, and agree two rules out loud: no production credentials in the agent’s environment, and nothing customer-related goes to a tool whose terms nobody has read. Everyone reviews everything an agent drafts, because everyone knows the whole codebase. The risk is the free account that becomes the company’s data path unnoticed.
This is where drift starts and where the standard is cheapest to write. A few teams have different agents, one has a notebook full of production data, and nobody owns the answer. Write the contract on two pages, approve two agents, put the instruction file and permission baseline in the service template, and name a sponsor. You will usually write it and run the evaluation yourself with one security colleague. Expect to revise it every quarter, because the tools move faster than the organisation.
Procurement, security, legal and an architecture function exist, and agents have often arrived through several enterprise agreements at once. The problem is scale and politics: dozens of teams on different tools, a vendor with an executive sponsor, a compliance function that wants evidence of review. Your leverage is defaults and checks owned by a platform team, an approved list with a published route for additions, and a bypass sample you report upward. A ban needs the owner of the risk beside you, or it will be argued down in the first quarter.
Template
# Agent standard: <scope>
Owner · Sponsor · Version · Next review of this standard: <date>
## Diagnosis
<Two or three observations from your own data, and what they do not show.>
## Contract (every agent used on company code)
- Data terms gate: <what must be true of retention, training, region, deletion>
- Permission baseline: <runs without approval | needs approval | never unattended>
- Instruction file: <path, owner, how it is reviewed>
- Verification bar: <tests, change size, review; the human author of record>
- Logs: <what is recorded, for how long>
## Teams choose
<Which agent from the approved list, prompting, team skills, which tasks.>
## Approved agents and how to add one
| Agent / model | Approved on | Data gate passed | Exit cost | Re-evaluate by |
|---|---|---|---|---|
Procedure: <evaluation script, owner, answer within n days>
## Gates
| Where | Condition | Checked by |
|---|---|---|
## Bans
| Ban | Harm | Enforced by | Exception route | Review date |
|---|---|---|---|---|
## Defaults shipped in the template
<instruction file, sandbox settings, test command>
## Exceptions register
| Exception | Owner | Granted | Expires |
|---|---|---|---|
## Measures
| Measure | Current | Target | Source |
|---|---|---|---|
## Not covered here
<seats and budget (head of engineering), security review, incident process> WORKED EXAMPLE
Ifenna, a principal engineer at Ojaline, wrote this standard with the head of engineering as sponsor, for 300 engineers and about 150 services.
Diagnosis. 180 of 300 engineers have agent seats. Deploys rose from 2,500 to 3,050 and failed deploys from 225 to 366, so the failure rate went from 9.0% to 12.0%. The figures do not show that agents caused it. They show more change reaching production, a larger share failing, and no written rule on where an agent may act alone.
Contract. Data terms gate, passed before any agent touches company code. Permission baseline: tests and linters run without approval; installs, network calls and deletions need approval; production access is never unattended. One AGENTS.md per repository, owned by the service owner. Every change has a named human author who can explain each line.
Approved. Two agents, re-evaluated each quarter with the same script and on any retirement notice.
Gates. The 24 tier-1 services: the owner approves every agent-drafted change. The five single-owner services also get a second named reviewer, which doubles as cover for the owner.
Bans. B1, no agent session holds write credentials for the seller-wallet settlement job, payout batch or nightly capture sweep; enforced by the vault not issuing them; review in six months. B2, no auto-merge on tier-1; enforced by branch rule. B3, sessions reading seller-written text have no outbound network and no private data; enforced by sandbox profile.
Exception. Okwudili, who leads search, receives a third agent for ranking-model notebooks on non-production data, 90 days, with the same evaluation.
Measures. Failed deploys per 3,050 at 12.0%, tier-1 reported separately, target at or below 10% within two quarters (305 failures at current volume). Bypass sample of 40 merged changes each quarter.
Now you
You are the principal engineer at a lender with 120 engineers in 14 teams and about 60 services. Sixty engineers have agent seats and a further team of eight uses a second agent on a personal account. Last quarter 8% of 900 deploys failed; this quarter 11% of 1,150 did. Security has found an agent configured on a developer’s laptop with a read-write credential for the loans database, and customer emails pasted into a chatbot while debugging. The CTO wants a written standard within a month and has said the company should pick one agent. Complications: the collections team, with one remaining owner for its service, says any gate will make it miss a regulatory-reporting deadline in six weeks, and the data team uses notebooks that mix customer data with scraped web text. Write the standard: diagnosis, contract, gates, bans with their enforcement, and how you will know in two quarters whether it worked.
Self-check
You are a principal engineer at Ojaline: 300 engineers, about 150 services, 24 tier-1 services, 180 engineers with agent seats. Deploys rose from 2,500 to 3,050 and failed deploys from 225 to 366. The VP Engineering asks you to settle a question every team keeps raising: one agent and model for everyone, or teams choose. Security wants one data agreement to review. Okwudili, who leads the search team, wants a different agent and model, because his team tunes a ranking model and works mostly in notebooks. Two other teams already use a third product.
- BOOK Staff Engineer: Leadership beyond the management track Will Larson, 2021
The job this chapter assumes: setting technical direction across teams you do not manage, by writing it down and borrowing a sponsor's authority. Read: Free online at staffeng.com; read the guides on technical strategy and technical quality.
- DOC Technology Radar Thoughtworks
A public radar with four rings that is also a model for staging agents and tools inside your company, with its entries on AI-assisted development as evidence for your diagnosis.
- DOC Complacency with AI-generated code Thoughtworks
A Hold entry on why quality can decline as agents produce larger change sets that are harder to review, and which old practices to reinforce. The case for a verification bar.
- POST The lethal trifecta for AI agents: private data, untrusted content, and external communication Simon Willison, 2025
The post that coined the term, with the argument for removing one of the three legs. The reasoning behind the ban on a full trifecta in one session.
- DOC AGENTS.md
An open, plain-Markdown convention for telling coding agents how to build, test and follow your conventions, supported by many agents. Read it before choosing a file name for your standard.
- DOC DORA 2025: State of AI-assisted Software Development DORA, Google Cloud, 2025
The survey behind the idea that AI amplifies what an organisation already does well or badly, and its capabilities model. Use it as a hypothesis to test on your own deploy data.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.