CI Debugging
Overview
CI failures are diagnosed systematically, not by guessing. This skill prevents the common anti-pattern of "just re-run it" by enforcing a hypothesis-first approach.
Constraints
- Never suggest "retry the build" as a first action
- Never add retry logic to "fix" a flaky test
- Never push a speculative fix without reproducing locally first
- Always form a hypothesis before making changes
Process
1. Read the failure
Read the full CI log output. Identify:
- What failed: test, lint, typecheck, build, deploy, or infrastructure
- When it started failing: this commit, recent merge, or intermittent
- Error message: exact error text, not a summary
2. Form a hypothesis
Before touching any code, state a hypothesis: "I believe X is failing because Y, and I can verify by Z."
Good hypotheses are specific and falsifiable:
- "The test fails because the database migration added a NOT NULL column and the test fixture doesn't set it"
- "The build fails because Node 20 dropped support for this API and CI upgraded last week"
Bad hypotheses:
- "Something is wrong with the tests"
- "CI is flaky"
Graph-assisted hypothesis grounding. Prefer CodeGraph/Repowise over raw
Grep for locating the actual source/test code behind the failing log line
before stating the hypothesis. See