Evanflow debug

From evanklem/evanflow · View interactive version

Evanflow debug is an AI agent skill from the GitHub repository evanklem/evanflow. Root-cause discipline for bugs, test failures, and unexpected behavior. Embedded grill on the hypothesis before writing fix code. Use when encountering any bug, failing test, or behavior that doesn't match expectation.

How to use this skill

Skill file

EvanFlow: Debug

Vocabulary

See evanflow meta-skill.

When to Use

SKIP when: the cause is obvious and the fix is one line. Don't ceremonialize trivial bugs.

The Flow

1. Reproduce

2. Form a Hypothesis

State the hypothesis explicitly:

"I think the bug is in <file>:<line> because when X happens, Y is supposed to happen but instead Z does."

A vague "probably the validation" is not a hypothesis.

3. Embedded Grill — Challenge the Hypothesis

Before writing any fix, ask:

4. Verify the Hypothesis Before Fixing

Add an instrument (log, breakpoint, test assertion) that proves the hypothesis right or wrong. Watch the instrument fire. If it doesn't, the hypothesis is wrong — go back to step 2.

5. Write a Failing Test First

The test should fail because the bug exists. This is a vertical-slice TDD application — see evanflow-tdd.

6. Fix at the Root

Fix where the root cause originates, not where the symptom appears. If the fix is far from the symptom, leave a comment explaining the WHY (this is one of the few cases where a code comment earns its keep).

7. Verify the Test Passes

Run the test. Run the broader suite. Confirm no regressions.

Hard Rules

Hand-offs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.