An AI-assisted code change should preserve the base and final repository revisions, applicable decision IDs and versions, the agent's decision-aware plan, final citations, deterministic check results, human approvals and any exceptions. Evidence should be tamper-evident, linked to the merged change and precise about what each check proves.

Auditability is a chain, not a transcript dump

A complete model transcript is noisy, may contain sensitive context and still may not prove which reviewed authority governed the final patch. Useful evidence connects the change to repository state, decisions, verification and approval in a form another reviewer can inspect later.

Preserve claims at their natural boundary. A unit test proves a tested behaviour under stated conditions. A decision citation proves that a record was declared relevant. Human approval proves review occurred, not that every latent risk was eliminated.

The minimum evidence bundle

Capture identifiers and results that remain meaningful after the agent session ends. Prefer repository commits, signed attestations and CI artifacts over screenshots of a transient interface.

  • Task or issue identity plus base and final commit.
  • Decision IDs, lifecycle and source revisions retrieved.
  • Plan-time and final applicability results.
  • Commands, policy versions and pass/fail outputs.
  • Exceptions, owners, approvers and expiry dates.
  • Final human review and merge identity.

Make evidence reproducible

Pin the repository and tool versions used by a check. Store hashes for decision artifacts and policy bundles. Where practical, make the validation command runnable against the recorded commit. SLSA provenance provides a useful vocabulary for linking outputs to inputs and build processes even when the local evidence model is simpler.

Avoid claiming that an LLM self-assessment is deterministic evidence. It can be retained as reasoning context, but objective controls should produce independently repeatable results.

Design retention around risk

Not every patch needs the same retention period or approval depth. Map evidence requirements to data classification, deployment environment and regulatory need. Keep the durable summary small, and restrict raw prompts or transcripts when they may contain credentials, personal data or proprietary context.

Sources and further reading

  1. SLSA provenance specification
  2. NIST Secure Software Development Framework
  3. AsDecided Sentry
  4. Git internals