Step 1: capture provenance
Record the model, prompt context, agent identity, and editing session. Provenance should persist with the change so reviewers can reconstruct how the code was produced. An AI-BOM or equivalent record is a practical starting point.
Step 2: require review evidence
AI-generated changes should not merge without reviewer attestation. The review record should include what was reviewed, by whom, and against what policy. Automated checks alone are not review evidence.
Step 3: cap AI claims at the detected level
Treat AI-generated claims as probabilistic inputs. An AI assertion that code is safe is a detected-level claim. Promotion requires independent corroboration from tests, scanners, or reviewer attestation.
Step 4: validate autofixes
A validated autofix requires evidence that the original risk is absent. Re-run the original test or scanner, compare outcomes, and preserve the result. Indeterminate outcomes must be escalated, not auto-promoted to fixed.