§ reference · skill

code-review

Reads a diff, branch, or PR through Quality · Security · Dependencies lenses with parallel specialist agents and returns one cited report under `.rpiv/artifacts/reviews/`.

arguments [scope]

§ 01 · purpose

Purpose

Multi-lens review using parallel specialist agents (integration-scanner, precedent-locator, peer-comparator, codebase-analyzer, web-search-researcher). The most token-hungry skill in the pipeline; drop it into any workflow at any point, not just before commit. Order is interchangeable with commit.

§ 02 · when to use

When to use it

  • Changes are ready for review — pending diff, branch, or PR.
  • You want a third opinion on quality, security risk, or dependency churn before landing.
  • You need a written, archivable review artifact.

§ 03 · inputs

Inputs

Name Required Source
scope no One of commit · staged · working · <hash> · A..B · PR branch name
scope
Empty defaults to feature-branch-vs-default-branch first-parent review.

§ 04 · outputs

Outputs

Artifact Path Format
Review document .rpiv/artifacts/reviews/ markdown with file:line citations

§ 05 · key steps

Key steps

  1. Resolve scope and assemble a -U30 union diff Why: 30 lines of surrounding context inline so agents rarely need extra Read calls. Union-of-changes (not net) so reverted intermediate work stays visible.
  2. Wave-1 — integration, precedents, deps/CVE, peer-mirror (parallel) Why: Integration map and peer-mirror gate Wave-2 quality/security; precedents gate reconciliation. Dispatching all four at T=0 keeps the critical path short.
  3. Wave-2 — Quality + Security lenses (parallel) Why: File-oriented (not hunk-oriented) so findings see the whole unit of change. Wave-2 agents receive ONLY the Discovery Map + patch path — context isolation prevents Wave-1 raw dumps from polluting downstream reasoning.
  4. Wave-3 — Predicate-Trace + Interaction Sweep + Gap-Finder Why: Gated waves catch what single-lens audits miss — gating predicates, cross-file interactions, and findings the lenses didn't surface.
  5. Reconcile, then verify each cited file:line Why: Advisor reconciliation or inline dimension-sweep merges duplicates; every finding is then re-read at its cited line before the artifact is written. Unverified findings are dropped or demoted.
  6. Write the review artifact and present follow-ups Why: The artifact is the durable output; follow-ups become tickets, not lost session state.

§ 06 · related skills

upstream implementcommit
downstream revisecommit