systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior. Enforces root-cause investigation before fixes. The Iron Law — no fixes without understanding why.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- systematic-debugging
- description
- Use when encountering any bug, test failure, or unexpected behavior. Enforces root-cause investigation before fixes. The Iron Law — no fixes without understanding why.
03 SKILL.md 正文
Systematic Debugging
The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
Quick patches mask underlying issues. Systematic debugging is FASTER than thrashing.
The Four Phases (Must Complete in Order)
Phase 1: Root Cause Investigation (MANDATORY)
- Read Error Messages Carefully — full stack traces, exact line numbers
- Reproduce Consistently — if not reproducible, gather more data before proceeding
- Check Recent Changes — git diff, recent commits, new dependencies
- Gather Evidence (Multi-Component Systems)
For EACH component boundary: - Log what data enters the component - Log what data exits the component - Verify environment/config propagation Run once to gather evidence showing WHERE it breaks - Trace Data Flow — where does the bad value originate? trace backward
Phase 2: Pattern Analysis
- Find working examples of similar code in the same codebase
- Read reference implementations completely — don't skim
- List every difference between working and broken
- Understand all dependencies and assumptions
Phase 3: Hypothesis and Testing
- Form one specific hypothesis: "I think X is the root cause because Y"
- Make the smallest possible change to test it
- One variable at a time — never multiple changes simultaneously
- Verify: works → Phase 4; doesn't work → form NEW hypothesis
Phase 4: Implementation
- Write a failing test case that reproduces the bug (before fixing)
- Implement the single fix addressing the root cause
- Verify: test passes, no other tests broken, issue resolved
- If 3+ fixes failed → STOP. Question the architecture.
When 3+ Fixes Fail
This is an architectural problem, not a surface bug:
- Each fix reveals new coupling/shared state elsewhere
- Fixes require "massive refactoring" to implement
- Stop and discuss with the human before attempting more fixes
Red Flags — Return to Phase 1
- "Quick fix for now, investigate later"
- "Just try changing X and see if it works"
- "I don't fully understand but this might work"
- "One more fix attempt" (after already trying 2+)
- Proposing solutions before tracing data flow
Real-World Impact
- Systematic: 15-30 minutes to fix, 95% first-time fix rate
- Random fixes: 2-3 hours of thrashing, 40% first-time fix rate
04 同仓库更多 Skills
worktable-review-with-annotations
Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.
worktable-find-and-synthesize-context
Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.
worktable-create-or-update-docs
Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.
worktable-create-or-manage-records
Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.
worktable-create-or-manage-interactive-html
Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.
worktable-collaborate-threads
Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.