apply-all-findings

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Apply All Findings

落实所有审查发现的问题

Overview

概述

Address EVERY finding from code review. Findings are either FIXED or DEFERRED with tracking issues.
Core principle: Minor issues accumulate into major problems.
The rule: If it was worth noting, it's worth tracking.
ABSOLUTE REQUIREMENT: Every finding results in ONE of:
  1. Fixed in this PR (verified)
  2. Tracking issue created (linked in review artifact)
There is NO third option. "Won't fix without tracking" is NOT permitted.
处理代码审查中发现的每一个问题。所有问题要么已修复,要么已延迟处理并创建追踪工单。
核心原则: 小问题会累积成大麻烦。
规则: 既然值得记录,就值得追踪。
绝对要求: 每个问题必须对应以下其中一种处理方式:
  1. 在当前PR中修复(已验证)
  2. 创建追踪工单(链接到审查文档中)
不存在第三种选择。“不修复也不追踪”是绝对不允许的。

Why All Findings

为何要处理所有问题

Minor Issues Compound

小问题会不断累积

1 unclear variable name +
1 missing null check +
1 inconsistent style +
1 outdated comment =
Confusing, fragile code
1个不清晰的变量名 +
1个缺失的空值检查 +
1个不一致的代码风格 +
1个过时的注释 =
混乱、脆弱的代码

Selective Fixing Creates Precedent

选择性修复会开不良先例

"This minor issue can wait" →
"That minor issue can wait too" →
"We don't fix minor issues" →
Technical debt mountain
“这个小问题可以等等” →
“那个小问题也可以等等” →
“我们不处理小问题” →
技术债务堆积如山

Thoroughness Builds Quality Culture

全面处理能构建质量文化

Every finding addressed →
High standards maintained →
Quality becomes habit
所有问题都得到处理 →
维持高标准 →
质量成为习惯

The Process

处理流程

Step 1: Gather All Findings

步骤1:收集所有问题

From
comprehensive-review
, you have:
markdown
undefined
comprehensive-review
中,你会得到:
markdown
undefined

Findings

审查发现的问题

  1. [Critical] SQL injection in findUser()
  2. [Major] N+1 query in getOrders()
  3. [Minor] Variable 'x' should be renamed
  4. [Minor] Missing JSDoc on helper()
  5. [Minor] Inconsistent quote style
undefined
  1. [严重] findUser()中存在SQL注入风险
  2. [主要] getOrders()中存在N+1查询问题
  3. [次要] 变量'x'应重命名
  4. [次要] helper()缺少JSDoc注释
  5. [次要] 引号风格不一致
undefined

Step 2: Create Checklist

步骤2:创建检查清单

Every finding becomes a todo:
markdown
- [ ] Fix SQL injection in findUser()
- [ ] Fix N+1 query in getOrders()
- [ ] Rename variable 'x' to descriptive name
- [ ] Add JSDoc to helper()
- [ ] Fix quote style to use single quotes
每个问题都转化为待办项:
markdown
- [ ] 修复findUser()中的SQL注入风险
- [ ] 修复getOrders()中的N+1查询问题
- [ ] 将变量'x'重命名为有意义的名称
- [ ] 为helper()添加JSDoc注释
- [ ] 统一引号风格为单引号

Step 3: Address Systematically

步骤3:系统处理问题

Work through the list. For each finding:
逐一处理清单中的问题:

If Fixable:

若可在当前PR中修复:

  1. Fix the issue
  2. Verify the fix
  3. Check off the item
  4. Move to next finding
  1. 修复问题
  2. 验证修复效果
  3. 勾选该待办项
  4. 处理下一个问题

If Not Fixable in This PR:

若无法在当前PR中修复:

  1. Verify valid deferral reason (see
    deferred-finding
    skill)
  2. Create tracking issue with full documentation
  3. Add tracking issue to review artifact
  4. Mark as DEFERRED (not unaddressed)
  5. Move to next finding
bash
undefined
  1. 验证延迟处理的合理理由(参考
    deferred-finding
    技能)
  2. 创建包含完整文档的追踪工单
  3. 将追踪工单链接到审查文档中
  4. 标记为“已延迟”(而非未处理)
  5. 处理下一个问题
bash
undefined

Create tracking issue for deferred finding

为延迟处理的问题创建追踪工单

