AI agent pull request evidence¶
agent-trace can generate a privacy-minimized Evidence Packet, check pull request reviewability, attach schema v1 cognitive debt coverage, and publish the files as GitHub Action artifacts. The local dashboard and VS Code extension provide the same conservative per-session evidence review surface.
Local workflow¶
agent-strace health SESSION_ID
agent-strace share SESSION_ID --dry-run
agent-strace share SESSION_ID --output evidence-packet.html
agent-strace cognitive-debt --session SESSION_ID --format json --output cognitive-debt.json
agent-strace review SESSION_ID --format markdown \
--evidence-packet evidence-packet.html \
--cognitive-debt cognitive-debt.json
The default Evidence Packet omits prompts, responses, commands, paths, tool
inputs, tool results, and other content-rich values. It keeps event order,
timing, tool names, effect categories, evidence health, known gaps, redaction,
and shareable annotations. share --include-content is the explicit
full-content mode.
review reports rationale, scope, validation, stewardship, and evidence
health. Each finding includes a status, confidence, and source. Prompt text and
command strings are not printed.
Pull request comment¶
agent-strace pr-comment SESSION_ID --review \
--evidence-packet evidence-packet.html \
--cognitive-debt cognitive-debt.json \
--dry-run
Remove --dry-run to post or update the comment. With no session, as on a
Copilot cloud agent pull request, pr-comment --review --commits RANGE still
renders: it says no agent-trace session was linked, shows the findings, and
lists the external evidence. The Action posts that comment only when the
external evidence shows agent involvement, a review note was used, or the
disclosure check fails. The exit code follows the
configured reviewability threshold. Cognitive debt in check mode also fails
unless its result is a pass. An unknown cognitive debt status is unavailable,
not passing.
GitHub Action artifacts¶
With review on (the default), the Action can generate and upload:
- a metadata-only
evidence-packet.html; - schema v1
cognitive-debt.json; - Shields-compatible
cognitive-debt-badge.json; review.jsonandreview.md.
The Action writes the review table to the step summary and can post the same section to the pull request. Fork pull requests skip comments when the token is read-only, but the local check still runs. See the reviewability guide for the workflow and output contract.
Without CI¶
With no workflow, the review can go in the pull request body. Before the pull
request is opened, the author runs these commands on the branch, or the agent
runs them through the plugin skill or the MCP review tool:
agent-strace list
agent-strace share SESSION_ID --dry-run
agent-strace share SESSION_ID --output evidence-packet.html
agent-strace review --format markdown --commits origin/main..HEAD \
--evidence-packet evidence-packet.html
Paste the review output into the pull request body as printed, including a
fail result. review links sessions by the current git branch; pass
--branch NAME for another branch. --commits is optional and adds commit
trailer evidence. share --dry-run prints category counts and writes nothing.
share then writes the metadata-only packet to the --output path, or to
session-<id>.html in the current directory. Send that file to the reviewer;
the review table lists it as a local file, not uploaded. With no linked
session, every finding is inconclusive at low confidence and the table
says no session is linked. Paste that result too.
The author supplies both the change and the evidence, and can edit the pasted text. That is the same trust level as committed traces: treat the table as the author's claim. The GitHub Action run in CI is the stronger path. CI renders the table from the trace files, so it does not depend on pasted text, though it still reads only the traces the author provides.
To review a pasted table, read each row as described in
Findings. In the evidence health row, a link of
commit time or latest is a weak link
and can name an unrelated session. Validation counts only runs inside the
session, not CI. If the traces are committed, run review on the branch
yourself and compare.
Local evidence review¶
The session evidence review is shipped in the local dashboard and the VS Code extension. It shows ordered evidence, raw provider fields, relationship gaps, evidence health, privacy state, annotations, filters, and local compare, minimized share, and OTLP export actions.
Evidence limits¶
- A trace contains only events exposed by the provider and capture path.
- A recorded test command does not prove that all relevant tests ran.
- A successful tool result does not prove that the code change caused a later outcome.
- Missing events can mean absent capture, provider limitations, or unfinished work.
- The default Evidence Packet is minimized, but
--include-content, source traces, and theagent-tracesworkflow artifact can contain sensitive data. By default the Action uploads that artifact only when its eval step runs. Seeupload-tracesin commands.md. - Evidence health reports structural usability, not code quality, security certification, legal compliance, or reviewer approval.
Treat the trace as review input. Keep the code diff, CI results, and human review as separate evidence sources.