Loop directory

47 loops match your filters.

Including grade C — stops on its own, but runs fewer checks than A or B. Back to A and B →

/goalEvaluationmedium risknew

Qualitative-Judge + Deterministic-Gate Loop

Improve output toward a qualitative goal ('until it's simple enough', 'until it's fast enough') judged by an LLM, while a separate deterministic gate enforces correctness; loop exits only when both pass at once.

prompt
→ Claude Code
You are improving [code/output] toward the qualitative goal: "[GOAL - e.g. until it is simple enough / reads cleanly / is fast enough]". Each iteration: 1. Generate or revise the output. 2. Run the DETERMINISTIC GATE: [tests / benchmark / lint]. If it fails, fix the regression before anything else - never skip this. 3. Ask an LLM judge: "Does this satisfy the goal '[GOAL]'? Rate 1-5 and explain." If below [THRESHOLD e.g. 4], revise and repeat. Stop when the deterministic gate passes AND the judge scores >= [THRESHOLD] in two consecutive rounds. Constraint: the judge may never lower the deterministic bar or waive the gate. Qualitative goals are the judge's domain; correctness is the gate's domain. Both must hold simultaneously to exit.
/goalMaintenancemedium risknew

Codex Manager/Worker Loop

A persistent 'manager' session monitors a separate 'worker' session, detects stalls, reviews output, prompts fixes, and advances through ordered tasks; stop when every task passes manager review.

prompt
→ Claude Code
You are the MANAGER agent over a list of N tasks (some must run in a fixed order). Monitor a separate WORKER session per task. After each worker session: (a) review its output against the task spec; (b) if unsatisfactory, send a targeted fix prompt and wait for the worker to re-run; (c) if satisfactory, commit it and advance to the next task. Repeat until all tasks pass review. Stop when every task has a passing review; report a per-task commit summary for human sign-off.
/goalMaintenancemedium risknew

Explore-Fix + Blind Audit Loop

Loop explore->fix until two consecutive 'all clear' passes, then a FRESH-context blind audit; if it finds issues, re-enter the loop; stop only when the blind audit is also clear.

prompt
→ Claude Code
Harden this codebase in two phases. PHASE 1 (Explore-Fix): hunt bugs, security issues, and logic errors; fix every finding; record a 'pass' when you find nothing. Repeat until you get TWO consecutive passes. PHASE 2 (Blind Audit): in a FRESH context with no memory of Phase 1, audit the same code independently. If it finds anything, return to Phase 1. Stop only when the blind audit also returns zero findings. Report total rounds and all fixes.
/goalEvaluationmedium risknew

ABCD Adversarial Criteria Loop

Four agents: A defines criteria, B implements, C reviews in a sub-loop until clear, then D (non-implementing) independently verifies against A's ORIGINAL criteria; stops when D approves + A signs off.

prompt
→ Claude Code
Run a four-agent quality pipeline. A: define explicit acceptance criteria. B: implement against them. C: review B's work in a loop until no findings remain. D (adversarial, did NOT implement): independently verify the output against A's ORIGINAL criteria, ignoring C's verdict -- list any criterion not provably met; output APPROVED or FAIL+reason, no fixes. Final gate: D APPROVED and A signs off. The separation (D never saw the implementation reasoning) is the point.
/goalDesign & UXmedium risknew

The Three.js Game Loop

Build a playable loop first, then iterate until it passes gameplay, visual, perf & release checks.

prompt
→ Claude Code
Build the smallest PLAYABLE core loop first (move, interact, win/lose). Then iterate: playtest it, pick the weakest aspect (fun, feel, visuals, performance), improve it, and playtest again. After each pass, run the checklist: plays on desktop + mobile, no visual glitches, stable frame rate, clear UI. Repeat until every check passes.
/goalMaintenancemedium risknew

Agentomics-ML

Autonomous ML experimentation loop that produces a suitable model for a dataset.

prompt
→ Claude Code
Given a dataset and a target metric, autonomously build a good model. Loop: inspect the data, propose a modeling approach (features, model, hyperparameters), train, evaluate on a held-out split, and record the metric. Keep changes that improve held-out performance, revert those that don't. Repeat until the metric plateaus; output the best model and a summary of what worked.
/goalMaintenancehigh risknew

