OMC
Oh My ClaudeCodev4.14.5

Deep Dive

2-stage pipeline: trace (causal investigation) → deep-interview (requirements crystallization)

Overview

Deep Dive orchestrates a 2-stage pipeline that first investigates WHY something happened (trace) then precisely defines WHAT to do about it (deep-interview). The trace stage runs 3 parallel causal investigation lanes, and its findings feed into the interview stage via a 3-point injection mechanism.

The result is a crystal-clear spec grounded in evidence, not assumptions.

Usage

/oh-my-claudecode:deep-dive "why does the auth token expire early?"

Also activated via magic keywords.

deep dive into the authentication failures
investigate deeply why the DAG fails intermittently

When to Use

  • User has a problem but doesn't know the root cause — needs investigation before requirements
  • Bug investigation: "Something broke and I need to figure out why, then plan the fix"
  • Feature exploration: "I want to improve X but first need to understand how it currently works"
  • The problem is ambiguous, causal, and evidence-heavy

When NOT to Use

  • User already knows the root cause — use /deep-interview directly
  • User has a clear, specific request with file paths — execute directly
  • User wants to trace only without requirements — use /trace directly
  • User already has a PRD or spec — use /ralph or /autopilot

Pipeline Stages

Stage 1: Deep Dive               Stage 2: Ralplan                Stage 3: Autopilot
┌─────────────────────┐    ┌───────────────────────────┐    ┌──────────────────────┐
│ Trace (3 lanes)     │    │ Planner creates plan      │    │ Phase 2: Execution   │
│ Interview (Socratic)│───>│ Architect reviews         │───>│ Phase 3: QA cycling  │
│ 3-point injection   │    │ Critic validates          │    │ Phase 4: Validation  │
│ Spec crystallization│    │ Loop until consensus      │    │ Phase 5: Cleanup     │
│ Gate: ≤20% ambiguity│    │ ADR + RALPLAN-DR summary  │    │                      │
└─────────────────────┘    └───────────────────────────┘    └──────────────────────┘
Output: spec.md            Output: consensus-plan.md        Output: working code

Execution Phases

Phase 1: Initialize

Parses the user's input, detects brownfield vs greenfield, and generates 3 trace lane hypotheses:

  1. Code-path / implementation cause
  2. Config / environment / orchestration cause
  3. Measurement / artifact / assumption mismatch cause — covers verification-method defects, not just system defects. If the problem says "X is empty but Y is not", "N streams differ", or "values mismatch across entities", this lane runs a premise audit first: enumerate entity dimensions (cohort IDs, tenant IDs, partition keys, dimensional keys per stream) via metadata table or schema introspection before treating zero-row or mismatch results as evidence of a system defect.

Phase 1.5: Pre-flight Workflow Setup

Loads runtime settings before execution:

  • Reads [$CLAUDE_CONFIG_DIR|~/.claude]/settings.json and ./.claude/settings.json (project overrides user)
  • Resolves omc.deepInterview.ambiguityThreshold (default 0.2) so the later interview gate uses the project-configured value instead of a hard-coded threshold

Phase 2: Lane Confirmation

Presents the 3 hypotheses to the user for confirmation (1 round only).

Phase 3: Trace Execution

Runs 3 parallel tracer lanes using Claude built-in team mode. Each lane:

  • Owns exactly one hypothesis
  • Gathers evidence for and against
  • Names the critical unknown
  • Recommends the best discriminating probe

For Lane 3 (Misplacement / SoT violation) findings, every candidate MOVE destination is classified with an ownership_scope:

ownership_scopeExamples
personal-configuser-level dotfiles, ~/.claude/, personal repos, user-only agent rules
shared-configcompany/org repos, team-maintained config, multi-tenant shared rules
externalthird-party, vendor, or OSS upstream repositories outside the user's ownership
project-scopedper-project storage owned by the current project boundary

Cross-boundary MOVE candidates (for example personal-configshared-config) are flagged with an explicit warning and must not be surfaced as the default recommendation; same-scope MOVE, COMPRESS, or KEEP is preferred.

A falsification round runs between the leading hypothesis and the strongest alternative.

Phase 4: Interview with Trace Injection

Follows the deep-interview protocol with 3 initialization overrides:

  1. initial_idea enrichment: Replaces raw input with trace findings
  2. codebase_context replacement: Uses trace synthesis instead of re-exploring
  3. initial question queue injection: Per-lane critical unknowns become the first interview questions

The interview continues with Socratic questioning until ambiguity ≤ 20%.

Phase 5: Execution Bridge

Presents execution options:

OptionDescription
Ralplan → Autopilot (Recommended)Consensus-refine spec, then execute with full autopilot
Autopilot (skip ralplan)Full autonomous pipeline, faster but no consensus
RalphPersistence loop with architect verification
TeamN coordinated parallel agents
Refine furtherContinue interviewing

Trace Output

Trace results are saved to .omc/specs/deep-dive-trace-{slug}.md with:

  • Ranked hypotheses with confidence and evidence strength
  • Per-lane evidence summaries
  • Rebuttal round results
  • Most likely explanation
  • Critical unknown and recommended discriminating probe
  • trace - Investigation only, no requirements
  • deep-interview - Requirements only, no investigation
  • ralplan - Consensus planning (Stage 2)
  • autopilot - Autonomous execution (Stage 3)

Reference

ItemValue
Invocation/oh-my-claudecode:deep-dive
Magic Keywordsdeep dive, deep-dive, investigate deeply
CategoryWorkflow
Pipelinedeep-dive → plan → autopilot

On this page