Loopany
Sign in
Back to templates
Ship with Confidence

Test Guardian

A weekly guardian that finds your riskiest untested code path, adds one solid test, and opens a PR.

Moderate setupLong cycleOpen loopBuilds over runs
Create directly in Loopany

How this loop works

Suggested schedule
Weekly · Mon ~6am
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
One meaningful test per week; coverage climbs steadily rather than overnight.

The prompt this runs

Set up a weekly loop that grows this project's test coverage where it matters most. Before creating it, verify the test suite actually runs on this machine - run it once as a smoke test and confirm how coverage is measured (or that it can be) - and confirm the setup with me; never create a blind loop. Every Monday around 6am my local time, find the single riskiest genuinely-untested path - core logic, an error branch, a regression-prone area real usage depends on - and add one solid, meaningful test for it, never a trivial coverage-padding test. Write and verify the test 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, and confirm it passes now and genuinely fails when the behavior it guards is broken. Open a pull request for the new test - but if a previous Test Guardian PR is still unmerged, don't stack another one; just refresh its status. Track each test PR as a markdown card with front matter `type: open` or `type: merged`, and report tests added (or coverage) as a weekly metric. Set up the loop's dashboard at creation: a kanban of the test PRs plus a chart of the 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.