diagnose

Solid

Structured 6-phase debugging. Build feedback loop first, reproduce deterministically, hypothesize with ranked falsifiable theories, instrument one variable at a time, fix with regression test, cleanup. Use when a bug exists, tests fail unexpectedly, or behavior is wrong and cause is unknown.

AI & Automation 22 stars 5 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
45
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# /supergraph:diagnose Systematic debugging. Never guess and patch β€” build a feedback loop, prove the hypothesis, fix once. Announce: "πŸ› /supergraph:diagnose β€” building feedback loop..." ## Setup **Read `.supergraph-env` for test/lint commands (if exists):** ```bash [ -f .supergraph-env ] && source .supergraph-env ``` This sets `$TEST_CMD`, `$FOCUSED_TEST_CMD`, `$LINT_CMD`. If absent, detect from project config (package.json β†’ jest/vitest, pubspec.yaml β†’ flutter test, etc.) same as `/supergraph:scan`. ## Phases ### Phase 1 β€” Build Feedback Loop Before touching any code, establish a fast, deterministic way to observe the bug. ```bash # Identify the smallest command that shows the failure $TEST_CMD --grep "<failing test name>" # focused test run # or <minimal repro command> ``` **Goal:** failure visible in < 5 seconds. If not, slim down the repro. Do NOT skip this phase. Debugging without a feedback loop is guessing. ### Phase 2 β€” Reproduce Cleanly - Run the feedback loop 3 times β€” confirm it fails consistently - Capture exact error output, stack trace, exit code - Note any flakiness β†’ treat as separate bug before continuing - Add a failing regression test if one doesn't exist: ``` test("<bug description>", () => { ... }) // RED ``` ### Phase 3 β€” Hypothesize (3-5 ranked theories) List falsifiable hypotheses, ordered most-to-least likely: ``` 1. [Most likely] β€” [reason] β€” [how to falsify] 2. [Second] β€” [reason] β€” [how to falsify] 3. [Third] β€” [r...

Details

Author
datit309
Repository
datit309/supergraph
Created
4 months ago
Last Updated
6 days ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content β€” not just same category