/clavain:clavain-review [PR number, GitHub URL, branch name, or latest]from clavain
Performs multi-agent code review on a PR, branch, or local changes — runs parallel architecture, security, quality, and history agents, then synthesizes findings into a verdict report.
Ships in clavain. Installing the plugin adds it to Claude Code.
<review_target> #$ARGUMENTS </review_target>
gh pr checkout or git checkoutgh pr view --json title,body,files,linkedIssuesdocs/plans/*.md, docs/solutions/*.mdREVIEW_TARGET="current" # or PR number / branch name
OUTPUT_DIR="${PROJECT_ROOT}/.clavain/reviews/${REVIEW_TARGET}"
mkdir -p "$OUTPUT_DIR"
rm -f "$OUTPUT_DIR"/*.md "$OUTPUT_DIR"/*.md.partial 2>/dev/null
DIFF_FILE="/tmp/review-diff-$(date +%s).txt"
git diff HEAD > "$DIFF_FILE"
Launch in parallel (run_in_background: true). Each agent reads $DIFF_FILE as first action.
Output contract (include verbatim in each agent prompt):
Write ALL findings to `{OUTPUT_DIR}/{agent-name}.md`. Do NOT return findings in response text.
Response text: single line "Findings written to {OUTPUT_DIR}/{agent-name}.md"
File structure:
### Findings Index
- SEVERITY | ID | "Section" | Title
Verdict: safe|needs-changes|risky
### Summary
[3-5 lines]
### Issues Found
[ID. SEVERITY: Title — 1-2 sentences with evidence. file:line ref.]
### Improvements
[ID. Title — 1 sentence rationale]
Zero findings: empty index + verdict: safe.
Core agents:
interflux:review:fd-architecture — structural reviewinterflux:review:fd-safety — security scaninterflux:review:fd-quality — naming, conventions, idiomsinterflux:research:git-history-analyzer — historical contextintercraft:review:agent-native-reviewer — agent-native parityConditional:
interflux:review:fd-correctnessdata-migration-expertPoll $OUTPUT_DIR/ every 30s; report [N/5 agents complete]; after 5min flag pending agents.
If Oracle available:
DISPLAY=:99 CHROME_PATH=/usr/local/bin/google-chrome-wrapper \
oracle --wait \
-p "Review this PR for issues a Claude-based reviewer might miss. Focus on: security blind spots, architectural concerns, edge cases. Number each finding with severity (P1/P2/P3)." \
-f "<changed-files>" \
--write-output "${OUTPUT_DIR}/oracle-council.md"
Do NOT read agent output files yourself. Delegate to subagent:
Every spawn names a model — execution model: sonnet, validation model: opus, frontier-in-the-loop model: inherit (routing doctrine, commands/model-routing.md). Unpinned spawns inherit the session model.
Task(intersynth:synthesize-review, model="haiku"):
OUTPUT_DIR={OUTPUT_DIR}
VERDICT_LIB={CLAUDE_PLUGIN_ROOT}/hooks/lib-verdict.sh
MODE=review
CONTEXT="PR #{pr_number} — {title}"
PROTECTED_PATHS=docs/plans/*.md, docs/solutions/*.md
After synthesis: read {OUTPUT_DIR}/synthesis.md, present to user (~30-50 lines). P1 findings block merge. If .beads/ exists and findings > 3, ask user about filing beads issues.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
66 commands in this plugin
/bead-sweepScan open beads for stale trackers already implemented — deterministic checks then LLM verification./blast-radiusFind what a change could break somewhere else before it ships, and prove the one fact it is safe because of by running real code/brainstormCollaborative brainstorm — assess clarity, research repo, explore approaches, capture design. Auto-handoff to /write-plan./campaignOrchestrate epic execution — read children, topo-sort by dependencies, dispatch phases sequentially with parallel features/changelogCreate engaging changelogs for recent merges to main branch/clavain-doctorQuick health check — verifies MCP servers, external tools, beads, and plugin configuration without making changesclavain@interagency-marketplace is listed by mistakeknot/interagency-marketplace — review the source before installing
npx claudepluginhub mistakeknot/interagency-marketplace --plugin clavain