agentleFS
lifekit-hqlifekit-hq/devclaw/.claude/skills/root-cause/SKILL.md

root-cause

Skill1 starsChanged 24 days agoMITView on GitHub

How a devclaw problem gets fixed — at the root, never at the symptom. Use whenever Denys reports a problem, incident, smell, wedge, or "why did X happen" on devclaw or on a repo devclaw drives, asks to fix something, or when an audit/digest surfaces a recurring failure. Refuses instance fixes; traces symptom → mechanism → design decision → root, names the class, and proposes the fix at the root as a spec before any patch. Also the tool for reviewing an incoming fix PR for "is this the symptom or the cause".

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

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

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 0

    Distinctive

    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. Very specific:

    Find the mechanism: Read the code path that produced the symptom until you can point at the line that made the decision (file:line).

    line 18
  2. Very specific:

    When Denys asks about a problem, answer in this order: the root in one sentence, the mechanism with file:line, the design decision it came …

    line 75

“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 — fix the class, never the instance

Denys's standing rule (2026-07-18 doctrine, restated 2026-09-03): if a problem smells bad, fix its root cause. A fix that only unwedges the case that hurt today is a smell in itself. This skill is the procedure; the doctrine lives in CLAUDE.md ("Design doctrine — systemic over specific").

The procedure

  1. Collect the symptoms as facts. Timestamps, log lines, file:line, goal ids, PR numbers. No adjectives. If the same symptom appears twice with a different surface, list both — two instances of one class is the first clue.
  2. Find the mechanism. Read the code path that produced the symptom until you can point at the line that made the decision (file:line). Not the line that raised the error — the one that chose the wrong thing.
  3. Ask "why is that mechanism there?" until you hit a design decision or an ownership boundary. Every mechanism was put there on purpose (an ADR, a spec's rejected-alternatives list, a skill's instruction, a defaulted parameter). Name the decision and the assumption it rests on. Stop when the next "why" is a question about the world, not about the code.
  4. Name the smell in one sentence. The smell is the shape of the decision, stated so it would be recognisable in a different codebase: "two sources of truth for X", "the judge reads the defendant's diary", "policy encoded as a keyword list", "state of system A persisted in repo B", "done ends one hop before the user".
  5. Inventory the instance fixes already stacked on this root. Grep the specs, ADRs, prompts and tests for earlier reactions to the same class. Each one is evidence for the class and a candidate for deletion once the root is fixed — a root fix that leaves the band-aids in place is half a fix.
  6. Propose the fix at the root, as a spec. Behaviour-changing work starts at /speckit-specify → /speckit-clarify with Denys (rules/speckit-workflow.md). The spec names: the root, the class, the instance fixes it retires, the invariant it adds or amends (constitution), and the rejected alternatives — including "patch the instance", with the reason it was rejected.
  7. Only then stop the bleeding, explicitly labelled as such. A hotfix for the live instance is fine (a broken production is a broken production) but its PR body says "instance fix; root tracked in spec NNN". Never let the hotfix close the conversation about the root.

Smells that recur in this codebase (recognise them fast)

  • Two environments, one declared truth. Verification runs in a place that is not where the code will run, and its verdict is treated as the verdict.
  • The judge reads the defendant's diary. A gate whose only evidence is the tree written by the party being judged (tests, specs, tasks.md, AGENTS.md).
  • Policy as a keyword list. A regex or word list standing in for a classification the system should make from typed facts.
  • State of system A persisted in repo B. Sandbox lore, workarounds and "repo conventions" that describe devclaw's environment landing in a product's AGENTS.md, CI config or install scripts.
  • The only writable surface is the wrong one. An actor that can only act on X will fix every problem by editing X, including problems that live in Y.
  • Done ends one hop before the user. Merge, deploy, delivery and "it works" each owned by someone else — or no one.
  • A counter where a measurement belongs. Brakes and budgets that count rounds/chars/attempts instead of the thing that matters (progress, value, product code changed).
  • Instance fixes stacking. Three specs in three weeks that each answer one incident of the same class are the loudest signal that the root is untouched.

What this skill refuses

  • A fix whose PR body cannot state the class it closes.
  • A test minted for the instance when a class test exists (rules/testing.md).
  • A new keyword, special case, or if project == … branch as the fix.
  • Closing an incident on a hotfix alone.

Output shape

When Denys asks about a problem, answer in this order: the root in one sentence, the mechanism with file:line, the design decision it came from, the instance fixes already stacked on it, the proposed root fix (spec), and the bleeding-stop if one is needed. Short. He will argue back; that is the point (vault: agent-behavior.md → "Argue by default").

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.