UPDATED IN DECEMBER 2026

Full provenance tracking per change

For every change in production you can reconstruct the whole lineage: the requirement, the ticket, the AI sessions, the review, the CI run, the release - and the agent session logs behind it are kept as potential evidence, with retention, integrity and deletion rights set by policy.

L4 · GOVERNEDWhat this level takes
MUSTNot met, not at this level
  • Full provenance tracking per change: model version, prompt context, agent session ID, iteration count
  • Automated compliance checks run without manual intervention on every merge
  • AI-generated code is distinguishable from human-written code in version control (metadata, labels, or attribution)
SHOULDExpected in practice, not required
  • Provenance data is queryable (e.g., "show all changes made by model X in the last 30 days")
  • Compliance check results are aggregated into a governance dashboard
  • Prompt and audit logs are retained beyond vendor defaults, in a store the organisation controls
  • The AI gateway has a patch SLA and is monitored for CVEs like any other critical infrastructure
  • The AI gateway runs a pinned version and is upgraded only from verified releases
  • Agent session logs have a written retention, integrity and deletion policy that is enforced centrally, not left to the user's client
EVIDENCEHow you would check
  • Provenance metadata on commits/PRs showing full attribution chain
  • Automated compliance check configuration with zero manual steps
  • VCS query showing AI-vs-human code distinction
DEPENDS ON
  • Delivery L3 (Governance & Compliance) - audit trail and policy-as-code must be operational
  • Delivery L3 (Metrics) - metrics infrastructure required for compliance dashboarding

What It Is

Full provenance tracking means that for every change that reaches production, you can reconstruct the complete lineage: the business requirement that originated the work, the ticket that specified it, the AI sessions that generated the code (with model versions and prompts), the human review that approved it, the CI pipeline that validated it, and the deployment event that released it. Provenance is not just an audit trail - it is a complete, queryable graph of causality from intent to production.

At L4 (Governed), provenance tracking is automated and comprehensive rather than partial and manual. The L3 minimum viable audit trail captures four fields per AI-assisted commit. L4 provenance tracking captures the full context: linked tickets, linked requirements, the sequence of AI sessions including prompts and responses, reviewer identities and their roles, test results, security scan results, deployment metadata, and the configuration of every tool in the pipeline that handled the change. This is the difference between knowing "an AI helped write this" and knowing "here is the exact sequence of decisions and actions that produced this artifact."

The technical infrastructure for full provenance typically follows the SLSA (Supply Chain Levels for Software Artifacts) framework. SLSA defines provenance as a structured attestation: a signed document that describes what inputs went into a build, what process produced it, and what the outputs were. At SLSA Level 3, provenance is generated by the CI system (not by the developer) and is signed with a key that the developer cannot access - making it tamper-resistant. SLSA Level 4 adds hermetic, reproducible builds. For AI-assisted development, SLSA-style attestations can be extended to include AI session metadata as part of the build inputs.

As of June 2026 the bar for agent provenance is cryptographic tamper-evidence, not just a stored log. Dapr 1.18 introduced Verifiable Execution on June 11: tamper-evident workflow traces, built on SPIFFE identity, that record which agent did what, provably. The same period made it clear that "which model" is no longer enough - provenance must also record the runtime an action ran in (hosted vendor API vs self-hosted in your VPC) and the inference region, because a model can be pulled or silently re-routed between runs. Capture model id, model version, runtime, and region alongside each AI session in the attestation.

July 2026 extended provenance from cryptographic traces to a full audit stack. machine-genome proposes an open identity and provenance protocol built on SHA-256 content-addressed "Genes" for models, prompts, datasets, and artifacts. Brain0 bills itself as a "black box for AI-written code": it links every commit to the agent prompts behind it and detects drift. whodecided distills the silent decisions agents make into a reviewable ledger - approve once and it becomes precedent - while agentacct joins client-reported token spend against agent-claimed work. On the identity side, Microsoft Agent 365 (July preview) binds every agent to an Entra identity so its actions can be attributed and audited. Organizational policy is arriving even faster than tooling: the Kubernetes project's AI contribution policy makes disclosure mandatory and bans AI-written commit messages (InfoQ, July 10), and Kenton Varda at Cloudflare banned AI-written PR descriptions because they describe the diff, not the strategic why. The common thread: provenance must capture intent and accountability, not just artifacts.

