root-cause-trace

Trace root-cause errors through call stacks and implement source fixes.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/cjennings/rulesets --skill root-cause-trace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: root-cause-trace
Source: https://github.com/cjennings/rulesets/tree/main/root-cause-trace
Command: npx skills add https://github.com/cjennings/rulesets --skill root-cause-trace

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bugs and errors often surface far from their origin, leading to patching the symptom instead of the trigger. This skill documents a systematic backward walk to identify the original trigger in the call chain, enabling fixes at the source and the addition of defender layers to prevent recurrence.

Core Features & Use Cases

  • Backward-trace workflow: observe symptom, identify immediate cause, walk the call chain, find origin, and implement a fix with layered defenses.
  • Instrumentation guidance: insert stack traces and contextual logs before dangerous operations to capture runtime data.
  • Test-pollution diagnosis and defense design: patterns to detect polluted states and build robust guardrails across system layers.

Quick Start

Follow the five-step workflow to observe the symptom, identify the immediate cause, walk the call chain, find the original trigger, and implement a fix with defense-in-depth.

Frequently Asked Questions about root-cause-trace

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trace the root cause of an error deep in a call stack?

To trace the root cause, apply a backward-walk workflow: observe the symptom, identify the immediate cause, walk up the call chain to find the origin, and implement a fix with layered defenses to prevent recurrence.

Why do my bug fixes only patch the symptom instead of the original trigger?

Bugs and errors often surface far from their origin, leading to symptom patching. A systematic backward trace identifies the original trigger in the call chain, enabling durable fixes at the source.

What instrumentation do I need to debug errors buried deep in a call chain?

Instrumentation requires inserting stack traces and contextual logs before dangerous operations to capture runtime data. This traceability enables you to walk the call chain backward and find the original trigger.

How do I add defense-in-depth to prevent error recurrence across runs?

Defense-in-depth is added by implementing layered defenses at the source of the error after walking the call chain. This ensures defensible changes that prevent recurrence across runs.

Can I diagnose test pollution using a backward-walk debugging workflow?

Yes, the backward-walk workflow includes test-pollution diagnosis patterns to detect polluted states. You observe the symptom, walk up the call chain, and build robust guardrails to prevent recurrence.

What is the best way to fix errors at their source instead of patching symptoms?

The best way to fix errors at the source is a systematic backward-walk workflow that traces the call chain from symptom to origin, enabling defensible changes with layered defenses for durable remediation.