deep-debugging
Trigger: deep debug, root cause, hypothesis, multi-file bug, ambiguous failure. Hypothesis-driven debugging.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- deep-debugging
- triggers
- deep debug, root cause, hypothesis, multi-file bug, ambiguous failure, debug, RCA
- changelog
- docs/ciclos/cycle28-20260815.md
- description
- Trigger: deep debug, root cause, hypothesis, multi-file bug, ambiguous failure. Hypothesis-driven debugging.
- token_budget
- 2523
03 SKILL.md 正文
When to Use
Multi-file bugs, ambiguous failures. NOT for 1-file edits (→ quick-executor), architecture decisions (→ sdd), or refactors (→ refactoring-planner).
METHODOLOGY: Hypothesis-Driven Debugging
Output each step name as completed:
- OBSERVE: Quote exact error/symptom. If no error, describe behavioral difference.
- HYPOTHESIZE: 2-3 root causes. Rank by: (1) direct evidence, (2) structural proximity, (3) frequency.
- TEST: One cycle = one hypothesis. Methods (escalate): grep/read (static) → add print/logging → run test harness → use debugger/profiler → minimal repro. After 2 grep cycles with no answer → escalate to runtime tools.
- DIAGNOSE: Pick strongest evidence. Cite file:line.
- PLAN: Before/after for each affected file. Check cascading impacts. If fix requires structural changes → note it, continue fix first, refactor after.
- EXECUTE: One logical change per edit.
- VERIFY: Tests first → typecheck/lint → syntax parse → escalate. Read order + OUTPUT template → reference.
Rules
- Max 5 hypotheses before narrowing. Max 3 cycles total.
- Unclear after 3 cycles → STOP, ask human.
- Never refactor during bug fix.
- Verify with evidence, not assumptions.
Anti-Rationalization
| Rationalization | Red Flag | Verification |
|---|---|---|
| "Skill without verification" | Doing work without checking output format | Output matches skill ## Output contract + file:line citaton |
| "Save time skipping this skill" | Using skill directly without resolving deps | skill-graph resolution + cross-ref check |
| "Output is self-evident" | No file:line or confidence marker | Cite file:line or flag confidence: unvalidated |
Red Flags
- Doing work without checking output format → STOP, re-read skill
- Second occurrence of same rationalization → force RED zone
Verification
- Output matches skill ## Output contract + file:line citaton
- cross-ref-check.ps1 → SKILL.md OK
Refs
refactoring-planner · code-review-agent
Anti-Patterns
Skip OBSERVE step · Refactor during fix · >3 cycles without diagnosis · Assume without grep evidence · Skip tool escalation Chase symptoms not root cause · Add logging without hypothesis · Rewrite instead of bisect · Ignore shared state
Reference
Read order + OUTPUT template → docs/skills/deep-debugging/reference.md
04 同仓库更多 Skills
web-quality-audit
Comprehensive web audit: performance, a11y, SEO, responsive, animation, design tokens.
ui-engine
UI system — Grid/Flexbox/@layer/:has(), container queries, compositor-only animation, OKLCH tokens, component patterns
baseline-ui
Anti-slop UI — layout, typography, responsive, animation, tokens. Use for cleanup or polish.
skill-creator
Create new AI agent skills following Agent Skills spec -- auto-bootstrap unknown tasks, define structure, register in AGENTS.md
senior-engineer
Apply senior engineering competencies — system design, trade-off analysis, delegation, mentoring, and tech debt strategy
prompt-engineering
Design effective prompts using SPEARS framework — scope, principles, examples, assertions, refinements, with ReAct and multi-agent patterns