The Mobile Closed-Loop Build

Install on a virtual device, tap through every screen, fix crashes, repeat until store-ready.

prompt
→ Claude Code
Build and install the app on a virtual device. Programmatically tap through every screen and flow; verify layouts across screen sizes; watch for crashes, broken navigation, and slow frames. When you hit a defect, reproduce it, fix it, rebuild, and re-run the full walkthrough. Repeat until a complete walkthrough passes clean on all target device sizes.
/goalTestinghigh risknew

The Code Migration Loop

Environment-in-the-loop: plan, set up env, migrate, run tests, refine until the port passes.

prompt
→ Claude Code
Migrate this code to the target language/framework with the environment in the loop. Steps: (1) plan the migration and set up a runnable target environment; (2) port a slice; (3) run the target's tests against it; (4) read failures and refine. Repeat slice by slice until the migrated code passes the same behavioral tests as the original. Keep a mapping of old->new for traceability.
/goalTestingmedium risknew

The Multi-File Refactor Loop

Plan the change, apply transforms across call sites, run tests after each, until behavior is preserved.

prompt
→ Claude Code
Plan a refactor that spans multiple files. First map every call site / dependency affected. Apply the change in small, behavior-preserving steps; after EACH step run the full test suite and commit only if green. If a step changes behavior, revert and rethink. Repeat until the refactor is complete, all references are updated, and the suite is green.
/goalCode Reviewmedium risknew

The spec dev-review loop

A specification-quality workflow that writes ticket-scoped planning artifacts, applies critical gates, logs review rounds, and stops only at approval or a clear blocker.

prompt
→ Claude Code
For one ticket or story, write a scoped spec packet: findings, progress, task plan, and a rubric with critical gates and edge cases derived from that ticket. Verify factual claims against the repo before relying on them. After each edit round, run an independent adversarial review against the rubric and require it to check that prior findings remain resolved. If the review finds material issues, fix every affected spec file consistently, append the finding and fix to the review log, and review again. Stop only when the reviewer returns ready with no material findings, or when the round cap is reached and the remaining blocker is logged for human decision.
Sponsored · ConnectMyEmail

Loops that read your inbox.

Email is the missing tool in your harness. ConnectMyEmail gives Claude Code and Codex a clean MCP into Gmail, iCloud and IMAP — triage, drafts, follow-ups, on a loop.

connectmyemail.com →
/goalPlanninglow risk

Refine goals before execution

Rewrite your request into a precise end state with verification criteria and stop condition, confirm it, then execute and stop when verified.

prompt
→ Claude Code
/goal Before doing anything, rewrite my request into a precise goal: the exact end state, how you will verify it, what you must not touch, and the stop condition (including a turn cap). Confirm that goal with me, then execute against it and stop when the end state is verified
/goalPerformancemedium risk

Cut checkout p95 under 120ms

Optimize checkout-service code until the p95 latency benchmark hits 120ms and correctness tests pass, recording each iteration's change and result.

prompt
→ Claude Code
/goal Reduce checkout p95 latency below 120 ms, verified by the checkout benchmark, while keeping the correctness suite green. Use only checkout-service code, benchmark fixtures, and related tests. Work in checkpoints: after each iteration, record the change, benchmark result, test result, and next experiment. Stop when p95 is below 120 ms and correctness passes, or if the benchmark cannot run or no valid optimization path remains; then report attempted paths, evidence, blockers, and next input needed
/goalRefactoringhigh risk

Fix boolean naming across codebase

Scan, plan, and refactor all boolean naming violations across the codebase until 100% green without stopping.

prompt
→ Claude Code
/goal Autonomously scan, plan, refactor, and fix all boolean naming, double negatives, mixed polarity, single-letter boolean parameters (v bool, b bool), bare verb/noun identifiers (stop bool -> isStopped bool, stopOnFail -> isStopOnFail), awkward isExists identifiers (isExists -> isDefined), compound negative chains (!a || !b || c -> discrete checks), and complex condition violations across the codebase, modifying source files directly to enforce affirmative prefixes (is and has only (can, should, was, etc. are banned)), implicit evaluation (no == true), positive framing (no !isSuccess), and discrete condition decomposition until 100% green without stopping
/goalCode Reviewmedium risk

