Loopany
Sign in
Back to templates
CI, Test & Security

CI Doctor

A daily doctor that hunts your flaky tests and CI slowdowns and fixes or quarantines the worst offender.

Moderate setupShort cycleOpen loopBuilds over runs
Setup in Loopany

How a run flows

Before first run
Verify CI history reads
On schedule
Every day · 7am
Step 1 · Hunt
The worst offender
Isolated git worktree · off main
Step 2 · Fix
Stabilize or speed up
Step 3 · Or quarantine
Skip with a linked issue
Step 4 · Ship
Open a PR
Metric
Flaky failures / week
Report
Latest diagnosis
open loop — repeats on the next tick, picking up where it left off
How this loop works — schedule, exit, notifications
Suggested schedule
Daily · ~7am
Loop type
Open loop — an ongoing monitor with no finish line.
Exit condition
Runs indefinitely (no finish line).
Notifications
On by default — you're alerted on each run's outcome (completion or failure). Silence with notify: never.
Ease of starting
Some setup and context are needed before the first useful run.
When you see value
Fixes the worst flaky or slow offender each day; a healthier pipeline emerges over a week.

The prompt this runs

Set up a daily loop that keeps this project's CI fast and trustworthy. Before creating it, verify this machine can read CI run history - gh for GitHub Actions, or the CI provider's API or logs - run one listing as a smoke test, and confirm the setup with me; never create a blind loop. Every morning around 7am my local time, look at recent CI runs for the worst reliability or speed problem - a test that fails intermittently, a step whose duration has crept up, a frequently-retried job - and address the single worst offender. Prefer a real fix: stabilize the flaky test or speed up the slow step, verified in a fresh git worktree off the main branch and located outside the loop folder - the loop folder is a synced content home, not a workspace - so neither my working checkout nor the sync is polluted. If a genuine fix is not safe yet, quarantine it instead - skip the flaky test with a linked tracking card so it stops blocking merges, never a silent deletion. Open a pull request for the fix or quarantine - never while a previous CI Doctor PR is unmerged. Track each as a markdown card with front matter `type: open` or `type: merged`, and report the CI pass rate (or average run duration) as a daily metric. Set up the loop's dashboard at creation: a kanban of the cards plus a chart of that metric over time.

This is the exact intent appended to the bootstrap when you create the loop — your coding agent reads it, then proposes cadence and config and confirms with you before creating anything.