Scope — Collect changed files:
Run git diff --name-only HEAD (unstaged + staged). If empty
(changes already committed), fall back to git diff --name-only main...HEAD (branch diff). If a shape context exists, read
criteria[] and mustNot[] for context — but verify does NOT check
against them (that's loop's job).
If no changes detected in either diff: report "Nothing to verify"
and stop.
Announce: [VERIFY] Scanning {N} changed files across 4 dimensions
Spawn specialists — 4 parallel agents via Task tool.
Each agent receives: changed file list + file contents + dimension
instructions. Each produces findings as:
{severity} — {file}:{line} — {finding} — {evidence}
digraph verify {
rankdir=LR
scope -> correctness
scope -> security
scope -> performance
scope -> standards
correctness -> aggregate
security -> aggregate
performance -> aggregate
standards -> aggregate
aggregate -> gate
}
Correctness — "Do the changes work as intended?"
Task(prompt="[changed files + contents]
Check: types compile, tests pass (run them), logic errors,
edge cases, error handling gaps. Run tsc --noEmit and
test commands if available. Report findings as
BLOCKER/WARNING/SUGGESTION with file:line evidence.",
subagent_type="general-purpose")
Security — "Do the changes introduce vulnerabilities?"
Task(prompt="[changed files + contents]
Check: injection (SQL, XSS, command), auth gaps, secrets in
code, unsafe deserialization, SSRF, path traversal. Read
CHANGED files only. Report findings as
BLOCKER/WARNING/SUGGESTION with file:line evidence.",
subagent_type="general-purpose")
Performance — "Do the changes degrade performance?"
Task(prompt="[changed files + contents]
Check: N+1 queries, unbounded loops, missing pagination,
large bundle imports, unnecessary re-renders, missing
memoization. Measure where possible (bundle size, query count).
Report findings as BLOCKER/WARNING/SUGGESTION with evidence.",
subagent_type="general-purpose")
Standards — "Do the changes follow project conventions?"
Task(prompt="[changed files + CLAUDE.md conventions]
Check: naming conventions, file organization, import patterns,
error handling patterns, design system usage, accessibility.
Compare against CLAUDE.md rules and dominant codebase patterns.
Report findings as BLOCKER/WARNING/SUGGESTION with evidence.",
subagent_type="general-purpose")
Report — Emit verification card:
[VERIFY] Gate: {SHIP/FIX/BLOCK} | Files: {N} | Findings: {B}B {W}W {S}S
Per finding (grouped by dimension):
{severity} — {file}:{line} — {finding}
If BLOCK: list BLOCKERs with remediation hints.
If FIX: list WARNINGs, note they're advisory.
If SHIP: one-line confirmation.
Footer: satisfaction: {0-100} | confidence: {high/med/low} | basis: execution
Score: 100 - (BLOCKERs×25 + WARNINGs×5 + SUGGESTIONs×1), floor 0.