Land a change through verified review

Implement a requested change, run documented checks, and surface verification evidence in the transcript until complete or blocked after 20 turns.

prompt
→ Claude Code
/goal The requested change is implemented, reviewed, verified by the project’s documented checks, and Claude has surfaced evidence in the transcript: changed files, commands run, exit codes, risks, rollback notes, and next steps. Stop after 20 turns if blocked or if progress stalls
/goalTestingmedium risk

Fix the flaky checkout test

Run checkout tests repeatedly until 20 consecutive passes, logging failure modes and hypotheses after each iteration.

prompt
→ Claude Code
/goal Reproduce and fix the flaky checkout test so it passes 20 consecutive runs, verified by npm test -- checkout, while preserving checkout API behavior and existing correctness tests. Use the checkout test files, checkout service code, fixtures, and related logs. Between iterations, record the observed failure mode, hypothesis, change, and rerun result. If reproduction stays unavailable or valid paths are exhausted, stop with reproduction attempts, logs, most likely absent condition, blocker, and next input needed
/goalRefactoringmedium risk

Convert JavaScript to strict TypeScript

Convert all src/ JS files to TypeScript with strict annotations until npm test passes cleanly.

prompt
→ Claude Code
/goal "Convert all JavaScript files in src/ to TypeScript, add strict type annotations, and ensure npm test passes with zero errors"

Two reviewers from different model families, each in a fresh context, must both pass an objective rubric before a PR is opened — the maker-checker split with real model diversity. Each failed round fixes only what was flagged and re-reviews with reviewers that have no memory of the last round, so nothing anchors on prior findings. Hard cap of three rounds, tests may never be edited to pass, and the loop ends by opening a PR rather than pushing. Adapted from ECC's /santa-loop (affaan-m/ECC, MIT), which auto-pushes on agreement and has no verifiable exit; this version adds the test-exit condition and the human merge gate.

prompt
→ Claude Code
/goal Ship the current diff only after two independent reviewers both PASS. Scope is `git diff --name-only HEAD` (or the paths I name). First write a rubric with objective PASS/FAIL criteria: correctness, security (no secrets, injection, OWASP top 10), error handling, completeness, internal consistency, no regressions. Each round launch two reviewers in parallel with fresh context and no memory of earlier rounds: Reviewer A is a Claude subagent, Reviewer B is a different model via `codex exec --sandbox read-only` (fall back to a second Claude subagent and say so in the report). Both return a JSON verdict with per-criterion PASS/FAIL and critical issues. If either FAILs: fix only the flagged issues with minimal diffs, never modify the tests to make them pass, commit "fix: address review findings (round N)", run `npm test`, and re-review with fresh reviewers. Exit when both reviewers PASS and `npm test` exits 0 — then open a PR for me to merge; never push to main or merge. Stop after 3 rounds; if still failing, print the unresolved issues and escalate to me instead of shipping.
/goalTestinghigh risk

Complete PLAN.md until tests pass

Work through every task in PLAN.md, pausing for credentials or destructive actions, until pnpm test and pnpm build both succeed.

prompt
→ Claude Code
/goal Implement every task in PLAN.md without stopping until pnpm test passes and pnpm build succeeds. Execution strategy: assess dependencies, shared context, write overlap, and independent verification before using subagents; keep final integration with the main agent. Surface each checkpoint with commands and exit codes. Pause for credentials, production data, or destructive actions

Community goal loop for testing, sourced from github. Verified exit condition, evaluator-gated.

prompt
→ Claude Code
/goal every task in PLAN.md is marked [x], npm test exits 0 with output shown Cap the run at 20 turns.
/goalResearchlow risk

Source-verified brief loop

Write a one-page brief where every claim has three or more sources and every link is opened and confirmed to support the claim — the loop that catches hallucinated citations a single prompt never can.

prompt
→ Claude Code
/goal write a one-page brief on [TOPIC] where every claim has at least three sources and every link opens to a real page that supports the claim. Open each link to confirm it before you call it done. Replace any source that is dead or does not back up the claim. Done when every source check passes on every claim — maximum 30 iterations.
Sponsored · ConnectMyEmail