September 2026 moved the hardest link in that chain - commit back to prompt - from bespoke tooling to the gateway. Claude Code 2.1.283 (changelog, 2026-09-25) added an opt-in x-claude-code-prompt-id header, a hint that lets an LLM gateway group every request behind one user prompt. If all model traffic already flows through an AI gateway, that ID ties the prompt, every model call it caused, and the tokens it spent into one record, and the commit provenance only needs to carry the same ID. The prompt and response logs themselves belong in the SIEM, next to the rest of your security telemetry, with a retention period you set rather than the vendor's. Vendor defaults are short: Cursor's Admin API keeps audit events for only 30 days and has no per-request content log. An investigation that starts in month three finds nothing if you relied on it.

November 2026 added a reason to treat those logs as more than telemetry: agent session logs are potential evidence. On 2026-11-09 Cubist Systematic Strategies, part of Point72, filed a trade-secret suit in Connecticut against a former analyst, Xin Jin. According to press reports of the complaint (The Star, syndicating Bloomberg, 2026-11-11), it alleges 4,117 queries across 2,416 Claude Code and OpenAI Codex sessions between late February and the end of May 2026, and alleges that AI history was deleted to avoid detection. These are allegations in a filed complaint, not findings. Jin denies them: his lawyer calls the claims without merit and says reviewing the team's code was his job (Hedgeweek). Nothing here depends on who is right. What matters for this guide is that session-level counts of agent activity are now being put in front of a court, by one side, as evidence. Three policy questions follow, and none of them should be answered by whatever the user's client happens to do:

  • Retention. How long are agent session logs kept, and where? If the answer is "as long as the developer's laptop or the vendor's console keeps them", you do not have a retention policy. Too short and you cannot support or rebut a claim; indefinite retention of prompts that contain proprietary code and personal data is its own liability. Decide the period with legal counsel and write it down.
  • Integrity. A log that can be edited is weak evidence for you and weak evidence against you. Export sessions at the gateway or the managed runtime to append-only storage, hash them, and record who can read them. This is the same independence rule the rest of the edition applies to checks: the record of what an agent session did must sit where the person and the agent in that session cannot change it.
  • Deletion rights. Who may delete session history, under what request, and is the deletion itself logged? A local "clear history" should not remove the organisation's copy, and a legal hold has to be able to suspend scheduled deletion. Privacy obligations (an employee's or customer's right to erasure where it applies) belong in the same policy, so the two are reconciled deliberately rather than by accident.

The logs are sensitive in their own right. Cursor's November root-cause update on the October trojanized extension traced it through a bucket of agent traces that contained unredacted credentials. Evidence-grade retention therefore needs evidence-grade access control and redaction of secrets on the way in.

The other L4 addition is that agent access is certified the way human access is, and ends the way human access does. Okta made Resource Access Certifications for agents generally available at Oktane in September, so agent entitlements go through the same periodic review as a person's, and CrowdStrike's Agentic Identity Provider links every agent action to the human or workload behind it. Provenance is only as good as that link: when the accountable owner leaves the company, their agents, tokens and grants must be revoked in the same offboarding step, or the graph starts attributing new changes to someone who no longer works there.

The graph structure is what distinguishes full provenance from a sequential audit trail. A change may have been influenced by multiple AI sessions across multiple days, with human decisions interleaved. A graph representation can capture this non-linear causality: the initial implementation came from session A, the security review comment came from session B, the fix for that comment came from session C, and the final reviewer was human. This graph is queryable in ways that a sequential log is not: "find all changes where an AI session generated the security fix rather than the initial implementation."

