agentleFS
danielvm-gitdanielvm-git/bigpowers/.cursor/rules/diagnose-root.mdc

bigpowers / rules

Cursor rule252 starsChanged 3 months agoMITView on GitHub

Run 4-phase root cause analysis — reproduce, isolate, hypothesize, verify. Use when a bug is confirmed but root cause is unclear, after investigate-bug, or when user mentions root cause analysis.

The file

Files
diagnose-root.mdc
---
description: "Run 4-phase root cause analysis — reproduce, isolate, hypothesize, verify. Use when a bug is confirmed but root cause is unclear, after investigate-bug, or when user mentions root cause analysis."
alwaysApply: false
---

# Diagnose Root

**Boundary**: Canonical, reusable 4-phase RCA engine. Invoked by `investigate-bug` (as step 2 of the end-to-end flow) and by `fix-bug` (when no bug file exists). Does not write the bug file — that is `investigate-bug`'s responsibility.

Four phases — do not skip. Update the active `specs/bugs/BUG-*.md` file at each phase.

## Phases

1. **Reproduce** — minimal steps; record environment; capture logs.
2. **Isolate** — narrow to module/function; binary-search commits or config.
3. **Hypothesize** — list ranked hypotheses with falsification test each.
4. **Verify** — run falsification; confirm single root cause; link to fix plan.

> **HARD GATE** — Do not propose a fix until phase 4 confirms one root cause with evidence.

## Verify

→ verify: `[ "$(grep -lE 'Reproduce' specs/bugs/BUG-*.md 2>/dev/null | grep -cv "\.okf\.md$")" -ge 1 ]`

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.