Loops that read your inbox.

Email is the missing tool in your harness. ConnectMyEmail gives Claude Code and Codex a clean MCP into Gmail, iCloud and IMAP — triage, drafts, follow-ups, on a loop.

connectmyemail.com →
/goalResearchlow risk

Kill-criteria loop

Make every live option declare the single fact that would disqualify it upfront, then hunt for that evidence.

prompt
→ Claude Code
/goal for each live option [LIST], state its ONE disqualifying condition upfront, then run an evidence hunt for that disqualifier. Done when: for every option, the state-file kill-criteria.md contains either PASTED evidence the disqualifier is true (kill it) or a documented search showing it isn't (keep it). No option stays undecided. Paste the evidence table as proof, or paste what's still missing and stop. Judge: a second smaller model checks each verdict cites evidence. Budget: cap $[X]. Hard cap: stop after 1 iteration per run.
/goalDatabasehigh risk

Index every foreign key

Query the catalog for unindexed foreign keys, create a migration per missing index, and verify each with a full test run until all FKs are covered or 6 turns complete.

prompt
→ Claude Code
/goal every foreign key in the schema has a covering index — query the catalog (pg_catalog or information_schema) to list FKs with no matching index, add one migration per missing index, and re-run the catalog check until it returns zero rows. After each index, apply the migration on a scratch database and run the full test suite to verify nothing regresses; stop after 6 turns. Only add indexes — never change constraints or table definitions — and propose the final migration set as a PR for review.
/goalCImedium risk

Get lint and E2E tests passing

Execute work from PLAN.md until npm run lint and npm run test:e2e pass, scoping changes per AGENTS.md.

prompt
→ Claude Code
/goal Implement the work described in PLAN.md. Stop only when npm run lint and npm run test:e2e pass. Follow AGENTS.md, keep changes scoped, and report verification evidence Stop after 25 turns even if the goal is not reached.
/goalEvaluationmedium risk

Search the literature, verify every source

Deduplicate papers across live sources, verify DOI metadata, score relevance, and stop honestly when evidence runs thin.

prompt
→ Claude Code
Search the current PubMed and Semantic Scholar APIs for papers about [topic] and produce a DOI-verified CSV. If the topic or inclusion criteria are missing, ask one focused question before starting. Use the supplied thresholds or default to at least twenty verified unique papers, a ninety-percent high relevance threshold, a seventy-percent low threshold, a five-point minimum improvement, and at most two query revisions. Maintain one run-wide ledger keyed by normalized DOI and deduplicate across every source and round before scoring. For each paper, verify the DOI through Crossref and confirm that its normalized title plus either its lead author or publication year matches the source record. Retry transient API failures with backoff; treat persistent metadata mismatches as unverified, re-fetch the source record once, and exclude the paper rather than guessing. Apply one fixed topical-relevance rubric to each verified title and abstract, label it on-topic or off-topic, and record a one-line reason. Never change the rubric during the run. Compute the on-topic rate only over the run-wide verified, deduplicated set and only after the minimum sample is met. Succeed when the set reaches the high threshold. Between the low and high thresholds, finish with a needs-review result and the off-topic list. Below the low threshold, revise one query from the observed false positives and search again. Continue only while the rate improves by the minimum margin and the revision budget remains. Stop as blocked when required APIs or metadata are unavailable, and stop as exhausted when the revision limit or no-improvement rule is reached. Never invent, infer, or autocomplete paper metadata. Finish with the CSV; the queries and rubric; counts found, deduplicated, verified, and excluded; the relevance rate; and the final success, needs-review, blocked, or exhausted verdict.
/goalContent & SEOlow risk

Fact-check before you publish

Inventory checkable claims, verify them against primary sources, repair high-risk mismatches, and log what stays unresolved.

prompt
→ Claude Code
Before publishing [draft], inventory every factual, statistical, quoted, or attributed claim a reader could verify. Find the best current primary source for each and label it supported, outdated, misattributed, unsupported, or unverifiable. Fix the riskiest mismatch, then recheck that claim and anything depending on it. Repeat until no high-risk unsupported claim remains or five rounds are exhausted. Never invent a source, cite evidence that does not support the claim, or alter a quotation. Ask before changing a named person’s quote or a legal, medical, or financial statement. Stop without changes if there are no checkable claims; stop as blocked when adequate evidence is unavailable. Finish with the claim-to-source table, corrections made, unresolved claims, and decisions requiring an editor.
/goalSecurityhigh risk

