multi-reviewer-patterns
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMulti-Reviewer Patterns
多审查者模式
Patterns for coordinating parallel code reviews across multiple quality dimensions, deduplicating findings, calibrating severity, and producing consolidated reports.
用于协调跨多个质量维度的并行代码审查、发现去重、严重程度校准以及生成整合报告的模式。
When to Use This Skill
何时使用此技能
- Organizing a multi-dimensional code review
- Deciding which review dimensions to assign
- Deduplicating findings from multiple reviewers
- Calibrating severity ratings consistently
- Producing a consolidated review report
- 组织多维度代码审查
- 确定分配哪些审查维度
- 去除来自多个审查者的重复发现
- 一致校准严重程度评级
- 生成整合的审查报告
Review Dimension Allocation
审查维度分配
Available Dimensions
可用维度
| Dimension | Focus | When to Include |
|---|---|---|
| Security | Vulnerabilities, auth, input validation | Always for code handling user input or auth |
| Performance | Query efficiency, memory, caching | When changing data access or hot paths |
| Architecture | SOLID, coupling, patterns | For structural changes or new modules |
| Testing | Coverage, quality, edge cases | When adding new functionality |
| Accessibility | WCAG, ARIA, keyboard nav | For UI/frontend changes |
| 维度 | 关注重点 | 适用场景 |
|---|---|---|
| Security | 漏洞、身份验证、输入验证 | 处理用户输入或身份验证的代码必须包含 |
| Performance | 查询效率、内存、缓存 | 更改数据访问或热路径时 |
| Architecture | SOLID、耦合、模式 | 结构变更或新增模块时 |
| Testing | 覆盖率、质量、边缘情况 | 添加新功能时 |
| Accessibility | WCAG、ARIA、键盘导航 | UI/前端变更时 |
Recommended Combinations
推荐组合
| Scenario | Dimensions |
|---|---|
| API endpoint changes | Security, Performance, Architecture |
| Frontend component | Architecture, Testing, Accessibility |
| Database migration | Performance, Architecture |
| Authentication changes | Security, Testing |
| Full feature review | Security, Performance, Architecture, Testing |
| 场景 | 维度组合 |
|---|---|
| API端点变更 | Security、Performance、Architecture |
| 前端组件 | Architecture、Testing、Accessibility |
| 数据库迁移 | Performance、Architecture |
| 身份验证变更 | Security、Testing |
| 全功能审查 | Security、Performance、Architecture、Testing |
Finding Deduplication
发现去重
When multiple reviewers report issues at the same location:
当多个审查者报告同一位置的问题时:
Merge Rules
合并规则
- Same file:line, same issue — Merge into one finding, credit all reviewers
- Same file:line, different issues — Keep as separate findings
- Same issue, different locations — Keep separate but cross-reference
- Conflicting severity — Use the higher severity rating
- Conflicting recommendations — Include both with reviewer attribution
- 同一文件:行,同一问题 — 合并为一个发现,标注所有贡献审查者
- 同一文件:行,不同问题 — 保留为独立发现
- 同一问题,不同位置 — 保留独立发现但建立交叉引用
- 严重程度冲突 — 使用较高的严重程度评级
- 建议冲突 — 同时包含两种建议并标注审查者
Deduplication Process
去重流程
For each finding in all reviewer reports:
1. Check if another finding references the same file:line
2. If yes, check if they describe the same issue
3. If same issue: merge, keeping the more detailed description
4. If different issue: keep both, tag as "co-located"
5. Use highest severity among merged findingsFor each finding in all reviewer reports:
1. Check if another finding references the same file:line
2. If yes, check if they describe the same issue
3. If same issue: merge, keeping the more detailed description
4. If different issue: keep both, tag as "co-located"
5. Use highest severity among merged findingsSeverity Calibration
严重程度校准
Severity Criteria
严重程度标准
| Severity | Impact | Likelihood | Examples |
|---|---|---|---|
| Critical | Data loss, security breach, complete failure | Certain or very likely | SQL injection, auth bypass, data corruption |
| High | Significant functionality impact, degradation | Likely | Memory leak, missing validation, broken flow |
| Medium | Partial impact, workaround exists | Possible | N+1 query, missing edge case, unclear error |
| Low | Minimal impact, cosmetic | Unlikely | Style issue, minor optimization, naming |
| 严重程度 | 影响范围 | 发生可能性 | 示例 |
|---|---|---|---|
| Critical | 数据丢失、安全漏洞、完全故障 | 确定或极有可能 | SQL注入、身份验证绕过、数据损坏 |
| High | 显著功能影响、性能退化 | 可能 | 内存泄漏、缺少验证、流程中断 |
| Medium | 部分影响,存在变通方案 | 有可能 | N+1查询、缺少边缘情况处理、错误提示不明确 |
| Low | 影响极小,仅外观层面 | 不太可能 | 风格问题、次要优化、命名问题 |
Calibration Rules
校准规则
- Security vulnerabilities exploitable by external users: always Critical or High
- Performance issues in hot paths: at least Medium
- Missing tests for critical paths: at least Medium
- Accessibility violations for core functionality: at least Medium
- Code style issues with no functional impact: Low
- 外部用户可利用的安全漏洞:始终为Critical或High
- 热路径中的性能问题:至少为Medium
- 关键路径缺少测试:至少为Medium
- 核心功能的Accessibility违规:至少为Medium
- 无功能影响的代码风格问题:Low
Consolidated Report Template
整合报告模板
markdown
undefinedmarkdown
undefinedCode Review Report
Code Review Report
Target: {files/PR/directory}
Reviewers: {dimension-1}, {dimension-2}, {dimension-3}
Date: {date}
Files Reviewed: {count}
Target: {files/PR/directory}
Reviewers: {dimension-1}, {dimension-2}, {dimension-3}
Date: {date}
Files Reviewed: {count}
Critical Findings ({count})
Critical Findings ({count})
[CR-001] {Title}
[CR-001] {Title}
Location:
Dimension: {Security/Performance/etc.}
Description: {what was found}
Impact: {what could happen}
Fix: {recommended remediation}
{file}:{line}Location:
Dimension: {Security/Performance/etc.}
Description: {what was found}
Impact: {what could happen}
Fix: {recommended remediation}
{file}:{line}High Findings ({count})
High Findings ({count})
...
...
Medium Findings ({count})
Medium Findings ({count})
...
...
Low Findings ({count})
Low Findings ({count})
...
...
Summary
Summary
| Dimension | Critical | High | Medium | Low | Total |
|---|---|---|---|---|---|
| Security | 1 | 2 | 3 | 0 | 6 |
| Performance | 0 | 1 | 4 | 2 | 7 |
| Architecture | 0 | 0 | 2 | 3 | 5 |
| Total | 1 | 3 | 9 | 5 | 18 |
| Dimension | Critical | High | Medium | Low | Total |
|---|---|---|---|---|---|
| Security | 1 | 2 | 3 | 0 | 6 |
| Performance | 0 | 1 | 4 | 2 | 7 |
| Architecture | 0 | 0 | 2 | 3 | 5 |
| Total | 1 | 3 | 9 | 5 | 18 |
Recommendation
Recommendation
{Overall assessment and prioritized action items}
undefined{Overall assessment and prioritized action items}
undefined