Agent — does the agent deliver?
Brief 37

Trace & Replay Audit

Can you see why a run did what it did — per-step traces, failure taxonomy, and replaying yesterday's bad run today.

TRACES.md4 phases7 lenses~2.7k chars

Free & open · no signup · read-only — it ends by asking · nothing leaves your machine

What it does

You are working inside this repo. Mission: determine whether a bad agent run can be understood after the fact — and rebuilt into a test — or whether every incident is archaeology.

Read-only pass. Your only write is the report file.

What it looks for

7 lenses it looks through

Phase 2 sweeps the codebase through every one of these, citing file and line for each finding.

1

Step completeness

for any step, can you see exactly what the model saw when it chose? Inputs-at-that-moment captured, or only outputs?

2

Correlation

one run_id threading everything, or grep-and-pray across systems

3

Failure taxonomy

failures bucketed by cause (bad retrieval, tool error, refusal, timeout, hallucination) or one undifferentiated "error"

4

Replay capability

can a captured trace be re-run with fixed inputs to reproduce or verify a fix? Even approximately?

5

Redaction

user content and secrets sitting in traces; retention aligned with 21's rules or contradicting them

6

Cost and latency per step

recorded where you can query them, or reconstructed by hand

7

Triage workflow

simulate it: a user reports a wrong answer; time the path from report to root cause with today's tooling

The deliverable

What lands in your repo

One structured report at the repo root — or in reports/, if you keep one — the same shape every time, ready for a teammate — or the optional Studio — to act on.

TRACES.md
1
Trace anatomy
captured today vs needed, field by field
2
The triage walkthrough
the simulated incident, timed, with every dead end
3
Instrumentation plan
field · where to emit · effort
4
Replay design
the smallest mechanism that turns a bad trace into a fixture
5
Redaction fixes
Start the report with today's date. If TRACES.md already exists from a previous run, read it first and lead with what changed since.
One file. Evidence-backed. It ends by asking before touching anything.
How it works

What it makes the agent do

Every Goal Prompt follows the same four steps, so results are consistent and repeatable — no matter which one you run.

1
Phase 1

What's recorded today

Per run and per step.

2
Phase 2

Audit through 7 lenses

Step completeness — for any step, can you see exactly what the model saw when it chose? Inputs-at-that-moment captured…

3
Phase 3

Curate

Rank gaps by how much they lengthen the report-to-root-cause path.

4
Phase 4

Report

Create TRACES.md at repo root.

Get started

Three ways to run this Goal Prompt

01 · COPY

Paste it in

Copy it and paste it into your agent inside the repo you want checked.

02 · INSTALL

As a slash command

Install the goal plugin once — two commands — then just type /goal:trace-replay-audit.

1/plugin marketplace add GhostlyGawd/goal-prompts
2/plugin install goal@goal-prompts

Or install only this Goal Prompt as /goal-trace-replay-audit:

curl -fsSL https://goal-prompts.vercel.app/install | BRIEF=37 sh
03 · AGENT

From an agent (MCP)

Let an agent fetch it mid-conversation, or pull the raw Goal Prompt by URL.

https://goal-prompts.vercel.app/raw/37.md
Transparency

The exact prompt

Nothing hidden — this is the whole Goal Prompt, verbatim. Read it in a minute, edit it, or copy it as-is.

Read the full brief (2,672 characters)
# Goal: Trace & Replay Audit

You are working inside this repo. Mission: determine whether a bad agent run can be understood after the fact — and rebuilt into a test — or whether every incident is archaeology.

Read-only pass. Your only write is the report file.

## Phase 1 — What's recorded today
- Per run and per step: are prompts, tool calls, tool results, model outputs, tokens, latency, and errors captured? Where, and for how long?
- How would you find the trace for "user X's bad run yesterday afternoon" — walk the actual lookup path.
- Do IDs correlate: user → run → steps → cost, or are these separate log puddles?

## Phase 2 — Audit through 7 lenses
1. **Step completeness** — for any step, can you see exactly what the model saw when it chose? Inputs-at-that-moment captured, or only outputs?
2. **Correlation** — one run_id threading everything, or grep-and-pray across systems
3. **Failure taxonomy** — failures bucketed by cause (bad retrieval, tool error, refusal, timeout, hallucination) or one undifferentiated "error"
4. **Replay capability** — can a captured trace be re-run with fixed inputs to reproduce or verify a fix? Even approximately?
5. **Redaction** — user content and secrets sitting in traces; retention aligned with 21's rules or contradicting them
6. **Cost and latency per step** — recorded where you can query them, or reconstructed by hand
7. **Triage workflow** — simulate it: a user reports a wrong answer; time the path from report to root cause with today's tooling

## Phase 3 — Curate
- Rank gaps by how much they lengthen the report-to-root-cause path
- Traces feed evals (34) and feedback loops (45) — note the wiring wins

## Phase 4 — Report
Create `TRACES.md` at repo root:
1. **Trace anatomy** — captured today vs needed, field by field
2. **The triage walkthrough** — the simulated incident, timed, with every dead end
3. **Instrumentation plan** — field · where to emit · effort
4. **Replay design** — the smallest mechanism that turns a bad trace into a fixture
5. **Redaction fixes**

Start the report with today's date. If `TRACES.md` already exists from a previous run, read it first and lead with what changed since.

## Rules
- If you can't see what the model saw, you can't explain what it did
- Every production failure should be one command away from becoming a test
- No agent runs to trace in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding.
- If a `reports/` directory exists at the repo root, write the report there instead of the root.
- Before asking, present the top findings as a ranked list in plain words
- Report only — end by asking which gaps to close

House rules for this Goal Prompt

  • If you can't see what the model saw, you can't explain what it did
  • Every production failure should be one command away from becoming a test
  • No agent runs to trace in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding.
  • If a reports/ directory exists at the repo root, write the report there instead of the root.
  • Before asking, present the top findings as a ranked list in plain words
  • Report only — end by asking which gaps to close
Keep exploring

More Agent briefs

Runs inside these playbooks — curated sequences you can launch with one paste: