/root-why
Root cause analysis and debugging
> /plugin marketplace add nWave-ai/nWave > /plugin install nw@nwave-marketplace
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/root-why
Context preview
What this command does when you run it.
Root cause analysis and debugging
Command definition
root-why.mddescription: "Root cause analysis and debugging"
argument-hint: "[problem-description] - Optional: --depth=[3|5|7-whys] --output=[text|diagram|report]"
NW-ROOT-WHY: Toyota 5 Whys Root Cause Analysis
**Wave**: CROSS_WAVE **Agent**: Rex (nw-troubleshooter)
Overview
Systematic root cause analysis using Toyota's 5 Whys with multi-causal investigation and evidence-based validation. Investigates multiple cause branches at each level|validates solutions against all identified root causes.
Agent Invocation
@nw-troubleshooter
Execute \*investigate-root-cause for {problem-statement}.
**Configuration:**
- investigation_depth: 5
- multi_causal: true
- evidence_required: true
Usage: DELIVER Wave Retrospective (Phase 3.5)
When invoked as part of `/nw-deliver` Phase 3.5, analyze across 4 categories:
1. **What worked well** (and why — preserve these practices) 2. **What worked better than before** (and why — reinforce improvements) 3. **What worked badly** (5 Whys root cause, actionable fix) 4. **What worked worse than before** (5 Whys root cause, prevent regression)
**Inputs**: Evolution document|execution-log.json|mutation results|git log. **Output**: Retrospective section appended to evolution document. **Skip**: If clean execution (no skips|no failures|no tooling issues), generate brief summary only.
Tag items requiring nWave framework changes as **meta-improvements**.
Progress Tracking
The invoked agent MUST create a task list from its workflow phases at the start of execution using TaskCreate. Each phase becomes a task with the gate condition as completion criterion. Mark tasks in_progress when starting each phase and completed when the gate passes. This gives the user real-time visibility into progress.
Success Criteria
- [ ] All 5 WHY levels investigated with evidence
- [ ] Multi-causal branches explored at each level
- [ ] Root causes identified and validated
- [ ] Solutions address all identified root causes
- [ ] Backward chain validation performed
Next Wave
**Handoff To**: {invoking-agent-returns-to-workflow} **Deliverables**: Root cause analysis report with solutions
Examples
Example 1: Investigate test flakiness
/nw-root-why "Integration tests fail intermittently on CI but pass locally"
Rex investigates 5 WHY levels with multi-causal branches, discovers race condition in database cleanup, proposes transaction-isolated test fixtures.
Expected Outputs
docs/analysis/root-cause-analysis-{problem}.mdRead more
description: "Root cause analysis and debugging" argument-hint: "[problem-description] - Optional: --depth=[3|5|7-whys] --output=[text|diagram|report]"
NW-ROOT-WHY: Toyota 5 Whys Root Cause Analysis
**Wave**: CROSS_WAVE **Agent**: Rex (nw-troubleshooter)
Overview
Systematic root cause analysis using Toyota's 5 Whys with multi-causal investigation and evidence-based validation. Investigates multiple cause branches at each level|validates solutions against all identified root causes.
Agent Invocation
@nw-troubleshooter
Execute \*investigate-root-cause for {problem-statement}.
**Configuration:**
- investigation_depth: 5
- multi_causal: true
- evidence_required: true
Usage: DELIVER Wave Retrospective (Phase 3.5)
When invoked as part of `/nw-deliver` Phase 3.5, analyze across 4 categories:
1. **What worked well** (and why — preserve these practices) 2. **What worked better than before** (and why — reinforce improvements) 3. **What worked badly** (5 Whys root cause, actionable fix) 4. **What worked worse than before** (5 Whys root cause, prevent regression)
**Inputs**: Evolution document|execution-log.json|mutation results|git log. **Output**: Retrospective section appended to evolution document. **Skip**: If clean execution (no skips|no failures|no tooling issues), generate brief summary only.
Tag items requiring nWave framework changes as **meta-improvements**.
Progress Tracking
The invoked agent MUST create a task list from its workflow phases at the start of execution using TaskCreate. Each phase becomes a task with the gate condition as completion criterion. Mark tasks in_progress when starting each phase and completed when the gate passes. This gives the user real-time visibility into progress.
Success Criteria
- [ ] All 5 WHY levels investigated with evidence
- [ ] Multi-causal branches explored at each level
- [ ] Root causes identified and validated
- [ ] Solutions address all identified root causes
- [ ] Backward chain validation performed
Next Wave
**Handoff To**: {invoking-agent-returns-to-workflow} **Deliverables**: Root cause analysis report with solutions
Examples
Example 1: Investigate test flakiness
/nw-root-why "Integration tests fail intermittently on CI but pass locally"
Rex investigates 5 WHY levels with multi-causal branches, discovers race condition in database cleanup, proposes transaction-isolated test fixtures.
Expected Outputs
docs/analysis/root-cause-analysis-{problem}.mdAI agents that guide you from idea to working code, with human judgment at every gate. nWave runs inside Claude Code. It breaks feature delivery into seven waves (discover, diverge, discuss, design, devops, distill, deliver).
Repo: nWave-ai/nWave
Other commands on nwave.
- /buddy
nWave concierge — ask any question about methodology, project state, commands, migration, or troubleshooting. Read-only, contextual answers.
Open command - /bugfix
Bug fix workflow: root cause analysis → user review → regression test + fix via TDD
Open command - /continue
Detects current wave progress for a feature and resumes at the next step. Scans docs/feature/ for artifacts.
Open command - /deliver
Orchestrates the full DELIVER wave end-to-end (roadmap > execute-all > finalize). Use when all prior waves are complete and the feature is ready for implementation.
Open command - /design
Designs system architecture with C4 diagrams and technology selection. Use when defining component boundaries, choosing tech stacks, or creating architecture documents.
Open command - /devops
Designs CI/CD pipelines, infrastructure, observability, and deployment strategy. Use when preparing platform readiness for a feature.
Open command

