agentleFS
jjanczurjjanczur/tyran/skills/root-cause/SKILL.md

root-cause

Skill81 starsChanged 4 months agoApache-2.0View on GitHub

Find the mechanism behind a failure instead of patching its symptom - reproduce first, one variable per experiment with the prediction written before the run, exit by naming the mechanism and pinning it with a failing test. Use for a bug, an unexplained red test, or a failure that will not reproduce.

27 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use prove-it, grill 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.
  • Neko-Catpital-LabsSkill

    prove-it

    Shared evidence rule for investigating, diagnosing, debugging, proving, or explaining what happened or why for any problem or situation: do not assert something is fixed, working, passing, merged, or running unless you personally observed it this turn and can show what you saw; do not assert it was caused by X until a repro and controlled isolation prove that cause.

    Also in 3 projects that use this

  • renatorozasSkill

    grill

    Adversarial code review. Don't let me ship until the changes pass your scrutiny.

    Also in 4 projects that use this

  • sunnyclinches44Skill

    explain

    Explains code using real-world analogies and ASCII diagrams

    Also in 5 projects that use this

  • jasonmichaelbell78-creatorSkill

    skill-audit

    Interactive behavioral quality audit for individual skills. Evaluates against 12 quality categories (including T25 convergence loop and completion verification) to surface attention management issues and produce actionable decisions. Includes self-audit verification that all decisions were actually implemented. Uses convergence loops in its own discovery phase. Produces a decision record and updated skill files.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    design

    Design rules and conventions for the API Center Portal. Use when editing detail pages, card components, badges, layout, navigation, sidebars, or headers. Covers badge styling, metadata placement, page navigation patterns, and layout alignment.

    Also in 4 projects that use this

  • SentrySkill

    spec

    Produce a verified spec — problem, desired outcome, and acceptance criteria — before building. Use when given a GitHub/Linear issue link, when starting from a fuzzy in-conversation idea, or asked to "figure out what to do" / "scope this" / "what should I build" — whenever the *what* isn't yet pinned down. Grills the ambiguities, checks the premise against the code, and produces acceptance criteria you sign off on — then hands to design-first.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 1

    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:

    Do not re-read the code hoping to spot it.

    line 45

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

Root cause — working a failure down to its mechanism

This is the situation the conductor is told to spend its most expensive reasoning on: a diagnosis, a failure nobody can reproduce, two agents who disagree. Spending more thinking on an undisciplined search just produces a more confident wrong answer, so here is the discipline.

Reproduce first. Everything else is downstream of this

A fix for a bug you cannot reproduce is a guess with a diff attached. You cannot tell whether it worked, and neither can the reviewer — the bug's absence after the change is indistinguishable from the bug's absence before it.

Get to the smallest reliable reproduction you can, and write down the exact command, input and environment. If it reproduces only sometimes, capture the rate — "3 of 20 runs" is a fact you can measure against later, "it is flaky" is not. If it will not reproduce at all, that is now the task: what does the failing environment have that yours does not — version, data, timezone, concurrency, permissions, a warm cache?

Read the whole error

The first line names where it surfaced, not where it went wrong. Read the full stack, the frames from your own code in particular, and everything logged in the seconds before. The answer is stated outright more often than anyone expects, which is why "I read the error" and "I read the first line of the error" have to be different sentences.

One variable, and write the prediction first

Change ONE thing per experiment, and write down what you expect to happen before you run it. An experiment whose outcome you did not predict teaches almost nothing: whatever comes back, it confirms something you already believed. A prediction that turns out wrong is the single most informative event available to you, and you only get it by committing first.

Two changes at once and you have learned nothing about either.

Halve the surface

Do not re-read the code hoping to spot it. Bisect.

  • Over time: git bisect against a command that exits non-zero on the failure. A scriptable check turns an afternoon into a few minutes.
  • Over the input: cut it in half, keep the half that still fails, repeat.
  • Over the system: disable, stub or bypass half the pipeline. Where does the value stop being correct? Instrument at the boundary between two components before you go inside either.

It is your code before it is the library

The base rate favours the code changed most recently by the fewest people — yours. Suspect the dependency only after the evidence points there, and then read the installed version's source, not your memory of the API and not the documentation for a version you might not have. node_modules is on disk; the answer is a grep away, and a remembered signature has already sent people down a day of the wrong road.

When three hypotheses have died

The wrong assumption is one you have not written down. Stop testing and list what you believe is true about the system — which file is loaded, which branch is running, which build is deployed, which database you are pointed at, that the change you made is even in the process you are running. Then test the cheapest item on that list.

Almost every long debugging session ends here: something everyone was certain of was not true. prompt-tuning has the sibling rule for non-deterministic work — after three failed attempts at the same defect, name it a known limitation and hand it to a person rather than taking a fourth blind swing.

Exiting

  1. Name the MECHANISM, not the symptom. "The cache key omits the locale, so the second request serves the first request's body" is a root cause. "The page showed the wrong language" is the symptom you started with.
  2. Pin it with a failing test before the fix. Written after the fix, a test only proves the code's current behaviour; written before, it proves the bug existed and is gone. This is also what the reviewer will ask for.
  3. Check for siblings. The same mechanism usually has other victims — another cache key, another unhandled path. Find them now, while you understand it.
  4. Report the mechanism, the evidence, the fix and the blast radius, plus the hypotheses you killed. Those save the next person from re-running your dead ends, and they are the part everyone omits.

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.