AI Coding Policy for Teams
A written policy turns ad-hoc AI tool usage into accountable engineering practice. This page is a template team leads can adapt — not legal advice.
Last reviewed: June 2026
Have legal and security review your final policy. Link primary terms: GitHub Copilot Terms, Anthropic AUP.
Who This Is For
Team leads, engineering managers, and security rolling out Cursor, Copilot, Claude Code, or LLM features in product code. Individual developers should read Responsible Use for day-to-day norms.
Policy Template
Copy into your internal wiki and customize bracketed sections.
# AI-Assisted Development Policy — [Company Name]
Effective date: [YYYY-MM-DD]
Owner: [Engineering / Security]
Review cadence: Quarterly
## Purpose
Define approved AI tools, data boundaries, and review requirements for code
that touches [company] systems.
## Scope
Applies to all engineers using AI coding assistants on company repositories
and anyone shipping LLM-powered product features.
## Approved tools
| Tool | Use case | Plan / tier |
| --- | --- | --- |
| [Cursor Business] | Primary IDE agent | Required for production repos |
| [GitHub Copilot Enterprise] | Inline completion | Optional alongside Cursor |
| [Claude Code] | CLI automation on CI clones | Read-only unless approved |
Unapproved tools must not access company source code.
## Data handling
- **Never paste:** production credentials, customer PII, unreleased financials,
attorney-client privileged material, or full production database dumps.
- **Allowed:** anonymized snippets, staging data, public OSS patterns.
- **Rules files:** Maintain AGENTS.md / .cursor/rules with secret path exclusions.
- **Retention:** Confirm vendor data retention with [Copilot Trust Center]
and Cursor/Anthropic enterprise docs.
## Development workflow
1. Plan before Agent mode on changes touching >3 files.
2. Label PRs `ai-assisted` when any commit used AI generation.
3. Required checks before merge: lint, test, build (no exceptions for AI PRs).
4. Auth, payments, crypto, and infra: senior reviewer required.
## MCP and integrations
- MCP servers must be on an allowlist maintained by [platform team].
- Read-only tools first; write tools require security review.
- Secrets via environment variables only — never in mcp.json committed to git.
## Product features using LLMs
- Follow [Security and Prompt Injection](/ai/web-apps/security/) guidelines.
- Disclose AI-generated content to end users where appropriate.
- Log prompts/responses per retention policy; redact PII.
## Incidents
If secrets or PII are pasted into a cloud model:
1. Rotate affected credentials within 1 hour.
2. Notify security@ and document in incident tracker.
3. Review vendor retention/deletion options.
## Training
New hires complete:
- [Common AI Coding Mistakes](/ai/common-mistakes/)
- [Verifying AI Output](/ai/common-mistakes/verifying-output/)
- This policy acknowledgment
## Exceptions
Request exceptions via [security ticket template]. Document risk acceptance.
Rollout Checklist
Week 1: Decide
- [ ] Inventory current shadow AI usage (survey)
- [ ] Choose approved tools and enterprise plans
- [ ] Legal review of IP and training data terms
- [ ] Security review of data residency requirements
Week 2: Document
- [ ] Publish policy (template above)
- [ ] Add Project Rules to template repos
- [ ] Define PR label
ai-assistedin GitHub/GitLab - [ ] Document MCP allowlist process
Week 3: Enable
- [ ] Provision licenses
- [ ] Run 60-minute team workshop: mistakes + verification checklist
- [ ] Enable required CI checks on default branch
Week 4: Measure
- [ ] Track
% PRs ai-assisted(informational, not punitive) - [ ] Review one incident drill (secret paste scenario)
- [ ] Schedule quarterly policy review
Decision Tables
Approved tool by role
| Role | Recommended stack |
|---|---|
| Frontend engineer | Cursor + Copilot inline |
| Platform / SRE | Claude Code on staging clones; no prod secrets |
| Contractor | Copilot only; no MCP; read-only repo access |
| ML / product engineer | Direct API keys in secret manager; see LLM APIs |
Review depth by change type
| Change type | AI allowed? | Reviewer |
|---|---|---|
| Docs / comments | Yes | Peer |
| Unit tests | Yes | Peer |
| Business logic | Yes, verified | Peer + tests |
| Auth / payments | Plan mode only | Senior + security |
| Dependencies | Manual | Senior; verify package names |
Communication Templates
Slack announcement:
We are standardizing on [tools]. Policy: [link]. Required reading: Common Mistakes + Verifying Output. Questions in #eng-ai.
PR template addition:
## AI assistance
- [ ] This PR used AI coding tools
- [ ] I ran lint, test, and build locally
- [ ] I verified new imports and APIs exist