Review Artifacts Persistence Protocol
August 30, 2026 ยท View on GitHub
Any code review agent that produces a structured verdict follows this protocol to enable CI integration and cross-agent artifact compatibility.
Folder Structure
.copilot-tracking/
reviews/
code-reviews/
<sanitized-branch>/
review.md # full markdown review output
metadata.json # machine-readable summary (see schema below)
diff-state.json # shared subagent input (branch, base, files, depth)
dispatch-manifest.json # canonical loop state (phase gates, next actions, board items)
dispatch-board.md # human-readable enumerated dispatch board
walkthrough.md # factual Register 1 orientation narrative
emission-record.json # selected emission mode, target, status, outcome
explanations/
<board-item>-<symbol>.md # per-item Register 1 explanation artifacts
walkback/
<board-item>-research.md # per-item Register 2 investigation artifacts
Sanitize the branch name by replacing every / with -
(e.g. feat/my-feature โ feat-my-feature).
The review.md, metadata.json, diff-state.json, and dispatch-manifest.json
artifacts are always produced. The orientation-first artifacts
(dispatch-board.md, walkthrough.md, explanations/, walkback/, and
emission-record.json) are produced only when the review runs in interactive
orientation-first mode; omit them in non-interactive workflow runs.
metadata.json Schema
{
"schema_version": "1",
"branch": "<original branch name, e.g. feat/my-feature>",
"head_commit": "<full SHA of HEAD at time of review>",
"reviewed_at": "<ISO 8601 UTC timestamp, e.g. 2026-02-27T10:00:00Z>",
"verdict": "<normalized verdict - see table below>",
"files_changed": ["<workspace-relative paths of source files in the diff>"],
"findings_count": {
"critical": 0,
"high": 0,
"medium": 0,
"low": 0
},
"reviewer": "<agent or prompt name, e.g. code-review>",
"artifacts": {
"dispatch_manifest": "dispatch-manifest.json",
"dispatch_board": "dispatch-board.md",
"walkthrough": "walkthrough.md",
"emission_record": "emission-record.json",
"explanations": ["explanations/<board-item>-<symbol>.md"],
"walkbacks": ["walkback/<board-item>-research.md"]
}
}
The artifacts object records the orientation-first artifacts produced during
the review. Omit any key whose artifact was not produced (for example, omit
artifacts entirely for a non-interactive workflow run, or omit explanations
when no per-item explanation was requested). The explanations and walkbacks
values are arrays of review-folder-relative paths, one entry per board item
that was explained or investigated.
Verdict Normalization
| Agent Output Verdict | verdict value |
|---|---|
| โ Approve | approve |
| ๐ฌ Approve with comments | approve_with_comments |
| โ Request changes | request_changes |
Orientation-First Artifacts
Interactive orientation-first reviews persist the following artifacts alongside
review.md and metadata.json. Each is referenced from review.md so the
markdown report links to the supporting evidence.
dispatch-manifest.jsonโ the canonical loop state:phaseGates,currentPhase,nextActions, andboardItems. This is the machine-readable source of truth for the human-steered walk-back loop.dispatch-board.mdโ the human-readable enumerated board rendered from the manifestboardItems: id, area, status, register, summary, openable links, and selectable symbols.walkthrough.mdโ the factual Register 1 orientation narrative (diff summary, runway summary, and appendices) presented before any findings register. It contains no severity grades or verdicts.explanations/<board-item>-<symbol>.mdโ per-item Register 1 explanation artifacts written by the explainer when a human asks a shallow factual question about a symbol. Each includes the answer, source file reference, relevant code excerpt, and follow-on symbols.walkback/<board-item>-research.mdโ per-item Register 2 investigation artifacts written by the walk-back researcher when a human asks a deep investigative question. Each is anchored to its board item.emission-record.jsonโ the selected emissionmode(native or canonical),target(PR, MR, ADO, or review artifact),status(completed or skipped), and a short outcomesummary.
Change-Risk Decision State
diff-state.json is the canonical owner of the evidence and depth decision used by every review lane:
reviewStateProvenancerecordshuman-confirmedorautomation-derivedorigins forscope,changeRiskEvidence,recommendedDepth,depthTier, anddepthRationale. It describes origin, not confidence.changeRiskEvidencecontains exactly one entry for each ofchange-scope,path-criticality,history,test-presence,coverage, androllback.- Each entry contains
signal,availability, andevidence. Theavailabilityfield records the evidence state, not confidence in a claim. Its value isobserved,unavailable, orqualitative; unavailable inputs remain explicit and are never fabricated. recommendedDepthrecords the advisorybasic,standard, orcomprehensiverecommendation. Usestandardwhen evidence is incomplete or inconclusive unless observed evidence supports comprehensive review.- In interactive mode, existing
depthTierremains the human-selected verification depth, anddepthRationaleexplains that selection and any difference fromrecommendedDepth. Mark scope, evidence, depth, and rationale ashuman-confirmed; keep the advisory recommendationautomation-derived. - In workflow mode, mark all five provenance values
automation-derived. Host-supplied or default values are not represented as human-confirmed.
In interactive mode, write these values after human scope and depth confirmation. In workflow mode, write them after automated context preparation. Complete either write before perspective dispatch. Subagents consume the values and provenance as shared context but do not recalculate or overwrite them.
Writing Rules
- Always overwrite any existing
review.mdandmetadata.jsonfor the branch: only the latest review per branch is retained. - Obtain the HEAD commit SHA with
git rev-parse HEADimmediately before writing artifacts. - Obtain the current UTC timestamp immediately before writing artifacts:
- In POSIX-compatible shells, use
date -u +%Y-%m-%dT%H:%M:%SZ. - In PowerShell, use
Get-Date -AsUtc -Format "yyyy-MM-ddTHH:mm:ssZ".
- In POSIX-compatible shells, use
files_changedmust list only source files present in the diff (additions, modifications, or deletions). Filter by relevance - e.g..py,.sh,.ts,.tf- excluding lock files, binaries, and build output.- Do not write artifacts if the diff was empty and the review was aborted.
- The
reviewerfield must use the kebab-case form of the agent's or prompt'snamefrom its frontmatter (e.g.Code Reviewโcode-review). - Write orientation-first artifacts only when the review runs in interactive orientation-first mode; record each produced artifact under the
artifactskey inmetadata.jsonand link it fromreview.md. - Keep
walkthrough.mdandexplanations/artifacts factual (Register 1): no severity grades or verdicts. Keepwalkback/artifacts in the structured investigation register (Register 2). - Create the
explanations/andwalkback/subfolders only when at least one explanation or investigation artifact is written. - Every
review.mdends with a Disclaimer and Human Review section: the verbatim## Code-ReviewCAUTION disclaimer fromdisclaimer-language.instructions.mdfollowed by an unchecked- [ ] Reviewed and validated by a qualified human reviewercheckbox. This section is always present, is always the final section, and the agent never checks the checkbox; only a human may convert[ ]to[x]. - When the review scope targets a pull request or merge request,
review.mdincludes a mandatory human-editable PR Comment Draft section with an unchecked posting checkbox. This section is the only place the general PR or MR comment is authored; the agent never reproduces the full drafted comment body in the conversational summary. The agent never checks the posting box; only the human may convert[ ]to[x], and that check is the gate that authorizes posting the general PR or MR comment.