一键导入
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 职业分类
| 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, 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/exports 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, route/middleware, 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:
Common false positives:
Before flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Valid patterns often flagged incorrectly:
// Type assertion with ok check, NOT unsafe cast
data, ok := value.(UserData)
if !ok {
return fmt.Errorf("unexpected type: %T", value)
}
// Type switch is safe narrowing
switch v := value.(type) {
case User:
v.Name // Go 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 |
|---|---|
val, ok := map[key] | Comma-ok idiom, standard for maps |
Returning error as last return value | Go error handling convention |
defer for cleanup | Correct resource management pattern |
| Short variable names in small scope | Idiomatic Go (e.g., i, err, ctx) |
interface{} / any in generic code | Valid for truly heterogeneous data |
| Pattern | Why It's Valid |
|---|---|
| Unbuffered channel for synchronization | Correct when goroutines must synchronize |
select with default | Non-blocking channel operation, intentional |
sync.Once for initialization | Thread-safe lazy init pattern |
context.Background() in main/tests | Valid root context for top-level calls |
| Goroutine without explicit join | Valid for fire-and-forget with proper lifecycle management |
| Pattern | Why It's Valid |
|---|---|
| Table-driven tests | Standard Go testing pattern |
t.Helper() in test utilities | Correct for accurate error line reporting |
testify/assert alongside stdlib | Common and acceptable in Go projects |
Test function names without _ | TestFooBar is idiomatic Go |
| 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 unchecked error ONLY IF ALL of these are true:
_)Close())Flag goroutine leak ONLY IF:
Flag missing interface ONLY IF:
Final verification:
[FILE:LINE] ISSUE_TITLEIf uncertain about any finding, either:
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