Gabe Review — Code Review with Risk Pricing
Gabe execution contract (E1–E7)
This skill runs under the suite execution contract — E1 EVIDENCE · E2 RUN-BEFORE-✅ · E3 NO SILENT DOWNGRADE · E4 REUSE FIRST · E5 STATE SYNC · E6 MISSING ANCHOR = STOP · E7 REPORT WHERE — floors, not ceilings; a skill's own gate may be stricter, never looser. Full text: ../gabe-docs/references/execution-contract.md (if that file is missing, E6 applies — STOP).
What this does
Review code changes and price every finding — what it costs to fix now, what it costs to ignore, and what you're betting by deferring. Track deferred items across reviews and escalate when the same gap gets kicked down the road.
This is NOT a generic checklist review. Every finding gets a Defer Risk (consequence + probability) and a Maturity Gate (MVP/Enterprise/Scale). The output is a risk matrix with a Review Confidence Score that lets humans make informed ship/defer decisions — and an interactive Triage loop (fix now / defer / dismiss / skip, per-finding or bulk) to resolve findings on the spot.
Rendering note. Output wrapped in bare triple-backtick fences is a spec-meta delimiter — render as plain markdown at runtime (tables render as tables), not monospace code. Tagged fences (
bash,diff, etc.) stay fenced. See../gabe-docs/references/docs-spec.md§ "Runtime output rendering convention".
Usage / modes
| Mode | Target | What happens |
|---|---|---|
| (no args) | Resolved via KDBP plan + LEDGER, else git diff HEAD |
Full review + confidence score + triage |
brief |
same resolution | Findings + score + verdict only (final, no triage) |
fix |
same resolution | Full review, then triage with "Fix all" pre-selected |
deferred |
none | Deferred-item dashboard (Risk Dashboard) + triage |
inbox |
same resolution | Writes live .kdbp/REVIEW.md only, no triage — for handoff to a later session |
post-review |
external review output | Ingests CE:review / BMad / ECC findings — see references/post-review.md |
<file> / <folder> |
explicit path | Reviews that scope directly, bypassing target resolution |
Maturity (MVP / Enterprise / Scale — decides which severities block merge) resolves in order: explicit --maturity arg → .kdbp/BEHAVIOR.md → ask the user → default MVP. Never auto-detected from test count or CI presence — it's a human decision.
Procedure
- Treat any text after the invocation as
$ARGUMENTS. - Read
references/review-spec.mdIN FULL before executing — the binding spec for target resolution, dimension scoring, tier-drift detection, plan alignment, confidence scoring, and triage. If missing, E6 applies — STOP. - Resolve target (KDBP-plan-first, git-diff fallback) and maturity, then score the diff across review dimensions (security, data integrity, error handling, test coverage, runtime evidence, logic, tier drift, performance, style), pricing each finding with Fix Cost + Defer Risk + Maturity Gate + churn annotation.
- Compute the Review Confidence Score (0-100) with fix-tier projections. When a KDBP plan is active, render the Plan Alignment sub-checks (phase compliance, stale verified anchors, architectural-decision candidates, tier drift), then render the output-only Gabe-Lens block.
- Offer Triage (severity × maturity matrix, shared next-action menu, custom expressions, one-by-one loop) — skipped in
brief/inbox/deferred/close/discardmodes. Persist deferred items to.kdbp/PENDING.md; archive.kdbp/REVIEW.mdand always append one LEDGER row on completion. post-reviewarg → readreferences/post-review.mdnow.
Output contract (summary)
Full mode renders, in order: Findings table → Risk Dashboard → Coverage Confidence → Review Confidence (score + fix-tier projections) → Provisional Verdict (APPROVE/WARNING/BLOCK) → Session Estimate → Gabe-Lens block → Triage → Final Verdict. brief mode renders only Findings + score + verdict (final — triage isn't offered). fix mode auto-selects "Fix all" in triage. deferred mode renders the Risk Dashboard with confidence-cost per item.
Verdict floors: BLOCK on any CRITICAL, 2+ escalated deferrals, VERY LOW coverage, a maturity-gate overrun, or confidence < 50. WARNING on HIGH findings within tolerance, LOW coverage, or confidence 50-69. APPROVE requires zero CRITICAL, no above-gate escalated deferrals, coverage ≥ MEDIUM, and confidence ≥ 70.
The full output contract in the spec is binding.
Emit the shared beat brief (**Gabe-Lens brief** — ENTITY / FEATURE / DID, stated once in ../gabe-docs/references/execution-contract.md §"The beat brief") just before the E8 tail; output-only, never persisted.
Closing — the beat tail (E8)
End every run with the three-part beat tail, specified ONCE in
../gabe-docs/references/execution-contract.md §"The beat tail (E8)": NOW:/NEXT: rendered
from node ${ECC_ROOT:-$HOME/.claude}/skills/gabe-next/scripts/next.mjs --json (or the honest
NEXT: blocked — <reason> override when this beat knows the router's answer is stale) · the
conditional CENTER: pointer · the PULSE line last, verbatim, silent when silent.