The tests that fail intermittently — the ones eroding trust in the suite until a red build stops meaning anything.
Free & open · no signup · read-only — it ends by asking · nothing leaves your machine
You are working inside this repo. Mission: find the tests that pass and fail without the code changing — and the nondeterminism behind each — because a suite people re-run until it's green is a suite they no longer trust.
Read-only pass. Read the tests, their setup, and any run history; change nothing but the report file.
Phase 2 sweeps the codebase through every one of these, citing file and line for each finding.
sleeps, fixed timeouts, and races between test and code under test
passes alone, fails in a suite because of shared state
reliance on real time, timezones, or "now" without freezing it
real HTTP, third-party services, unmocked I/O in unit tests
unseeded random data; hash or set ordering assumed stable
unclosed connections, ports, or temp files bleeding across tests
passes locally, fails in CI on parallelism, locale, or filesystem
One structured report at the repo root — or in reports/, if you keep one — the same shape every time, ready for a teammate — or the optional Studio — to act on.
Every Goal Prompt follows the same four steps, so results are consistent and repeatable — no matter which one you run.
Look for the usual sources.
Name the nondeterminism source for every finding.
Rank by how often each blocks a build and how central the test is.
Create FLAKY.md at repo root.
Copy it and paste it into your agent inside the repo you want checked.
Install the goal plugin once — two commands — then just type /goal:flaky-test.
/plugin marketplace add GhostlyGawd/goal-prompts/plugin install goal@goal-promptsOr install only this Goal Prompt as /goal-flaky-test:
curl -fsSL https://goal-prompts.vercel.app/install | BRIEF=101 shLet an agent fetch it mid-conversation, or pull the raw Goal Prompt by URL.
https://goal-prompts.vercel.app/raw/101.mdNothing hidden — this is the whole Goal Prompt, verbatim. Read it in a minute, edit it, or copy it as-is.
# Goal: Flaky-Test Audit You are working inside this repo. Mission: find the tests that pass and fail without the code changing — and the nondeterminism behind each — because a suite people re-run until it's green is a suite they no longer trust. Read-only pass. Read the tests, their setup, and any run history; change nothing but the report file. ## Phase 1 — Hunt the nondeterminism - Look for the usual sources: time, order, network, randomness, shared resources. - Check run history or retry config for tests already known to be re-run. - Note tests that pass alone but might fail in a parallel or shuffled suite. ## Phase 2 — Audit through 7 lenses Name the nondeterminism source for every finding. 1. **Timing & waits** — sleeps, fixed timeouts, and races between test and code under test 2. **Order dependence** — passes alone, fails in a suite because of shared state 3. **Clock & date** — reliance on real time, timezones, or "now" without freezing it 4. **Network & external** — real HTTP, third-party services, unmocked I/O in unit tests 5. **Randomness** — unseeded random data; hash or set ordering assumed stable 6. **Resource leakage** — unclosed connections, ports, or temp files bleeding across tests 7. **Environment sensitivity** — passes locally, fails in CI on parallelism, locale, or filesystem ## Phase 3 — Curate - Rank by how often each blocks a build and how central the test is. - For each, give the fix — freeze the clock, seed the data, mock the boundary, isolate the resource. - Decide fix-now versus quarantine: keep a flaky critical test's intent, but stop it blocking others. ## Phase 4 — Report Create `FLAKY.md` at repo root: 1. **Suspected flakes** — each: test · nondeterminism source · how to reproduce · confidence 2. **Fixes** — the deterministic replacement for each source 3. **Quarantine list** — the flakes to isolate now versus fix now, and why 4. **Prevention** — the patterns (fixed clock, seeded random, sanctioned mocks) to adopt Start the report with today's date. If `FLAKY.md` already exists from a previous run, read it first and lead with what changed since. ## Rules - Name the source of nondeterminism; "sometimes fails" is not a diagnosis - Quarantine to unblock, but quarantine is a debt, not a fix - No test suite in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding. - If a `reports/` directory exists at the repo root, write the report there instead of the root. - Before asking, present the top findings as a ranked list in plain words - Report only — end by asking which flaky tests to fix first
reports/ directory exists at the repo root, write the report there instead of the root.Trace latent bugs, unhandled edge cases, and race conditions; rank by user pain with repro paths and fix sketches.
Map what is tested against what is riskiest, and produce a test-writing plan that buys the most safety per hour.
Find swallowed errors, missing logs, and monitoring blind spots — everywhere the system can break without anyone knowing.
The bugs that only appear under load — races, shared mutable state, and ordering assumptions that hold on a quiet laptop and break in production.
Runs inside these playbooks — curated sequences you can launch with one paste: