Help us improve
Share bugs, ideas, or general feedback.
From session-orchestrator
Runs a 4-phase systematic root-cause investigation for bugs, test failures, build breaks, and unexpected behavior. Produces a debug artifact before any fix is allowed.
npx claudepluginhub kanevry/session-orchestrator --plugin session-orchestratorHow this skill is triggered — by the user, by Claude, or both
Slash command
/session-orchestrator:debuginheritThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> 4-phase root-cause investigation. Iron Law: no fix without root cause.
Enforces systematic root cause investigation for bugs, test failures, and unexpected behavior through four phases: investigation, pattern analysis, hypothesis testing, and implementation.
Provides four-phase debugging framework prioritizing root cause investigation before fixes. Use for bugs, test failures, unexpected behavior, performance issues, build failures.
Enforces structured root-cause analysis for bugs, test failures, errors, warnings, and performance regressions before proposing fixes. Uses phases: known issues, investigation, pattern comparison, hypothesis testing.
Share bugs, ideas, or general feedback.
4-phase root-cause investigation. Iron Law: no fix without root cause.
/plan or wave-executor)Read skills/_shared/bootstrap-gate.md and execute the gate check. If the gate is CLOSED, invoke skills/bootstrap/SKILL.md and wait for completion before proceeding. If the gate is OPEN, continue to Phase 1.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
No matter how obvious the fix looks, complete Phase 1 (Root Cause Investigation) and produce the artifact BEFORE writing any fix code. This is non-negotiable.
The "2-hour obviously a typo" case has been the root cause of every multi-day debugging session in every project's history. Treat the obvious fix as a hypothesis to verify, not a conclusion to act on.
Quote the exact error message, full stack trace, and exit code in the artifact. Do not paraphrase. Paraphrasing introduces your assumptions before investigation begins.
Document the exact command and environment that triggers it. If reproduction is flaky, that itself is a data point — write down the failure rate.
# minimum reproduction attempt
<exact command>
# env: Node version, OS, env vars relevant to the failure
git log --oneline -20
git diff HEAD~5..HEAD -- <affected paths>
Identify the smallest set of commits that could have introduced this. Do not assume the most recent commit is the culprit without checking.
Add temporary logging at each input/output point along the failing path's modules. Capture actual values, not assumptions about what they should be. Run with instrumentation in place and record results.
Start from the failure point and walk upstream. At each step, verify what you think is true with an actual Read or Bash call. "I assume X is Y" is not data.
Write to .orchestrator/debug/<session-id>-<sequence>.md (sequence = 1, 2, 3 within session).
Artifact MUST be written before proceeding to Phase 2. See "Artifact contract" section below.
After the Phase 1 artifact is written:
git log --all --grep="<symptom keyword>".grep -rn "<suspect pattern>" --include="*.ts" --include="*.mjs"
git grep "<symbol>"
Record findings in the artifact's Phase 2 section.
Optional operator-side companion: /tmux-layout --layout debug renders a 4-pane layout (scratch shell + npm test --watch + tail -F .orchestrator/debug/*.md + watch -n 2 'git diff --stat') so you can observe hypothesis tests, debug artifacts, and diff progression peripherally. Pure observability — the /debug skill works identically with or without the layout (per ADR-0007 + GitLab #562).
grep -rn "<function or symbol name>"
Only after Phases 1-3 are complete and the artifact is written:
test-command) and confirm the failure no longer reproducesDo not gold-plate the fix. Scope creep during a bugfix introduces new bugs.
.orchestrator/debug/<session-id>-<sequence>.md:
# Debug session: <topic>
Created: <ISO timestamp>
Session: <session-id>
## Phase 1 — Root Cause
### Error
[exact error message + stack trace + exit code — verbatim]
### Reproduction
[exact command]
[environment: Node version, platform, relevant env vars]
[frequency: always | intermittent (~N/10)]
### Suspect commits
- <sha> <subject> — reason
### Instrumentation data
[per-boundary observations with actual values]
### Hypothesized root cause
[ONE sentence] · Confidence: [low|medium|high]
## Phase 2 — Pattern
[recurrence? class? missing test? similar code paths?]
## Phase 3 — Impact
[affected files, callers, dependents]
## Phase 4 — Solution
[proposed fix + test cases identified]
## Resolution
[commit SHA, files changed, tests added — filled in after fix lands]
Rules for the artifact:
When wave-executor classifies a task as bugfix, it routes through this skill. code-implementer agents handling bugfix-classified tasks must reference an existing Phase-1 artifact path in their task description before editing any production code. Wire-up happens in wave-executor's routing layer (Wave 3 P1 cross-reference).
git log -20 and the diff before assuming recency.skills/discovery/SKILL.md — discovery surfaces problems; debug investigates them.claude/rules/verification-before-completion.md — once fixed, verify fresh (issue #38)agents/code-implementer.md — references this skill for bugfix-classified tasks