gh issue create
--title "[Finding] [Description] (from #123)"
--label "review-finding,depth:1"
--body "[Full deferred-finding template]"
gh issue create
--title "[审查问题] [问题描述] (来自#123)"
--label "review-finding,depth:1"
--body "[完整的延迟问题模板]"

Create spawned-from label if needed

若需要则创建关联标签

gh label create "spawned-from:#123" --color "C2E0C6" 2>/dev/null || true gh issue edit [NEW_ISSUE] --add-label "spawned-from:#123"
undefined
gh label create "spawned-from:#123" --color "C2E0C6" 2>/dev/null || true gh issue edit [新工单编号] --add-label "spawned-from:#123"
undefined

Step 4: Verify All Complete

步骤4:验证所有问题已处理

Before considering done:
bash
undefined
在完成前,执行以下操作:
bash
undefined

Re-run linting

重新运行代码检查

pnpm lint
pnpm lint

Re-run tests

重新运行测试

pnpm test
pnpm test

Re-run type check

重新运行类型检查

pnpm typecheck

All checks must pass.
pnpm typecheck

所有检查必须通过。

Step 5: Update Review Artifact

步骤5:更新审查文档

After all findings addressed, update artifact in issue comment:
  1. All FIXED findings marked ✅ FIXED
  2. All DEFERRED findings have tracking issue # linked
  3. "Unaddressed: 0" in summary
  4. "Review Status: COMPLETE"
处理完所有问题后,在工单评论中更新审查文档:
  1. 所有已修复的问题标记为✅ 已修复
  2. 所有延迟处理的问题需关联追踪工单编号
  3. 摘要中显示“未处理:0”
  4. 标记“审查状态:已完成”

Addressing by Type

按问题类型处理

Critical/Major Findings

严重/主要问题

These require code changes:
typescript
// Finding: SQL injection in findUser()
// Before
return db.query(`SELECT * FROM users WHERE username = '${username}'`);

// After
return db.query('SELECT * FROM users WHERE username = ?', [username]);
这些问题需要修改代码:
typescript
undefined

Minor: Naming

审查问题:findUser()中存在SQL注入风险

修复前

typescript
// Finding: Variable 'x' should be renamed
// Before
const x = users.filter(u => u.active);

// After
const activeUsers = users.filter(user => user.isActive);
return db.query(
SELECT * FROM users WHERE username = '${username}'
);

Minor: Documentation

修复后

typescript
// Finding: Missing JSDoc on helper()
// Before
function helper(data: Data): Result {

// After
/**
 * Transforms raw data into the expected result format.
 *
 * @param data - Raw data from the API
 * @returns Transformed result ready for display
 */
function helper(data: Data): Result {
return db.query('SELECT * FROM users WHERE username = ?', [username]);
undefined

Minor: Style

次要问题:命名规范

typescript
// Finding: Inconsistent quote style
// Before
const name = "Alice";
const greeting = 'Hello';

// After (using project standard: single quotes)
const name = 'Alice';
const greeting = 'Hello';
typescript
undefined

Handling Deferrals

审查问题:变量'x'应重命名

Valid Deferral Reasons

修复前

ReasonExampleRequires
Out of scopeArchitectural changeTracking issue
External dependencyInfrastructure changeTracking issue
Breaking changeMajor version bumpTracking issue
Separate concernIndependent featureTracking issue
const x = users.filter(u => u.active);

NOT Valid Deferral Reasons

修复后

ExcuseRealityAction
"It's minor"Minor compoundsFix now
"Takes too long"Debt takes longerFix now
"Good enough"Never enoughFix now
"Not important"Then why note it?Fix now
"Do it later"Without tracking? No.Fix or create issue
const activeUsers = users.filter(user => user.isActive);
undefined

Deferral MUST Create Issue

次要问题:文档注释

ABSOLUTE: No deferral without tracking issue.
bash
undefined
typescript
undefined

WRONG - Deferred without tracking

审查问题:helper()缺少JSDoc注释

修复前

"We'll fix the SQL injection later" # NO
function helper(data: Data): Result {

RIGHT - Deferred with tracking

修复后

gh issue create --title "[Finding] SQL injection in findUser (from #123)" ...
/**
  • 将原始数据转换为预期的结果格式。
  • @param data - 来自API的原始数据
  • @returns 可直接用于展示的转换后结果 */ function helper(data: Data): Result {
undefined

Then link #456 in review artifact

次要问题:代码风格

undefined
typescript
undefined

Verification

审查问题:引号风格不一致

修复前

After addressing all findings:
const name = "Alice"; const greeting = 'Hello';

Run All Checks

修复后(遵循项目规范:单引号)

bash
undefined
const name = 'Alice'; const greeting = 'Hello';
undefined

Linting

延迟处理的规则

合理的延迟理由

pnpm lint
理由示例要求
超出范围架构变更创建追踪工单
外部依赖基础设施变更创建追踪工单
破坏性变更大版本升级创建追踪工单
独立关注点独立功能模块创建追踪工单

Type checking

不合理的延迟理由

pnpm typecheck
借口实际情况操作要求
“这是小问题”小问题会累积立即修复
“太费时间”技术债务更耗时立即修复
“已经够好了”永远没有“够好”立即修复
“不重要”那为什么要记录?立即修复
“以后再做”没有追踪的话不行修复或创建工单

Tests

延迟处理必须创建工单

pnpm test
绝对要求: 没有追踪工单的延迟处理是不允许的。
bash
undefined

Build

错误做法 - 延迟处理但未创建追踪工单

pnpm build
undefined
"我们以后再修复SQL注入问题" # 不允许

Review the Diff

正确做法 - 延迟处理并创建追踪工单

bash
git diff
Verify:
  • All findings addressed
  • No unrelated changes
  • Tests updated if behavior changed
gh issue create --title "[审查问题] findUser中的SQL注入风险(来自#123)" ...

Self-Review Again

然后在审查文档中链接#456

Quick pass through 7 criteria to ensure fixes didn't introduce new issues.
undefined

Checklist

验证环节

Before moving on from review:
  • All critical findings addressed
  • All major findings addressed
  • All minor findings addressed
  • Any deferred finding has tracking issue created
  • Tracking issues linked in review artifact
  • All automated checks pass
  • Fixes reviewed for correctness
  • No new issues introduced
  • Review artifact updated with final status
  • "Unaddressed: 0" confirmed
处理完所有问题后:

Common Pushback (Rejected)

运行所有检查

PushbackResponse
"We can fix minors later"Without tracking? No. Create issue or fix now.
"This is slowing us down"Debt slows you down more.
"It's not important"Then why was it noted?
"Good enough"Good enough is never enough.
"The reviewer is being picky"Attention to detail is valuable.
bash
undefined

Integration

代码检查

This skill is called by:
  • issue-driven-development
    - Step 10
This skill follows:
  • comprehensive-review
    - Generates the findings
This skill uses:
  • deferred-finding
    - For creating tracking issues
This skill ensures:
  • No accumulated minor issues
  • Consistent quality standards
  • Complete reviews, not partial
  • All deferrals tracked in GitHub
pnpm lint

类型检查

pnpm typecheck

测试

pnpm test

构建

pnpm build
undefined

查看代码差异

bash
git diff
验证:
  • 所有问题已处理
  • 无无关变更
  • 若行为变更则已更新测试

再次自我审查

快速检查7项标准,确保修复未引入新问题。

检查清单

在完成审查前,确认:
  • 所有严重问题已处理
  • 所有主要问题已处理
  • 所有次要问题已处理
  • 任何延迟处理的问题已创建追踪工单
  • 追踪工单已链接到审查文档中
  • 所有自动化检查已通过
  • 修复内容已验证正确性
  • 未引入新问题
  • 审查文档已更新最终状态
  • 已确认“未处理:0”

常见反对意见(均不采纳)

反对意见回应
“我们以后再处理小问题”没有追踪的话不行。要么现在修复,要么创建工单。
“这拖慢了我们的进度”技术债务会更拖慢进度。
“这不重要”那为什么要记录它?
“已经够好了”永远没有“够好”这一说。
“审查者太挑剔了”注重细节是有价值的。

集成关系

本技能被以下技能调用:
  • issue-driven-development
    - 第10步
本技能承接:
  • comprehensive-review
    - 生成审查发现的问题
本技能使用:
  • deferred-finding
    - 用于创建追踪工单
本技能确保:
  • 无小问题累积
  • 质量标准一致
  • 审查完整无遗漏
  • 所有延迟处理的问题在GitHub中被追踪