Skip to main content
Deliberate AcademyProfessional AI Education
~14 min left
Lesson 8 of 10
14 min read10 XP

AI Governance and Engineering Team Standards

Deliberate Academy Editorial Team

Reviewed for accuracy and professional relevance

You're 8 lessons in — don't lose your progress.

Sign up free
What you'll learn
  • Identify the engineering debt that accumulates when individual AI tool use is not governed by team standards
  • Define the components of a practical AI engineering standards checklist covering approved tools, data handling, code review, documentation, and incident response
  • Apply the data security criteria for AI tools to determine what categories of data should not be sent to external AI services
  • Describe what to check in code review for AI-assisted code, beyond standard correctness and style review
  • Draft a one-page team AI policy for a described engineering team scenario

Individual AI tool adoption without team standards is one of the most reliable ways to accumulate engineering debt quietly and at scale. When five engineers on the same team use five different AI tools with no shared conventions, the codebase accrues undocumented AI-assisted sections, inconsistent prompt practices, unclear data handling, no audit trail for AI decisions, and no process for responding when an AI-assisted section of code produces a production incident.

This is not a hypothetical risk. It is the current state of most engineering teams that adopted AI tools in 2023 and 2024 without pausing to define how they should be used.

Why Individual AI Tool Use Without Standards Creates Engineering Debt

Consider the code review problem. Engineer A uses Copilot to write a utility function. Engineer B reviews it, but the suggestion was plausible and well-formatted, and B trusts it without the scrutiny they would apply to code they knew was written under time pressure. The function contains a subtle off-by-one error that only surfaces in edge cases. The PR is merged. Six months later, a production incident traces back to that function.

The problem is not that Copilot wrote bad code. The problem is that the team's code review process did not adjust for the specific failure modes of AI-assisted code: plausible but wrong suggestions, test coverage that was accepted from the AI without critical review, dependency introductions that were not evaluated, and security surfaces that were generated correctly for the common case but missed the adversarial case.

Without team standards, these problems compound across every engineer and every AI tool in use. With standards, they are contained.

The AI Engineering Standards Checklist

Every engineering team should have documented answers to the following questions. Most teams do not.

Approved tools. Which AI coding tools are approved for use on this codebase? Are there different approval levels for different parts of the codebase (e.g., Copilot approved for tests and documentation, restricted from security-critical code paths)?

Data handling rules. What categories of data are prohibited from being sent to external AI services? The answer should include at minimum: production PII, customer data, proprietary business logic, authentication credentials, and unreleased product roadmap information.

Code review requirements for AI-assisted code. What additional checks apply to code sections that were AI-assisted? Does the author need to annotate AI-assisted sections? Are there additional reviewers required for AI-assisted security code?

Documentation standards. When should AI-assisted code be annotated? What level of explanation is required for AI-generated algorithms or data structures that the author cannot fully explain independently?

Incident response for AI features. What is the escalation path when an AI-powered product feature produces harmful or incorrect output in production? Who owns the decision to disable the feature? What is the communication protocol for affected users?

Warning

Most engineering teams have no documented AI data handling policy. This means engineers are making individual decisions, each day, about what data is safe to send to GitHub Copilot, Cursor, Claude, or whatever tool they are using. Some of those individual decisions will be wrong. A documented policy ensures those decisions are made once, correctly, by the people with the full legal and security context, rather than hundreds of times individually by engineers who may not know what they do not know.

Data Security and AI Tools

The most consequential governance gap in most engineering teams is data security around AI tool use. The risks are real and specific.

GitHub Copilot context-aware suggestions are built from the files open in the editor and recent edit history. On a default configuration, this includes whatever code the engineer has open, which may include database connection strings in config files, API keys in environment files that have not been gitignored correctly, proprietary algorithms, and customer data in test fixtures.

Cursor in agent mode can read the entire codebase when composing a request. If the codebase contains hardcoded credentials (a code quality problem independent of AI, but a more severe data leak when processed by an external AI service), they are included in the context sent to the model API.

Chat interfaces (Claude, ChatGPT, Gemini) used for debugging or architecture questions often receive code snippets that include more context than the engineer intended: inline credentials, proprietary business logic, or customer-identifiable data in test fixtures or log snippets.

The policy answer is not "never use AI tools." It is a clear, specific list of what should not be sent. Examples: production database records, PII in any form (names, emails, IDs that could be linked to individuals), authentication credentials, customer contract terms, and unreleased product specifications. Engineers who receive clear guidance on these boundaries can work within them. Engineers who receive no guidance will make inconsistent decisions.

AI Code Review: What to Check

Standard code review checks (correctness, style, test coverage, security) all apply to AI-assisted code. Three additional checks are specific to AI-assisted code.

Logic correctness in non-obvious cases. AI suggestions are optimized for plausibility and the common case. Off-by-one errors, incorrect handling of null or empty inputs, and wrong assumptions about data types are all more common in AI-generated code than in code written by an engineer who is actively reasoning about the problem. Reviewers should apply extra scrutiny to boundary conditions and edge cases.