Why It Matters

  • Enables complete incident root cause analysis - when a production incident involves AI-generated code, full provenance lets you trace back through every decision point: what was the requirement, what did the AI generate, what did the human reviewer see, was the AI's output the issue or was the human's modification the issue?
  • Satisfies emerging regulatory documentation requirements - the EU AI Act's Article 12 record-keeping requirements and forthcoming technical standards will require documentation of AI system involvement at a level of detail that the minimum viable audit trail does not meet; full provenance does
  • Enables AI system performance analysis - with provenance data, you can ask: which AI model versions have the highest downstream incident rates? Which types of tasks have the highest human modification rates? This analysis drives AI tool adoption and configuration decisions
  • Creates the foundation for autonomous agent governance - as AI agents operate more autonomously (L4-L5), the human who "reviews" a change may be reviewing a summary rather than the full diff. Full provenance captures what the agent actually did, not just what the human saw when they approved
  • Survives beyond vendor retention - Cursor keeps admin audit events for 30 days; prompt and response logs exported to your SIEM under your retention policy are the only way an investigation opened months later still has evidence
  • Session logs are potential evidence, in either direction - a trade-secret suit filed on 2026-11-09 rests on an alleged 4,117 queries across 2,416 agent sessions (allegations, which the defendant denies); whether logs like these exist, can be trusted and can be deleted has to be a policy decision made in advance, because the same record can support an employer's claim or an employee's defence
  • Keeps attribution honest after people leave - agent access certified like human access, and revoked with the owner's offboarding, prevents orphaned agents from producing changes attributed to former employees
  • Supports supply chain security - SLSA provenance prevents the substitution or tampering of build artifacts; AI-assisted code with provenance attestations creates the same supply chain integrity guarantees for AI-generated code as SLSA provides for traditional builds

