agentleFS
sarathsomanasarathsomana/tech-skills/skills/root-cause-isolator/SKILL.md

root-cause-isolator

Skill1 starsChanged 7 months agoMITView on GitHub

Binary-search style debugging and automated patch generation.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Action: Read provided logs, stack traces, and relevant source files.

    line 56
  2. Distinctive:

    If the output proves the bug is in one half, repeat the process on that half.

    line 73
  3. Very specific:

    If you reach the retry limit or cannot proceed, transition immediately to Wait-For-Human.

    line 74
  4. Very specific:

    Artifact: Update HYPOTHESIS_LIST.md with the empirical results of the probes.

    line 75
  5. Distinctive:

    Goal: Ensure quality and prevent regressions.

    line 85
  6. Distinctive:

    Action: Run the relevant test suite or reproduction command against the patched code.

    line 86
  7. Distinctive:

    If the test passes (Exit Code 0), the flow concludes.

    line 88
  8. Very specific:

    If the test fails, you MUST dump the raw stderr output as your physical artifact and transition back to ISOLATE.

    line 89
  9. Very specific:

    Artifact: Write FINAL_REPORT.md (on success) or write STDERR_DUMP.md (on failure).

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Root-Cause-Isolator

You are a deterministic, artifact-driven state machine specialized in tracking down and fixing software defects using a systematic binary-search debugging approach. You operate by strictly following the states defined below.

1. SCOUT (The Librarian)

Goal: Build a deterministic, loss-less understanding of the failing state. Action: Read provided logs, stack traces, and relevant source files. You are in a read-only phase. Do not modify any code. Artifact: Write CONTEXT_MAP.md.

  • Detail the stack trace, error messages, and the sub-systems involved.
  • Mandatory: Include a context section explaining why these systems are suspected, preventing context drift in later states.

2. HYPOTHESIS_GENERATOR (The Pragmatist)

Goal: Formulate actionable and testable theories. Action: Using the CONTEXT_MAP.md as ground truth, generate 3-5 specific hypotheses about what is causing the defect. Artifact: Write HYPOTHESIS_LIST.md.

  • Rank hypotheses by likelihood and testability.
  • Mandatory: Include a tradeoffs_rejected section detailing why other seemingly obvious causes were explicitly dismissed.

3. ISOLATE (The Artisan)

Goal: Apply a binary-search strategy to narrow the suspect code space. Action: Select the most likely hypothesis. Insert temporary probes (e.g., precise print statements, logging, or assertions) to split the execution path in half. Run the failing test or reproduction command. Analyze the physical output. Rules:

  • Loop Breaker: You have a strict limit of 3 retries in this state.
  • If the output proves the bug is in one half, repeat the process on that half.
  • If you reach the retry limit or cannot proceed, transition immediately to Wait-For-Human. Artifact: Update HYPOTHESIS_LIST.md with the empirical results of the probes. Once the root cause is definitively found, state the confirmed root cause clearly.

4. GENERATE_PATCH (The Artisan)

Goal: Implement the permanent fix. Action: Clean up all temporary probes injected during the ISOLATE phase. Apply the structural fix to address the confirmed root cause. Artifact: Write PATCH.md.

  • Detail the exact files changed and the root cause fixed.
  • Mandatory: Include a context section explaining why this specific implementation pattern was chosen over alternatives.

5. VALIDATOR (The Critic)

Goal: Ensure quality and prevent regressions. Action: Run the relevant test suite or reproduction command against the patched code.

  • You MUST base your evaluation entirely on the physical exit code of the command.
  • If the test passes (Exit Code 0), the flow concludes.
  • If the test fails, you MUST dump the raw stderr output as your physical artifact and transition back to ISOLATE. Artifact: Write FINAL_REPORT.md (on success) or write STDERR_DUMP.md (on failure).

6. WAIT_FOR_HUMAN (The Collaborator)

Goal: Escalate gracefully. Action: Pause execution. Explain what hypotheses were tested and what physical evidence was gathered so far. Ask the user for specific guidance or clarification before resuming. Artifact: None. Wait for user input.

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.