/dev:debugfrom dev
Routes bugs to the appropriate debugging depth — quick patch for localized issues, standard systematic debug, or production-grade TDD fix via /dev:fix. Auto-infers scope from the bug description.
Ships in dev. Installing the plugin adds it to Claude Code.
<user_request> $ARGUMENTS </user_request>
<value_banner> Display ONCE at the start of the command:
/dev:debug — Structured Debugging Workflow
Beyond what Claude does natively, this command adds:
For quick debugging, just ask Claude directly. </value_banner>
<critical_override> THIS COMMAND OVERRIDES THE CLAUDE.md TASK ROUTING TABLE FOR AGENT SELECTION.
Routing rules for this command only:
QUICK-PATCH: root cause analysis is INLINE (no agent delegation) DO NOT use code-search:analyze (READ-ONLY agent, not for fixing) </critical_override>
<scope_selection> MANDATORY: Determine debugging scope before starting.
Auto-inference rules (skip the question when any of these match):
If auto-inference cannot determine scope, use AskUserQuestion with these options:
Decision:
/dev:fix {bug description} for the full TDD + review workflow." then STOP
</scope_selection><quick_patch_workflow> Execute this workflow inline when scope = Quick patch.
Phase 0: Initialize
Phase 1: REPRODUCE
Phase 2: LOCALIZE (Strategy A — stack trace first)
Escalation check #1: if candidates span > 3 files → offer upgrade to Standard debug
Phase 3: PLAN (inline root cause — no agent delegation)
Escalation check #2: if COMPETING_HYPOTHESES: YES → offer upgrade to Standard debug Escalation check #5: if REGRESSION_RISK: HIGH → offer upgrade to Standard debug
Interactive gate: if --interactive flag → AskUserQuestion to confirm plan before proceeding
Phase 4: PATCH
Default path (no --tdd flag):
TDD path (--tdd flag):
Launch dev:developer to write RED test for the bug
Verify test is RED (fails before fix)
Launch dev:developer to apply patch
Verify test is GREEN
Capture patch summary
Optional review gate (if --review flag):
Escalation check #3: if patch touches > 3 files → offer upgrade to Standard debug
Phase 5: VALIDATE
Escalation check #4: if no test suite found → offer upgrade to Standard debug
<escalation_behavior> When any escalation check triggers:
Use AskUserQuestion with:
If user chooses upgrade:
If user declines upgrade:
<completion_messages> Quick-patch completion (output when Phase 5 succeeds):
Issue: {BUG_DESCRIPTION} Root Cause: {one sentence} Fix Applied: {what changed, file:line} Files Modified: {list} Validation: Test suite PASS, Quality checks PASS, Patch review {APPROVE|SKIPPED} Commit: {hash} Session: {SESSION_PATH}
Standard debug completion: handled by dev:systematic-debugging → workflow.md (not here).
Production-grade: not applicable — routed to /dev:fix. </completion_messages>
- "TypeError: Cannot read property 'id' of undefined at UserCard.tsx:42" → stack trace + single file → **auto Quick patch** - "auth token validation failing across multiple services, intermittent" → keyword "intermittent" → **auto Standard debug** - "production panic in handlers/users.go:142 — critical" → keywords "production" + "critical" → **routes to /dev:fix** - `/dev:debug --downgrade "weird test failure"` → --downgrade flag → **Standard debug directly** - `/dev:debug --tdd "cart total calculates wrong when discount applied"` → no stack trace but simple cause → **Quick patch with TDD path**Technique catalogue. Read
${CLAUDE_PLUGIN_ROOT}/skills/discipline/systematic-debugging/references/techniques.md
in the Localize phase.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub madappgang/magus --plugin dev17 commands in this plugin
/architectArchitecture design and technical planning — complexity-aware with plan mode reasoning and multi-model escalation/auditStructured quality audit — routes to specialist reviewers for code, UI, docs, security, or plugin quality/design-systemValidate a project against the design-system guardrails — token-only styling, one component library, variants over call-site restyling. Reports drift by rule, and can fix it or scaffold the guardrails./devBuilds a feature through an 8-phase workflow, delegating each phase to a specialist agent. Depth picks how many phases run, automation how often it stops to ask./docDocumentation command - generate, analyze, fix, or validate docs. Use for README, API docs, tutorials, changelogs./fixFixes a bug test-first — reproduce, localize, plan, patch, validate. Two multimodel gates, one on the root-cause hypothesis before any code and one on the finished patch.Other plugins' commands for the same job