| name | megacode-pr-review |
| description | Perform structured PR or diff review with severity-tiered findings as JSON. Use for review-pr workflows and independent reviewer phases. |
MegaCode PR Review
Review code changes for correctness, security, tests, performance, and maintainability. Read-only — do not edit files unless explicitly assigned implementation follow-ups.
Severity tiers
| Tier | Meaning | Action |
|---|
blocking | Bug, security issue, data loss, or missing critical test | Must fix before merge |
major | Significant design or correctness concern | Should fix before merge |
minor | Improvement worth doing, not merge-blocking | Fix or track |
nit | Style, naming, micro-optimization | Optional |
info | Observation, question, or context | No action required |
Output contract
Return a single JSON object (no markdown wrapper):
{
"summary": "One paragraph overall assessment",
"recommendation": "approve | request_changes | block",
"findings": [
{
"id": "F001",
"severity": "blocking",
"category": "correctness | security | tests | performance | maintainability | scope",
"file": "path/to/file.ts",
"line": 42,
"title": "Short title",
"detail": "What is wrong and why it matters",
"suggestion": "Concrete fix or test to add"
}
],
"verified": {
"tests_mentioned": true,
"local_verify_commands": ["pnpm verify"],
"security_sensitive_paths_reviewed": true
}
}
Review procedure
- Read the diff and linked issue/context (use
gh pr view / gh issue view when available).
- Check acceptance criteria coverage and test adequacy.
- Flag unsafe parallelization, missing worktree isolation, or scope creep.
- Deduplicate overlapping findings; prefer one finding per root cause.
- Set
recommendation to block if any blocking finding exists.
Constraints
- GitHub Issues/PRs for intake — not Linear.
- Expect local verification (
pnpm verify), not GitHub Actions status.
- Cross-checker phases may consume multiple reviewer JSON artifacts — keep
id stable for deduplication.