選項
首頁首頁 Skill 開發者工具 receiving-code-review

receiving-code-review

obra/superpowers obra/superpowers

提供一套結構化的流程,用以接收並評估程式碼審查的回饋意見,並著重於技術驗證,而非表面上的認同。

...展開全部
26
更新時間 2026-09-03

程式碼審查座談會

概述

程式碼審查需要的是技術評估,而非情緒表現。

核心原則:實作前先驗證,假設前先詢問。技術正確性重於社交舒適感。

回應模式

當收到程式碼審查回饋時:

1. 閱讀:完整閱讀回饋內容,暫不做出反應
2. 理解:用自己的話重述需求(或提出疑問)
3. 驗證:對照程式碼庫的實際情況進行核對
4. 評估:對「這個」程式碼庫而言,技術上是否合理?
5. 回應:技術性認同或提出有理有據的反駁
6. 實作:逐項處理,並分別進行測試

禁止的回應方式

切勿:

  • 「你說得完全正確!」(明確違反《指示文件》)
  • 「好點子!」/「很棒的回饋!」(純屬形式)
  • 「我現在就來實作」(在驗證之前)

應改為:

  • 重述技術需求
  • 提出澄清問題
  • 若要求有誤,以技術理由提出異議
  • 直接開始著手處理(行動重於言語)

處理不明確的回饋

若任何項目不明確:
  暫停 — 暫勿進行任何實作
  針對不明確的項目尋求澄清

原因:各項目的內容可能相互關聯。部分理解 = 錯誤實作。

範例:

你的合作夥伴:「修正 1-6」
你理解 1、2、3、6,但對 4、5 感到不明確。

❌ 錯誤:現在先執行 1、2、3、6,稍後再詢問 4、5
✅ 正確:「我理解第 1、2、3、6 項。在繼續之前,需要針對第 4 和 5 項進行澄清。」

針對特定來源的處理方式

來自人類夥伴

  • 可信賴— 理解後再執行
  • 若範圍仍不明確,仍應詢問
  • 無表態性同意
  • 直接採取行動或進行技術性確認

來自外部審查員

實作前:
  1. 確認:對「此」程式碼庫而言在技術上是否正確?
  2. 確認:會破壞現有功能嗎?
  3. 確認:現行實作的原因為何?
  4. 確認:在所有平台/版本上都能運作嗎?
  5. 確認:審查者是否理解完整背景?

若建議似乎有誤:
  以技術理由提出異議

若無法輕鬆驗證:
  如實說明:「若沒有 [X],我無法驗證此建議。我該 [調查/詢問/繼續進行] 嗎?」

若與您的真人合作夥伴先前決策衝突:
  先暫停並與您的真人合作夥伴討論

你的人類夥伴的準則:「面對外部反饋——保持懷疑,但務必仔細核實」

YAGNI 檢查「專業級」功能

若審查者建議「正確實作」:
  使用 grep 檢索程式碼庫中的實際使用情況

  若未被使用:「這個端點未被呼叫。是否應移除它(YAGNI)?」
  若被使用:則應正確實作

你的人類夥伴的規則:「你和審查者都向我匯報。如果我們不需要這項功能,就不要添加。」

實作順序

若為多項反饋:
  1. 首先釐清所有不明確之處
  2. 接著依此順序實作:
     - 阻塞性問題(功能失效、安全性)
     - 簡單修正(錯字、匯入)
     - 複雜修正(重構、邏輯)
  3. 分別測試每項修正
  4. 確認沒有回歸問題

何時應提出異議

在以下情況應提出異議:

  • 建議會破壞現有功能
  • 審查者缺乏完整背景資訊
  • 違反 YAGNI 原則(未使用功能)
  • 在該技術棧中存在技術性錯誤
  • 存在舊系統/相容性考量
  • 與您的合作夥伴所做的架構決策相衝突

如何反駁:

  • 運用技術論據,而非採取防禦姿態
  • 提出具體問題
  • 引用可運作的測試/程式碼
  • 若涉及架構問題,應讓人類夥伴參與討論

若您不習慣當面提出異議:先指出那份緊張感,然後向合作夥伴說明您觀察到的問題。對方會欣賞您的坦誠。

接納正確的回饋

