一键导入
review-verification-protocol
Mandatory verification steps for all code reviews to reduce false positives. Load this skill before reporting ANY code review findings.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Mandatory verification steps for all code reviews to reduce false positives. Load this skill before reporting ANY code review findings.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when you need a bite-sized, TDD-driven implementation plan but do NOT have a brainstorm-beagle spec to plan against. quick-plan reconstructs intent from the current conversation, fans out domain-expert exploration subagents across the codebase, and synthesizes the same plan format write-plan produces — without requiring `.beagle/concepts/<slug>/spec.md`. Triggers on: "quick plan", "plan this out", "plan what we just discussed", "turn this into an implementation plan", "plan this without a spec", "I don't have a spec, just plan it", "write-plan but no spec". Make sure to use this skill whenever the user wants an implementation or TDD plan and there is no spec to plan against — even if they just say "plan it" after discussing a feature. Writes to `.beagle/plans/<slug>/plan.md`. If a finalized spec already exists at `.beagle/concepts/<slug>/spec.md`, prefer write-plan. Does NOT brainstorm specs, write code, or execute the plan — produces the plan document (and an optional handoff prompt) only.
Use when the user has a fuzzy idea and wants to shape it into a concrete project spec before planning or building. Triggers on: "brainstorm this", "I have an idea for...", "help me think through this project", "what should I build", "spec this out". Also catches vague feature descriptions needing structured questioning to clarify scope. Does NOT write code, plan implementation, review strategy docs, or run strategy interviews — produces a WHAT/WHY spec through dialogue, not a HOW plan.
Use as the follow-up to brainstorm-beagle when a spec has an Open Questions section (or quietly carries latent gaps) that need closing before planning or implementation can begin. Triggers on: "resolve the open questions", "close the gaps in this spec", "research the open items", "finalize my spec", "make this spec implementation-ready", "answer the TBDs". Also triggers whenever the user points at a brainstorm-beagle spec and asks for research, proposals, or answers to unresolved items. Orchestrates parallel research subagents when available (falls back to inline sequential research otherwise), proposes answers one at a time for user approval, then rewrites the spec in place so it arrives at planning with no known gaps. Does NOT write code, design implementation, or create plans — it only produces a complete spec.
Use when you have a finalized brainstorm-beagle spec at `.beagle/concepts/<slug>/spec.md` and need a bite-sized, TDD-driven implementation plan before any code is written. Triggers on: "write a plan", "plan this spec", "turn the spec into a plan", "now plan the implementation", "write-plan". Reads the spec, designs the file structure, decomposes work into 2-5 minute TDD steps with exact paths and commands, self-reviews against the spec, gets user approval, then writes to `.beagle/concepts/<slug>/plan.md` and offers to generate an execution handoff prompt via the subagent-prompt skill. Does NOT brainstorm specs, write code, or execute the plan — produces the plan document (and an optional handoff prompt) only.
Core technical documentation writing principles for voice, tone, structure, and LLM-friendly patterns. Use when writing or reviewing any documentation.
Generate first-draft technical documentation from code analysis
| name | review-verification-protocol |
| description | Mandatory verification steps for all code reviews to reduce false positives. Load this skill before reporting ANY code review findings. |
| user-invocable | false |
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.
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.
Run these in order. Do not move to the next gate until its pass condition is met (objective evidence, not internal certainty).
Read — Open the file and read the full enclosing function, method, property, or type (not only the diff hunk).
Pass: You can name the symbol and cite at least one line outside the changed lines that shows control flow, scope, or use relevant to the finding.
Reference (required before any “unused”, “dead code”, or “never called” claim) — Search the workspace for the identifier and for imports/@objc/#selector/SPM symbols that could reference it.
Pass: Recorded outcome: match count or list, or explicit “zero matches in repo” before asserting unused.
Upstream (required before “missing validation” or “missing error handling”) — Inspect the immediate caller, parent View / coordinator / ViewModel, app or scene delegate pipeline, or documented framework behavior that might already enforce the rule.
Pass: One sentence naming where responsibility lives, or “checked caller + framework path; still missing” with which layer you checked.
Severity — Before assigning Critical or Major, map the issue to Severity Calibration and exclude style-only or Informational items.
Pass: Chosen label matches a bullet under that severity; otherwise downgrade, reclassify as Informational, or omit.
Submit — Each retained finding uses [FILE:LINE] plus a one-line proof; complete Before Submitting Review steps 1–7 for this review.
Pass: Every step satisfied or the finding was removed or downgraded.
The checklist below expands these gates by issue type; use both.
Before flagging ANY issue, verify:
Before flagging, you MUST:
public/open and used by other modules or targets (SPM, app extensions)#selector, key paths, or dynamic dispatchCommon false positives:
@State, @Binding, @Observable) that drives updates even when the binding looks “unused” in one branch#Preview, tests, or other targets@objc, #selector, or dynamic dispatch to a symbol search may not show as plain call sitesBefore flagging, you MUST:
ViewModel, coordinator, app/scene delegate)Codable, property wrappers, URLSession APIs)Result, async error path, user-facing alert elsewhere)Common false positives:
do/catchBefore flagging, you MUST:
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
}
Before flagging, you MUST:
deinit, onDisappear, cancel(), or store teardown elsewhere)Task cancellation, AsyncSequence termination, or Combine subscription disposal is handled after awaitsCommon false positives:
[weak self] or [unowned self] already used where neededTask is cancelled when the view disappears (reviewer missed the link)Before flagging, you MUST:
@Observable granularity)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 |
|---|---|
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 |
| 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 |
| 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 |
| 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 force unwrap (!) ONLY IF ALL of these are true:
guard let or if let protects the access@IBOutlet (which is conventionally force-unwrapped)Flag complex View body ONLY IF:
Flag missing do/catch ONLY IF:
Result type wraps the throwing callFinal verification:
[FILE:LINE] ISSUE_TITLEIf uncertain about any finding, either: