Root Cause Tracing

Trace bugs backward through the call stack to identify original error triggers.

1|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/chef0111/physthink --skill root-cause-tracing-chef0111
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Root Cause Tracing
Source: https://github.com/chef0111/physthink/tree/main/.agents/skills/debugging/root-cause-tracing
Command: npx skills add https://github.com/chef0111/physthink --skill root-cause-tracing-chef0111

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers systematically find the original source of bugs that appear deep within a program's execution stack, preventing the common mistake of only fixing symptoms.

Core Features & Use Cases

  • Backward Call Stack Analysis: Trace errors back through function calls to identify the initial trigger.
  • Symptom vs. Source Identification: Differentiate between where an error manifests and where it originates.
  • Debugging Assistance: Provides strategies and tools like stack trace logging and bisection scripts to pinpoint elusive bugs.
  • Use Case: When a git init command fails deep within a complex test suite, this Skill guides you to trace back through the test setup and execution to find the exact line of code that incorrectly provided an empty directory path, rather than just fixing the git init command itself.

Quick Start

Use the root cause tracing skill to find which test is creating a '.git' directory by running the find-polluter script with '.git' as the target and 'src/**/*.test.ts' as the test pattern.

Frequently Asked Questions about Root Cause Tracing

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

FAQPage Schema
How do I trace an error back through the call stack to find the original trigger?

To trace an error through the call stack, systematically analyze stack traces backward to identify the initial trigger point of invalid data or state, rather than just fixing the symptom where the error manifests.

Why does my test suite fail deep in execution with an invalid state error?

Deep execution state errors occur because invalid data or state is passed through layers of function calls, obscuring the original trigger point and requiring backward call stack analysis to pinpoint the source.

How do I find which test is creating an invalid directory path or state?

Run a bisection script, such as a find-polluter script, targeting the invalid state and specifying your test pattern to isolate the exact test that incorrectly creates the invalid path or state.

What is the difference between fixing a symptom and finding the root cause?

Finding the root cause means identifying the original trigger point of invalid data, whereas fixing a symptom only addresses where the error manifests deep within the execution stack.

Can I use debugging scripts to pinpoint elusive bugs in a complex test suite?

Yes, you can use debugging scripts like stack trace logging and bisection find-polluter scripts to pinpoint elusive bugs by tracing invalid data back through test setup and execution layers.

Do I need manual stack trace analysis to troubleshoot root causes in testing?

Yes, troubleshooting root causes requires manual analysis of stack traces to trace backward through function calls, potentially combined with debugging scripts to pinpoint the source of invalid data.