AddThisFeature

AI Audit Trail

Keep a reviewable record of what the AI saw, produced, recommended, and actually did.

involved AI Safety & Trust

What it adds

A per-run record of inputs, sources, configuration, output, approvals, and executed actions, restricted and retained by purpose.

What your agent is told to do

5
  1. 1

    Write one record per run covering the feature invoked, the configuration and prompt version in force, the sources retrieved, the tools called, the output produced, who approved it, and what was carried out.

  2. 2

    Distinguish a draft from an executed action explicitly in the record. A trail that shows only what text was produced cannot answer the question that matters in a review, which is whether anything happened.

  3. 3

    Redact at the moment of writing. Strip credentials, tokens, and payment details before the record is stored, and keep only the personal content genuinely needed to understand the decision.

  4. 4

    Make records append-only, permission-restricted, and tamper-evident, and link out to the retrieval capture owned by Retrieval Debugger rather than duplicating chunk-level detail here. A trail the operator who caused the event can quietly edit proves nothing.

  5. 5

    Set retention per purpose rather than one global window, since routine assistance, safety review, billing reconciliation, and regulated workflows justify different periods. Do not keep every prompt and response indefinitely because it was easier than deciding.

Edge cases it handles

8
  • The record must capture the configuration and prompt version used, the sources supplied, the tools invoked, who approved the result, and the outcome. Any one of those missing makes an incident unreconstructable.
  • Prompts and outputs carry secrets and personal data by accident. Redact before storage rather than at display time, because a redaction applied in the view still leaves the original in the database and in backups.
  • A suggestion the user rejected, a draft never sent, and an action executed against live data must be visually and structurally distinct in the trail.
  • Records must be append-only with modification detectable, and readable only by roles entitled to see the underlying content, since the trail aggregates material from across the app.
  • Retention has to be set separately for ordinary usage, safety investigations, billing evidence, and regulated activity, because a single window is either too short for one of them or too long for the rest.
  • A run that failed, timed out, was refused by the model, or was cancelled partway still needs a record. The absence of an entry must never be the only evidence that something went wrong.
  • If writing the audit record fails, decide deliberately whether the action proceeds or is blocked, and apply the stricter choice to anything consequential.
  • A deletion request from a user has to reach this trail as well. Define what is removed and what is retained under a legal obligation, and be able to state which is which.

Definition of done

9
  • Every AI run produces a record, including failed, refused, and cancelled runs.
  • Each record identifies the configuration and prompt version, the sources retrieved, the tools called, and the approver.
  • Drafts, rejected suggestions, and executed actions are distinguishable in the trail.
  • Credentials and payment details are removed before the record is stored, not hidden at display time.
  • Records are append-only, tamper-evident, and readable only by authorized roles.
  • Retention periods are configured separately per purpose and enforced by deletion.
  • Chunk-level retrieval detail is linked from Retrieval Debugger rather than duplicated.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.