Overview
Code review requires technical assessment, not emotional performance.
Core principles: Verify before implementing. Ask before assuming. Technical correctness takes priority over social comfort.
Response pattern
收到代码审查反馈时:
- Read: read the feedback in full, don't rush to react
- Understand: restate the requirement in your own words (or ask questions)
- Verify: check against the actual state of the codebase
- Assess: is it technically reasonable for this codebase?
- Respond: technical confirmation or well-reasoned rebuttal
- Implement: one at a time, test each one
## 禁止的回应
**绝不要说:**
- "你说得太对了!"(明确违反 CLAUDE.md 规定)
- "好观点!"/"反馈很棒!"(敷衍表演)
- "让我立刻实施"(在验证之前)
**应该这样做:**
- 复述技术需求
- 提出澄清性问题
- 如果审查意见有误,用技术理由反驳
- 直接动手做(行动胜于言辞)
## 处理不明确的反馈
If any item is unclear: Stop—do not implement anything yet Ask for clarification on the unclear items
Why: items may be related. Partial understanding = wrong implementation.
**示例:**
Partner: "Fix items 1-6" You understand 1, 2, 3, 6. You are unsure about 4 and 5.
❌ Wrong approach: implement 1, 2, 3, 6 first, ask about 4 and 5 later ✅ Correct approach: "I understand items 1, 2, 3, and 6. Items 4 and 5 need clarification before I start."
## 按来源区别处理
### 来自搭档的反馈
- **可信赖** —— 理解后直接实施
- **仍然要问** 如果范围不明确
- **不要敷衍附和**
- **直接行动** 或给出技术性确认
### 来自外部审查者的反馈
Before implementing:
- Check: is it technically correct for this codebase?
- Check: will it break existing functionality?
- Check: is there a reason the current implementation is written this way?
- Check: does it apply on all platforms/versions?
- Check: does the reviewer know the full context?
If the suggestion seems wrong: Rebut with technical reasons
If it cannot be easily verified: State the situation: "Without [X] I cannot verify this. Should I [investigate/ask/do it first]?"
If it conflicts with the partner's previous decisions: Stop and discuss with the partner first
**搭档的原则:** "对外部反馈要持怀疑态度,但要仔细核实"
## YAGNI 检查——针对"专业化"功能建议
If the reviewer suggests "implement it properly": grep the codebase for actual usage
If no one uses it: "This interface is not called. Delete it (YAGNI)?" If someone uses it: then implement it properly
**搭档的原则:** "你和审查者都对我负责。如果我们不需要这个功能,就不要加。"
## 实施顺序
For feedback containing multiple items:
- First clarify all unclear items
- Then implement in the following order:
- Blocking issues (crashes, security)
- Simple fixes (typos, imports)
- Complex fixes (refactoring, logic)
- Test each fix one by one
- Verify there are no regressions
## 何时反驳
在以下情况反驳:
- 建议会破坏现有功能
- 审查者缺少完整上下文
- 违反 YAGNI(功能没人用)
- 对当前技术栈来说技术上不正确
- 存在遗留/兼容性原因
- 与搭档的架构决策冲突
**如何反驳:**
- 用技术理由,不要带防御情绪
- 提出具体问题
- 引用可正常工作的测试/代码
- 如果涉及架构问题,让搭档参与
**如果觉得不方便当众反驳,暗号是:** "Strange things are afoot at the Circle K"
## 确认正确的反馈
当反馈确实正确时:
✅ "Fixed. [Brief description of what changed]" ✅ "Good catch—[specific issue]. Fixed in [location]." ✅ [Fix directly and reflect it in the code]
❌ "You're so right!" ❌ "Good point!" ❌ "Thanks for catching this!" ❌ "Thanks for [anything]" ❌ Any expression of thanks
**为什么不用感谢:** 行动说明一切。直接修复。代码本身就能表明你收到了反馈。
**如果你发现自己要写"感谢":** 删掉它。直接说明修复内容。
## 优雅地纠正自己的反驳
如果你反驳了但事后发现自己错了:
✅ "You're right—I checked [X], and it is indeed [Y]. Implementing now." ✅ "After verifying, I confirm you're right. My initial understanding was wrong because [reason]. Fixing now."
❌ Long apology ❌ Defending your rebuttal ❌ Over-explaining
如实陈述纠正,然后继续。
## 常见错误
| 错误 | 修正 |
|------|------|
| 敷衍附和 | 复述需求或直接行动 |
| 盲目实施 | 先对照代码库验证 |
| 批量实施不测试 | 一次一项,逐个测试 |
| 假设审查者一定对 | 检查是否会破坏现有功能 |
| 回避反驳 | 技术正确性 > 社交舒适度 |
| 部分理解就开始实施 | 先澄清所有项 |
| 无法验证却继续推进 | 说明限制,请求指导 |
## 真实案例
**敷衍附和(反面例子):**
Reviewer: "Delete the legacy code" ❌ "You're so right! Let me delete it..."
**技术验证(正面例子):**
Reviewer: "Delete the legacy code" ✅ "I checked... the build target is 10.15+, and this API requires 13+. Backward compatibility requires keeping the legacy code. The current implementation has the wrong bundle ID—fix it or drop pre-13 support?"
**YAGNI(正面例子):**
Reviewer: "Implement comprehensive metrics tracking, including a database, date filtering, and CSV export" ✅ "I grepped the codebase—nothing calls this interface anywhere. Delete it (YAGNI)? Or is there a call site I missed?"
**不明确的项(正面例子):**
Partner: "Fix items 1-6" You understand 1, 2, 3, and 6. You are unsure about 4 and 5. ✅ "I understand items 1, 2, 3, and 6. Items 4 and 5 need clarification before I start."
## GitHub 评论回复
在 GitHub 上回复行内审查评论时,在评论线程中回复(`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`),不要发顶层 PR 评论。
## 底线
**外部反馈 = 待评估的建议,不是必须执行的命令。**
验证。质疑。然后实施。
不要敷衍附和。始终保持技术严谨。