/code-review — MCP-Powered Code Review
What
Performs a multi-dimensional code review combining Roslyn MCP analysis with structured manual review. Effort follows the 80/20 rule: the 20% of code that causes 80% of incidents (data access, security, concurrency, integration boundaries) gets thorough review; style and formatting are left to tooling.
Review dimensions: Correctness (logic, edge cases, null handling, async pitfalls), Security (auth gaps, injection, secrets, CORS), Performance (N+1, allocations, missing cancellation), Architecture compliance (layer violations, boundary breaches), Test coverage (behavior tests for changed types).
When
- "Review this", "code review", "PR review", before merging a pull request
- After a major refactor to verify no regressions or design drift
- "What should I review?" — deciding where review effort goes on a large change
- Onboarding to unfamiliar code and wanting a quality assessment
How
Step 1: Scope and Score Blast Radius
Identify changed files (git diff main...HEAD, specified files, or module).
Score each change to set review depth — blast radius determines depth, not
line count. A one-line middleware change outranks a 300-line rename.
Step 2: MCP Analysis (before reading any file)
Distinguish newly introduced findings from pre-existing ones — focus on new.
Step 3: Blast Radius Verification
For each modified public API:
Check whether callers handle changed return types and new error cases.
Step 4: Architecture Compliance
Verify dependency direction (Domain → nothing; Infrastructure → Application →
Domain) via get_project_graph and detect_circular_dependencies. Per
architecture: VSA features don't cross-reference; Clean Architecture domain has
zero project references; Modular Monolith modules communicate only via
integration events — find_references on a module's DbContext should resolve
only inside that module.
Step 5: Manual Review — Priority Order
Review what tools can't catch, highest-risk areas first:
Step 6: Produce the Review
Every finding states what's wrong, why it matters, and how to fix it. Never bury a security bug under naming nits.
Quick review (1-2 files, low blast radius): run detect_antipatterns +
get_diagnostics, read for correctness, output Summary + Issues + What's Good.
Example
Related
/de-sloppify— Cleanup pass for the style/formatting issues review skips/verify— Automated verification pipeline (complements manual review)/health-check— Broader project health assessment beyond a single PR


