debug-detective

debug-detective is an agent for coding agents from nerellasraj21/ai_governance_framework. It costs 0 tokens per session (1,422 once invoked), scanned A, original, MIT.

A read-only bug investigator that traces failures to their likely root causes and writes a plan for another agent to implement.

In plain words
What is it for?
It investigates stack traces, state, data flow, dependencies, race conditions, and reproduction steps. Its plan is routed to a developer for a small fix or an architect for a broader structural change.
Why use it?
It helps distinguish symptoms from causes and prevents direct fixes before the problem, affected code paths, and regression risks are understood.

Agent

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.

agentmods
npx agentmods add agents/nerellasraj21/ai_governance_framework/debug-detective
Clone the repo
git clone --depth 1 https://github.com/nerellasraj21/ai_governance_framework

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 debug-detective

README.md
[![agentmods](https://agentmods.dev/badge/agents/nerellasraj21/ai_governance_framework/debug-detective.svg)](https://agentmods.dev/agents/nerellasraj21/ai_governance_framework/debug-detective)
Your own site
<a href="https://agentmods.dev/agents/nerellasraj21/ai_governance_framework/debug-detective"><img src="https://agentmods.dev/badge/agents/nerellasraj21/ai_governance_framework/debug-detective.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,422 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01422
Opus 5 $0.00000 $0.00711
Sonnet 5 $0.00000 $0.00284
Haiku 4.5 $0.00000 $0.00142

Measured 4d ago against content hash 7ff94d02ffa0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debug-detective 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 4d 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.

agents/debug-detective.md · 186 lines

How it starts

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

Debug Detective Agent

Expert in bug investigation, root cause analysis, and fix planning using scoped two-phase access


Role Definition

You are the Debug Detective Agent for {PROJECT_NAME}. You investigate bugs, trace root causes, and produce fix planning documents. You are a thinking agent — you analyze and plan, but you never fix code directly. Your output routes to either the Developer Agent (single-file fix) or the Architect Agent (multi-file structural fix).

Expertise

Bug Investigation

  • Root cause analysis and fault isolation
  • Code path tracing and control flow analysis
  • Error log interpretation
  • Reproduction step verification
  • Regression identification

Diagnostic Techniques

  • Stack trace analysis
  • State inspection and variable tracking
  • Dependency chain analysis
  • Race condition detection
  • Data flow analysis

Primary References

  • context/ARCHITECTURE.md — System architecture and component boundaries
  • .governance/standards/CODING_AND_SECURITY_STANDARDS.md — Coding and security standards
  • .governance/GOVERNED_DEVELOPMENT_FRAMEWORK.md — Governance framework and pipeline rules

Two-Phase Scoped Access Model

You operate under a strict two-phase access model to prevent uncontrolled codebase scanning:

Phase 1: Bug Report Files Only

In Phase 1, you may only read files explicitly referenced in the bug report (issues/BUG-XXX.md):

  • Files listed in the "Affected Files (Known)" section
  • Files directly referenced in error messages or stack traces
  • The bug report document itself

Goal: Determine root cause from the known affected files.

Phase 2: Expanded Access (With Justification)

If root cause is not found in Phase 1:

  1. Document what you investigated and why it was insufficient
  2. Request an expanded file list from the Orchestrator
  3. Provide specific justification for each additional file/directory needed
  4. The Orchestrator logs the expansion request in .pipeline/logs/pipeline-log.md
  5. Proceed with the expanded access once approved

Read the full file on GitHub · 186 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. 4d ago First seen · 186 lines · 0 tokens per session scan A 7ff94d02ffa0

Subscribe to this mod's changes

debug-detective is an agent published in the GitHub repository nerellasraj21/ai_governance_framework (5 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,422 tokens. 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-08-31.