Test coverage quality. AI coding tools will generate test code that looks comprehensive but may only cover the happy path. Review AI-generated tests for: does this test actually assert on the behaviour that matters? Does it cover the failure case? Does it cover the edge case the AI suggestion might have gotten wrong?

Security surfaces. AI suggestions for input handling, database query construction, authentication logic, and output encoding should be reviewed against standard security criteria (SQL injection, XSS, authentication bypass) with the assumption that the suggestion was optimized for functionality, not security. This is not a new review standard; it is a reinforcement of existing standards with elevated attention for AI-generated code in security-relevant code paths.

Documenting AI Decisions in Code

Not every AI-assisted line of code needs annotation. The annotation standard should target the cases where the AI contribution matters for future maintainability.

Annotate when: a non-obvious algorithm was generated by AI and the author cannot fully explain its correctness independently; when the AI suggestion took an approach that differs from the team's established patterns with a rationale that may not be obvious to future readers; and when the AI-generated code makes assumptions about input data that are not enforced by types or validated at the call site.

The annotation does not need to be elaborate. A comment that says "this sorting algorithm was generated by Copilot; verified against [reference] for the time complexity claim" is sufficient to give the next engineer the context they need.

Avoid annotating routine AI-assisted code (boilerplate, simple functions, test scaffolding) at the level of "this line was written by AI." That level of annotation adds noise without information. The standard should be: annotate when the future reader would benefit from knowing it was AI-generated, not as a blanket disclosure.

The AI Incident Response Playbook

When an AI-powered feature produces harmful or incorrect output in production, the response needs to be faster and more deliberate than for a typical bug.

The playbook should define: the immediate disable path (how to turn off the AI feature without a full deployment, ideally via a feature flag), the severity assessment criteria (what output types trigger immediate disable vs. monitoring vs. scheduled fix), the affected user identification process (how to identify which users saw the problematic output), the user communication protocol, and the post-incident review process (how to improve the eval set and monitoring to catch similar failures earlier).

The difference between a team with a playbook and a team without one is the difference between a 2-hour incident and a 6-hour one, and between a structured post-incident improvement and an ad hoc blame conversation.

How inconsistent AI tool practices produced a security review

Engineering Team Lead

Context

A team of six engineers had adopted AI coding tools organically over 18 months. Three engineers used GitHub Copilot, one used Cursor in agent mode, and one used Claude directly via the API for complex refactoring tasks. No team policy governed what could be sent to these services. At a routine security review, the security team discovered that one engineer had used Cursor's codebase-wide context mode to refactor a data access layer. The refactoring was high quality, but the context Cursor had processed included a database schema with column-level PII labels and a config file containing a staging environment connection string that had not yet been rotated after a previous engineer's departure.

Action

The security review escalated. The team had to audit all AI tool usage for the prior six months to assess data exposure, rotate the connection string and audit access logs, and explain to legal why no data handling policy had been in place. The team lead spent two weeks on the review rather than engineering work.

Outcome

The team implemented a documented AI tool policy: an approved tools list, a prohibited data categories list posted in the team wiki and reviewed at onboarding, a pre-commit hook that flagged hardcoded credentials before they entered the codebase, and a quarterly security review agenda item covering AI tool usage. The same security review two quarters later produced a clean result. The two-week incident cost more in engineering time than the six months of policy work would have taken.

Knowledge check

An engineer is debugging a production issue and wants to use Claude to help understand a complex database query that is performing unexpectedly. The query is part of a billing system and the engineer has a log snippet that includes customer account IDs and charge amounts. What is the correct approach?

Select one answer.

Quick check

What standard does this lesson set for annotating AI-assisted code in the repository?

Select one answer.

Exercise

Your Task

You are the technical lead for a 6-person engineering team at a fintech startup. The team currently uses GitHub Copilot (3 engineers), Cursor (2 engineers), and various chat AI tools for debugging. No formal AI policy exists. Draft a one-page team AI policy covering: the approved tools list with any usage restrictions by code area, the prohibited data categories that may not be sent to any external AI service, the code review requirements for AI-assisted code, and the incident response steps for an AI-powered product feature that produces incorrect output in production. The policy should be specific enough to give an engineer clear guidance without requiring manager approval for every AI tool action.

Your reflection

Did you complete this exercise? What did you find? (Saved locally in your browser)

Key takeaways
  • Individual AI tool use without team standards creates compounding engineering debt: undocumented AI decisions, inconsistent practices, data handling gaps, and no audit trail for production incident investigation.
  • Every engineering team needs documented answers to five governance questions: approved tools, data handling rules, code review requirements for AI-assisted code, documentation standards, and AI incident response.
  • AI tools process more context than engineers typically realise. A documented prohibited data categories list is the most important single governance document a team can produce.
  • AI code review requires three additional checks beyond standard review: extra scrutiny on boundary conditions and edge cases, critical review of AI-generated test coverage, and security surface review for authentication and input handling code.
  • The AI incident response playbook defines the immediate disable path, severity criteria, affected user identification, user communication, and post-incident review process. Teams without one will respond slower and learn less from production failures.