Topic 4 of 5 · 4 min read
Team agreements on AI use
Goal: Draft a team AI working agreement covering accountability, disclosure, approved tools and data limits.
Write down, in one short page, who answers for merged code, which tools and data are allowed, and what to tell reviewers. Then people stop guessing. Without it, each engineer makes private rules, and the team finds out when something leaks or breaks.
Check yourself · 1 of 3
An agent wrote most of a pull request. Who is accountable for the code once it is merged?
Why it matters
AI tools were adopted bottom-up in most teams. One person pastes a customer log into a chat window, another lets an agent run shell commands, a third merges code they never read. None of them meant harm. They simply had no shared answer. An agreement gives the answer before the incident.
What the agreement covers
- Accountability. The human who opens or approves a pull request owns the code, whoever or whatever wrote it. "The model wrote it" is never an answer to a failed deploy. This one line matters most.
- Disclosure. Say in the pull request when an agent wrote or changed a meaningful part, and how you checked it. Reviewers then know to look at edges and tests more closely. The point is review quality, not blame.
- Approved tools. A named list of assistants and agents the company has reviewed (for example the plans with data-retention terms you accept), who can request additions, and what personal accounts must not be used for.
- Data limits. What may never go into a prompt or an agent's context: customer personal data, production secrets, unreleased financial figures, source code covered by a client contract. Say what to use instead, such as fake data or a local model.
- Permissions for agents. What an agent may run on its own (tests, linters) and what needs a human yes (deleting files, pushing, deploying, touching production).
- When not to use agents. Security-critical code, work under legal or client restrictions, and tasks where you could not explain the result.
Before and after
Before, in chat: "Please be careful with AI."
After, in the team's handbook:
- The author of a pull request is accountable for it.
- The template has a field "AI assistance: none / some / most, and how I verified it".
- Only the tools on the approved list may see company code.
- No customer data, secrets or contract-restricted code in any prompt.
- Agents may not push or deploy without a person approving the step.
What goes wrong
- A policy nobody can find or follow. Keep it to one page and link it from the pull request template.
- A ban that people ignore. If the approved tools are bad, engineers use personal accounts. Make the approved path good.
- Disclosure used as punishment. If people are blamed for saying they used an agent, they stop saying it.
- Never updating. Review the agreement when tools or contracts change.
Examples
A pull request template field
The template gains one required line: "AI assistance: none / some / most. What I checked myself: ...". An engineer writes "most; I ran the migration on a copy of staging and read every query". The reviewer focuses on the queries.
A data limit in practice
A support engineer wants an agent to find a bug in a customer's exported log. The agreement says no customer data in prompts, so they strip names and emails with a script first, or reproduce the bug with generated records.
Key points
- The human who opens or approves a pull request is accountable for the code, whoever wrote it.
- Disclose agent involvement in pull requests so reviewers can look harder at edges and tests.
- Name the approved tools and say what personal accounts may not be used for.
- List data that must never enter a prompt, and say what to use instead.
- Define what agents may do alone and what needs a human yes, and name tasks where agents should not be used.
Common mistakes
- Leaving accountability vague, so a failed change has no owner.
- Writing a long policy no one reads instead of a one-page agreement.
- Banning tools without offering an approved alternative that works.
- Punishing disclosure, which teaches people to hide agent use.
Check yourself · 2 of 3
Why add an "AI assistance" field to the pull request template?
Check yourself · 3 of 3
Which item should a team's data limit forbid in any prompt?
Practice items, not counted towards your mastery.
Start here
- DORA metrics guide (opens in a new tab)ArticleFree
The five delivery metrics, how to read them, and the pitfalls of using them as targets.
- DORA research: AI (opens in a new tab)ArticleFree
Research on how AI assistance relates to delivery performance and team practices.
- AGENTS.md (opens in a new tab)DocsFree
The open convention for a plain-markdown instruction file that coding agents read.
More for this topic
- Exploring Generative AI (martinfowler.com) (opens in a new tab)ArticleFree
Field notes from Thoughtworks on where AI coding assistants help and where people must catch them.
- The Standard of Code Review (Google Engineering Practices) (opens in a new tab)ArticleFree
The rule reviewers apply: approve a change that improves code health, and who owns that call.