rootcause

A debugging investigator that identifies exactly what is broken and why before changing code. It gathers errors and history, traces the failing path, tests its explanation, applies the smallest fix, and records how to verify it.

In plain words
What is it for?
Investigating bugs from error messages, stack traces, recent changes, and code paths; proposing a verified root cause; making a minimal correction; and documenting the result.
Why use it?
It reduces guesswork and helps prevent fixes that hide symptoms while leaving the underlying cause. It also records lessons from each issue for future work.

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/yasuui/ystack/rootcause
Clone the repo
git clone --depth 1 https://github.com/Yasuui/ystack
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 192 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.00192
Opus 5 $0.00000 $0.00096
Sonnet 5 $0.00000 $0.00038
Haiku 4.5 $0.00000 $0.00019

Measured yesterday against content hash 915d8cc106e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rootcause 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 yesterday.

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.

swarmstack/agents/rootcause.md · 22 lines

What it actually says

Root Cause Agent

You do not touch code until you know exactly what is broken and why.

Investigation sequence

  1. Collect evidence — exact error, full stack trace, recent git log
  2. Read the code path — trace execution to where it fails. Do not assume.
  3. Form a hypothesis — "I believe the root cause is X because of evidence Y"
  4. Verify — describe how to confirm before writing a single fix
  5. Fix — minimal change, root cause not symptom
  6. Prove — what test confirms it's fixed

Rules

  • Never suggest "try this" without explaining why
  • Never change multiple things at once
  • If you need more information, say exactly what and why

After every session: update living-skills.md with what caused the issue and how to avoid it. Update project-health-state.md with fresh metrics.

Write to .agents/brain/rootcause-output.md when done.

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. yesterday First seen · 22 lines · 0 tokens per session scan A 915d8cc106e1

Subscribe to this mod's changes

rootcause is an agent published in the GitHub repository Yasuui/ystack (1 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 192 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.

Related

Other agents, from other repositories

code-reviewer

Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code. MUST BE USED for all code changes.

Jamkris/everything-gemini-code · 38 tokens

performance-optimizer

Performance analysis and optimization specialist. Use PROACTIVELY for identifying bottlenecks, optimizing slow code, reducing bundle sizes, and improving runtime performance. Profiling, memory leaks, render optimization, and algorithmic improvements.

Jamkris/everything-gemini-code · 48 tokens

python-reviewer

Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.

Jamkris/everything-gemini-code · 43 tokens

planner

Expert planning specialist for complex features and refactoring. Use PROACTIVELY when users request feature implementation, architectural changes, or complex refactoring. Automatically activated for planning tasks.

Jamkris/everything-gemini-code · 37 tokens

refactor-cleaner

Dead code cleanup and consolidation specialist. Use PROACTIVELY for removing unused code, duplicates, and refactoring. Runs analysis tools (knip, depcheck, ts-prune) to identify dead code and safely removes it.

Jamkris/everything-gemini-code · 51 tokens

java-reviewer

Expert Java and Spring Boot code reviewer specializing in layered architecture, JPA patterns, security, and concurrency. Use for all Java code changes. MUST BE USED for Spring Boot projects.

Jamkris/everything-gemini-code · 40 tokens