review-report-repair
Use when arthurpower:code-review emits "GATE: BLOCKED" or unresolved High, or the operator says "修审查意见" / "fix review findings". Also use when a findings table, JSON, or markdown review report must become root-cause fixes without patch stacking. Skip greenfield design and severity disputes.
- License 许可
- MIT
- 最近更新
- 2026-10-28
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- review-report-repair
- type
- technique
- bucket
- engineering
- description
- Use when arthurpower:code-review emits "GATE: BLOCKED" or unresolved High, or the operator says "修审查意见" / "fix review findings". Also use when a findings table, JSON, or markdown review report must become root-cause fixes without patch stacking. Skip greenfield design and severity disputes.
03 SKILL.md 正文
Review Report Repair
Turn a review report into clustered root-cause fixes. This skill does not re-review. code-review judges; this skill repairs.
When to use
code-reviewjust emittedGATE: BLOCKEDor unresolved High (next slot after that skill)- Operator supplies a review artifact (
live-review*.json, markdown review, PR comments dump) or the in-session side-by-side findings table - Findings must be fixed without if-else stacks that only silence a symptom
When not to use
GATE: PASSwith only Low / no findings — this skill does not fire- Medium-only with no operator ask to fix now — stay advisory; do not auto-repair
- Greenfield feature design with no review artifact
- Docs-only rewrites with no code findings
- Disputing severity only (re-run
code-reviewor ask the operator) - Applying the report as a blind checklist of micro-diffs without clustering
Definitions
- Finding: one report item (file, line range, severity, message)
- Root-cause cluster: multiple findings that share one underlying design/contract bug
- Surface patch: a local if/else or silent catch that silences a symptom without fixing the contract
- Repair unit: one cluster fixed in one logical change set (tests + code)
Procedure
1. Ingest the report
- Use the in-session
code-reviewaggregation table if present. Otherwise open the path the operator named. - Parse every finding into:
file,line_range,severity,message, optionalsuggested_fix. - Count by severity and by file. List High first, then Medium. Skip Low unless the operator asks.
- Confirm the report’s
commit/ branch tip matches the working tree (or state the mismatch).
Completion: ingest counts recorded; High listed first.
2. Skill check (repair context)
- Confirm product truth docs if findings touch protocol/eval (ADR, tool-schema, eval gates).
- Confirm verification commands for this repo (typecheck, unit tests, project gates).
- Do not invent new product requirements under the guise of “review wants it.”
Completion: verification commands named; no new requirements invented.
3. Cluster by root cause
Group findings into clusters such as:
| Cluster type | Examples |
|---|---|
| Contract drift | schema vs runtime validation, dual sources of truth |
| Error surface | silent catch, wrong error type, unhandled rejection |
| Config precedence | env file order, key not read from the project’s loader |
| API surface hygiene | test doubles exported from main barrel |
| Concurrency / singleton | shared index races, stale module state |
| Performance (optional) | independent async work left sequential |
For each cluster write one sentence: root cause → intended contract → fix shape.
Completion: every High/Medium finding is in a cluster; each cluster has that sentence.
4. Design the fix (anti-patch rules)
For each High/Medium cluster:
- Prefer fixing the source of truth (single registry, single env loader, typed errors).
- Prefer fail closed with typed errors over silent degrade—unless the product already defines an explicit degrade path (document EXIT condition in comment).
- Prefer extracting shared helpers over copy-paste branches.
- Reject nested ternary stacks and magic-string special cases without a comment that names the contract.
- Every behavior change needs a test that would fail before the fix (
test-driven-developmentfor the implementation slot if the cluster is new behavior).
Completion: each cluster has a contract-level fix shape, not a line-only patch.
5. Implement by cluster
- Fix one cluster at a time when possible.
- Keep diff scope = task scope (no drive-by refactors).
minimal-change-verifierif the diff grows a second feature. - Update public exports carefully: do not expand the public API for test-only helpers.
- Never log or print secret values; env names only.
Completion: one repair unit per cluster that was in scope.
6. Verify
- Run the project’s required commands (at minimum: typecheck + unit tests).
- If the project has an eval or CI suite that is part of the landing gate, run it.
- Grep for regressions related to the clusters (remaining dual truth, bare
catch). - Do not claim “done” here. After repair evidence is captured, the next slot is
verification-before-completionif the operator is claiming the landing round is finished. Re-runcode-reviewonly if the operator asks for a second pass on the repair diff.
Completion: commands and exit codes captured; no “done” claim in this skill.
7. Report back
Structure the operator reply as:
- Report ingest (source, commit, counts)
- Root-cause clusters (table)
- Changes (files + contract fixed)
- Validation evidence
- Deferred findings (with reason)
- Git status (commit/push only if authorized)
Anti-patterns (forbidden)
- Applying every comment as a one-line patch without clustering
- Silent
catchthat returns success-shaped data for programming errors - Re-exporting test fakes from the main package entry
- “Fixed” without re-running typecheck/tests
- Mixing unrelated refactors into the repair change set
- Writing secrets into repo files or chat
- Patching inside
code-reviewinstead of opening this skill - Claiming the landing round done without
verification-before-completion
Acceptance Criteria
- [ ] Report source and commit identity recorded
- [ ] All High findings either fixed or deferred with an operator-visible reason
- [ ] Medium findings fixed or deferred with reason (default: fix when same cluster as High)
- [ ] No new public test-only exports on the main barrel
- [ ] Typed errors for config/API contract failures (no silent skip of required keys when the mode requires them)
- [ ] Typecheck exit 0
- [ ] Unit tests exit 0 (full suite, or the repo’s documented subset)
- [ ] Project eval/CI gate exit 0 when the project defines one as a landing gate
- [ ] Reply includes evidence (commands + counts), not narrative-only success
Related
- Judge the diff:
code-review(this skill is the next slot when that gate is BLOCKED) - Landing claim:
verification-before-completion - New behavior in a cluster:
test-driven-development - Diff grew a second feature:
minimal-change-verifier
04 同仓库更多 Skills
writing-plans
Use when turning a buildable spec into ordered tracer bullets after architecture-change-reviewer. Covers vertical slicing, dependency order, and headroom for the implementer. Triggers on 写计划, 拆任务, 任务分解, 制定方案, 跨文件改动, 计划.
wayfinder
Use when a chunk of work is more than one agent session can hold — plan it as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
verification-before-completion
This skill should be used when claiming "完成" / "done" / "fixed" / "passing" / "ready to ship", before trusting a subagent success report, or when checking "对照计划" / "对照 spec" — whether this run's delivery matches its basis.
using-agent-skills
Use when starting a new session, switching tasks, or unsure which arthurpower skill applies. Routes incoming work to the matching skill via flowchart before invoking. Activates on phrases like "which skill should I use", "skill check", "pre-task skill check", "how to start", "router", "skill routing", or when multiple competing skills could apply. Does not auto-invoke user-invoked authoring skills (skill-authoring, self-evolving-rules).
test-driven-development
Use when implementing logic, fixing a bug, or changing behavior — write the failing test first (RED), then minimal code (GREEN), then refactor. Triggers on "write the failing test first", "Prove-It", or a bug that needs a reproduction test before the fix.
systematic-debugging
Use when debugging a test failure, build break, unexpected runtime error, flaky test, or hanging process. Triggers on phrases like "fix this bug", "getting an error", "failing test", "flaky", "hanging", "halfway through debugging", "this used to work", "intermittent failure", "stack trace shows X", or any case where behavior does not match expectations. Prevents shotgun debugging.