# Root-Cause Triage

> Enforces Zero Speculative Edits: blocks touching production code until an isolated failing reproduction test proves the exact root cause.

Root-Cause Triage is a free AI agent skill on Agensi by Hemanth, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Hemanth](https://www.agensi.io/creators/hemanth17r)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Uses: 3
- Version: 1.0
- Last updated: 2026-11-29
- Security: scan passed (2026-11-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/root-cause-triage
- Tags: testing, code-review, ai-agents, typescript, python, unit-testing

## About this skill

**Never let your coding agent guess-edit production code.**

`root-cause-triage` enforces a strict 4-step **Scientific Debugging Protocol** (`Reproduce → Isolate → Diagnose → Surgically Patch → Verify`) so AI coding agents stop masking symptoms with random `if != null` checks or shotgun refactors.

### Key Guardrails
- **Zero Speculative Edits Law:** Strictly forbids modifying production code until a minimal, deterministic reproduction test is written and failing.
- **Root-Cause Isolation:** Extracts initial state, exact triggering event, and broken invariant/boundary before proposing a fix.
- **Minimal Surgical Patch:** Fixes only the root defect (no unrelated refactors) and keeps the reproduction test permanently as a regression guard.

### Compatibility
Works natively with Claude Code, Cursor, Codex CLI, Gemini CLI, VS Code Copilot, and Google Antigravity (`SKILL.md` open standard).

Part of **AHR Autonomous Workflow** (MIT).

## Requires

Nothing beyond your AI agent.

## Known limitations

Requires an environment where automated tests can run. Does not support non-deterministic bugs that cannot be reproduced in isolation.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Root-Cause Triage skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How is 'Root Cause Triage' different from just asking a standard LLM to fix a bug?

Unlike generic AI prompts that guess at fixes, this skill uses a "test-first" protocol. It refuses to modify your source code until it has written a deterministic test that reproduces the bug, ensuring the root cause is actually fixed rather than just masked.

### Which programming languages and testing frameworks are supported?

This skill is language-agnostic and integrates with any environment where you can run automated tests, including popular frameworks like Jest, Pytest, Vitest, and Playwright. It works best in projects with an existing testing suite it can build upon.

### What are the technical requirements for setting up this skill?

The skill is designed to run within your existing CI/CD or local dev environment; it requires access to your test runner to execute the reproduction cases it generates. Once it has access to the codebase and the error logs, it handles the isolation and patching process automatically.

### Can I use this skill to refactor large portions of my application architecture?

No, this skill is specifically optimized for surgical bug fixes and deterministic logic errors. It is not intended for broad architectural refactors, UI/UX styling, or greenfield feature development where a failing test case cannot yet be defined.

### How does this skill help reduce technical debt in my project?

By enforcing a "no reproduction, no fix" rule, the skill ensures that every bug fix is accompanied by a permanent regression test. This prevents the "whack-a-mole" effect where fixing one bug introduces another, significantly hardening your codebase over time.

### What is included with my purchase of this skill?

You receive the full skill configuration compatible with major AI agent platforms, a set of integration templates for various test runners, and access to all future version updates that refine the diagnostic logic.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
