Prompt file imported from jlaws/dotfiles (
.codex/prompts/j-debug.md). Fill in{{arguments}}before use. Copyright stays with the author.
Bug / failing test: {{arguments}}
Before investigating, gather diagnostic context:
- Check git status for uncommitted changes (note them for context).
- Detect test runner from project config (package.json scripts, pytest.ini, Makefile, etc.).
- Check recent commits (
git log --oneline -10) for potential culprits. - Capture failure output: If {{arguments}} references a test name, run it first to get the current failure output.
Then invoke the debugging-methodology skill and apply the Four Phases (root cause investigation → pattern analysis → hypothesis and testing → implementation). When the cause is unclear, use the Structured Hypothesis Investigation section to enumerate and test 3-5 hypotheses; independent hypotheses may be investigated in parallel via subagents.
Once the root cause is found, you may delegate the durable regression test to the test-writer agent. Verify it fails before the fix and passes after.