2.3 KiB
description, agent
| description | agent |
|---|---|
| Run the three-layer unified review (CRG graph context + score_review + dedupe_findings + generate_report). | build |
Unified Review
Run the three-layer unified code review using the MCP prompt workflow.
$ARGUMENTS
Token optimization: Before starting, call get_docs_section_tool(section_name="unified-review") for the optimized workflow.
Steps
-
Load the workflow by calling the
unified_reviewMCP prompt (or theunified-reviewskill). This drives the full READ-ONLY review pipeline. -
Ensure the graph is current by calling
build_or_update_graph_tool(). -
Get the review context by calling
get_review_context_tool()— changed files, blast radius, source snippets. -
Detect changes by calling
detect_changes_tool()— risk score, changed functions, test gaps, affected flows. -
Score objectively by calling
score_review_tool()— SQL risk, exception coverage, redundancy, high-risk density, vulnerability heuristic (good/warn/fail grades). LLM-judged metrics are inllm_judged. -
Review the changed code (Layer 1 chain decomposition): interface, business, data, utility, error handling, security, performance, observability. Produce findings with severity (blocker/major/minor), confidence (1-10), file:line, and proposed fix.
-
Merge findings by calling
dedupe_findings_tool(findings=<your findings>)— fingerprint dedup, multi-source confidence boost, PR quality score. -
Generate the report by calling
generate_report_tool(review_data=<verdict, tier, scope, metrics, merged findings>)— writescode-review-report.htmlandcode-review-report.md(defaultformat="both"). -
Report the verdict (✅ PASS / ❌ FAIL), severity counts, each issue with confidence + fix, and manual-review items.
Important Rules
- READ-ONLY. This workflow never modifies code, commits, or pushes. Every finding waits for a manual fix decision.
- Any blocker → verdict ❌ FAIL, regardless of other scores.
- Tier (fast / standard / strict) comes from
.code-review.yamlat the repo root, or thetierargument.
Tips
- For large diffs (50+ lines), dispatch specialist subagents (testing, maintainability, security, performance, data-migration, api-contract) in parallel before dedupe.
- Security and data-migration are insurance specialists — always run even when silent.