145 lines
3.2 KiB
Markdown
145 lines
3.2 KiB
Markdown
# Code Review Report Template
|
|
|
|
审核报告保存到项目根目录的 `code-review-report.md`,使用以下模板:
|
|
|
|
---
|
|
|
|
```markdown
|
|
# Code Review Report
|
|
|
|
**Project:** {PROJECT_NAME}
|
|
**Branch:** {BRANCH}
|
|
**Commit:** {COMMIT_SHA}
|
|
**Date:** {DATE}
|
|
**Scope:** {SCOPE_DESCRIPTION}
|
|
**Files Reviewed:** {TOTAL_FILES}
|
|
|
|
---
|
|
|
|
## Executive Summary
|
|
|
|
| 等级 | 数量 | 占比 |
|
|
|------|------|------|
|
|
| Critical (P0) | {N} | {%} |
|
|
| High (P1) | {N} | {%} |
|
|
| Medium (P2) | {N} | {%} |
|
|
| Low (P3) | {N} | {%} |
|
|
| Info (P4) | {N} | {%} |
|
|
| **Total** | **{N}** | **100%** |
|
|
|
|
**Overall Risk:** {HIGH/MEDIUM/LOW} — {一句话总结}
|
|
**C7 Verification:** {FULL/PARTIAL/LIMITED/NONE}
|
|
|
|
---
|
|
|
|
## Critical Issues (P0) — Immediate Action Required
|
|
|
|
### [{RULE}] {TITLE}
|
|
- **File:** `{FILE}:{LINE}`
|
|
- **Dimension:** {DIMENSION}
|
|
- **Confidence:** {CONFIDENCE} | **C7 Verified:** {YES/NO}
|
|
- **Description:** {DESCRIPTION}
|
|
- **Suggestion:**
|
|
```{lang}
|
|
{CODE_SUGGESTION}
|
|
```
|
|
- **References:** {REFERENCES}
|
|
|
|
---
|
|
|
|
## High Issues (P1) — Fix Before Next Release
|
|
|
|
{同上格式}
|
|
|
|
---
|
|
|
|
## Medium Issues (P2) — Plan to Fix
|
|
|
|
{同上格式}
|
|
|
|
---
|
|
|
|
## Low Issues (P3) — Nice to Fix
|
|
|
|
| # | Rule | File:Line | Title | Confidence |
|
|
|---|------|-----------|-------|------------|
|
|
| 1 | {RULE} | `{FILE}:{LINE}` | {TITLE} | {CONF} |
|
|
|
|
---
|
|
|
|
## Info (P4) — Suggestions
|
|
|
|
| # | File:Line | Suggestion |
|
|
|---|-----------|------------|
|
|
| 1 | `{FILE}:{LINE}` | {SUGGESTION} |
|
|
|
|
---
|
|
|
|
## Hotspot Analysis
|
|
|
|
| Rank | File | Issues | Critical | High | Medium |
|
|
|------|------|--------|----------|------|--------|
|
|
| 1 | {FILE} | {N} | {N} | {N} | {N} |
|
|
|
|
---
|
|
|
|
## Dimension Summary
|
|
|
|
| 维度 | 文件数 | 问题数 | Critical | High |
|
|
|------|--------|--------|----------|------|
|
|
| Security & Compliance | {N} | {N} | {N} | {N} |
|
|
| Architecture & Design | {N} | {N} | {N} | {N} |
|
|
| Performance & Resource | {N} | {N} | {N} | {N} |
|
|
| Reliability & Data | {N} | {N} | {N} | {N} |
|
|
| Quality & Observability | {N} | {N} | {N} | {N} |
|
|
|
|
---
|
|
|
|
## Context7 Verification Statistics
|
|
|
|
| 指标 | 数值 |
|
|
|------|------|
|
|
| 依赖库总数 | {N} |
|
|
| C7 成功解析 | {N} |
|
|
| C7 解析失败 | {N} ({FAILED_LIBS}) |
|
|
| Pre-Review 查询 | {N} |
|
|
| In-Review 查询 | {N} |
|
|
| Post-Review 查询 | {N} |
|
|
| C7 验证通过 | {N} ({%}) |
|
|
| C7 纠正误判 | {N} |
|
|
| 覆盖度评级 | {FULL/PARTIAL/LIMITED/NONE} |
|
|
|
|
### Anti-Hallucination Corrections
|
|
|
|
| # | Agent | 原 Severity | Title | 纠正原因 | C7 Source |
|
|
|---|-------|------------|-------|---------|-----------|
|
|
| 1 | {AGENT} | {SEV} | {TITLE} | {REASON} | {SOURCE} |
|
|
|
|
---
|
|
|
|
## Recommendations
|
|
|
|
### Immediate Actions (This Sprint)
|
|
1. {P0/P1 对应行动项}
|
|
|
|
### Short-term (Next 2-3 Sprints)
|
|
1. {P2 对应行动项}
|
|
|
|
### Long-term
|
|
1. {架构级改进}
|
|
|
|
---
|
|
|
|
## Methodology
|
|
|
|
- **Type:** Multi-agent parallel review + Context7 anti-hallucination
|
|
- **Agents:** Security, Architecture, Performance, Reliability, Quality
|
|
- **Isolation:** Independent git worktrees per agent
|
|
- **Verification:** Context7 three-layer (warm-up → realtime → cross-validation)
|
|
- **Policy:** API findings ≥ high require C7 verification; unverified auto-downgraded
|
|
|
|
---
|
|
|
|
*Generated by Code Review Expert — Universal Multi-Agent Code Review System with Context7 Anti-Hallucination*
|
|
```
|