.agents/skills/flaky-test-fixer/SKILL.md
Establish whether a failure is caused by the current change, deterministic, infrastructure, or genuinely flaky. “Flaky”, “pre-existing”, and “unrelated” are conclusions that require evidence. Treat a failure on the current change as caused by that change until evidence identifies another mechanism; otherwise call it unknown.
Never make CI green by weakening or deleting assertions, filtering unexpected inputs, increasing timeouts, or adding unexplained retries.
Spend one evidence pass on the exact failing command, test name, assertion or error, environment, first actionable error, last meaningful log line, whether the test process started, and the current diff. Do not reproduce or search test code before this gate.
Evidence for an unrelated flake can include a passing rerun plus a credible race mechanism, the same failure on the unchanged target branch, a tracked known-flake entry, or a reproducible ordering or resource-contention dependency. A passing rerun by itself is evidence of nondeterminism, not proof that the current change is unrelated.
master.AGENTS.md. Report commands, iteration counts, and unproved claims.Treat a hang as a potentially masked failure. Inspect the last meaningful error and leaked handles such as tracer or remote-configuration timers, sockets, child processes, servers, and unfinished hooks before considering a timeout increase.
After the classification gate, when a suspected unrelated flake appears during another task, delegate its investigation immediately if sub-agents are available and the investigation has a disjoint write scope. Continue the main task while it runs.
Give the sub-agent:
Do not duplicate the sub-agent's investigation in the main thread or let it modify files also being changed there.
A separate branch, commit, or draft PR requires explicit user authorization. When authorized, isolate a genuine unrelated flake fix from the feature change and base it on the appropriate clean target branch. If a confirmed unrelated flake cannot be fixed immediately, a temporary skip is not a fix and requires a tracked reason in its own authorized change; never silently weaken an assertion.
Report: