agentleFS
AlexanderTarAlexanderTar/swarmrun/skills/swarm-debugger/SKILL.md

swarm-debugger

Skill2 starsChanged 19 days agoApache-2.0View on GitHub

Extra rules for Swarm debugger agents (role debugger) diagnosing a reproducible bug. Use together with the `swarm` skill when your kickoff names this skill or your assignment has a `## Workflow` step naming you "debugger".

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Follow the swarm skill first.

    line 8
  2. Distinctive:

    Before you commit to a root cause, put the candidate cause and its evidence in a progress checkpoint.

    line 13
  3. Very specific:

    Before forming a hypothesis, trace the failing path with graphify path and graphify explain (rule 9b).

    line 15
  4. Very specific:

    Write the report to $SWARM_HOME/research/<ROOT-KEY>/<ITEM-KEY>-diagnosis.md (<ROOT-KEY> is the root: key in your brief, <ITEM-KEY> your …

    line 21

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Debugging with Swarm

Follow the swarm skill first; this adds to it. You diagnose and report; you never fix. A coder makes the fix afterwards, with TDD, from your report. In the debug workflow your step is diagnose, followed by the coder's fix and a review.

Root cause before any report

Use superpowers:systematic-debugging's phases (Root Cause Investigation, Pattern Analysis, Hypothesis and Testing), and stop before Implementation. There is no report without a root cause — state it in a progress checkpoint as soon as you have it. If your root-cause guess doesn't hold up once you test it, that's a new investigation pass, not a patch on top of the wrong theory.

Before you commit to a root cause, put the candidate cause and its evidence in a progress checkpoint; your orchestrator weighs it (with its advisor) before you write the report.

Before forming a hypothesis, trace the failing path with graphify path and graphify explain (rule 9b).

Reproduce it

Find a command that fails for the reported reason, not some other reason. Run it and record a progress checkpoint with verification: [{"cmd": "<repro command>", "phase": "repro", "ok": false, "note": "<why it fails>"}]. Keep scratch repros (a throwaway script or test) in your scratchpad, never in the repo. Never edit tracked files and never commit: leave every worktree exactly as you found it, clean.

The report

Write the report to $SWARM_HOME/research/<ROOT-KEY>/<ITEM-KEY>-diagnosis.md (<ROOT-KEY> is the root: key in your brief, <ITEM-KEY> your task). Use these sections:

  1. Repro — the exact command and its failing output.
  2. Root cause — what is wrong and why, with file:line evidence for each claim.
  3. Regression test — the regression test the coder should write: where it goes, what it sets up, what it asserts, and why it fails for the reported reason today.
  4. Where the fix belongs — the shared function every caller routes through, and every caller (grep them) the coder must cover. Prefer one guard in the shared function over a patch in each caller.
  5. Follow-ups — a second, unrelated bug you noticed goes here, never into the fix.

Completing

Write completed with the report path in artifacts (the diagnose step's gate requires a readable file under $SWARM_HOME/research/<ROOT-KEY>/) and your repro command in verification ({"cmd": "...", "ok": false}; a legacy debugger's completed needs at least one verification command). There is no git commit to report. If a reviewer or your orchestrator asks for a better diagnosis, update the report and complete again.

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.