Published loops
40
Copies
467
Installs
63
Views
2,600
Start the "Ship PR Until Green" loop. Goal: PR is open with all CI checks passing Max iterations: 10 Between iterations run: gh pr checks Exit when: all PR checks are success Step 1: Implement the change, test locally, push, open PR, and fix CI until green. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "De-Sloppify Pass" loop. Goal: recent changes are clean, minimal, and convention-aligned Max iterations: 4 Between iterations run: npm run lint && npm test Exit when: review finds no slop and checks pass Step 1: Review the diff for debug code, dead branches, and naming issues. Fix them with minimal diffs. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
/loop 15m Start the "PR Babysitter" loop. Goal: open PRs labeled codex-watch are healthy (CI green, rebased, not stale). Max iterations: 20. Between iterations run: gh pr list --label "codex-watch" Exit when: each watched PR is green and current, or escalated. Step 1: List watched PRs. Fix CI once, rebase if behind, comment if stale. Escalate repeated failures.
Start the "Coverage Until Threshold" loop. Goal: coverage meets the target threshold (default 80%) with all tests passing Max iterations: 12 Between iterations run: npm test -- --coverage Exit when: coverage threshold is met and tests exit 0 Step 1: Run coverage. Add focused tests for the biggest uncovered gaps, then repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Build Until Green" loop. Goal: production build succeeds Max iterations: 10 Between iterations run: npm run build Exit when: npm run build exits 0 Step 1: Run the build. If it fails, fix the first error, then repeat until green. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Spec-First Ship" loop. Goal: every requirement in spec.md is implemented and checked off Max iterations: 15 Between iterations run: npm test Exit when: spec.md has no unchecked requirements Step 1: Read spec.md, implement the first unchecked item, verify it, mark [x], and stop this iteration. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "E2E Until Green" loop. Goal: E2E suite passes Max iterations: 10 Between iterations run: npm run test:e2e Exit when: E2E command exits 0 Step 1: Run E2E tests. Fix the first failing spec, then repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Migration Until Applied" loop. Goal: all database migrations apply cleanly Max iterations: 6 Between iterations run: npx prisma migrate status Exit when: migrate status shows no pending failures Step 1: Run migrations. Fix schema or SQL errors, then repeat until status is clean. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Install and run the "Pre-Commit Guard" loop. Goal: block git commits when tests are failing. Between iterations run: npm test Exit when: tests exit 0 before each commit. Step 1: Before any git commit, run tests. Fix failures before committing.
Start the "Format Until Clean" loop. Goal: formatter runs cleanly with no remaining diff Max iterations: 5 Between iterations run: npm run format Exit when: format command succeeds and git diff is empty Step 1: Run the formatter. Fix any issues it cannot auto-fix, then repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Investigation Script Loop" loop. Goal: prove the root cause with a minimal repro script Max iterations: 8 Between iterations run: node scripts/investigate.mjs Exit when: script output demonstrates root cause Step 1: Write a tiny throwaway script that reproduces the issue. Run it and iterate on what the output shows. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "PR Self-Review" loop. Goal: three clean self-review passes on the current diff Max iterations: 3 Between iterations run: git diff main...HEAD Exit when: three passes complete with no critical findings Step 1: Review the diff like a senior reviewer. Fix findings, then re-review. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "A11y Audit Until Clean" loop. Goal: zero serious accessibility violations on changed UI Max iterations: 8 Between iterations run: npm run test:a11y Exit when: a11y audit exits 0 Step 1: Run the a11y audit on changed routes. Fix each violation, prioritizing keyboard and screen reader issues. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Independent Verifier Pass" loop. Goal: build, lint, and tests pass under independent verification Max iterations: 8 Between iterations run: npm run build && npm run lint && npm test Exit when: all verifier commands exit 0 Step 1: Run build, lint, and tests as a verifier. Trust only command output, not prior claims. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
/loop 7d Start the "Security Audit Weekly" loop. Goal: deliver a weekly npm audit summary with a remediation plan. Between iterations run: npm audit --json Exit when: summary is posted with prioritized fixes. Step 1: Run npm audit, triage by severity, and propose safe remediation steps.
Start the "API Contract Until Match" loop. Goal: API implementation matches the published contract Max iterations: 10 Between iterations run: npm run test:contract Exit when: contract test suite exits 0 Step 1: Run contract tests. Fix each schema/response mismatch with minimal diffs, then re-run. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Reflexion Debug Loop" loop. Goal: the failing test or repro passes Max iterations: 8 Between iterations run: npm test -- --testNamePattern=<failing-test> Exit when: the repro test exits 0 Step 1: Reproduce the bug. If it fails, append a reflection to .loops/reflexion.md before trying a new fix. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
/loop 7d Start the "Dependency Audit Weekly" loop. Goal: deliver a weekly dependency audit summary. Between iterations run: npm outdated || true Exit when: summary is posted with recommended upgrades. Step 1: Run npm outdated, categorize updates, and propose a safe upgrade plan.
Start the "Dependency Upgrade One-by-One" loop. Goal: critical outdated deps are upgraded with green tests Max iterations: 15 Between iterations run: npm outdated && npm test && npm run build Exit when: npm outdated shows no critical packages left or user stops Step 1: Pick one outdated package, upgrade it, fix breakages, commit, and stop. One package per iteration. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
/loop 15m Start the "Deploy Verification Loop". Goal: all post-deploy health and smoke endpoints return success. Max iterations: 8. Between iterations run: curl -fsS <your-health-url> Exit when: every configured endpoint succeeds. Step 1: Hit health/smoke URLs. If any fail, inspect deploy logs and fix or escalate.
Start the "Fix CI Until Green" loop. Goal: latest CI run on this branch passes Max iterations: 8 Between iterations run: gh run list --branch $(git branch --show-current) --limit 1 --json conclusion -q '.[0].conclusion' Exit when: latest run conclusion is success Step 1: Find the latest failed CI run, read logs, reproduce locally, fix root cause, push, and verify. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "npm Audit Fix Loop" loop. Goal: no high or critical npm audit vulnerabilities Max iterations: 10 Between iterations run: npm audit --audit-level=high && npm test Exit when: npm audit reports no high/critical issues Step 1: Pick one high/critical advisory, apply the safest fix, run tests, and repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Staging Smoke Test" loop. Goal: staging smoke checklist passes Max iterations: 6 Between iterations run: npm run smoke:staging Exit when: smoke command exits 0 Step 1: Run the staging smoke checklist. Fix the first failing item, then repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Test Until Green" loop. Goal: all tests pass Max iterations: 10 Between iterations run: npm test Exit when: tests exit 0 Step 1: Run tests. If there are failures, fix the smallest root cause, then repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Install and run the "Post-Merge Regression Guard" loop. Goal: smoke tests pass immediately after every merge or rebase. Between iterations run: npm run test:smoke Exit when: smoke suite exits 0. Step 1: After a merge, run smoke tests. Fix regressions before continuing other work.
Start the "Visual Regression Until Match" loop. Goal: visual regression suite passes with intentional UI only Max iterations: 6 Between iterations run: npx playwright test --grep @visual Exit when: visual tests exit 0 Step 1: Run visual tests. Fix unintended UI diffs; update baselines only for deliberate design changes. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Bundle Size Budget" loop. Goal: client bundle stays under the size-limit budget Max iterations: 6 Between iterations run: npm run build && npm run size-limit Exit when: size-limit exits 0 Step 1: Build and measure bundle size. If over budget, lazy-load or trim deps until size-limit passes. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Guardrails Learning Loop" loop. Goal: tests and lint pass without repeating prior failure patterns Max iterations: 12 Between iterations run: npm test && npm run lint Exit when: all checks pass Step 1: Read .ralph/guardrails.md, run checks, and if a failure repeats, add a sign before fixing. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "OpenAPI Sync Until Valid" loop. Goal: openapi.yaml lints clean and matches implemented routes Max iterations: 8 Between iterations run: npx @redocly/cli lint openapi.yaml Exit when: OpenAPI lint exits 0 Step 1: Lint openapi.yaml. Fix spec errors and handler drift until lint passes. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Autoloop TDD" loop. Goal: implement the target behavior test-first with a green suite Max iterations: 12 Between iterations run: npm test Exit when: target behavior is covered and all tests pass Step 1: Write a failing test for the next behavior, implement the minimum code to pass, refactor, and repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
/loop 5m Start the "CI Failure Watcher" loop. Goal: latest CI run on this branch is green. Max iterations: 12. Between iterations run: gh run list --branch $(git branch --show-current) --limit 1 Exit when: latest run conclusion is success. Step 1: Check CI status. If failed, read logs, fix root cause, verify locally, and push if needed.
Start the "Docs Sync After Edits" loop. Goal: documentation matches the current code changes Max iterations: 3 Between iterations run: git diff main...HEAD --name-only Exit when: all affected docs are updated and verified Step 1: Review the diff, find stale docs, update them, and verify accuracy. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Knip Until Clean" loop. Goal: knip reports no unused code or dependencies Max iterations: 5 Between iterations run: npx knip Exit when: knip exits 0 Step 1: Run knip. Remove dead exports and unused deps with minimal diffs; verify tests still pass. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Lint and Typecheck Fix" loop. Goal: lint and typecheck are clean Max iterations: 8 Between iterations run: npm run lint && npx tsc --noEmit Exit when: both commands exit 0 Step 1: Run lint and typecheck. Fix reported issues with minimal diffs, then repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Install and run the "Post-Edit Test Guard" loop. Goal: after each batch of file edits, related tests must pass before continuing. Between iterations run: npm test -- --findRelatedTests <edited files> Exit when: related tests exit 0. Step 1: After edits, run related tests. If they fail, fix before making more changes.
/loop 15m Start the "PR Watch Loop". Goal: keep codex-watch PRs healthy and unblocked. Between iterations run: gh pr list --label codex-watch --json number,title,state,statusCheckRollup Exit when: status report is delivered for every watched PR. Step 1: List codex-watch PRs, check CI and reviews, and report or fix trivial blockers.
Start the "Flaky Test Triage" loop. Goal: classify failing tests as flaky vs real and fix only real regressions Max iterations: 5 Between iterations run: npm test -- --testPathPattern=<failing-suite> Exit when: every failure is classified and real regressions are fixed or explicitly deferred Step 1: Run the failing suite multiple times. Classify each failure, fix real ones, and document flaky behavior. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Ralph Story Executor" loop. Goal: every story in .ralph/prd.json has passes: true Max iterations: 20 Between iterations run: npm test && npm run lint && npm run build Exit when: no stories remain with passes: false (respond "ALL STORIES ARE COMPLETE") Step 1: Read .ralph/prd.json and .ralph/progress.md. Pick one incomplete story, implement it, run backpressure checks, commit, update prd.json and progress.md, then stop this iteration. Self-pace this loop. Each iteration does exactly one story. State lives on disk, not in chat history.
Start the "Changelog Sync After Ship" loop. Goal: CHANGELOG.md has accurate [Unreleased] entries for this ship Max iterations: 3 Between iterations run: git log -5 --oneline Exit when: changelog covers all user-visible changes Step 1: Review recent commits, write Keep-a-Changelog entries for user-visible changes, and verify completeness. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Merge Conflict Resolver" loop. Goal: branch is rebased on main with no conflicts and tests pass Max iterations: 8 Between iterations run: npm test Exit when: rebase completes and tests exit 0 Step 1: Rebase on main. Resolve conflicts one file at a time, run tests, continue. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.