agentleFS
Grit-77Grit-77/done-is-a-claim/skills/debugging-with-evidence/SKILL.md

debugging-with-evidence

Skill33 starsChanged 34 days agoApache-2.0View on GitHub

Diagnose unexpected behavior with a reproduction, competing explanations and experiments that separate them before fixing. Use for bugs, failed checks or repeated unsuccessful fixes; attribute branch failures only with suitable comparison evidence.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep the investigation tied to the user's outcome and authorized file scope.

    line 10
  2. Distinctive:

    Read the complete error and inspect the affected artifact and relevant diff.

    line 16
  3. Distinctive:

    Use read-only inspection to answer state questions.

    line 22
  4. Distinctive:

    Write a small set of plausible hypotheses based on the observation.

    line 27
  5. Distinctive:

    When evaluating a detector or classifier, establish that a known-good case can produce a negative result.

    line 37
  6. Very specific:

    If branch versus baseline attribution matters, use whose-red at the location the host actually exposes.

    line 42
  7. Distinctive:

    When evidence supports a cause, make the smallest change that addresses its class within the authorized scope.

    line 50
  8. Distinctive:

    Avoid tests that only repeat implementation values without an independent basis.

    line 54
  9. Distinctive:

    If a planned fix fails, compare its prediction with the new observation and revise the hypothesis.

    line 56
  10. Very specific:

    Use discovered reviewing-changes when useful.

    line 66
  11. Distinctive:

    After review fixes, run affected checks and review changed or unresolved findings.

    line 67
  12. Distinctive:

    Before reporting success, confirm evidence describes the final inputs and rerun final acceptance yourself.

    line 69

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

An observed failure establishes that something happened under particular conditions. Find the mechanism that explains it before changing another thing. Keep the investigation tied to the user's outcome and authorized file scope.

Capture the failure

  1. Record expected and observed behavior, exact command or user action, revision, dirty inputs, environment, relevant order or seed and evidence path.
  2. Read the complete error and inspect the affected artifact and relevant diff. Missing paths, absent tools, empty test collection and permission errors may explain an unrunnable check; they do not establish successful behavior.
  3. Reproduce with the smallest scope that still preserves the failure. Retain the original run: narrowing can remove order, shared state or boundary effects.
  4. Register cleanup before an experiment that creates temporary resources. Use read-only inspection to answer state questions; do not reset or destroy the working tree to learn what was changed.

Test explanations

Write a small set of plausible hypotheses based on the observation. For each, name the predicted result and the observation that would contradict it. Choose an experiment whose outcomes separate at least two explanations. Repeating the same failed run without changing a discriminating condition adds little evidence.

Change one relevant condition where feasible and capture the actual outcome. For an intermittent failure, retain repetitions and their conditions; one passing retry is not proof of a fix. Instrument only what is needed and remove temporary instrumentation when it no longer contributes to the delivered behavior.

When evaluating a detector or classifier, establish that a known-good case can produce a negative result. A check that flags everything may be measuring itself. Inspect differences in inputs, configuration and failure signatures before assigning cause from test names, counts, labels or timing alone.

If branch versus baseline attribution matters, use whose-red at the location the host actually exposes. If unavailable, compare identified trees with matched commands, environment and failure signatures, using a clean control when feasible. Report extra branch failures and unmatched conditions separately. A shared failure on one baseline supports a limited historical finding, not innocence of the change.

Fix the supported mechanism

When evidence supports a cause, make the smallest change that addresses its class within the authorized scope. Inspect related call sites and affected inputs; one repaired example may leave the same defect elsewhere. Where warranted, add a regression check that would reject the old behavior for the observed reason. Avoid tests that only repeat implementation values without an independent basis.

If a planned fix fails, compare its prediction with the new observation and revise the hypothesis. Do not stack unrelated guesses. If experiments stop distinguishing explanations, summarize what is known, seek a better observation or name the concrete unavailable prerequisite. Continue independent work if useful.

Verify the explanation and result

Rerun the reproduction and relevant regression scope, then the agreed acceptance and broader checks on the candidate. Inspect the actual output and capture each command's own exit code. Review the diff for scope and temporary artifacts. Use discovered reviewing-changes when useful; self-review remains explicit. After review fixes, run affected checks and review changed or unresolved findings.

Before reporting success, confirm evidence describes the final inputs and rerun final acceptance yourself. State the supported cause, rejected alternatives, changed files, observed checks and evidence paths. Keep unavailable comparisons, remaining intermittent behavior and untested boundaries explicit.

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.