Tier 3: Opus Review (Deep Analysis)
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.
Thorough architectural review. Catches what surface + logic tiers missed.
Completion Promise: <promise>OPUS_PASS</promise>
Checklist
Architectural Fit
Standards Compliance
Governance — Checkbox drift audit (two-tier cadence)
If the project uses a governance MCP server for checkboxes, fetch the issue body and parse the ## Proof of Work section — the canonical audit signal. Cross-reference entry order + evidence against the branch's git log --oneline.
Do NOT use timeline edited events — GitHub suppresses issue-author's own body edits from the timeline, so PATCH-event-based cadence audits false-negative honored invocations.
Classify every checked [x] box into one of two tiers:
- Tier A — Phase-deliverable checkboxes (items in Acceptance Criteria Phases 1..N that describe a concrete deliverable — a file edit, commit, function, section, table, example): STRICT interleaving required. Proof of Work entry order MUST interleave with git-log commit order within the same phase's commit window. Cluster-at-end (many entries appended after all phase commits) = FAIL.
- Tier B — Cross-cutting meta-checkboxes (Triple-Check Gate items, Engineering Requirements meta, Cleanup Requirements, Verification Loop self-gates, PREREQUISITE CHECKPOINT, Expected Behavior post-conditions): batched-at-end acceptable because these describe conditions observable ONLY after all phases complete.
Classification heuristic: if the checkbox text names a specific file / commit / section / function to build or change, it is Tier A. If it describes a cross-cutting condition requiring the WHOLE implementation to evaluate, it is Tier B. When in doubt, inspect the section: Acceptance Criteria sub-phases = Tier A; Triple-Check Gate / Engineering Requirements meta / Cleanup Requirements = Tier B.
Standards — Five Common Culprits (Architectural)
Deep analysis for the five recurring patterns across the entire implementation. Categories 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 Contract Audit — Architectural
Deep cross-system reasoning. Every value that crosses a boundary (code↔DB, code↔config, caller↔callee, backend↔frontend) must have its contract verified.
SQL / Schema Architecture
Null Propagation Architecture
Config Architecture (Bidirectional)
Lifecycle Wiring Architecture
Data Correction Architecture
7. Factual Claims Audit
Required when available: Code Graph Checks (Architectural Depth)
Documentation-only PR exemption: if the diff touches ONLY Markdown / YAML / JSON / TOML / shell, skip this section. Document [GRAPH: skipped — doc-only PR] in RESULT and return PASS.
Preconditions: a code-review-graph MCP server is available, graph fresh. If either fails, skip to fallback clause below.
Fallback clause (retry-aware, evidence-required): first graph call fails → retry once. Second fails → RESULT MUST include the Explore-subagent's RESULT block demonstrating manual architectural audit (dead code + impact + large functions) was actually executed. Documenting only [graph unavailable] without subagent RESULT = silent skip = FAIL.
Overengineering Check
Pre-Merge Precondition Check (NOT the post-merge user review)
CRITICAL: This tier runs BEFORE merge. The items below are pre-merge preconditions. They are NOT the user review itself — that happens after merge.
Final Verification
Bash Output Discipline
Pass Criteria
All checkboxes verified with evidence. Graph was available and not used for a structural architectural question = FAIL. If doc-only PR exempted via the short-circuit: PASS. Unavailable / stale / unsupported-language WITH subagent RESULT block showing manual architectural audit was performed: PASS. Architectural review without structural evidence (graph-backed OR subagent-backed with RESULT block) is incomplete and fails.
On Pass
Output: <promise>OPUS_PASS</promise>
On Fail
- List architectural concern with specific file:line
- Explain why it violates standards
- Suggest a specific fix
- Do NOT output the promise
- Ralph loop restarts from Tier 1 after fixes