Files
relayview-skills/packages/code-review/SKILL.md
T
adminandClaude Opus 5.5 7c89205e06 Update Planner and Reviewer packages for proof translation, typed escalation, and guardrails (v0.16.0)
planner-scope (schema 2, issueClaim unchanged) now translates the
Specification Designer's requested proof, fast-test completeness, and
declared test resources into Implementer fast checks and Building
Inspector verification goals in Plan v1. A new escalation.md resolves
Implementer needs_operator_decision and scope_exceeded flags inside the
approved specification or promotes them, and escalates directly with one
typed Layer C reason and a short risk summary, never downgrading
operator_review_required.

code-review-auto and code-review share a Trust Pyramid "Propose a
guardrail" section (architecture/API boundary, then static check or fast
regression test, then verification harness, then a candidate prose skill
as last resort) and a typed "Escalate" section. planner-communication and
reviewer-communication (schema 3) frame escalations and Review Packets.

RELEASE-NOTES.md gives each package's before and after for fork
maintainers; OVERRIDING.md and README.md record the new versions and seams.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 20:41:06 -05:00

40 lines
4.1 KiB
Markdown

---
name: code-review
description: Review the owner-pinned candidate against repository standards and the admitted Plan on separate evidence axes, propose guardrails for repeatable defects, and escalate with typed reasons.
disable-model-invocation: true
metadata:
relayview-display-name: Code review
relayview-version: 0.16.0
---
# Two-axis code review
Review only the candidate and commit identity supplied by the owner. Keep standards and Plan fidelity separate. For standards, cite the exact repository rule and changed hunk; identify possible design smells as judgment calls, never as rule violations. A documented local standard takes precedence over a general heuristic. For Plan fidelity, identify missing or partial requirements, unrequested behavior, and behavior whose implementation contradicts the accepted Plan. Cite the Plan clause and code evidence for each finding.
Report both axes even if one has no findings. Distinguish evidence, inference, and uncertainty; skip issues already enforced by tooling unless the enforcement itself failed. Do not edit the candidate, create subagents, choose a new base, change the acceptance state, or request a new review run. The owner controls review scheduling, exact-head binding, and the response to findings.
Keep findings bounded, path-aware, and actionable.
## Propose a guardrail
When a finding belongs to a repeatable defect class, meaning the same kind of mistake could recur in other changes and a deterministic check could have caught it, propose the lowest viable guardrail with the finding. Recommend the first rung that can make the class impossible or catch it reliably:
1. **Architecture or API boundary:** a structural change, such as a narrower interface, a type that cannot represent the invalid state, or a module boundary, that makes the defect class impossible.
2. **Static check or lint rule, or a fast regression test:** a lint rule, import-graph fence, or type constraint with a root-cause error message that names the cause and the fix, or a fast regression test that fails on the defect.
3. **Verification harness:** an update to the repository's Feature Map, a verification driver or CLI, or a property test, when the defect shows only in the running application.
4. **Candidate prose skill:** the last resort, for a genuine judgment call no check can decide. It stays a candidate until the Operator approves it.
Keep each proposal short: the defect class in one or two sentences, the rung you recommend and why the lower-numbered rungs do not fit, and a bounded follow-up task. A proposal is a recommendation for the Operator to queue or dismiss; it never expands the candidate under review. Skip proposals for one-off mistakes.
## Escalate
Escalate when a finding needs the Operator's judgment rather than another correction round. Give exactly one typed reason and a risk summary of one or two sentences naming the decision and its evidence:
- `boundary_crossed`: the candidate touches a sensitive boundary the specification did not approve, such as a public contract or API, a schema migration, authentication or security, CI or release configuration, a user-facing screen, or a new dependency, network egress, secret, or privilege.
- `spec_ambiguity`: the candidate and the Plan read the specification differently, and no contract settles which reading the Operator intended.
- `verification_incomplete`: the evidence cannot establish an acceptance observation, for example because fast tests cannot cover it or a required check was skipped or replaced by a mock.
- `behavioral_tradeoff`: the candidate makes a behavioral tradeoff or architectural compromise the specification did not settle.
- `convergence_exceeded`: the same findings return across correction rounds, and another round is unlikely to converge.
Report ordinary defects as findings, not escalations; an escalation made just to be safe spends Operator attention without saying what to decide. An escalation only raises the review a task needs: never downgrade `operator_review_required` or recommend a lower review tier. Raise it through the escalation interface the owner assigns; where none is assigned, state the reason and risk summary at the top of the review result.