From kata
Systematically debugs issues: gathers symptoms, spawns isolated subagents for root cause analysis, maintains persistent sessions across context resets. Auto-activates on debug/troubleshoot triggers.
npx claudepluginhub gannonh/kata-orchestratorThis skill uses the workspace's default tool permissions.
<objective>
Orchestrates persistent debugging sessions with subagents for systematic bug investigation, symptom gathering, checkpoints, and root cause tracking across context resets.
Orchestrates persistent, hypothesis-driven debugging sessions across conversations, delegating analysis to subagents and tracking in debug files.
Orchestrates systematic debugging of code issues using subagent isolation, scientific method, and persistent sessions across context resets. Supports list/status/continue subcommands and --diagnose flag.
Share bugs, ideas, or general feedback.
Orchestrator role: Gather symptoms, spawn kata-debugger agent, handle checkpoints, spawn continuations.
Why subagent: Investigation burns context fast (reading files, forming hypotheses, testing). Fresh 200k context per investigation. Main context stays lean for user interaction.
User's issue: $ARGUMENTSCheck for active sessions:
find .planning/debug -maxdepth 1 -name "*.md" 2>/dev/null | grep -v resolved | head -5
Read model profile for agent spawning:
MODEL_PROFILE=$(node scripts/kata-lib.cjs read-config "model_profile" "balanced")
Default to "balanced" if not set.
Model lookup table:
| Agent | quality | balanced | budget |
|---|---|---|---|
| kata-debugger | opus | sonnet | sonnet |
Store resolved model for use in Task calls below.
If active sessions exist AND no $ARGUMENTS:
If $ARGUMENTS provided OR user describes new issue:
Use AskUserQuestion for each:
After all gathered, confirm ready to investigate.
Before spawning agents, read agent instructions using the Read tool:
references/debugger-instructions.md (relative to skill base directory) — store as debugger_instructions_contentFill prompt and spawn:
<objective>
Investigate issue: {slug}
**Summary:** {trigger}
</objective>
<symptoms>
expected: {expected}
actual: {actual}
errors: {errors}
reproduction: {reproduction}
timeline: {timeline}
</symptoms>
<mode>
symptoms_prefilled: true
goal: find_and_fix
</mode>
<debug_file>
Create: .planning/debug/{slug}.md
</debug_file>
Task(
prompt="<agent-instructions>\n{debugger_instructions_content}\n</agent-instructions>\n\n" + filled_prompt,
subagent_type="general-purpose",
model="{debugger_model}",
description="Debug {slug}"
)
If ## ROOT CAUSE FOUND:
If ## CHECKPOINT REACHED:
If ## INVESTIGATION INCONCLUSIVE:
When user responds to checkpoint, spawn fresh agent:
<objective>
Continue debugging {slug}. Evidence is in the debug file.
</objective>
<prior_state>
Debug file: @.planning/debug/{slug}.md
</prior_state>
<checkpoint_response>
**Type:** {checkpoint_type}
**Response:** {user_response}
</checkpoint_response>
<mode>
goal: find_and_fix
</mode>
Task(
prompt="<agent-instructions>\n{debugger_instructions_content}\n</agent-instructions>\n\n" + continuation_prompt,
subagent_type="general-purpose",
model="{debugger_model}",
description="Continue debug {slug}"
)
<success_criteria>