一键导入
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user provides a GitHub PR link with a "deep review" trigger inside a locally cloned repo, to perform a thorough multi-dimensional code review grounded in ARCS DAG context, AGENTS.md conventions, and optional codegraph coupling analysis, then post findings as inline GitHub review comments under explicit user gate
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Use when initializing a new ARCS project — bootstrapping a repo into the DAG with metadata, docs, and structural knowledge entries. Covers gather → present summary → init → codegraph ingestion → fan-out analysis across typed sub-agents.
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
Use when implementing any feature or bugfix, before writing implementation code
Use when you have a spec or requirements for a multi-step task, before touching code
| name | systematic-debugging |
| description | Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes |
Any bug, test failure, or unexpected behavior — before proposing fixes.
Follows ARCS CLI Primer:
arcs --commands --jsonfor discovery,--json --leanon all calls.
flowchart TD
classDef decision fill:#f59e0b,color:#fff
classDef stop fill:#ef4444,color:#fff
Bug[Bug observed] --> ARCS[Check ARCS knowledge]
ARCS --> Found{Match found?}
Found -->|Yes| Verify[Verify it applies]
Found -->|No| Observe
Verify -->|Applies| Fix
Verify -->|Doesn't apply| Observe
Observe[Phase 1: Observe] --> Repro{Reproducible?}
Repro -->|No| Instrument[Add logging/tracing]
Instrument --> Observe
Repro -->|Yes| Hypothesize[Phase 2: Hypothesize]
Hypothesize --> Compare[Find working example, list differences]
Compare --> Theory[Form single specific hypothesis]
Theory --> Isolate[Phase 3: Isolate]
Isolate --> Test{Smallest change confirms?}
Test -->|Yes| Fix[Phase 4: Fix]
Test -->|No| FailCount{3+ failures?}
FailCount -->|No| Theory
FailCount -->|Yes| Arch[Question architecture]
Fix --> WriteFail[Write failing test]
WriteFail --> Implement[Single targeted fix]
Implement --> Green{Scoped tests pass?}
Green -->|Yes| Capture[Capture as ARCS knowledge]
Green -->|No| FailCount
class Found,Repro,Test,FailCount,Green decision
class Arch stop
git log, git diff)arcs knowledge search <slug> "<error>" --json for gotcha/lesson/pattern entriesScan order: failure point → errors → warnings → timing anomalies
rg -n "ERROR|FATAL|panic|exception" <logfile> # Error grep
jq 'select(.level == "error")' <json-log> # Structured logs
Output: Timeline of events leading to failure (T-5m, T-3m, T-0).
git bisect start
git bisect bad HEAD
git bisect good <last-known-good>
git bisect run <test-command>
After finding the commit: read the diff, isolate specific lines, feed into Phase 2.
| Symptom | Likely Cause |
|---|---|
instanceof fails across modules | Duplicate package copies |
| Type mismatch on same interface | Different versions loaded |
| "Cannot find module" intermittent | Hoisting conflict |
Works with --legacy-peer-deps | Peer dep unsatisfied |
Diagnose: npm ls <pkg>, npm explain <pkg>, check for multiple copies.
After root cause identified, persist as knowledge:
Include: root cause summary, evidence, affected files, fix approach.
After resolving the issue, persist the learning:
# For a surprising behavior or trap
arcs knowledge create <slug> "Redis connection pool exhaustion under load" \
--kind=gotcha \
--summary="Pool size defaults to 10; under concurrent requests >50, connections time out silently" \
--body="Root cause: default pool size. Fix: set poolSize to max(50, expectedConcurrency). Symptoms: intermittent 503s with no error logs." \
--json
# For a reusable debugging technique or resolution pattern
arcs knowledge create <slug> "Diagnosing silent connection failures" \
--kind=lesson \
--summary="Enable connection-level event logging before load testing" \
--body="Attach listeners to pool 'error' and 'timeout' events. Default Node.js behavior swallows these." \
--json
# For a pattern that should be followed going forward
arcs knowledge create <slug> "Connection pool sizing formula" \
--kind=pattern \
--summary="Pool size = max(50, 2x expected peak concurrency)" \
--body="Applies to Redis, Postgres, and HTTP agent pools. Validated under load test 2026-05-26." \
--json
Kind selection guide:
gotcha — surprising behavior, trap, or non-obvious failure modelesson — learned technique, debugging approach, resolution methodpattern — reusable solution that should be applied going forward