Install
openclaw skills install review-verification-protocolMandatory verification steps for all code reviews to reduce false positives. Load this skill before reporting ANY code review findings.
openclaw skills install review-verification-protocolThis protocol MUST be followed before reporting any code review finding. Skipping these steps leads to false positives that waste developer time and erode trust in reviews.
Before issuing any verdict — flag, reject, or downgrade a finding — you MUST echo the exact artifact you are judging, quoted from a source you read in this turn:
The artifact is the only source of truth. Never infer what you are reviewing from the branch name, the working directory, surrounding files, or recollection. If your mental model differs from the freshly read source, the source wins. A verdict issued without a same-turn echo of its target is invalid — emit the echo first, or do not emit the verdict.
This gate exists because an LLM under contextual priming will confidently flag code that is not in the file. It runs before the hard gates below.
Complete in order for each finding (or once per batch if every finding shares the same file/symbol). Do not advance while the prior gate fails.
Read gate — Open and read the full containing symbol (function, class, component, hook), not only the diff hunk or snippet.
Pass: You can state the file path and symbol name you read without re-opening the file.
Reference gate (required before “unused”, “dead code”, or “never called”) — Run a workspace search for the identifier (or equivalent: find references in the IDE).
Pass: One concrete artifact: e.g. “rg/search: N matches” or “only the definition in path” — not a guess.
Mitigation gate — Look for handling elsewhere: callers, middleware, route/loaders, error boundaries, framework validation, earlier guards, or comments/ADR context.
Pass: Either cite where the concern is already addressed, or one explicit sentence: “No mitigating pattern found after checking [scope].”
Claim gate — Each reported issue must include [FILE:LINE] and a specific line or behavior that demonstrates the problem; severity must match Severity Calibration below.
Pass: A reviewer could navigate to that line and see the same issue; “might” or “could” without an anchor fails this gate.
The checklist below restates the same expectations in checkbox form.
Before flagging ANY issue, verify:
Before flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Valid patterns often flagged incorrectly:
// Type annotation, NOT assertion
const data: UserData = await loader()
// Type narrowing makes this safe
if (isUser(data)) {
data.name // TypeScript knows this is User
}
Before flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Do NOT flag:
ONLY use for:
Use for:
Use for:
Use for:
These are NOT review blockers. They should be noted for the author's awareness but must not appear in the actionable issue count. The Verdict should ignore informational items entirely.
| Pattern | Why It's Valid |
|---|---|
map.get(key) || [] | Map.get() returns T | undefined, fallback is correct |
| Class exports without separate type export | Classes work as both value and type |
as const on literal arrays | Creates readonly tuple types |
| Type annotation on variable declaration | Not a type assertion |
satisfies instead of as | Type checking without assertion |
| Pattern | Why It's Valid |
|---|---|
| Array index as key (static list) | Valid when: items don't reorder, list is static, no item identity needed |
| Inline arrow in onClick | Valid for non-performance-critical handlers (runs once per click) |
| State that appears unused | May be set via refs, external callbacks, or triggers re-renders |
| Empty dependency array with refs | Refs are stable, don't need to be dependencies |
| Non-null assertion after check | TypeScript narrowing may not track through all patterns |
| Pattern | Why It's Valid |
|---|---|
toHaveTextContent without regex | Handles nested text correctly |
| Mock at module level | Defined once, not duplicated |
| Index-based test data | Tests don't need stable identity |
| Simplified error messages | Test clarity over production polish |
| Pattern | Why It's Valid |
|---|---|
+? lazy quantifier in regex | Prevents over-matching, correct for many patterns |
| Direct string concatenation | Simpler than template literals for simple cases |
| Multiple returns in function | Can improve readability |
| Comments explaining "why" | Better than no comments |
Flag array index as key ONLY IF ALL of these are true:
Flag missing dependency ONLY IF:
Flag missing try/catch ONLY IF:
Final verification (after Hard gates for each finding):
[FILE:LINE] ISSUE_TITLEIf uncertain about any finding, either: