investigate-first

Diagnose ambiguous failures by ranking evidence-based hypotheses before editing code.

1|Updated May 3, 2021
One-click install
npx skills add https://github.com/leogurja/dotfiles --skill investigate-first-leogurja
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: investigate-first
Source: https://github.com/leogurja/dotfiles/tree/main/home/dot_agents/skills/investigate-first
Command: npx skills add https://github.com/leogurja/dotfiles --skill investigate-first-leogurja

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Engineers often jump to fixing code before understanding the actual cause of a failure, leading to wasted effort and regressions. This Skill enforces an evidence-first diagnostic workflow for ambiguous bugs, intermittent behavior, and performance regressions. ## Core Features & Use Cases - Symptom vs. Cause Separation: Distinguishes observed symptoms from inferred causes to avoid premature conclusions. - Evidence-Ranked Hypotheses: Traces inputs, state transitions, and ownership boundaries, then ranks hypotheses by evidence and falsification cost. - Edit Gate: Blocks code changes until one credible mechanism explains the evidence, then reports cause and proof. - Use Case: When a production service intermittently times out, use this Skill to gather logs, trace state transitions, and identify the exact failing component before proposing any fix. ## Quick Start Use investigate-first to diagnose this intermittent test failure and report the root cause with supporting evidence before making any edits.

Frequently Asked Questions about investigate-first

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

FAQPage Schema
How do I diagnose a bug with an unknown root cause?▼

Start by separating the observed symptom from the inferred cause, then trace inputs, state transitions, and failure output. Rank hypotheses by evidence strength and how cheaply each can be falsified before attempting any fix.

How to investigate intermittent test failures before editing code?▼

Gather evidence from failure output and state transitions first, then rank possible causes by falsification value. Only edit code once one credible mechanism explains all observed evidence.

When should I use evidence-based debugging instead of fixing immediately?▼

Use it for unknown causes, intermittent behavior, and performance regressions where guessing wastes effort. It is less necessary when the cause is already obvious from a clear error message.

Does this investigation workflow make code changes automatically?▼

No. The workflow reports the cause and supporting proof only, and makes no fix unless the task explicitly authorizes implementation. Its purpose is diagnosis, not remediation.

Why does hypothesis ranking matter in debugging?▼

Ranking by evidence and falsification cost prevents chasing unlikely theories and reduces time spent on dead ends. It ensures the cheapest tests are run first to eliminate wrong hypotheses quickly.