LOOPS

Self-pacing agent workflows. Copy a loop, paste it into your agent, let it run.

Compatible tools

Works with your agent

Claude Code
Cursor
Codex
Gemini CLI

What are loops

Autonomous agent workflows that iterate until done

A loop is a structured prompt that tells an AI coding agent (Claude Code, Cursor, Codex, Gemini CLI) to repeat a task autonomously until a measurable exit condition is met. Instead of prompting, inspecting, re-prompting manually — you define the goal, the check command, and the exit condition, then let the agent self-pace.

How it works

The loop execution cycle

1
Define goal + exit condition
What does 'done' look like? A passing test suite, a clean audit, a merged PR.
2
Set the check command
The command the agent runs between iterations to evaluate progress.
3
Agent executes a step
The agent does one unit of work — fix a bug, write a test, tighten a constraint.
4
Agent self-evaluates
Runs the check command, reads output, decides: continue or stop.
5
Loop or exit
If exit condition is not met and iterations remain, the agent continues. Otherwise it stops and reports.
24 loops

Assumption Mapper

Extract and rank risky assumptions from a spec. Loop until each has a validation method assigned.

DefiningManual|Claude CodeCursorCodex
See details

Metric Definer

Define north star + input metrics for a feature. Loop until metrics are measurable, attributed, and baselined.

DefiningManual|Claude CodeCursorCodex
See details

Problem-Worth-Solving Gate

Validate a problem has evidence before coding. Loop until problem statement has user signals, data, and cost-of-inaction.

DefiningManual|Claude CodeCursorCodex
See details

Build Until Green

Hardened

Run production build, fix compile/bundle errors, repeat until exit 0.

BuildingManual|Claude CodeCursorCodex
See details

Context-Window Packer

Compress context into minimal tokens before handing to an agent. Loop until agent succeeds on first pass.

BuildingManual|Claude CodeCursor
See details

Harness Tightener

After agent run, review for drift from spec. Tighten constraints and re-run until output matches intent.

BuildingManual|Claude CodeCursor
See details

Ship PR Until Green

Hardened

Implement, test, push, open PR, fix CI until all checks pass.

BuildingManual|Claude CodeCursorCodex
See details

Type-Safe Refactor

Rename/restructure with TypeScript as guardrail. Loop until tsc exits 0 with no any escape hatches.

BuildingManual|Claude CodeCursor
See details

Changelog Generator

From commits since last tag, generate user-facing changelog. Loop until all changes categorized.

ShippingManual|Claude CodeCursorCodex
See details

Deploy Canary Watch

Hardened

After deploying, monitor error rates and latency. Loop until canary is stable or rollback triggered.

ShippingManual|Claude CodeCodex
See details

Feature Flag Cleanup

Find stale flags (>30 days, 100% rolled out). Remove them one by one until none remain.

ShippingManual|Claude CodeCursorCodex
See details

Coverage Until Threshold

Hardened

Add focused tests until coverage target met (default 80%).

TestingManual|Claude CodeCursor
See details

E2E Until Green

Hardened

Run Playwright end-to-end tests, fix failures, repeat until suite passes.

TestingManual|Claude CodeCursor
See details

Mutation Testing Pass

Run mutation tests, fix surviving mutants until mutation score meets threshold.

TestingManual|Claude CodeCursor
See details

Visual Regression Fixer

Run visual diff tests, fix CSS regressions until all screenshots match baselines.

TestingManual|Claude CodeCursor
See details

Accessibility Audit Loop

Run axe/lighthouse, fix a11y violations one by one until score meets threshold.

ReviewingManual|Claude CodeCursor
See details

Bundle Diet

Analyze bundle size, remove/replace heavy deps until budget met.

ReviewingManual|Claude CodeCursor
See details

De-Sloppify Pass

Hardened

Remove debug code, tighten naming, delete dead branches. Loop until clean.

ReviewingManual|Claude CodeCursor
See details

Security Scan Loop

Hardened

Run SAST/dependency audit, fix vulnerabilities until clean.

ReviewingManual|Claude CodeCursorCodex
See details

Agent Output Validator

Run agent, validate output against schema/checklist, feed corrections back. Loop until passes.

AgenticManual|Claude CodeCursor
See details

Context Compression Loop

Iteratively summarize/compress project context until it fits target token budget.

AgenticManual|Claude CodeCursor
See details

Multi-Agent Coordinator

Orchestrate parallel agent tasks. Loop until all subtasks complete and merge cleanly.

AgenticManual|Claude CodeCodex
See details

Prompt Regression Suite

Run prompt against test cases, fix regressions until all pass.

AgenticManual|Claude CodeCursor
See details

PR Babysitter

Hardened

Every 15 minutes, check open PRs, fix CI, rebase, nudge reviewers.

CIInterval|Claude CodeCodexCursor
See details