Burn down CVEs by reachability

Rank dependency CVEs by reachability and exposure, apply one bounded fix, and verify the whole project before moving on.

prompt
→ Claude Code
Scan the dependencies of [authorized project or current repository] for known CVEs using current advisory sources. If you cannot access the dependency graph, repository, or current advisories, report the blocker and stop. For each high or critical finding, identify the affected direct or transitive dependency, determine whether the vulnerable code is reachable, and check whether the exploit conditions exist in this project. Rank findings by severity, reachability, exposure, and available remediation. Patch or upgrade the highest-risk reachable dependency using the smallest credible change. Run the build, tests, and security scan again. Keep the change only if verification passes and no unacceptable regression appears. Repeat until no exploitable high or critical CVE remains, or every remaining finding has an evidence-backed reachability assessment and an approved risk decision. Ask before major or breaking upgrades, production changes, or accepting risk. Finish with the CVE inventory, reachability evidence, fixes, verification results, and remaining risks.
/goalPerformancemedium risk

Hold a stable frame rate

Measure frame time, CPU, GPU, and memory under fixed conditions and keep only regression-free optimizations.

prompt
→ Claude Code
Improve the frame-rate stability of [game or interactive build]. Before editing, define one repeatable benchmark with the same scene, inputs, hardware, build, resolution, and settings. If no scenario or targets are supplied, propose representative values and state them before proceeding. Record frame-time distribution, average FPS, minimum FPS, CPU use, GPU use, and memory behavior. Identify the largest measured bottleneck and make one focused optimization. Rerun the complete benchmark under the same conditions. Keep the change only if it improves the target without regressing another metric or changing expected behavior. Repeat until [FPS target] holds for [stability period] with no dip below [FPS floor], memory remains below [memory target] without an upward trend, and CPU stays below [CPU target] across two consecutive runs. Stop on success, two rounds without measurable progress, a blocker, or [iteration budget]. Finish with the benchmark setup, before-and-after measurements, retained changes, reverted attempts, and remaining bottlenecks.
/goalMaintenancemedium risk

Chase a refund until it lands

Open the claim, watch replies and deadlines, and keep the case moving until the money actually arrives.

prompt
→ Claude Code
Get my refund for [company and charge info]. Start the claim now through an approved support channel, then keep following up on replies, promises, and deadlines until the refund arrives. Keep a short case note so each follow-up has context. Stop only when the refund is received or you are genuinely blocked and need me.
/goalMaintenancehigh risk

Prove your backups actually restore

Restore random real recovery points, verify integrity and RPO/RTO, and keep every failure as a regression drill.

prompt
→ Claude Code
For each required recovery scenario, randomly select an eligible real backup or recovery point and restore from zero in a disposable, isolated clean-room using only documented materials. Verify integrity, dependencies, representative reads and writes, and actual RPO and RTO. Repair one blocker, destroy the environment, and retry fresh. Stop when every scenario reaches its predefined consecutive-success streak or an exception is explicitly accepted. Never overwrite production, expose restored data, or initiate failover without approval.
/goalTestingmedium risk

Stabilize flaky tests for good

Measure the flakiness, fix one root cause at a time, and stop after a defined streak of stable full-suite runs.

prompt
→ Claude Code
Run [test suite] [N] times under the same conditions and list tests whose result changes. Fix the most frequent flake at its root cause—shared state, timing, ordering, or an external dependency—never with a blind sleep or retry. Run that test [N] times, then rerun the full suite. Repeat until [N] consecutive full-suite runs pass, progress stalls, or approval is required. Return each flake, root cause, fix, evidence, and justified quarantine.
Sponsored · ConnectMyEmail

Loops that read your inbox.

Email is the missing tool in your harness. ConnectMyEmail gives Claude Code and Codex a clean MCP into Gmail, iCloud and IMAP — triage, drafts, follow-ups, on a loop.

connectmyemail.com →