systematic-debugging
Skill2 starsChanged 5 days agoMITView on GitHub
Use when investigating runtime bugs, failing tests, unexpected behaviors, or system crashes before modifying implementation code.
191 other projects use a version of this.
Adopted by
Most recently taken up by
- DemonDamon/AgenticXtheir own version, first seen Nov 9, 2026
- chrysogonus/power-agentstheir own version, first seen Nov 8, 2026
- willy92wins/DayZ-Modding-Knowledge-Packtheir own version, first seen Nov 8, 2026
- roundpilot/superpowers-antigravitytheir own version, first seen Nov 8, 2026
- REPOZY/superpowers-optimizedtheir own version, first seen Nov 8, 2026
- lingyired/status-triotheir own version, first seen Nov 8, 2026
Used with
Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Leodorareluctant259Skillchinese-code-review
中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈
Also in 8 projects that use this
Leodorareluctant259Skillchinese-commit-conventions
中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化
Also in 8 projects that use this
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 20 projects that use this
mjunaidcaSkillbuilding-chatgpt-apps
Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).
Also in 4 projects that use this
mjunaidcaSkillbuilding-chat-interfaces
Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.
Also in 4 projects that use this
- +2 more from Leodorareluctant259
- +5 more from mjunaidca
Other versions191 projects use a version of this.
Word for word · 1
- Echo-Scion/portable-brainvibing★ 2100% same
Edited · 0
None found.
Wrote their own version · 190
- obra/superpowers★ 314ksame name
- NousResearch/hermes-agent★ 262ksame name
- open-metadata/OpenMetadata★ 16ksame name
- jnMetaCode/superpowers-zh★ 8.4ksame name
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- openai/plugins★ 7.8ksame name
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- farm-fe/farm★ 5.6ksame name
- microsoft/FluidFramework★ 4.9ksame name
180 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-engineerSkill
- api-contractSkill
- app-lifecycleSkill
- brain-graphSkill
- code-reviewSkill
- cost-optimizerSkill
- data-logicSkill
- feature-discoverySkill
- frontend-experienceSkill
- integrity-sentinelSkill
- meta-agent-adminSkill
- paletteSkill
- project-architectSkill
- project-operatorSkill
- saas-strategistSkill
- self-evolveSkill
- session-offloadSkill
- strict-tddSkill
- ui-finishSkill
- worker-delegateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 11 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use python .agents/scripts/orion.py sandbox or SovereignSandbox.execute_snippet() for isolated reproduction snippets before modifying …
- Distinctive: line 21
Zero Production Mutation: NEVER modify production source code or persistent database tables just to probe or reproduce a bug.
- Distinctive: line 25
When issues span boundaries (API -> Service -> DB, CLI -> Subprocess), add temporary diagnostic logs at each boundary (input data, output …
- Distinctive: line 30
Dependency & Environment Verification: Check active configuration, environment variables, and state assumptions.
- Distinctive: line 34
Write a single-sentence hypothesis: *"Condition X causes invariant Y to fail because of state Z."*
- Distinctive: line 36
Test the hypothesis by changing ONE variable at a time.
- Distinctive: line 39
If reproduction test passes, advance to Phase 4.
- Distinctive: line 40
If test still fails, discard hypothesis immediately.
- Distinctive: line 42
If 2 consecutive hypotheses fail, document root-cause analysis before attempting Hypothesis 3.
- Very specific: line 47
Verify reproduction test exits with Exit Code 0.
- Very specific: line 48
Run the full project test suite to prove zero regression (Exit Code 0).
- Distinctive: line 50
If 3 consecutive fix attempts fail, STOP calling tools immediately.
- Very specific: line 56
Write reproduce_bug.<ext> or <feature>_test.<ext> (e.g.
- Distinctive: line 58
If script succeeds (no bug found), STOP fix.
- Distinctive: line 59
If script fails (bug proven), proceed with implementation.
- Very specific: line 64
Test Pollution Bisector: Run python .agents/scripts/orion.py polluter <leak_target> <test_pattern> to isolate tests that leak state or …
“Common” is measured: kept by at least 6 in 10 of the 177 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🌲 Systematic Debugging Protocol (Scientific Root-Cause Discipline)
Use python .agents/scripts/orion.py sandbox or SovereignSandbox.execute_snippet() for isolated reproduction snippets before modifying production code.
The Iron Law: NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
If you have not deterministically proven the root cause, you are FORBIDDEN from modifying implementation code.
Execute these four phases sequentially for ANY bug, test failure, crash, or unexpected behavior:
Phase 1: Root Cause Investigation
- Read Error Messages & Stack Traces Completely:
- Note exact file paths, line numbers, and error codes. Do NOT skim or jump to assumptions.
- Deterministic Minimal Reproduction (Scratchpad Isolation Gate):
- Formulate exact reproduction steps. Create a standalone reproduction test case in a temporary scratch script (e.g.,
scratch/repro_<issue>.<ext>) or ephemeral test that exits withExit Code > 0. - Zero Production Mutation: NEVER modify production source code or persistent database tables just to probe or reproduce a bug. Reproduction must remain completely isolated in the scratchpad harness.
- Formulate exact reproduction steps. Create a standalone reproduction test case in a temporary scratch script (e.g.,
- Trace Data Flow Backward:
- Trace backwards from the symptom or bad value to the exact origin in the call stack. Fix at the source, never at the symptom.
- Multi-Component Diagnostic Logging:
- When issues span boundaries (API -> Service -> DB, CLI -> Subprocess), add temporary diagnostic logs at each boundary (input data, output data, state). Pinpoint precisely which layer breaks before touching logic.
Phase 2: Pattern Analysis
- Find Working Examples: Locate similar working implementations in the same codebase.
- Differential Analysis: Compare the working code against the broken code line-by-line. List every difference without assuming "that can't matter."
- Dependency & Environment Verification: Check active configuration, environment variables, and state assumptions.
Phase 3: Single Hypothesis & Minimal Testing
- Formulate Explicit Hypothesis:
- Write a single-sentence hypothesis: "Condition X causes invariant Y to fail because of state Z."
- Minimal Single-Variable Modification:
- Test the hypothesis by changing ONE variable at a time.
- Strictly forbid bundled refactoring, formatting cleanup, or "while I'm here" modifications during debugging.
- Evaluate Outcome & Mandatory Rollback:
- If reproduction test passes, advance to Phase 4.
- If test still fails, discard hypothesis immediately.
- Mandatory Rollback Gate: You MUST execute
git stash push --include-untracked -m "debug-hypothesis-rollback" -- <target_file>to revert modifications non-destructively before testing the next hypothesis. Speculative changes MUST NEVER accumulate across hypotheses (Anti-Shotgun Rule). - If 2 consecutive hypotheses fail, document root-cause analysis before attempting Hypothesis 3.
Phase 4: Implementation, Survivor Verification & Circuit Breaker
- Targeted Root Cause Fix: Apply the surgical fix directly addressing the proven root cause.
- Survivor Verification:
- Verify reproduction test exits with
Exit Code 0. - Run the full project test suite to prove zero regression (
Exit Code 0).
- Verify reproduction test exits with
- The 3-Attempt Circuit Breaker:
- If 3 consecutive fix attempts fail, STOP calling tools immediately.
- Repeated failure indicates an architectural flaw or wrong pattern, NOT a missing tweak.
- Acknowledge the pattern failure, output error analysis, and consult user before attempting further fixes.
🔒 Causal Enforcement (The "No-Fix" Policy)
- Protocol:
- Write
reproduce_bug.<ext>or<feature>_test.<ext>(e.g..py,.ts,.go,.dart). - Run the script.
- If script succeeds (no bug found), STOP fix.
- If script fails (bug proven), proceed with implementation.
- Write
📚 Specialized References & Tooling
- Condition-Based Waiting: references/condition-based-waiting.md (Eliminate flaky sleeps in async tests).
- 4-Layer Defense-in-Depth: references/defense-in-depth.md (Entry, Domain, Sandbox, and Telemetry layers).
- Test Pollution Bisector: Run
python .agents/scripts/orion.py polluter <leak_target> <test_pattern>to isolate tests that leak state or files.
💡 Continuous Learnings
<!-- LEARNED_START -->- Recurring Mechanical Catch in scanner.py:ast_symbol_cache_read: Enforce boundary invariant guard on scanner.py:ast_symbol_cache_read
- Recurring Mechanical Catch in generate_completion:openai:qwen2.5-coder:3b-lite: Enforce boundary invariant guard on generate_completion:openai:qwen2.5-coder:3b-lite
- Recurring Mechanical Catch in orion:record_tool_quantum: Enforce boundary invariant guard on orion:record_tool_quantum
- Recurring Mechanical Catch in capabilities:record_tool_call: Enforce boundary invariant guard on capabilities:record_tool_call
- Recurring Mechanical Catch in packer.py:_call_local_llm_for_taxonomy: Enforce boundary invariant guard on packer.py:_call_local_llm_for_taxonomy
- Recurring Mechanical Catch in pre_wake:record_turn: Enforce boundary invariant guard on pre_wake:record_turn
- Recurring Mechanical Catch in multi_layer_memory_pre_wake: Enforce boundary invariant guard on multi_layer_memory_pre_wake
- Recurring Mechanical Catch in brain.py:gc_ep_file:session_20261019_160740.md: Enforce boundary invariant guard on brain.py:gc_ep_file:session_20261019_160740.md
- Recurring Mechanical Catch in brain.py:gc_obs_rollover: Enforce boundary invariant guard on brain.py:gc_obs_rollover
- Recurring Mechanical Catch in rag:filter_overlapping_context: Enforce boundary invariant guard on rag:filter_overlapping_context
- Recurring Mechanical Catch in probe_local_ollama_for_vision: Enforce boundary invariant guard on probe_local_ollama_for_vision
- Recurring Mechanical Catch in brain.py:classify_file:dna: Enforce boundary invariant guard on brain.py:classify_file:dna
- Recurring Mechanical Catch in auto_sync_compile: Enforce boundary invariant guard on auto_sync_compile
- Graduated Observation: Verify gate failure: GHOST - Invalid orion CLI subcommand: 'debug': Enforce deterministic verifier for Verify gate failure: GHOST - Invalid orion CLI sub
<!-- LEARNED_END -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

