بنقرة واحدة
debug
Systematically diagnose and resolve bugs through conversational investigation and root cause analysis
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Systematically diagnose and resolve bugs through conversational investigation and root cause analysis
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | debug |
| description | Systematically diagnose and resolve bugs through conversational investigation and root cause analysis |
| user-invocable | true |
| argument-hint | describe the bug, error message, or unexpected behavior |
Act as an expert debugging partner through natural conversation. Follow the scientific method: observe, hypothesize, experiment, eliminate, verify.
Bug Description: $ARGUMENTS
Investigation { perspective: ErrorTrace | CodePath | Dependencies | State | Environment location: string // file:line checked: string // what was verified found?: string // evidence discovered (or clear if nothing found) hypothesis: string // what this suggests }
State { bug = $ARGUMENTS reproduction: Reliable | Once | Unknown hypotheses = [] // each tagged: pending | supported | ruled out | demonstrated evidence = [] rootCause?: string // only set when [demonstrated] mode: Standard | Agent Team }
Always:
[hypothesis], [evidence: X], [ruled out: X because Y], [demonstrated]. The prefix tells the reader (and you) the grade of the claim. See reference/hypothesis-hygiene.md.Never:
unresolved — deferred for reason. Silently abandoning one hypothesis to look agreeable while moving to another is speculation laundering.[demonstrated] — toggling the suspected condition makes the bug appear or disappear on demand. Anything else is speculation in formal dress.Before forming any hypothesis: can you trigger the bug on demand?
Yes — note the trigger (inputs, environment, sequence of operations). Proceed to Understand.
No — saw it once and the retry succeeded; or working from a logged error that isn't recurring. STOP. Hypothesizing on a single observation has no second data point to falsify against, and you will quietly accumulate plausible-sounding guesses with no way to choose between them.
Either:
Acceptable Phase 0 exits:
Don't proceed past Phase 0 without one of these. Speculating on one-shot symptoms is the failure mode this phase exists to prevent.
Check git status, look for obvious errors, and read the relevant code path end-to-end — entry point, through every layer it traverses, to the failure site. Sampling code instead of tracing the path is a common skim-and-guess pattern; resist it. Most bugs labelled "mysterious" are visible in code that wasn't read.
Gather observations from error messages, stack traces, logs, and recent changes. Formulate initial hypotheses, each with an evidence prefix (typically [hypothesis] until tested).
Present brief summary per reference/output-format.md.
AskUserQuestion: Standard (default for simple bugs) — conversational step-by-step debugging Agent Team — adversarial investigation with competing hypotheses
Agent Team is REQUIRED, not advisory, when ANY of:
Standard mode is appropriate when a stack trace points at a clear file:line and one read of that file plausibly reveals the cause.
match (mode) { Standard => { present theories conversationally, let user guide direction track every hypothesis in TodoWrite using the ledger from reference/hypothesis-hygiene.md descend reference/investigation-ladder.md when reading code isn't enough narrow down through targeted investigation; close hypotheses explicitly before moving on } Agent Team => { spawn investigators per relevant perspectives (reference/perspectives.md) adversarial protocol: investigators challenge each other's hypotheses every claim carries the same vocabulary prefix strongest surviving hypothesis = candidate to be promoted to [demonstrated] } }
Process evidence:
[demonstrated] — you can switch the bug on and off by toggling a condition. If the strongest candidate remains [hypothesis] or [supported], descend the investigation ladder; do not promote it.Propose minimal fix targeting root cause. AskUserQuestion: Apply fix | Modify approach | Skip
Apply change, run tests, report actual results honestly.
AskUserQuestion: Add test case for this bug | Check for pattern elsewhere | Done
Lightweight implementation orchestrator for low-complexity work — fixes, refactors, doc changes, or single-AC features that do not warrant a phase plan or factory decomposition.
Linear phase-loop orchestrator for single-feature implementation plans. Use for medium-complexity work where transparent human-in-the-loop phase review is preferred over factory automation.
Implementation entry point. Use to execute a completed specification. Auto-detects the decomposition tier (Direct, Incremental, or Factory) from spec artifacts and dispatches to the matching execution sub-skill.
Decompose a single-feature specification into a linear, phase-by-phase implementation plan. Use this for medium-complexity work — single feature, one or two components — where transparent human-in-the-loop phase review is preferred over factory automation.
Scaffold, status-check, and manage specification directories. Use when creating a new spec, reading spec status, transitioning between phases, or logging decisions on a spec in .start/specs/.
Create a comprehensive specification from a brief description. Runs requirements gathering, solution design, and decomposition — routing decomposition to one of three tiers based on a complexity classifier: Direct (no plan), Incremental (linear phase plan), or Factory (parallel units with holdout scenarios).