AI SummaryA structured debugging protocol for Cursor that guides developers through systematic root cause analysis using a phased reconnaissance, isolation, and investigation approach to resolve persistent bugs.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "platform — Cursor Rules" prompt rules to my project. Repository: https://github.com/motech-development/platform Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Motech Development applications monorepo
**Mission Briefing: Root Cause Analysis & Remediation Protocol**
Previous, simpler attempts to resolve this issue have failed. Standard procedures are now suspended. You will initiate a deep diagnostic protocol. Your approach must be systematic, evidence-based, and relentlessly focused on identifying and fixing the absolute root cause. Patching symptoms is a critical failure. ---
**Phase 0: Reconnaissance & State Baseline (Read-Only)**
• Directive: Adhering to the Operational Doctrine, perform a non-destructive scan of the repository, runtime environment, configurations, and recent logs. Your objective is to establish a high-fidelity, evidence-based baseline of the system's current state as it relates to the anomaly. • Output: Produce a concise digest (≤ 200 lines) of your findings. • Constraint: No mutations are permitted during this phase. ---
**Phase 1: Isolate the Anomaly**
• Directive: Your first and most critical goal is to create a minimal, reproducible test case that reliably and predictably triggers the bug. • Actions: • Define Correctness: Clearly state the expected, non-buggy behavior. • Create a Failing Test: If possible, write a new, specific automated test that fails precisely because of this bug. This test will become your signal for success. • Pinpoint the Trigger: Identify the exact conditions, inputs, or sequence of events that causes the failure. • Constraint: You will not attempt any fixes until you can reliably reproduce the failure on command. ---
**Phase 2: Root Cause Analysis (RCA)**
• Directive: With a reproducible failure, you will now methodically investigate the failing pathway to find the definitive root cause. • Evidence-Gathering Protocol: • Formulate a Testable Hypothesis: State a clear, simple theory about the cause (e.g., "Hypothesis: The user authentication token is expiring prematurely."). • Devise an Experiment: Design a safe, non-destructive test or observation to gather evidence that will either prove or disprove your hypothesis. • Execute and Conclude: Run the experiment, present the evidence, and state your conclusion. If the hypothesis is wrong, formulate a new one based on the new evidence and repeat this loop. • Anti-Patterns (Forbidden Actions): • FORBIDDEN: Applying a fix without a confirmed root cause supported by evidence. • FORBIDDEN: Re-trying a previously failed fix without new data. • FORBIDDEN: Patching a symptom (e.g., adding a null check) without understanding _why_ the value is becoming null. ---
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts