agentleFS
gyujeongiongyujeongion/claude-code-rootcause/skills/deusex/SKILL.md

deusex

Skill1 starsChanged 5 months agoMITView on GitHub

Root-cause redesign skill. Instead of patching a symptom, it designs the fix that makes the symptom structurally impossible. Use when the same problem keeps coming back, when you feel the urge to "just make it work for now," when a bug/system/workflow has a structural smell, or when someone says "fix this properly", "at the root", "structurally", or "/deusex". NEVER propose a solution before completing Phase 1 (Diagnosis) — that is a hard gate.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    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:

    Before proposing any code, solution, or change, you MUST complete Phase 1 (Diagnosis).

    line 12
  2. Distinctive:

    No code, no solution, no proposal until all five are answered.

    line 20
  3. Distinctive:

    Don't just assert "it can't happen again" — that's a confident story, not a proof.

    line 62
  4. Distinctive:

    If the fix is "where should this instruction live," use rethink.

    line 94

≈ “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

/deusex — fix the structure, not the symptom

Core principle

Don't fix the symptom. Build a structure where the symptom can't occur.

Before proposing any code, solution, or change, you MUST complete Phase 1 (Diagnosis). This is a non-negotiable hard gate. "Make it work for now" is exactly the impulse this skill exists to stop.


Phase 1 — Diagnosis (HARD GATE)

No code, no solution, no proposal until all five are answered.

  • D1. Symptom (What) — What exactly is wrong? State the phenomenon in 1–2 sentences.
  • D2. Direct cause (Why ×1) — What immediately produced this symptom?
  • D2-M. Workflow decomposition (when applicable) — If the problem lives in a system / pipeline / integration flow, break the whole flow into modules A → B → C → D … and test each independently to pinpoint where it fails:
    • For each module: define input, output, and the pass condition → check actual values → mark ✅ / ⚠️ / ❌
    • Skip healthy modules; focus D3+ on the failing one
    • e.g. a sync pipeline: A(event) B(network) C(receive) D(process) E(extension) F(reconcile)
  • D3. Structural cause (Why ×5) — Keep asking "why" until you reach the root flaw. Is it technical debt, a design contradiction, or a logic-structure problem?
  • D4. Recurrence condition (When) — Under what conditions does this come back? (specific input, state, timing)
  • D5. Complexity contribution — How is this flaw currently feeding overall system complexity?

D3 is the one that matters. Answering only D1/D2 and moving on is no different from patching the symptom.


Phase 2 — Redesign

Enter only after diagnosis is complete. Keep this order.

  1. Before architecture — Show the current structure (diagram or pseudocode). Mark the failure point.
  2. After architecture — Show the redesigned structure. Minimize the blast radius, but structurally foreclose the recurrence.
  3. Elegance check — "One concise line that cuts to the essence beats ten thousand lines of patches." Is there a simpler solution?
  4. Side-effect check — List every component, workflow, and data flow this change touches. Verify integrity.
  5. Entropy check — After the fix, is overall complexity lower and maintainability higher? If complexity stays the same or rises, redesign again.

Phase 3 — Recurrence-impossibility proof

Don't just assert "it can't happen again" — that's a confident story, not a proof. Make it falsifiable: take the exact recurrence conditions from D4 (the specific input, state, and timing that triggered it) and, for each one, show structurally why the new design no longer produces the symptom. If a condition can only be answered with "the agent will remember to handle it" rather than "the structure makes it impossible," you have a patch, not a redesign — go back to Phase 2.

A good proof reads like: "D4 said this recurs when [input] arrives during [state]. In the After architecture, [input] is now validated at [boundary] before [state] can exist, so the path that produced the symptom is unreachable." If you can't write a sentence in that shape for each recurrence condition, the solution is incomplete.


Scope

Code bugs / system design / workflow inefficiency / agent behavior patterns / business processes — applies to any problem domain.


deusex vs rethink

These two share one spine — never patch a symptom before finding its structural cause — but they end differently.

rethinkdeusex
Targetthe agent's own mistakesany problem domain
Outputa routing decision (hook / skill / memory / instructions)a structural redesign
Triggerthe agent did something wrongthe same problem recurs, or a structure smells off

If the fix is "where should this instruction live," use rethink. If the fix is "this structure is wrong," use deusex.

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.