Skip to content

Reviews and auditing with AI

Reviews and audits involve reading a great deal of material against a set of rules: designs against principles, code and infrastructure against standards, evidence against controls. That makes them a natural fit for AI, which can read a whole repository or a stack of policies in minutes and point to where something looks wrong.

But a review is only as trustworthy as its findings. AI produces false findings with total confidence, and misses context-specific risks no checklist covers. The pattern that works: deterministic tools enforce, AI drafts and explains, humans decide.

AI-assisted review and audit1. The assistant reads intended design, built code and infrastructure, and runtime evidence against your standards. 2. It drafts findings, each pointing to the exact file, line, diagram or document behind it. 3. A person confirms or rejects each finding, assigns an owner and decides severity. Unconfirmed findings don't count. Designs and ADRswhat was intended Code and IaCwhat was built Logs and evidencewhat actually runs Standardsprinciples, controls AI reviewerreads, compares, drafts Evidence mapcontrol by control Draft findingswith references Human triageconfirm, reject, own123
AI-assisted review and audit AI reads everything against the standards and drafts findings; an architect or auditor confirms each one before it counts.
  1. The assistant reads intended design, built code and infrastructure, and runtime evidence against your standards.
  2. It drafts findings, each pointing to the exact file, line, diagram or document behind it.
  3. A person confirms or rejects each finding, assigns an owner and decides severity. Unconfirmed findings don't count.

Workflow 1: Review a design against your standards

Section titled “Workflow 1: Review a design against your standards”
You are reviewing an architecture design for [organization].
Our principles and standards:
[paste principles, or a well-architected checklist]
Design under review:
[paste design document or ADRs]
For each principle or checklist item, state: MEETS, PARTIAL, DOES NOT MEET,
or NOT ADDRESSED. Quote the part of the design that supports your
assessment. Then list the top five risks, most severe first.
If the design doesn't give you enough information, say so; do not assume.

Verify: check every quote really appears in the design and means what the AI says. Use the output to focus the human review, not replace it. Well-architected checklists from AWS, Azure and Google Cloud make good starting standards.

Here is a data flow description of a system, with trust boundaries marked.
[paste description or diagram source]
Apply STRIDE to each element and each flow that crosses a trust boundary.
For each threat: the element, the STRIDE category, a one-line attack
scenario, and a suggested mitigation. Mark threats you consider most
likely and most damaging. Do not include generic threats that don't
apply to this design.

Verify: run the session with the team anyway. AI gives breadth quickly; people supply the risks specific to your business, data and history. See threat modeling.

Workflow 3: Check that what was built matches what was designed

Section titled “Workflow 3: Check that what was built matches what was designed”

Architecture drifts. The service that should only call the API gateway now reads another team’s database directly. Two approaches work together:

  • Deterministic fitness functions enforce rules on every build: dependency rules in code (for example, ArchUnit for Java), policy as code for infrastructure, contract tests for APIs. These are reliable and repeatable.
  • AI helps write those rules, explains failures in plain language, and does one-off sweeps for things that are hard to express as rules.
Our architecture rules:
- [e.g. services only access their own database]
- [e.g. all external calls go through the integration layer]
- [e.g. no personal data in logs]
Review the code and configuration below. For each rule, list any
violations with file and line, and explain in one sentence why it
violates the rule. Then suggest an automated check (test, lint rule or
policy) that would catch this in future.
[attach repository or files]

Verify: reproduce each violation yourself before raising it. Then turn the useful rules into automated checks so they’re enforced deterministically, not by asking the AI again next quarter.

Workflow 4: Map audit evidence to controls

Section titled “Workflow 4: Map audit evidence to controls”
Below are the controls we must evidence for [framework, e.g. SOC 2,
PCI DSS, internal policy], and a set of artifacts (policies, configs,
screenshots, tickets, logs).
Build a table: control | evidence that supports it (artifact name and
section) | strength (strong / partial / none) | what's missing.
Only cite artifacts provided. If no artifact supports a control, say
"none" rather than guessing.
[controls]
[artifacts or descriptions]

Verify: auditors check the evidence, not the table. Open every cited artifact. The “none” and “partial” rows are the valuable part: they tell you where to act before the auditor arrives. See scenario: audit season panic.

Workflow 5: Find patterns across incidents and reviews

Section titled “Workflow 5: Find patterns across incidents and reviews”
Here are [N] postmortems and architecture review reports from the last
two years. Identify recurring causes, components that appear repeatedly,
and recommendations that were made more than once but apparently not
implemented. Cite the documents for each pattern.

This is often the most revealing review of all, and almost impossible to do by hand.

  • False positives stated as facts. A finding without a precise reference should not leave the review.
  • False negatives. “No issues found” from an AI means nothing. Absence of evidence is not evidence of absence.
  • Checklist blindness. The worst risks are often specific to your system and not on any list.
  • Sensitive material. Code, configs and audit evidence may contain secrets and personal data. Strip them, and use approved tools. See guardrails.
  • Auditor expectations. Tell auditors how AI was used, and keep the human sign-off visible.

Written and edited by Abhinav Taduka, enterprise software architect.