EngineeringLead

AI policy

How to write an AI coding assistant policy for your team

Engineers are already using AI assistants, whether or not a policy exists. A short, clear policy tells them what is allowed, protects code and data, and makes review expectations explicit. This guide gives you an outline you can adapt, section by section.

Not legal advice. Licensing, privacy, security and export-control obligations depend on your contracts, products and jurisdiction. Involve your security, legal and compliance functions before publishing a policy.

Why a clear stance matters

DORA's 2025 AI Capabilities Model, published by Google Cloud's DORA research program, lists a "clear and communicated AI stance" as one of seven capabilities that shape whether AI adoption helps teams. The others are healthy data ecosystems, AI-accessible internal data, strong version control practices, working in small batches, a user-centric focus, and quality internal platforms. The practical lesson for a lead: ambiguity is not neutral. When engineers guess what is allowed, some avoid useful tools and others paste in things they should not.

Who writes it and who owns it

The policy outline

  1. Purpose and scope. Who it applies to (employees, contractors, consultants), and which tools: editor assistants, chat assistants, command-line tools, code review bots and autonomous agents.
  2. Approved tools. A list of approved tools, the account or contract type that must be used, and how to request a new one. Personal accounts on consumer plans are often excluded because their data terms differ.
  3. Data rules. What each tool may see, by data class (see the table below).
  4. Permitted and prohibited uses. For example: permitted for drafting code, tests and documentation; prohibited for generating security-sensitive code without additional review.
  5. Ownership and review. The engineer who submits a change owns it. AI-assisted changes go through the same review as any other, with the additions in reviewing AI-generated code.
  6. Disclosure. Whether and how AI assistance is noted: a pull request template checkbox, a commit trailer, or nothing. Choose what your review and audit needs actually require.
  7. Agents and automation. What agents may do without a person approving it. See AI agents in the software lifecycle.
  8. Licensing and provenance. How the team checks that generated code and suggested dependencies do not create license or supply-chain problems.
  9. Security. Keeping secrets out of prompts, checking suggested packages exist and are trustworthy, and running the same scanning on AI-assisted code as on any other.
  10. Records and retention. What is logged, for how long, and who can see it.
  11. Training. What people must complete before they get access.
  12. Exceptions and reporting. How to request an exception, and how to report a mistake, such as sensitive data pasted into the wrong tool, without fear of blame.

A data classification table to adapt

Data classApproved enterprise assistantOther tools
Public code and documentationAllowedAllowed
Internal source codeAllowedNot allowed
Customer or personal dataNot allowed unless approved for that dataNot allowed
Secrets, keys, credentialsNeverNever
Export-controlled technical dataOnly a deployment approved by export complianceNever
Unreleased business informationCase by caseNot allowed

The entries above are an example, not a recommendation for your organization. Fill the table in with your security and compliance teams, based on each tool's actual contract and data handling. Teams in aerospace, defense and other regulated work should read AI in regulated engineering first.

Sample clauses

Ownership. "The engineer who opens a pull request is responsible for every line in it, however it was produced, and must be able to explain what it does and how it can fail."

Data. "Do not enter secrets, credentials, customer data or controlled technical data into any AI tool unless that specific tool and deployment is listed as approved for that data class."

Dependencies. "Before adding a dependency suggested by an AI tool, confirm the package exists in the expected registry, is maintained, and is under an approved license."

Agents. "Agents may open pull requests and run tests in approved environments. They may not merge, deploy, change infrastructure or access production data without a named person approving the action."

Reporting. "If you think data was shared with a tool in breach of this policy, report it to security the same day. Early reports are treated as a learning event."

Rolling it out

  1. Start with what people already do. Ask engineers which tools they use and for what. Write the policy around real usage.
  2. Publish it where engineers work, linked from the repository, the onboarding guide and the pull request template.
  3. Train before access. A short session with examples of what not to paste.
  4. Enforce with tooling where possible: single sign-on for approved tools, secret scanning, dependency checks.
  5. Measure the effect with team-level delivery and quality measures, not acceptance rates. See DORA, SPACE and DX Core 4.

Common questions

Should we ban AI coding assistants?

A ban is a policy too, and it needs enforcement. Where engineers find the tools useful, a ban tends to push use onto unapproved personal accounts, which is harder to control. Many teams find an approved tool with clear data rules easier to manage.

Do we need to label AI-generated code?

Only if you will use the label. Regulated teams may need it for traceability. Other teams may find that a pull request description explaining the approach is more useful than a per-line label.

How long should the policy be?

Short enough to read in a few minutes. Put the rules engineers must remember on the first page and keep detail in linked sections.

Who approves new tools?

Name one route, usually a combined security and engineering review, and publish how long it takes. A slow or unclear route encourages workarounds.

Last reviewed 2026-09-17