Loops

Reusable prompts and workflows for coding agents.

Submit a loop
BU

Build Until Green

Run the production build, fix compile and bundling errors, and loop until the build succeeds.

7.5K Testing & quality
AA

A11y Audit Until Clean

Run automated accessibility checks on changed routes, fix violations, and repeat until the audit is clean.

7.5K Quality
CU

Coverage Until Threshold

Add focused tests until coverage meets your threshold (e.g. 80%), without changing production behavior unnecessarily.

6.9K Testing & quality
CF

CI Failure Watcher

Poll CI on an interval, investigate failures when checks go red, and push fixes until green.

4.9K CI
FC

Fix CI Until Green

Fetch the latest failed CI run, reproduce the failure locally, fix it, and repeat until checks pass.

1.4K CI
PB

PR Babysitter

Every 15 minutes, inspect open PRs with a watch label: nudge reviewers, fix CI, rebase if behind main.

1.2K CI
FU

Format Until Clean

Run the formatter, fix any remaining style issues, and loop until the codebase formats cleanly with no diffs.

1.2K Testing & quality
RS

Ralph Story Executor

Fresh-context loop: pick one incomplete story from prd.json, implement it, run backpressure checks, commit, and update progress before the next iteration.

1.1K Automation
FT

Flaky Test Triage

Run failing tests repeatedly, classify each failure as flaky or real, and fix only confirmed regressions.

1.1K Testing & quality
PG

Pre-Commit Guard

Hook that runs tests before git commit commands to block commits when the suite is red.

1K Testing & quality
DP

De-Sloppify Pass

After implementation, run a cleanup pass: remove debug code, tighten naming, delete dead branches, and align with project conventions.

1K Review
GL

Guardrails Learning Loop

When a check fails twice the same way, append a guardrail sign to .ralph/guardrails.md so the next iteration avoids repeating it.

969 Automation
DS

Docs Sync After Edits

After code changes, find affected docs and update README, API references, and inline comments to match.

958 Maintenance
DV

Deploy Verification Loop

On an interval, hit health and smoke endpoints after a deploy until all checks return healthy responses.

948 DevOps
AT

Autoloop TDD

Test-first loop: write a failing test, implement the minimum code to pass, refactor, and repeat.

919 Testing & quality
NA

npm Audit Fix Loop

Fix high/critical npm audit findings one at a time with test verification — not a blind npm audit fix --force.

916 Security
PW

PR Watch Loop

Poll open PRs labeled codex-watch every 15 minutes, review activity, and flag regressions or stale threads.

912 CI
OS

OpenAPI Sync Until Valid

Keep openapi.yaml valid and in sync with route handlers — lint the spec and fix drift each pass.

861 API
IV

Independent Verifier Pass

When implementation claims done, a separate verifier pass runs build, lint, and tests with no access to the implementer's rationale.

852 Testing & quality
KU

Knip Until Clean

Find and remove dead exports, unused files, and orphan dependencies — loop until knip reports clean.

792 Maintenance
SP

Ship PR Until Green

Implement on a branch, run tests, push, open a PR, wait for CI, and loop until checks pass and the PR is ready to merge.

769 CI
AC

API Contract Until Match

Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.

764 API
CS

Changelog Sync After Ship

After shipping a feature, loop until CHANGELOG.md has a user-facing entry and conventional commits are reflected.

763 Docs
RD

Reflexion Debug Loop

On each failed repro attempt, write a short reflection to disk, then retry with that memory — avoids repeating the same wrong fix.

747 Debugging
Feedback 💬