Shield Agent AI

All 13 questions

Question 11 of 13 · Code quality

How is AI-generated code reviewed before it reaches our systems?

Clients also ask it like this:

  • Is AI-written code reviewed by a person?
  • Does a second person look at code that an AI tool wrote before it is merged?
  • Which tests and scans run on code that an agent wrote?

What the client is checking

The client wants to know that code from an agent gets at least the same checks as other code. They look for a review step that the process enforces, not only a promise.

Three draft answers

Pick the level that is true for you today. Every statement marked [VERIFY] must be true for your organisation before you send it. Delete a statement that is not true. Fill each {{placeholder}}.

Not yet in place

AI-generated code goes through the same process as other code. [VERIFY] We do not mark or track which code an agent wrote. [VERIFY] We have no extra checks for it. [VERIFY]

Policy only

Our policy says that the developer reviews all AI-generated code before merge and that a second person reviews each pull request. [VERIFY] A developer is responsible for the code they submit, whoever wrote it. [VERIFY] We rely on the team to follow this. We do not check it by tool. [VERIFY]

Enforced, with evidence

Every change goes through a pull request. A person other than the author must review it. [VERIFY] The repository settings enforce this. Administrators are included in the rule. [VERIFY] A bypass is recorded. [VERIFY] Automated tests, static analysis, dependency scans and secret scans run on every pull request and must pass. [VERIFY] We keep the results for {{period}}. [VERIFY]

Evidence to attach for the strongest answer

  • An export of the branch protection settings.
  • A sample pull request with its review and its checks.
  • The CI configuration.
  • Recent scan results.
  • The log of exceptions to the review rule.

How to move up one level

From not yet in place to policy only

Write the rule that every change gets a review by a second person, whoever wrote the code. Add a pull request template with a field for AI use if you want to track it.

From policy only to enforced, with evidence

Make the rule a repository setting that blocks a merge without review and without passing checks. Run tests and scans on every pull request. Record every exception.

KYA and this question

No. KYA does not answer this question. KYA does not review code and it does not check code quality or tests.

Get all 13 answers in one document

Choose the level that is true for each group. You get a preview at once and the full pack by email.

Make my Answer Pack

Previous question Next question

These are drafts. Send only what is true for your organisation. This is not legal advice.