root-cause-tracing

Trace errors backward through call stacks to identify original triggers.

68|6|Updated Apr 16, 2020
One-click install
npx skills add https://github.com/zenobi-us/dotfiles --skill root-cause-tracing-zenobi-us
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: root-cause-tracing
Source: https://github.com/zenobi-us/dotfiles/tree/main/devtools/files/opencode/skills/root-cause-tracing
Command: npx skills add https://github.com/zenobi-us/dotfiles --skill root-cause-tracing-zenobi-us

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solves? Bugs often manifest far from their origin, leading to symptom-fixing that doesn't solve the underlying problem and causes recurring issues and wasted effort.

Core Features & Use Cases

  • Backward Call Stack Tracing: Systematically traces bugs backward through the call chain to find the original trigger.
  • Diagnostic Instrumentation: Adds console.error with stack traces and context to pinpoint where invalid data originates.
  • Polluter Identification: Utilizes a bisection script (find-polluter.sh) to identify which specific test or code introduces unwanted state.
  • Use Case: You encounter a 'git init failed' error deep within a test suite, but the immediate cause is unclear. Use this Skill to trace backward through the call chain, identify where an empty directory path originated, and fix the bug at its true source.

Quick Start

Use the root-cause-tracing skill to investigate an error where a file is created in the wrong directory, starting by identifying the immediate code causing the file creation.

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 a bug back to its original source through the call stack?

Root-cause tracing systematically traces bugs backward through the call chain to find where the original trigger originated. This backward-trace methodology follows the execution path from where an error surfaces deep in the code back to its actual source, revealing the true problem instead of just the symptom.

Why does my error occur deep in the call stack when the real problem is elsewhere?

Bugs often manifest far from their origin due to long call chains and accumulated state changes. Root-cause tracing uses diagnostic instrumentation and stack-aware logging to pinpoint where invalid data actually originates, not where it fails, preventing recurring issues caused by symptom-only fixes.

How do I identify which test or code introduces unwanted state?

Root-cause tracing includes polluter identification using bisection scripts to isolate which specific test or code section introduces problematic state. This pinpoints the exact source of state pollution, test contamination, or directory/file path issues that cause downstream errors.

Can I use call stack tracing to debug file path and directory issues?

Yes. Root-cause tracing handles mislocated directories, wrong file paths, and similar configuration problems by tracing where invalid paths originate in the execution chain. It produces source-level root-cause paths and remediation guidance to fix the actual source of the problem.

What's the best way to prevent recurring bugs from surfacing?

Root-cause tracing fixes bugs at their true source rather than treating symptoms, which prevents recurrence. By combining backward-trace methodology, instrumentation insertion, and multi-layer defense analysis, it addresses the underlying trigger instead of the manifested error.