當回饋確實正確時:

✅ 「已修正。[簡要說明變更內容]」
✅ 「好眼力——[具體問題]。已在[位置]修正。」
✅ [直接修正並在程式碼中展示]

❌ 「你完全說得對!」
❌ 「說得有道理!」
❌ 「謝謝你發現這個!」
❌ 「謝謝你 [任何內容]」
❌ 任何感謝的表達

為何不說謝謝:行動勝於言辭。直接修正即可。程式碼本身便能證明你已聽取了回饋。

若發現自己正要寫下「謝謝」:刪掉它。改為說明修正方式。

優雅地應對反對意見

若你提出異議卻發現自己錯了:

✅ 「你是對的——我檢查了 [X],它確實會 [Y]。現在就著手修正。」
✅ 「經確認後,你說得沒錯。我最初的理解有誤,是因為 [原因]。正在修正。」

❌ 冗長的道歉
❌ 辯解為何會提出異議
❌ 過度解釋

請客觀陳述修正內容,然後繼續前進。

常見錯誤

錯誤 修正
做做樣子地表示同意 陳述要求或直接採取行動
盲目實作 先對照程式碼庫進行驗證
未經測試即批量處理 逐一測試
假設審查者是對的 檢查是否造成功能失效
避免引發反彈 技術正確性 > 便利性
部分實作 先釐清所有項目
無法驗證,仍繼續進行 說明限制條件,尋求指引

實際範例

表演性協議(不當):

審查者:「移除舊有程式碼」
❌ 「您說得完全正確!讓我來移除它……」

技術驗證(正確):

審查者:「移除舊版程式碼」
✅ 「正在檢查……建置目標為 10.15 以上,此 API 需 13.0 以上。為維持向後相容性,需保留舊版程式碼。目前實作的套件識別碼有誤——要修正它,還是取消對 13.0 以下版本的支援?」

YAGNI(良好):

審查者:「實作完善的指標追蹤功能,包含資料庫、日期篩選器及 CSV 匯出」
✅ 「已使用 grep 檢索程式碼庫——沒有任何地方呼叫此端點。該移除它(YAGNI)嗎?還是有我遺漏的使用情境?」

不明確項目(良好):

您的合作夥伴:「修正第 1 至 6 項」
您理解第 1、2、3、6 項。第 4、5 項尚不明確。
✅ 「理解第 1、2、3、6 項。在實作前需要釐清第 4 和第 5 項。」

GitHub 討論串回覆

在 GitHub 上回覆內嵌審查註解時,請在評論討論串中回覆(gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies),而非作為拉取請求(PR)頂層的評論。

總結

外部回饋=供評估的建議,而非必須遵循的指令。

驗證。提問。然後才實施。

切勿僅為做秀而表示同意。技術嚴謹性永遠是首要原則。

在 GitHub 上查看
---
name: receiving-code-review
description: Provides a structured protocol for receiving and evaluating code review feedback, emphasizing technical verification over performative agreement.
---

# Code Review Reception

## Overview

Code review requires technical evaluation, not emotional performance.

**Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.

## The Response Pattern

```
WHEN receiving code review feedback:

1. READ: Complete feedback without reacting
2. UNDERSTAND: Restate requirement in own words (or ask)
3. VERIFY: Check against codebase reality
4. EVALUATE: Technically sound for THIS codebase?
5. RESPOND: Technical acknowledgment or reasoned pushback
6. IMPLEMENT: One item at a time, test each
```

## Forbidden Responses

**NEVER:**
- "You're absolutely right!" (explicit instruction-file violation)
- "Great point!" / "Excellent feedback!" (performative)
- "Let me implement that now" (before verification)

**INSTEAD:**
- Restate the technical requirement
- Ask clarifying questions
- Push back with technical reasoning if wrong
- Just start working (actions > words)

## Handling Unclear Feedback

```
IF any item is unclear:
  STOP - do not implement anything yet
  ASK for clarification on unclear items

WHY: Items may be related. Partial understanding = wrong implementation.
```

**Example:**
```
your human partner: "Fix 1-6"
You understand 1,2,3,6. Unclear on 4,5.

❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
```

## Source-Specific Handling

