investigate-bug

investigate-bug is a cursor rule for Cursor from danielvm-git/bigpowers. It costs 59 tokens per session (1,246 once invoked), scanned A, original, MIT.

A bug-investigation guide that examines a reported problem, finds its likely root cause, and writes a test-driven fix plan. TDD means writing tests that describe the desired fix before implementing it.

In plain words
What is it for?
Use it to triage an issue, investigate how it happens, document the cause, and prepare a TDD-based plan in the project's bug records.
Why use it?
It turns a vague bug report into a recorded, reviewable diagnosis and plan. It also checks earlier bug records and assesses the possible security impact.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to triage an issue, investigate how it happens, document the cause, and prepare a TDD-based plan in the project's bug records.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/danielvm-git/bigpowers/investigate-bug
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/danielvm-git/bigpowers

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for investigate-bug

README.md
[![agentmods](https://agentmods.dev/badge/rules/danielvm-git/bigpowers/investigate-bug/github.svg)](https://agentmods.dev/rules/danielvm-git/bigpowers/investigate-bug)
Your own site
<a href="https://agentmods.dev/rules/danielvm-git/bigpowers/investigate-bug"><img src="https://agentmods.dev/badge/rules/danielvm-git/bigpowers/investigate-bug/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for investigate-bug

Your own site · 80×15
<a href="https://agentmods.dev/rules/danielvm-git/bigpowers/investigate-bug"><img src="https://agentmods.dev/badge/rules/danielvm-git/bigpowers/investigate-bug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.01246
Opus 5.5 $0.00024 $0.00498
Sonnet 5.5 $0.00012 $0.00249
Haiku 4.5 $0.00006 $0.00125

Measured 1mo ago against content hash 7154a17dadb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

investigate-bug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/investigate-bug.mdc · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Investigate Bug

Boundary: End-to-end bug entry point — history check → RCA (via diagnose-root) → fix approach → TDD plan → bug file. Delegates the 4-phase RCA to diagnose-root; does not re-implement it.

Investigate a reported problem, find its root cause, and write a TDD fix plan to specs/bugs/BUG-*.md. This is a mostly hands-off workflow — minimize questions to the user.

Process

0. Read previous bug history

Before starting diagnosis:

  1. Read specs/bugs/registry.yaml (if it exists) — check for prior bugs in the same scope or with similar symptoms.
  2. If a relevant prior bug is found, read the corresponding specs/bugs/BUG-*.md file to understand previous root cause analysis and fix approach.
  3. Note in your investigation whether this is a recurrence, a related issue, or novel.

1. Capture the problem

Get a brief description of the issue from the user. If they haven't provided one, ask ONE question: "What's the problem you're seeing?"

Do NOT ask follow-up questions yet. Start investigating immediately.

Security-impact assessment — After capturing the problem, assess and document: Security impact: NONE / LOW / MEDIUM / HIGH / CRITICAL. If HIGH or CRITICAL, assign bug severity HIGH and document the exploit path in findings. If MEDIUM+, include exploit path in the bug file. Document "no security exploit path identified" for NONE/LOW.

2. Explore and diagnose (4-phase RCA)

Run the 4-phase root-cause analysis via the diagnose-root skill (Reproduce → Isolate → Hypothesize → Verify). That skill is the canonical RCA engine — do not re-implement the phases here.

Also look at:

  • Recent changes to affected files (git log --oneline <file>)
  • Existing tests (what's tested, what's missing)
  • Similar patterns elsewhere in the codebase that work correctly

HARD GATE — Do NOT proceed to Step 3 (Fix Approach) until diagnose-root Phase 4 produces a verified root cause. "It probably is X" is not verified.

3. Identify the fix approach

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 127 lines · 59 tokens per session scan A 7154a17dadb1

Subscribe to this mod's changes

investigate-bug is a cursor rule published in the GitHub repository danielvm-git/bigpowers (267 stars, last pushed 27d ago), licensed MIT. It adds 59 tokens to every session and 1,246 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.