apply-all-findings
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApply 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:
- Fixed in this PR (verified)
- Tracking issue created (linked in review artifact)
There is NO third option. "Won't fix without tracking" is NOT permitted.
处理代码审查中发现的每一个问题。所有问题要么已修复,要么已延迟处理并创建追踪工单。
核心原则: 小问题会累积成大麻烦。
规则: 既然值得记录,就值得追踪。
绝对要求: 每个问题必须对应以下其中一种处理方式:
- 在当前PR中修复(已验证)
- 创建追踪工单(链接到审查文档中)
不存在第三种选择。“不修复也不追踪”是绝对不允许的。
Why All Findings
为何要处理所有问题
Minor Issues Compound
小问题会不断累积
1 unclear variable name +
1 missing null check +
1 inconsistent style +
1 outdated comment =
Confusing, fragile code1个不清晰的变量名 +
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 , you have:
comprehensive-reviewmarkdown
undefined从中,你会得到:
comprehensive-reviewmarkdown
undefinedFindings
审查发现的问题
- [Critical] SQL injection in findUser()
- [Major] N+1 query in getOrders()
- [Minor] Variable 'x' should be renamed
- [Minor] Missing JSDoc on helper()
- [Minor] Inconsistent quote style
undefined- [严重] findUser()中存在SQL注入风险
- [主要] getOrders()中存在N+1查询问题
- [次要] 变量'x'应重命名
- [次要] helper()缺少JSDoc注释
- [次要] 引号风格不一致
undefinedStep 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中修复:
- Fix the issue
- Verify the fix
- Check off the item
- Move to next finding
- 修复问题
- 验证修复效果
- 勾选该待办项
- 处理下一个问题
If Not Fixable in This PR:
若无法在当前PR中修复:
- Verify valid deferral reason (see skill)
deferred-finding - Create tracking issue with full documentation
- Add tracking issue to review artifact
- Mark as DEFERRED (not unaddressed)
- Move to next finding
bash
undefined- 验证延迟处理的合理理由(参考技能)
deferred-finding - 创建包含完整文档的追踪工单
- 将追踪工单链接到审查文档中
- 标记为“已延迟”(而非未处理)
- 处理下一个问题
bash
undefinedCreate tracking issue for deferred finding
为延迟处理的问题创建追踪工单
gh issue create
--title "[Finding] [Description] (from #123)"
--label "review-finding,depth:1"
--body "[Full deferred-finding template]"
--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 "[完整的延迟问题模板]"
--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"
undefinedgh label create "spawned-from:#123" --color "C2E0C6" 2>/dev/null || true
gh issue edit [新工单编号] --add-label "spawned-from:#123"
undefinedStep 4: Verify All Complete
步骤4:验证所有问题已处理
Before considering done:
bash
undefined在完成前,执行以下操作:
bash
undefinedRe-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:
- All FIXED findings marked ✅ FIXED
- All DEFERRED findings have tracking issue # linked
- "Unaddressed: 0" in summary
- "Review Status: COMPLETE"
处理完所有问题后,在工单评论中更新审查文档:
- 所有已修复的问题标记为✅ 已修复
- 所有延迟处理的问题需关联追踪工单编号
- 摘要中显示“未处理:0”
- 标记“审查状态:已完成”
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
undefinedMinor: 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]);
undefinedMinor: 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
undefinedHandling Deferrals
审查问题:变量'x'应重命名
Valid Deferral Reasons
修复前
| Reason | Example | Requires |
|---|---|---|
| Out of scope | Architectural change | Tracking issue |
| External dependency | Infrastructure change | Tracking issue |
| Breaking change | Major version bump | Tracking issue |
| Separate concern | Independent feature | Tracking issue |
const x = users.filter(u => u.active);
NOT Valid Deferral Reasons
修复后
| Excuse | Reality | Action |
|---|---|---|
| "It's minor" | Minor compounds | Fix now |
| "Takes too long" | Debt takes longer | Fix now |
| "Good enough" | Never enough | Fix 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);
undefinedDeferral MUST Create Issue
次要问题:文档注释
ABSOLUTE: No deferral without tracking issue.
bash
undefinedtypescript
undefinedWRONG - 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 {
undefinedThen link #456 in review artifact
次要问题:代码风格
undefinedtypescript
undefinedVerification
审查问题:引号风格不一致
—
修复前
After addressing all findings:
const name = "Alice";
const greeting = 'Hello';
Run All Checks
修复后(遵循项目规范:单引号)
bash
undefinedconst name = 'Alice';
const greeting = 'Hello';
undefinedLinting
延迟处理的规则
—
合理的延迟理由
pnpm lint
| 理由 | 示例 | 要求 |
|---|---|---|
| 超出范围 | 架构变更 | 创建追踪工单 |
| 外部依赖 | 基础设施变更 | 创建追踪工单 |
| 破坏性变更 | 大版本升级 | 创建追踪工单 |
| 独立关注点 | 独立功能模块 | 创建追踪工单 |
Type checking
不合理的延迟理由
pnpm typecheck
| 借口 | 实际情况 | 操作要求 |
|---|---|---|
| “这是小问题” | 小问题会累积 | 立即修复 |
| “太费时间” | 技术债务更耗时 | 立即修复 |
| “已经够好了” | 永远没有“够好” | 立即修复 |
| “不重要” | 那为什么要记录? | 立即修复 |
| “以后再做” | 没有追踪的话不行 | 修复或创建工单 |
Tests
延迟处理必须创建工单
pnpm test
绝对要求: 没有追踪工单的延迟处理是不允许的。
bash
undefinedBuild
错误做法 - 延迟处理但未创建追踪工单
pnpm build
undefined"我们以后再修复SQL注入问题" # 不允许
Review the Diff
正确做法 - 延迟处理并创建追踪工单
bash
git diffVerify:
- 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.
undefinedChecklist
验证环节
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)
运行所有检查
| Pushback | Response |
|---|---|
| "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
undefinedIntegration
代码检查
This skill is called by:
- - Step 10
issue-driven-development
This skill follows:
- - Generates the findings
comprehensive-review
This skill uses:
- - For creating tracking issues
deferred-finding
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”
—
常见反对意见(均不采纳)
—
| 反对意见 | 回应 |
|---|---|
| “我们以后再处理小问题” | 没有追踪的话不行。要么现在修复,要么创建工单。 |
| “这拖慢了我们的进度” | 技术债务会更拖慢进度。 |
| “这不重要” | 那为什么要记录它? |
| “已经够好了” | 永远没有“够好”这一说。 |
| “审查者太挑剔了” | 注重细节是有价值的。 |
—
集成关系
—
本技能被以下技能调用:
- - 第10步
issue-driven-development
本技能承接:
- - 生成审查发现的问题
comprehensive-review
本技能使用:
- - 用于创建追踪工单
deferred-finding
本技能确保:
- 无小问题累积
- 质量标准一致
- 审查完整无遗漏
- 所有延迟处理的问题在GitHub中被追踪