← ClaudeAtlas

diff-reviewlisted

Pre-commit phase. Independent subagent reviews the finalized diff against the task brief + touched ADRs, returns a structured report of consequences, surprises, gaps, and ADR conflicts. Worker logs the report as a ledger event before bookie will accept a merged state update.
a-canary/arc-agents · ★ 0 · Code & Development · score 60
Install: claude install-skill a-canary/arc-agents
# diff-review — Independent Pre-Commit Diff Review A worker self-reviewing its own diff misses what it rationalized away during implementation. This skill spawns a **fresh subagent** that has never seen the worker's reasoning, gives it only `(diff, task brief, touched ADR files)`, and asks it to predict consequences and flag surprises/gaps versus the brief. Mandatory before `bookie update --state merged`. The ledger CLI refuses merge unless the **latest `diff_review` event** parses as JSON of shape: ```json { "reviewer_identity": "<distinct from the row's claimed_by>", "reviewed_sha": "<7–40 hex chars>", "verdict": "pass" | "fail" | "comment" } ``` Self-review (reviewer_identity === row.claimed_by) is rejected. Legacy payloads (`{consequences, surprises_vs_brief, gaps_vs_brief, adr_conflicts}`) parse as JSON objects but are missing the required fields and are rejected as well — the gate requires the new contract. The reviewer may still produce a report with `consequences/axi_violations/...` keys; those keys are simply ignored by the parser. The remaining schema (`consequences, surprises_vs_brief, gaps_vs_brief, adr_conflicts, axi_violations`) is the reviewer's *content*; it lives outside the gate and should still be emitted for auditability. Wrap the contract fields together with the report in one event payload: ```json { "reviewer_identity": "claude-afk-reviewer", "reviewed_sha": "$(git rev-parse HEAD)", "verdict": "pass", "c