assistant-debugging
Diagnose an unknown failure by reproducing and isolating before fixing. Use for debugging, root causes, flaky tests, or unexplained breakage.
SKILL.mdskills/assistant-debugging/SKILL.md
GitHubEvidence-First Debugging
Goal
Find and fix the real cause of a failure with the smallest durable change and evidence that explains the symptom, cause, fix, and verification.
Success Criteria
- The symptom and expected behavior are explicit.
- Reproduction evidence exists, or an exact blocker explains why it cannot.
- Competing hypotheses are tested and disconfirming evidence is retained.
- Root cause is supported by code, config, or runtime evidence.
- Verification covers the original failure path and every selected and binding check; a regression test is required only when selected by verification policy.
- When a repair can affect another consumer, record compact change-impact applicability evidence. Only shared, materially unresolved, or explicitly carried expanded repairs use the bounded artifact through verification; source fixes do not relabel a symptom-only assessment as completion evidence.
Constraints
- Use local, company-safe diagnostics by default; redact secrets and private data.
- Ask before destructive, production-affecting, network, migration, or sensitive-data diagnostics.
- Do not patch from a guess or claim root cause when evidence supports only mitigation.
- Ask for missing context only when it materially blocks safe reproduction or isolation.
Progressive Contract Loading
Canonical tier files are contracts/input.yaml, contracts/output.yaml,
contracts/phase-gates.yaml, and contracts/handoffs.yaml.
Read contracts/index.yaml first. Canonical contracts remain authoritative, but
load only the boundary currently being enforced:
entryfor symptom, scope, reproduction target, safety, and edit permission;current_phasefor SCOPE, REPRODUCE, HYPOTHESIZE, ISOLATE, FIX, or VERIFY;fix_verificationbefore a code fix, for the canonical verification decision and FIX gate;change_impactwhen a diagnosis, repair, cosmetic, or locality claim affects consumer verification; andselected_handoffonly when investigation or fix delegation is selected; andcompletiononly for the artifact being returned.
If a selector is missing or invalid, load the full named canonical contract. Do not load every contract at entry.
Migration: debugging contracts are v2.0. Before resuming a persisted v1.1 fix,
refresh its verification decision through assistant-verification; never infer
the old check set or RED evidence.
Ownership
assistant-debugging owns diagnosis until the failure mechanism is reproducible or bounded strongly enough for a fix. Generic workflow may coordinate planning, delegation, and review, but specialist gates are authoritative.
Method
- SCOPE — capture symptom, expected behavior, affected path, recent changes, constraints, and severity.
- REPRODUCE — run the smallest safe failing test/command or record the exact blocker with available log/code/config evidence.
- HYPOTHESIZE — keep at least three plausible causes unless evidence justifies fewer. Rank by likelihood, diagnostic cost, and blast radius.
- ISOLATE — run the cheapest high-signal check first. Track supporting and disconfirming evidence until one cause predicts the symptom and fix.
- FIX — resolve the unchanged decision through
assistant-verificationbefore mutation; add or extend a test only when selected. Derivetdd_appliesfrom the selected/applicable ID intersection. When true, route throughassistant-tddand its existingexecution_lane; do not dispatch the generic fixer or edit before authorizing RED. Onlytdd_applies=falsepermits the generic fix path. Label uncertain emergency changes as mitigations. - VERIFY — run every selected and binding check against the fix, including the original failure path. Active TDD is fixed only after the complete current canonical cycle and due checks pass. Preserve exclusions and unresolved gaps; do not substitute an unselected full suite.
When change impact is triggered, load references/change-impact.md. The
common checker is resolved from the active installation, so standalone
debugging does not depend on assistant-workflow being installed.
For an unknown-cause failure, use assistant-debugging before verification
selection. Once the mechanism is understood, resolve the check scope and TDD
choice through assistant-verification. When the current fix's
selected_check_ids intersect
verification_decision.tdd_choice.applicable_check_ids, carry the unchanged
decision, IDs, bindings, reproduction, cause, and scope through
assistant-tdd before mutation; it selects its existing execution_lane.
debugging_fix is only for tdd_applies=false. When inactive, follow selected
checks without fabricating RED. Use assistant-review after non-trivial or
risky fixes.
Output
Return status, symptom, reproduction or blocker, ranked hypotheses, root cause and confidence, fix summary, verification results, and residual risks.
Stop Rules
- Stop before speculative edits when the failure is neither reproduced nor bounded.
- Stop and ask before unsafe diagnostics.
- If every hypothesis is refuted, gather new evidence instead of cycling guesses.
- Use
mitigatedorinconclusivewhen proof is insufficient for root cause.