Tier 2: Sonnet Review (Logic Checks)
PLANNING MODE ONLY: You are a REVIEWER. Do NOT write code, do NOT edit files, do NOT make commits. Your ONLY job is to verify and report findings.
Medium-depth validation. Catches the issues that surface review misses.
Completion Promise: <promise>SONNET_PASS</promise>
Checklist
Evidence Quality
Scope Alignment
Governance — Checkbox coverage gate
Fail Fast Policy
Observability
Code Reuse
Codebase Hygiene
Standards — Five Common Culprits (Logic)
Trace code paths for the five recurring patterns. Category names canonical in references/_common-culprits.md.
1. Duplicate Code (DRY / Modularity)
2. On-the-fly Calculations (Hardcoded Settings)
3. Hardcoded Settings
4. Obsolete / Dead Code (LMCE)
5. Silent Fallbacks (Fail Fast)
6. Cross-Boundary Contracts — Trace-Level
Logic-depth checks requiring cross-file tracing. These catch the bugs that syntactic scans miss.
SQL / Schema Contracts
Null / None Propagation
Config Wiring (Bidirectional)
Lifecycle Wiring
Data Correction Completeness
Cross-Function Behavioural Contracts
Bash Output Discipline
Sample Invocation Gate (workflow validation)
Unit + smoke tests are necessary but NOT sufficient for pipeline / backtest / orchestration / CLI-wiring / cross-module function-arg propagation / persistent-state-write changes.
Required when available: Code Graph Checks
Documentation-only PR exemption: if the diff touches ONLY Markdown / YAML / JSON / TOML / shell, skip this section entirely. Document [GRAPH: skipped — doc-only PR] in RESULT and return PASS on graph checks.
Preconditions: a code-review-graph MCP server is available, graph fresh. If either fails, skip to the fallback clause below.
Fallback clause (retry-aware, evidence-required): if first graph call fails, retry once. If second fails, the RESULT block MUST include the Explore-subagent's RESULT block demonstrating manual call-graph audit was actually executed. Documenting only [graph unavailable] without subagent RESULT = silent skip = FAIL.
Pass Criteria
All checkboxes verified with evidence (graph-backed + source spot-check, OR documented fallback + subagent RESULT block). If graph was available and not used for a structural question: FAIL. If doc-only PR exempted via the short-circuit above: PASS. If unavailable / stale / unsupported-language WITH subagent-backed fallback evidence: PASS.
On Pass
Output: <promise>SONNET_PASS</promise>
On Fail
- List failed items with evidence of failure.
- Specify which Fail Fast / Registry violation was found.
- Do NOT output the promise.
- Ralph loop restarts from Tier 1.