Review Verification Protocol
This 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.
Pre-Report Verification Checklist
Before flagging ANY issue, verify:
Verification by Issue Type
"Unused Variable/Function"
Before flagging, you MUST:
- Search for ALL references in the codebase (grep/find)
- Check if it's exported and used by external consumers
- Check if it's used via reflection, decorators, or dynamic dispatch
- Verify it's not a callback passed to a framework
Common false positives:
- State setters in React (may trigger re-renders even if value appears unused)
- Variables used in templates/JSX
- Exports used by consuming packages
"Missing Validation/Error Handling"
Before flagging, you MUST:
- Check if validation exists at a higher level (caller, middleware, route handler)
- Check if the framework provides validation (Pydantic, Zod, TypeScript)
- Verify the "missing" check isn't present in a different form
Common false positives:
- Framework already validates (FastAPI + Pydantic, React Hook Form)
- Parent component validates before passing props
- Error boundary catches at higher level
"Type Assertion/Unsafe Cast"
Before flagging, you MUST:
- Confirm it's actually an assertion, not an annotation
- Check if the type is narrowed by runtime checks before the point
- Verify if framework guarantees the type (loader data, form data)
Valid patterns often flagged incorrectly:
// Type annotation, NOT forced unwrap
let data: UserData = await loader()
// Type narrowing makes this safe
if let user = data as? User {
user.name // Swift knows this is User
}
"Potential Memory Leak/Race Condition"
Before flagging, you MUST:
- Verify cleanup function is actually missing (not just in a different location)
- Check if AbortController signal is checked after awaits
- Confirm the component can actually unmount during the async operation
Common false positives:
- Cleanup exists in useEffect return
- Signal is checked (code reviewer missed it)
- Operation completes before unmount is possible
"Performance Issue"
Before flagging, you MUST:
- Confirm the code runs frequently enough to matter (render vs click handler)
- Verify the optimization would have measurable impact
- Check if the framework already optimizes this (React compiler, memoization)
Do NOT flag:
- Functions created in click handlers (runs once per click)
- Array methods on small arrays (< 100 items)
- Object creation in event handlers
Severity Calibration
Critical (Block Merge)
ONLY use for:
- Security vulnerabilities (injection, auth bypass, data exposure)
- Data corruption bugs
- Crash-causing bugs in happy path
- Breaking changes to public APIs
Major (Should Fix)
Use for:
- Logic bugs that affect functionality
- Missing error handling that causes poor UX
- Performance issues with measurable impact
- Accessibility violations
Minor (Consider Fixing)
Use for:
- Code clarity improvements
- Documentation gaps
- Inconsistent style (within reason)
- Non-critical test coverage gaps
Informational (No Action Required)
Use for:
- Improvements that require adding new dependencies or modules
- Suggestions for net-new code that didn't exist in the codebase before (new modules, test suites, abstractions)
- Architectural ideas for future consideration
- Test infrastructure suggestions (new mock libraries, behaviour extraction)
- Optimizations without measurable impact in the current context
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.
Do NOT Flag At All
- Style preferences where both approaches are valid
- Optimizations with no measurable benefit
- Test code not meeting production standards (intentionally simpler)
- Library/framework internal code (shadcn components, generated code)
- Hypothetical issues that require unlikely conditions
Valid Patterns (Do NOT Flag)
Swift
| Pattern |
Why It's Valid |
guard let early return |
Standard Swift pattern for unwrapping, not excessive nesting |
weak self in closures |
Required for breaking retain cycles, not unnecessary |
@State / @Binding property wrappers |
SwiftUI state management primitives |
Optional chaining (foo?.bar?.baz) |
Safe access pattern, not error suppression |
as? conditional cast |
Safer than force cast, correct for type narrowing |
SwiftUI
| Pattern |
Why It's Valid |
@StateObject in parent, @ObservedObject in child |
Correct ownership pattern |
| View body computed property without caching |
SwiftUI manages re-rendering efficiently |
AnyView for heterogeneous lists |
Valid when @ViewBuilder or generics aren't practical |
EnvironmentObject injection |
Standard SwiftUI dependency injection |
PreferenceKey for child-to-parent data |
Correct alternative to callbacks for layout data |
Testing
| Pattern |
Why It's Valid |
XCTAssertEqual without custom message |
Default messages are often sufficient |
async let in test methods |
Valid for concurrent test setup |
@MainActor test classes |
Required when testing UI-bound code |
| Mock objects without protocol conformance |
Simple test doubles are acceptable |
General
| 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 |
Context-Sensitive Rules
Swift Optionals
Flag force unwrap (!) ONLY IF ALL of these are true:
View Body Complexity
Flag complex View body ONLY IF:
Error Handling
Flag missing do/catch ONLY IF:
Before Submitting Review
Final verification:
- Re-read each finding and ask: "Did I verify this is actually an issue?"
- For each finding, can you point to the specific line that proves the issue exists?
- Would a domain expert agree this is a problem, or is it a style preference?
- Does fixing this provide real value, or is it busywork?
- Format every finding as:
[FILE:LINE] ISSUE_TITLE
- For each finding, ask: "Does this fix existing code, or does it request entirely new code that didn't exist before?" If the latter, downgrade to Informational.
- If this is a re-review: ONLY verify previous fixes. Do not introduce new findings.
If uncertain about any finding, either:
- Remove it from the review
- Mark it as a question rather than an issue
- Verify by reading more code context
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: review-verification-protocol3description: Mandatory verification steps for all code reviews to reduce false positives. Load this skill before reporting ANY code review findings. Use when this capability is needed.4---56# Review Verification Protocol78This 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.910## Pre-Report Verification Checklist1112Before flagging ANY issue, verify:1314- [ ] **I read the actual code** - Not just the diff context, but the full function/class15- [ ] **I searched for usages** - Before claiming "unused", searched all references16- [ ] **I checked surrounding code** - The issue may be handled elsewhere (guards, earlier checks)17- [ ] **I verified syntax against current docs** - Framework syntax evolves (Tailwind v4, TS 5.x, React 19)18- [ ] **I distinguished "wrong" from "different style"** - Both approaches may be valid19- [ ] **I considered intentional design** - Checked comments, CLAUDE.md, architectural context2021## Verification by Issue Type2223### "Unused Variable/Function"2425**Before flagging**, you MUST:261. Search for ALL references in the codebase (grep/find)272. Check if it's exported and used by external consumers283. Check if it's used via reflection, decorators, or dynamic dispatch294. Verify it's not a callback passed to a framework3031**Common false positives:**32- State setters in React (may trigger re-renders even if value appears unused)33- Variables used in templates/JSX34- Exports used by consuming packages3536### "Missing Validation/Error Handling"3738**Before flagging**, you MUST:391. Check if validation exists at a higher level (caller, middleware, route handler)402. Check if the framework provides validation (Pydantic, Zod, TypeScript)413. Verify the "missing" check isn't present in a different form4243**Common false positives:**44- Framework already validates (FastAPI + Pydantic, React Hook Form)45- Parent component validates before passing props46- Error boundary catches at higher level4748### "Type Assertion/Unsafe Cast"4950**Before flagging**, you MUST:511. Confirm it's actually an assertion, not an annotation522. Check if the type is narrowed by runtime checks before the point533. Verify if framework guarantees the type (loader data, form data)5455**Valid patterns often flagged incorrectly:**56```swift57// Type annotation, NOT forced unwrap58let data: UserData = await loader()5960// Type narrowing makes this safe61if let user = data as? User {62 user.name // Swift knows this is User63}64```6566### "Potential Memory Leak/Race Condition"6768**Before flagging**, you MUST:691. Verify cleanup function is actually missing (not just in a different location)702. Check if AbortController signal is checked after awaits713. Confirm the component can actually unmount during the async operation7273**Common false positives:**74- Cleanup exists in useEffect return75- Signal is checked (code reviewer missed it)76- Operation completes before unmount is possible7778### "Performance Issue"7980**Before flagging**, you MUST:811. Confirm the code runs frequently enough to matter (render vs click handler)822. Verify the optimization would have measurable impact833. Check if the framework already optimizes this (React compiler, memoization)8485**Do NOT flag:**86- Functions created in click handlers (runs once per click)87- Array methods on small arrays (< 100 items)88- Object creation in event handlers8990## Severity Calibration9192### Critical (Block Merge)9394**ONLY use for:**95- Security vulnerabilities (injection, auth bypass, data exposure)96- Data corruption bugs97- Crash-causing bugs in happy path98- Breaking changes to public APIs99100### Major (Should Fix)101102**Use for:**103- Logic bugs that affect functionality104- Missing error handling that causes poor UX105- Performance issues with measurable impact106- Accessibility violations107108### Minor (Consider Fixing)109110**Use for:**111- Code clarity improvements112- Documentation gaps113- Inconsistent style (within reason)114- Non-critical test coverage gaps115116### Informational (No Action Required)117118**Use for:**119- Improvements that require adding new dependencies or modules120- Suggestions for net-new code that didn't exist in the codebase before (new modules, test suites, abstractions)121- Architectural ideas for future consideration122- Test infrastructure suggestions (new mock libraries, behaviour extraction)123- Optimizations without measurable impact in the current context124125**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.126127### Do NOT Flag At All128129- Style preferences where both approaches are valid130- Optimizations with no measurable benefit131- Test code not meeting production standards (intentionally simpler)132- Library/framework internal code (shadcn components, generated code)133- Hypothetical issues that require unlikely conditions134135## Valid Patterns (Do NOT Flag)136137### Swift138139| Pattern | Why It's Valid |140|---------|----------------|141| `guard let` early return | Standard Swift pattern for unwrapping, not excessive nesting |142| `weak self` in closures | Required for breaking retain cycles, not unnecessary |143| `@State` / `@Binding` property wrappers | SwiftUI state management primitives |144| Optional chaining (`foo?.bar?.baz`) | Safe access pattern, not error suppression |145| `as?` conditional cast | Safer than force cast, correct for type narrowing |146147### SwiftUI148149| Pattern | Why It's Valid |150|---------|----------------|151| `@StateObject` in parent, `@ObservedObject` in child | Correct ownership pattern |152| View body computed property without caching | SwiftUI manages re-rendering efficiently |153| `AnyView` for heterogeneous lists | Valid when `@ViewBuilder` or generics aren't practical |154| `EnvironmentObject` injection | Standard SwiftUI dependency injection |155| `PreferenceKey` for child-to-parent data | Correct alternative to callbacks for layout data |156157### Testing158159| Pattern | Why It's Valid |160|---------|----------------|161| `XCTAssertEqual` without custom message | Default messages are often sufficient |162| `async let` in test methods | Valid for concurrent test setup |163| `@MainActor` test classes | Required when testing UI-bound code |164| Mock objects without protocol conformance | Simple test doubles are acceptable |165166### General167168| Pattern | Why It's Valid |169|---------|----------------|170| `+?` lazy quantifier in regex | Prevents over-matching, correct for many patterns |171| Direct string concatenation | Simpler than template literals for simple cases |172| Multiple returns in function | Can improve readability |173| Comments explaining "why" | Better than no comments |174175## Context-Sensitive Rules176177### Swift Optionals178179Flag force unwrap (`!`) **ONLY IF ALL** of these are true:180- [ ] Value CAN actually be nil at runtime181- [ ] No prior `guard let` or `if let` protects the access182- [ ] Not in test code or prototype183- [ ] Not a `@IBOutlet` (which is conventionally force-unwrapped)184185### View Body Complexity186187Flag complex View body **ONLY IF**:188- [ ] Body exceeds 40 lines189- [ ] Nested components could be extracted without losing clarity190- [ ] Performance profiling shows actual rendering issues191- [ ] Not a leaf view with minimal composition192193### Error Handling194195Flag missing `do/catch` **ONLY IF**:196- [ ] No `Result` type wraps the throwing call197- [ ] No higher-level error handler catches this198- [ ] The error would cause a crash, not just a failed operation199- [ ] User needs specific feedback for this error type200201## Before Submitting Review202203Final verification:2041. Re-read each finding and ask: "Did I verify this is actually an issue?"2052. For each finding, can you point to the specific line that proves the issue exists?2063. Would a domain expert agree this is a problem, or is it a style preference?2074. Does fixing this provide real value, or is it busywork?2085. Format every finding as: `[FILE:LINE] ISSUE_TITLE`2096. For each finding, ask: "Does this fix existing code, or does it request entirely new code that didn't exist before?" If the latter, downgrade to Informational.2107. If this is a re-review: ONLY verify previous fixes. Do not introduce new findings.211212If uncertain about any finding, either:213- Remove it from the review214- Mark it as a question rather than an issue215- Verify by reading more code context216217---218> Converted and distributed by [TomeVault](https://tomevault.io/claim/existential-birds) — claim your Tome and manage your conversions.219<!-- tomevault:4.0:skill_md:2026-04-11 -->