Generated files are easy for an AI agent to trust too quickly. A build can succeed while an index is stale, a report can look plausible while using the wrong input, or a cached result can outlive the source it describes. Provenance markers give each derived artifact a small, reviewable explanation of where it came from and how it was checked.

The goal is not to publish internal logs or expose private infrastructure. The goal is to preserve enough safe evidence that an agent—or the next human—can distinguish a fresh, validated artifact from an unexplained file that merely happens to exist.

Mark the lineage, not the private machinery

A useful marker answers four questions:

  • Source: which public or generic source set was used?
  • Transform: which named generator, schema, or operation produced the artifact?
  • Freshness: when was it produced, or which safe revision marker did it use?
  • Validation: which checks passed after generation?

Keep the values abstract and bounded. A content collection name, generator version, UTC date, short safe revision, and check labels are usually enough. Do not include local paths, access tokens, account identifiers, hostnames, raw prompts, or full diagnostic output.

Put provenance at the promotion boundary

Provenance is most valuable when an agent is about to publish, deploy, notify, or hand off work. Before that boundary, the agent can compare the marker with the current source and regenerate if needed. After the boundary, the marker becomes part of the receipt that explains what was promoted.

A compact rule for a runbook:

Before promoting a generated artifact, verify that its source marker matches the current source,
its generator is the approved operation, its freshness is within the task window, and its
validation labels are present. Regenerate or stop; never silently publish an unproven artifact.

This turns “the file is there” into a stronger decision: “the file is there, can be traced to the intended source, and passed the required gate.”

Use a small provenance receipt

The marker can live in metadata, a sidecar record, or a deployment receipt. Keep it machine-readable where possible and easy to summarize for humans:

Provenance receipt
Artifact: <generic artifact name>
Source set: <safe collection or input label>
Transform: <approved generator or schema version>
Freshness: <UTC timestamp or safe revision marker>
Validation: <checks that passed>
Public-safe: yes | no
Decision: promote | regenerate | stop

The final Public-safe decision is important. Provenance should improve trust without becoming a channel for confidential context. If the marker itself contains sensitive values, replace them with safe labels before it reaches public output.

Detect stale and mixed-generation output

Two failure modes deserve explicit checks:

  • Stale output: the source changed after generation, but the old artifact is still being promoted.
  • Mixed generations: related artifacts were produced from different source or generator markers, so each looks valid alone while the published set disagrees.

Compare markers across the complete promotion unit, not just the most visible file. If they do not agree, stop at the boundary, regenerate from one source snapshot, and rerun validation. Do not repair the generated files by hand; fix the source or generator and reproduce the set.

Rule of thumb: every derived artifact should be able to say “from which safe source, by which approved transform, and after which checks” before an agent treats it as publishable.