Iterative code review through parallel independent subagent reviews with user confirmation at each step.
默认行为(安全模式):
可选:自动化模式(需手动启用):
用户可通过配置文件启用 autoFix 和 autoContinue。详见 references/automation.md。
┌─────────────────────────────────────────────────────────┐
│ 默认:安全模式 │
│ - 每步都需要用户确认 │
│ - 适合:重要项目、首次使用 │
│ │
│ 可选:自动化模式(需要手动配置启用) │
│ - autoFix=true: 发现问题后自动修复 │
│ - autoContinue=true: 修复后自动继续下一轮 │
│ ⚠️ 警告:会自动修改代码! │
└─────────────────────────────────────────────────────────┘
开始 Review 前,必须执行以下检查:
| Check | 说明 |
|---|---|
| ------- | ------ |
| Model Selection | 用户选择或确认使用的模型 |
| maxSpawnDepth | ≥1 才能继续 |
| 变更规模检测 | 根据文件数调整超时时间 |
| 新增代码识别 | 审查新增代码的安全性 |
| PR 历史检查 | 避免重复发现已修复的问题 |
| Review 模式 | Full Review 或 Delta Review |
┌─────────────────────────────────────────────────────────┐
│ Review Round N │
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │Reviewer1│ │Reviewer2│ │Reviewer3│ ← 并行 3 个 │
│ └────┬────┘ └────┬────┘ └────┬────┘ │
│ └────────────┼────────────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ 汇总问题列表 │ │
│ └──────┬───────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ 用户确认 │ ← 是否继续修复? │
│ └──────┬───────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ Fixer │ ← 用户同意后才执行 │
│ └──────────────┘ │
└─────────────────────────────────────────────────────────┘
| Reviewer | 关注点 |
|---|---|
| ---------- | -------- |
| Reviewer-1 | 功能正确性、测试覆盖 |
| Reviewer-2 | 代码质量、最佳实践 |
| Reviewer-3 | 安全性、边界情况 |
Final Round 必须采用 Full Review 模式!
npm run build + npm test| Level | Definition | Fix |
|---|---|---|
| ------- | ------------ | ----- |
| P0 | Critical | 建议 |
| P1 | High | 建议 |
| P2 | Medium | 建议 |
| P3 | Low | 可选 |
✅ 允许:读取代码、运行只读命令、Spawn subagent 分析、报告问题
⚠️ 需确认:修改文件、git commit、npm install/build、Spawn Fixer
❌ 禁止:未经同意修改代码、自主运行多轮修复、自主提交
共 3 个版本