### From your human partner
- **Trusted** - implement after understanding
- **Still ask** if scope unclear
- **No performative agreement**
- **Skip to action** or technical acknowledgment

### From External Reviewers
```
BEFORE implementing:
  1. Check: Technically correct for THIS codebase?
  2. Check: Breaks existing functionality?
  3. Check: Reason for current implementation?
  4. Check: Works on all platforms/versions?
  5. Check: Does reviewer understand full context?

IF suggestion seems wrong:
  Push back with technical reasoning

IF can't easily verify:
  Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"

IF conflicts with your human partner's prior decisions:
  Stop and discuss with your human partner first
```

**your human partner's rule:** "External feedback - be skeptical, but check carefully"

## YAGNI Check for "Professional" Features

```
IF reviewer suggests "implementing properly":
  grep codebase for actual usage

  IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
  IF used: Then implement properly
```

**your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."

## Implementation Order

```
FOR multi-item feedback:
  1. Clarify anything unclear FIRST
  2. Then implement in this order:
     - Blocking issues (breaks, security)
     - Simple fixes (typos, imports)
     - Complex fixes (refactoring, logic)
  3. Test each fix individually
  4. Verify no regressions
```

## When To Push Back

Push back when:
- Suggestion breaks existing functionality
- Reviewer lacks full context
- Violates YAGNI (unused feature)
- Technically incorrect for this stack
- Legacy/compatibility reasons exist
- Conflicts with your human partner's architectural decisions

**How to push back:**
- Use technical reasoning, not defensiveness
- Ask specific questions
- Reference working tests/code
- Involve your human partner if architectural

**If you're uncomfortable pushing back out loud:** Name that tension, then tell your partner about the issue you've seen. They'll appreciate your honesty.

## Acknowledging Correct Feedback

When feedback IS correct:
```
✅ "Fixed. [Brief description of what changed]"
✅ "Good catch - [specific issue]. Fixed in [location]."
✅ [Just fix it and show in the code]

❌ "You're absolutely right!"
❌ "Great point!"
❌ "Thanks for catching that!"
❌ "Thanks for [anything]"
❌ ANY gratitude expression
```

**Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.

**If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.

## Gracefully Correcting Your Pushback

If you pushed back and were wrong:
```
✅ "You were right - I checked [X] and it does [Y]. Implementing now."
✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."

❌ Long apology
❌ Defending why you pushed back
❌ Over-explaining
```

State the correction factually and move on.

## Common Mistakes

| Mistake | Fix |
|---------|-----|
| Performative agreement | State requirement or just act |
| Blind implementation | Verify against codebase first |
| Batch without testing | One at a time, test each |
| Assuming reviewer is right | Check if breaks things |
| Avoiding pushback | Technical correctness > comfort |
| Partial implementation | Clarify all items first |
| Can't verify, proceed anyway | State limitation, ask for direction |

## Real Examples

**Performative Agreement (Bad):**
```
Reviewer: "Remove legacy code"
❌ "You're absolutely right! Let me remove that..."
```

**Technical Verification (Good):**
```
Reviewer: "Remove legacy code"
✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
```

**YAGNI (Good):**
```
Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
```

**Unclear Item (Good):**
```
your human partner: "Fix items 1-6"
You understand 1,2,3,6. Unclear on 4,5.
✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
```

## GitHub Thread Replies

When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.

## The Bottom Line

**External feedback = suggestions to evaluate, not orders to follow.**

Verify. Question. Then implement.

No performative agreement. Technical rigor always.

所有檔案

0 個檔案

安裝 receiving-code-review

請下載並將技能檔案解壓縮至您的 .claude/skills/ 目錄中。

下載 ZIP

複製儲存庫並將技能檔案複製到您的專案中。

git clone https://github.com/obra/superpowers/tree/main/skills/receiving-code-review # Copy SKILL.md to your .claude/skills/ directory

複製 複製
快速設定: 將技能資料夾複製到 .claude/skills/ Claude 會自動偵測並使用該技能
儲存庫 obra/superpowers

相關技能

algorithmic-art
更新時間 2026-08-27
tech-debt-tracker
更新時間 2026-08-29
deprecation-and-migration
更新時間 2026-09-03
senior-backend
更新時間 2026-08-30
OR