From dh
Guides systematic investigation of test failures using dual-hypothesis approach (test wrong vs. implementation bug) and step-by-step protocol. Use for diagnosing test errors or establishing test failure mindset.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dh:test-failure-mindsetThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Establish a balanced investigative approach for all test failures encountered in this session.
Establish a balanced investigative approach for all test failures encountered in this session.
Tests are specifications - they define expected behavior. When they fail, it's a critical moment requiring balanced investigation, not automatic dismissal.
Always consider both possibilities when a test fails:
| Hypothesis A | Hypothesis B |
|---|---|
| Test expectations are incorrect | Implementation has a bug |
| Test is outdated | Test caught a regression |
| Test has wrong assumptions | Test found an edge case |
For EVERY test failure:
| Situation | Action |
|---|---|
| Implementation is wrong | Fix the bug |
| Test is wrong | Fix test AND document why |
| Unclear | Seek clarification before changing |
Good: "I see test_user_validation is failing. Let me trace through the validation logic to understand if this is catching a real bug or if the test's expectations are incorrect."
Bad: "The test is failing so I'll update it to match what the code does."
Every test failure is an opportunity to:
The goal is NOT to make tests pass quickly. The goal IS to ensure the system behaves correctly.
npx claudepluginhub jamie-bitflight/claude_skills --plugin dhGuides systematic test failure investigation with dual hypotheses (test vs. code issue), step-by-step protocol, red flags, and best practices.
Guides systematic test failure investigation with dual hypothesis (test wrong vs. code bug), step-by-step protocol, red flags for pitfalls, and learning practices.
Analyzes failing test cases to classify as test bugs, implementation bugs, or ambiguous cases. Uses investigative process to determine root causes without premature fixes.