I think every code change produced with an AI agent should carry a compact, machine-readable provenance record: model and version, agent/session ID, tools invoked, dependency lookups, files inspected, test and lint results, timestamp, and a hash of the final diff.
That could make review and debugging materially better—especially when a regression appears weeks later—but only if it stays an index into useful evidence. A giant transcript of every search, retry, prompt, and file read will become repository noise. Retaining prompts and context also creates privacy and data-locality problems, including accidental exposure of secrets or business information.
So I’m unsure whether this would improve safety or just create reassuring metadata that nobody checks. Would you require provenance records for production codebases? What minimum fields would you actually keep?