Getting Started

  1. Implement SLSA Level 2 or 3 for your build pipeline - start with the standard SLSA provenance attestation before extending it for AI. SLSA Level 2 requires provenance from the CI system (not developer-generated); Level 3 adds signing. The official SLSA GitHub Actions generator (slsa-framework/slsa-github-generator) makes this straightforward for GitHub Actions pipelines.
  2. Define the AI provenance schema extension - extend the SLSA provenance subject to include AI metadata: ai_sessions: [{model_id, model_version, runtime, region, session_id, prompt_hash, response_hash, timestamp, human_approver}] (where runtime distinguishes a hosted vendor API from a self-hosted deployment, and region records where inference ran). Using hashes of prompts and responses rather than the full text keeps the attestation compact while preserving the ability to verify the specific interaction.
  3. Integrate Claude Code session export - Claude Code can export session logs in structured format. Build a post-session hook that exports the session log, computes a hash, and stages the hash for inclusion in the next commit's provenance attestation. This creates the link between the AI session and the specific commit it influenced.
  4. Build the provenance graph store - individual attestations are useful; a queryable graph is transformative. Store provenance attestations in a graph database (Neo4j, or a PostgreSQL jsonb schema with graph query extensions) that links tickets, sessions, commits, PRs, reviews, and deployments as nodes with edges. The graph enables the investigations and analyses that a flat log cannot.
  5. Connect to the ticket system - provenance is most valuable when it links to the business requirement. Build a bi-directional link: the ticket includes the commit hashes that implement it, and the commit provenance includes the ticket ID. This "from business requirement to production artifact" traversal is the full chain that regulators and auditors are asking for.
  6. Join commits to prompts through the gateway - enable the gateway prompt ID (x-claude-code-prompt-id in Claude Code, or your gateway's equivalent request grouping), store it in the session record, and carry it into the commit provenance. Ship the gateway's prompt and response logs to the SIEM with a retention period that exceeds every vendor default you depend on.
  7. Certify agent access and tie it to offboarding - put agent entitlements into the same access-certification cycle as human ones (Okta's Resource Access Certifications for agents are one ready-made route), and add "revoke this person's agents and agent tokens" to the leaver checklist.
  8. Write the session-log policy: retention, integrity, deletion - with legal and security, decide and document (a) how long agent session logs are kept and in which system, (b) how they are protected from change (central export from the gateway or managed runtime, append-only storage, hashes) and who may read them, and (c) who may delete them, how a legal hold suspends deletion, and how erasure requests are handled. Then check that the client settings match: where the tool lets a user clear or disable session history locally, the organisation's copy must not depend on it. Tell developers plainly that sessions are logged and retained; a policy people learn about during a dispute is a second problem.
  9. Validate provenance on deployment - before deploying an artifact, verify that its provenance attestation is present, valid, and signed by the expected CI system. A deployment without a valid provenance attestation should fail or require manual override with audit logging. This is the control that prevents untracked changes from reaching production.
TIP

Prompt hashing in provenance attestations is tricky because prompts that are semantically identical may have superficial differences (whitespace, punctuation). Use a canonical form of the prompt before hashing - strip whitespace, lowercase, and apply a stable JSON serialization - so that equivalent prompts produce the same hash. This makes deduplication and correlation across sessions practical.

Common Pitfalls

Trying to capture everything and making the system unusable. Full provenance does not mean infinite provenance. Define the provenance boundary: what's inside the graph (tickets, AI sessions, commits, reviews, deployments) and what's outside (developer internal reasoning, pair programming conversations, documentation research). The boundary should be driven by what questions you need to answer, not by what's technically capturable.

Not addressing the privacy implications of prompt logging. AI session prompts may contain proprietary code, internal architecture details, or (accidentally) personal data. Before storing provenance that includes prompt hashes or prompt content, assess the data classification and access control requirements. Who can query the provenance graph? Under what circumstances can full prompt content be retrieved? This policy needs to exist before the system is built.

Provenance that's generated by the developer. Provenance that the developer generates can be falsified by the developer. For compliance purposes, provenance needs to be generated by the CI system using information that the developer cannot manipulate. SLSA addresses this with builder signing; AI session provenance should follow the same principle by having the Claude Code session log exported directly to the provenance system rather than passing through a developer-controlled step.

Graph stores that aren't queried. A provenance graph that's built but never queried provides compliance evidence but no operational value. The system needs to be queried regularly - during incident investigations, during model version evaluations, during compliance audits. Build example queries into the documentation and use them in real scenarios to validate that the graph structure supports the questions you actually need to answer.

Assuming the vendor keeps the evidence. Admin consoles are not archives. Cursor retains audit events for 30 days and does not log request content at all. If your provenance story depends on a vendor dashboard, check its retention before an auditor or an incident does.

Leaving retention and deletion to the client. If session history lives on the developer's machine, or can be cleared from the tool's menu with no central copy, then the person whose activity is in question controls the record. That is bad for the organisation and no better for the developer, who cannot use a log they could have edited to show what they actually did. Central, tamper-evident export protects both.

Treating session logs as surveillance data to mine. Evidence-grade retention is not a licence for routine monitoring of individuals. Restrict access, log every read, and define the triggers (incident, audit, legal process) under which full session content may be opened.

Ignoring provenance for automated agent PRs. If an autonomous agent creates a PR directly (without a developer initiating the session), the provenance model changes: there may be no human who chose to run an AI session - the agent ran itself. Ensure your provenance model has a valid representation for autonomous agent actions where the "human initiator" is an automation trigger (a schedule, a webhook, a merge event).

How Different Roles See It

BobHEAD OF ENGINEERING

Bob is preparing for a major enterprise customer's security review, which includes a software supply chain assessment. The customer is asking for evidence that every change to the software that runs their data has complete provenance - from ticket to production. Bob has the MVAT audit trail from L3, but the customer wants to see the ticket linkage and the deployment record, not just the commit metadata.

What Bob should do: Bob should scope a provenance graph MVP that connects the three systems the customer cares about: the issue tracker (Jira or Linear), the code repository (GitHub), and the deployment platform (Kubernetes with deployment records). The MVP is a script that, given a ticket ID, traverses the graph and outputs: the ticket, the PRs that closed it, the commits in those PRs with AI provenance data, and the deployment record. This traversal report is the supply chain evidence the customer wants. Bob doesn't need to build the full graph database in the first iteration - a script that queries three APIs and joins the results is enough to demonstrate provenance for the audit. Separately from the customer review, Bob should take one question to legal counsel this quarter: what is our retention period for agent session logs, who can delete them, and would the copy we hold stand up if a dispute turned on it? The Cubist v. Jin complaint is unproven and contested, but it shows the question is no longer hypothetical.

SarahPRODUCTIVITY LEAD

Sarah has been tracking AI adoption metrics but wants to build a more sophisticated analysis: what types of tasks are AI most effective at, and does effectiveness correlate with any provenance attributes (model version, human modification rate, task type)? The provenance graph gives her the data to answer these questions systematically.

What Sarah should do: Sarah should build an analysis pipeline on top of the provenance graph. Starting with a cohort of the last 200 AI-assisted PRs, she can compute: percentage of AI-generated code that was modified during human review (high modification = AI less effective for this task type), time from AI session to PR merge (efficiency measure), downstream defect rate by task type and model version. The goal is a "what works and what doesn't" map that guides how the team uses AI tools. Sarah should present this analysis quarterly and use it to update the guidance on which tasks are best suited for AI assistance.

VictorSTAFF ENGINEER - AI CHAMPION

Victor's workflow involves complex multi-agent orchestration: a planner agent creates a task breakdown, multiple worker agents implement the tasks in parallel, and Victor reviews the combined output. The provenance graph needs to capture this hierarchical agent structure, not just flat session-to-commit links.

What Victor should do: Victor should propose and implement a hierarchical provenance model that captures agent orchestration. The graph extension adds: a "workflow" node that represents the top-level task, "session" nodes for each agent session, and parent/child edges between orchestrator and worker sessions. The commit provenance then links to the workflow node rather than individual sessions. This model makes it possible to answer: "what was the top-level task that motivated this change?" and "which agent sessions contributed to this PR and in what roles?" Victor should prototype this with his own workflows, validate that the resulting graph is queryable and useful, and then propose it as the standard for multi-agent provenance.

How This Guide Changed

What each edition changed in this guide, newest first.

  1. V1.9December 2026LATEST

    The item now says agent session logs are potential evidence, so their retention, integrity and deletion rights are decided by policy rather than by the user's client. The trigger was Cubist v. Jin, a trade-secret suit filed on 9 November whose complaint reportedly cites 4,117 queries across 2,416 agent sessions - allegations only, which the defendant denies. The guide adds the three policy questions, a step for writing the session-log policy with legal counsel, and a caution that retained logs need access control because they hold secrets too.

  2. V1.7October 2026

    The item now names commit-to-prompt lineage via gateway prompt IDs, prompt and response logs in the SIEM with retention beyond vendor defaults, and agent access certified like human access and revoked when the owner leaves. The guide added Claude Code's x-claude-code-prompt-id gateway header as the practical join key, used Cursor's 30-day audit retention as the warning about relying on vendor consoles, and added Okta's agent access certifications and a leaver-checklist step so attribution stays honest after people go.

  3. V1.5August 2026

    Extended provenance from cryptographic traces to a full audit stack. machine-genome proposed an open identity protocol built on SHA-256 content-addressed Genes for models, prompts, datasets and artifacts; Brain0 links every commit to the prompts behind it and detects drift; whodecided distills the silent decisions agents make into a reviewable ledger. Microsoft Agent 365 bound every agent to an Entra identity so actions can be attributed. Organizational policy moved faster than tooling: the Kubernetes project made AI disclosure mandatory and banned AI-written commit messages, and Cloudflare banned AI-written PR descriptions because they describe the diff, not the strategic why. The common thread is that provenance must capture intent and accountability, not just artifacts.

  4. V1.4July 2026

    Raised the bar for agent provenance from a stored log to cryptographic tamper-evidence. Dapr 1.18 introduced Verifiable Execution on June 11: tamper-evident workflow traces built on SPIFFE identity that record which agent did what, provably. The same period established that "which model" is no longer enough, so the attestation schema grew model_version, runtime and region fields, because a model can be pulled or silently re-routed between runs.

  5. V1.0March 2026

    Arrived with the initial edition as the L4 step past a minimum audit trail. Four fields on a commit tell you an AI was involved; this guide asked for the whole causal graph - requirement, ticket, the AI sessions with their models and prompts, the review, the CI run, the deployment - on the grounds that the useful question is never whether AI touched a change but what sequence of decisions produced it.

Where does your team actually sit on this?

This guide describes one level of one area. Run the assessment to place your team across all 16 areas, see which gates you have passed, and get a report you can take to your stakeholders.

Start the assessment