review-all
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReview All
PR前全面审查
Comprehensive pre-PR review that runs specialized reviewers in parallel and synthesizes findings into a single report. Read-only — no changes.
这是一项全面的PR前审查,会并行运行专业审查Agent,并将审查结果整合为一份单一报告。仅可读——不做任何修改。
When to Use
适用场景
- Before creating a PR
- After completing a phase of work
- When you want a full-spectrum code quality check beyond what linting covers
- 创建PR之前
- 完成一个工作阶段之后
- 当你需要超越代码检查(linting)的全方位代码质量审查时
Pipeline
审查流程
Step 1: Identify Changed Files
步骤1:识别变更文件
bash
git diff --name-only main...HEADIf on , use (last 5 commits) or ask the user for the commit range.
maingit diff --name-only HEAD~5bash
git diff --name-only main...HEAD如果当前处于分支,使用(最近5次提交),或者向用户确认提交范围。
maingit diff --name-only HEAD~5Step 2: Launch Parallel Review Agents
步骤2:启动并行审查Agent
Spawn agents simultaneously using the Task tool:
| Agent | Type | Scope | What it checks |
|---|---|---|---|
| Security Reviewer | | Changed files only | OWASP Top 10, IDOR, injection, auth gaps |
| API Route Auditor | | Routes + types dirs | Schema coverage, type drift, auth hooks |
| Scope Auditor | | | Files modified outside task scope, formatting-only changes |
Add project-specific reviewers as needed (e.g., database query reviewer, framework-specific reviewer).
使用Task工具同时启动多个Agent:
| Agent | 类型 | 审查范围 | 审查内容 |
|---|---|---|---|
| 安全审查Agent | | 仅变更文件 | OWASP Top 10、IDOR、注入漏洞、认证缺口 |
| API路由审计Agent | | 路由+类型目录 | Schema覆盖度、类型漂移、认证钩子 |
| 范围审计Agent | | | 任务范围外的修改文件、仅格式变更的内容 |
可根据需要添加项目专属审查Agent(例如:数据库查询审查Agent、框架专属审查Agent)。
Step 3: Synthesize Report
步骤3:整合审查报告
Combine all agent outputs into a single report:
undefined将所有Agent的输出整合为一份单一报告:
undefinedPre-PR Review Report
Pre-PR Review Report
Summary
Summary
| Reviewer | Findings | Critical | Warnings |
|---|---|---|---|
| Security | 2 | 0 | 2 |
| API Audit | 3 | 1 | 2 |
| Scope | 1 | 0 | 1 |
| Reviewer | Findings | Critical | Warnings |
|---|---|---|---|
| Security | 2 | 0 | 2 |
| API Audit | 3 | 1 | 2 |
| Scope | 1 | 0 | 1 |
Critical Issues (must fix before merge)
Critical Issues (must fix before merge)
[List any CRITICAL/HIGH findings]
[List any CRITICAL/HIGH findings]
Warnings (consider fixing)
Warnings (consider fixing)
[List MEDIUM/LOW findings]
[List MEDIUM/LOW findings]
Clean Areas
Clean Areas
[List what passed review with no issues]
undefined[List what passed review with no issues]
undefinedStep 4: Verdict
步骤4:审查结论
End with a clear go/no-go:
- READY TO MERGE — No critical issues, warnings are acceptable
- NEEDS FIXES — Critical issues found, list what must change
- NEEDS DISCUSSION — Architectural concerns or ambiguous scope
结尾给出明确的可合并/不可合并结论:
- READY TO MERGE — 无严重问题,警告可接受
- NEEDS FIXES — 发现严重问题,列出必须修改的内容
- NEEDS DISCUSSION — 存在架构问题或范围不明确的情况
Arguments
参数说明
- : Optional scope or commit range
$ARGUMENTS- Example: — review changes vs main
/review-all - Example: — review last 3 commits
/review-all HEAD~3 - Example: — only security reviewer
/review-all --security-only
- Example:
- : 可选的审查范围或提交范围
$ARGUMENTS- 示例:—— 对比main分支审查变更
/review-all - 示例:—— 审查最近3次提交
/review-all HEAD~3 - 示例:—— 仅运行安全审查Agent
/review-all --security-only
- 示例:
Key Rules
核心规则
- Read-only — do not modify any files
- Parallel execution — all agents run simultaneously for speed
- De-duplicate — if two agents flag the same line, merge into one finding
- No false positives — only report genuine issues with file:line references
- 仅可读 — 不得修改任何文件
- 并行执行 — 所有Agent同时运行以提升审查速度
- 结果去重 — 如果两个Agent标记了同一行代码,将其合并为一个审查结果
- 无假阳性 — 仅报告带有文件:行号引用的真实问题