Consolidated Review: PR #{number}
【免费下载链接】ArchonThe first open-source harness builder for AI coding. Make AI coding deterministic and repeatable.项目地址: https://gitcode.com/GitHub_Trending/archon3/Archon
Date: {ISO timestamp}Agents: code-review, error-handling, test-coverage, comment-quality, docs-impactTotal Findings: {count}
### 4.2 Executive Summary 与总体裁决 ```markdown ## Executive Summary {3-5 sentence overview of PR quality and main concerns} **Overall Verdict**: {APPROVE | REQUEST_CHANGES | NEEDS_DISCUSSION} **Auto-fix Candidates**: {n} CRITICAL + HIGH issues can be auto-fixed **Manual Review Needed**: {n} MEDIUM + LOW issues require decision这里定义了三个决策关键量:总体裁决(三个取值)、可自动修复数(CRITICAL+HIGH 之和,直接决定下游archon-implement-review-fixes的工作量)、需要人工决策数(MEDIUM+LOW)。
4.3 Statistics 表
| Agent | CRITICAL | HIGH | MEDIUM | LOW | Total | |-------|----------|------|--------|-----|-------| | Code Review | {n} | {n} | {n} | {n} | {n} | | Error Handling | {n} | {n} | {n} | {n} | {n} | | Test Coverage | {n} | {n} | {n} | {n} | {n} | | Comment Quality | {n} | {n} | {n} | {n} | {n} | | Docs Impact | {n} | {n} | {n} | {n} | {n} | | **Total** | **{n}** | **{n}** | **{n}** | **{n}** | **{n}** |4.4 CRITICAL / HIGH 问题的条目模板
每个 CRITICAL 或 HIGH 问题采用统一条目结构:
### Issue 1: {Title} **Source Agent**: {agent-name} **Location**: `{file}:{line}` **Category**: {category} **Problem**: {description} **Recommended Fix**: ```typescript {fix code}Why Critical: {impact explanation}
**Recommended Fix** 必须携带可直接落地的修复代码,因为下游实施步骤(见下文第 6 节)会直接消费这段代码——`archon-implement-review-fixes` 明确指出 "If consolidated doesn't have full fix code, read original artifacts",说明主产物中的修复代码是首选输入,缺失时才回退到各 Agent 原始产物。 ### 4.5 MEDIUM 问题的选项表 MEDIUM 问题不给唯一答案,而是提供三选项决策表: ```markdown | Option | Approach | Effort | Risk if Skipped | |--------|----------|--------|-----------------| | Fix Now | {approach} | {LOW/MED/HIGH} | {risk} | | Create Issue | Defer to separate PR | LOW | {risk} | | Skip | Accept as-is | NONE | {risk} |并附Recommendation字段说明推荐哪条路径及理由。这正是合成阶段「把判断权留给人类、把信息备齐」的设计:MEDIUM/LOW 问题由用户决策,Agent 只提供选项和推荐。
4.6 LOW 问题与积极观察
LOW 问题以紧凑表格呈现:
| Issue | Location | Agent | Suggestion | |-------|----------|-------|------------| | {title} | `file:line` | {agent} | {brief recommendation} |Positive Observations汇总各 Agent 的正面发现(结构良好的代码、某处良好的错误处理、对某功能的全面测试、清晰的文档),保证评审不是只报问题。
4.7 后续 Issue 建议与 Next Steps
## Suggested Follow-up Issues | Issue Title | Priority | Related Finding | |-------------|----------|-----------------| | "{suggested issue title}" | {P1/P2/P3} | MEDIUM issue #{n} |Next Steps 明确下游动作:自动修复步骤处理 CRITICAL+HIGH → 人工决策 MEDIUM → 考虑 LOW。
4.8 Agent Artifacts 与 Metadata
最后用两张表收尾:Agent Artifacts 表(各 Agent 的产物文件名与发现数)、Metadata(合成时间戳与产物路径)。
Phase 3 检查点:
- Consolidated artifact created
- All findings included
- Severity ordering correct
- Options provided for MEDIUM/LOW
5. Phase 4:POST —— 发布 GitHub PR 评论
合成后的第二步交付物是一段 GitHub 友好的评审评论,通过ghCLI 发布:
gh pr comment {number} --body "$(cat <<'EOF' # 🔍 Comprehensive PR Review **PR**: #{number} **Reviewed by**: 5 specialized agents **Date**: {date} --- ## Summary {executive summary} **Verdict**: `{APPROVE | REQUEST_CHANGES}` | Severity | Count | |----------|-------| | 🔴 CRITICAL | {n} | | 🟠 HIGH | {n} | | 🟡 MEDIUM | {n} | | 🟢 LOW | {n} | EOF )"评论模板(完整见 archon-synthesize-review.md)在设计上有几个值得注意的要点:
- 严重级别 emoji 约定:🔴 CRITICAL / 🟠 HIGH / 🟡 MEDIUM / 🟢 LOW,与 archon-post-review-to-pr.md 中的约定(LOW 用 🔵)略有差异,但语义一致;
- 可折叠详情:每个修复方案包在
<details><summary>View fix</summary>...</details>中,控制评论体积,避免长 PR 评论刷屏; - CRITICAL/HIGH 标注 "Auto-fixing":明示这些将由下游自动修复,而 MEDIUM 标注 "Needs Decision";
- 评论尾部注明
*Reviewed by Archon comprehensive-pr-review workflow*与产物路径$ARTIFACTS_DIR/review/。
Phase 4 检查点:
- GitHub comment posted
- Formatting renders correctly
- All severity levels included
6. Phase 5:OUTPUT 与成功标准
合成命令的最后输出只保留一句极简确认(因其会作为评论发布,保持输出干净是刻意设计):
✅ Review synthesis complete. Proceeding to auto-fix step...【免费下载链接】ArchonThe first open-source harness builder for AI coding. Make AI coding deterministic and repeatable.项目地址: https://gitcode.com/GitHub_Trending/archon3/Archon
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考