agentleFS
gustavo-meilusgustavo-meilus/superpipelines/skills/systematic-debugging/SKILL.md

systematic-debugging

Skill4 starsChanged 6 months agoMITView on GitHub

Enforces root-cause investigation before any fix is proposed or implemented. Use when encountering a bug, test failure, or unexpected behavior, before proposing or implementing a fix.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, building-chatgpt-apps 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.
  • obraSkill

    diagnosing-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 6 projects that use this

  • mjunaidcaSkill

    building-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

  • mjunaidcaSkill

    building-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

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 4 projects that use this

  • +8 more from mjunaidca

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 173 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All differences are identified, however minor.

    line 33
  2. Distinctive:

    No Fix Bundling: Only the root cause is addressed.

    line 47
  3. Distinctive:

    The 3-Fix Limit: If three separate fix attempts have failed, STOP.

    line 48

“Common” is measured: kept by at least 6 in 10 of the 173 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Systematic Debugging — Root Cause Protocol

Establishes a rigorous methodology for identifying, isolating, and resolving technical issues before any fix is proposed.

<overview> Systematic Debugging is based on the Iron Law: **NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST**. It replaces guess-and-check thrashing with a scientific method—Read, Reproduce, Hypothesize, and Test—ensuring that fixes address the underlying problem rather than masking symptoms. </overview><glossary> <term name="Root Cause">The original source of a failure; fixing it prevents the symptom from recurring.</term> <term name="Symptom Fix">A patch that hides a failure without addressing the cause; leads to technical debt and regression.</term> <term name="Iron Law">The non-negotiable rule prohibiting any fix proposal until Phase 1 is complete.</term> </glossary>

The Debugging Protocol

<protocol> ### PHASE 1: ROOT CAUSE INVESTIGATION - **Read**: Complete error messages, stack traces, and logs are read in full — no skimming. - **Reproduce**: A consistent, reliable trigger for the failure is established before proceeding. - **Gather Evidence**: Component boundaries are instrumented to log data ingress/egress. Example: adding `console.log` at each function boundary to observe where a value becomes `undefined`. - **Trace**: Data flow is mapped backward from the failure point to the origin of the bad state. - <HARD-GATE>Phase 1 is complete only when the agent can explain exactly WHAT failed and WHY.</HARD-GATE>

PHASE 2: PATTERN ANALYSIS

  • Working examples of similar logic in the codebase are located and examined.
  • The broken implementation is compared against reference standards or successful instances.
  • All differences are identified, however minor; no detail is assumed to be irrelevant.

PHASE 3: HYPOTHESIS & MINIMAL TESTING

  • A single, specific hypothesis is formed: "X is the root cause because Y."
  • The smallest possible change is made to test the hypothesis. Example: a one-line guard clause rather than a multi-function refactor.
  • The result is verified before adding more logic. If it fails, the change is reverted and a new hypothesis is formed.

PHASE 4: IMPLEMENTATION & VERIFICATION

  • A minimal failing test case is created (using the test-driven-development skill).
  • A single fix addressing the root cause is implemented.
  • The fix is verified against the test case and checked for regressions.</protocol>
<invariants> - **No Fix Bundling**: Only the root cause is addressed; "while I'm here" refactors are deferred. - **The 3-Fix Limit**: If three separate fix attempts have failed, **STOP**. This indicates an architectural flaw, not a simple bug. The fundamental pattern is questioned with the human partner before continuing. - **Data Flow Truth**: Fixes are based on observed data state at component boundaries, not on intuition. </invariants>

Red Flags — STOP

  • "Quick fix for now, investigate later." → STOP. Symptom fixes are failure.
  • "Just try changing X and see if it works." → STOP. This is guessing, not debugging.
  • "I'll skip the test; I manually verified it." → STOP. Untested fixes are guaranteed regressions.
  • "Each fix reveals a new problem in a different place." → STOP. This is a signal of an architectural failure (The 3-Fix Limit).

Rationalization Table

<rationalization_table>

ExcuseReality
"The issue is too simple for process."Simple issues have root causes. Process is faster than guessing even for minor bugs.
"Emergency, no time for investigation."Systematic debugging is 5x faster than guess-and-check thrashing during crises.
"I see the problem, let me fix it."Seeing a symptom is not the same as understanding the trigger.
"Multiple fixes at once save time."Bundled fixes make it impossible to isolate the true resolution.
</rationalization_table>

Reference Files

  • test-driven-development/SKILL.md — Creating failing tests.
  • verification-before-completion/SKILL.md — Final verification protocol.
  • sk-pipeline-state/SKILL.md — Debugging state corruption.
  • root-cause-tracing.md — Backward tracing techniques.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.