agentleFS
daniel-kindldaniel-kindl/dkstack/skills/investigate-bug/SKILL.md

investigate-bug

Skill1 starsChanged 19 days agoMITView on GitHub

Use when a defect, crash, regression, flaky test, or unexpected behavior needs an investigation before a fix. Collect evidence, test hypotheses and hand off a failing regression test to tdd-loop.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 11

    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:

    Follow debugging. For an outage, also read incident analysis.

    line 8
  2. Distinctive:

    If reproduction fails, identify missing evidence and test plausible alternatives.

    line 15
  3. Distinctive:

    Write at least two competing hypotheses when the cause is uncertain.

    line 16
  4. Distinctive:

    Test one variable at a time.

    line 18
  5. Distinctive:

    Use tdd-loop for the actual fix.

    line 20
  6. Distinctive:

    Do not claim a confirmed root cause or a verified fix.

    line 26
  7. Distinctive:

    Prefer non-destructive instrumentation or an isolated experiment.

    line 29
  8. Distinctive:

    Ask for missing access or input only when it changes the next safe action.

    line 30
  9. Distinctive:

    Do not start subagents for this skill.

    line 34
  10. Distinctive:

    Do not weaken tests or quality gates.

    line 39
  11. Distinctive:

    Do not apply speculative patches until a hypothesis has supporting evidence.

    line 40

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

Investigate a bug

Follow debugging. For an outage, also read incident analysis.

Steps

  1. Record expected behavior, actual behavior, impact, and the known environment.
  2. Collect safe reproduction steps, input samples, logs, versions, and errors.
  3. Reproduce in the smallest controlled environment that preserves the failure.
  4. If reproduction fails, identify missing evidence and test plausible alternatives.
  5. Write at least two competing hypotheses when the cause is uncertain.
  6. For each hypothesis, name a result that would falsify it.
  7. Test one variable at a time. Use git bisect when a known good commit exists.
  8. Locate the cause at a source line or boundary, supported by evidence.
  9. Use tdd-loop for the actual fix.
  10. Re-run the reproduction, regression test, and affected existing checks.
  11. Report the cause, proof, changed behavior, and remaining uncertainty.

When reproduction is unavailable

  • Do not claim a confirmed root cause or a verified fix.
  • Preserve the diagnostic evidence. Report each check that did not run as NOT RUN, as quality gates says.
  • Prefer non-destructive instrumentation or an isolated experiment.
  • Ask for missing access or input only when it changes the next safe action.

Subagents

Do not start subagents for this skill. Reason: hypothesis tests must follow one controlled investigation and shared evidence record. See the subagent guide.

Boundaries

  • Do not weaken tests or quality gates.
  • Do not apply speculative patches until a hypothesis has supporting evidence.
  • Remain within the issue and the safety limits.

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.