循环工作流
可复用的提示词和分步工作流,让编码智能体自主推进任务直到完成。
全部
Coverage Until Threshold
Add focused tests until coverage meets your threshold (e.g. 80%), without changing production behavior unnecessarily.
CI Failure Watcher
Poll CI on an interval, investigate failures when checks go red, and push fixes until green.
Build Until Green
Run the production build, fix compile and bundling errors, and loop until the build succeeds.
A11y Audit Until Clean
Run automated accessibility checks on changed routes, fix violations, and repeat until the audit is clean.
PR Babysitter
Every 15 minutes, inspect open PRs with a watch label: nudge reviewers, fix CI, rebase if behind main.
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.
Post-Edit Test Guard
Hook-based loop that runs related tests after file edits to catch regressions early.
Autoloop TDD
Test-first loop: write a failing test, implement the minimum code to pass, refactor, and repeat.
Pre-Commit Guard
Hook that runs tests before git commit commands to block commits when the suite is red.
API Contract Until Match
Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.
Docs Sync After Edits
After code changes, find affected docs and update README, API references, and inline comments to match.
Spec-First Ship
Implement from a written spec.md checklist — each iteration completes one unchecked requirement with verification.
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.
Changelog Sync After Ship
After shipping a feature, loop until CHANGELOG.md has a user-facing entry and conventional commits are reflected.
Deploy Verification Loop
On an interval, hit health and smoke endpoints after a deploy until all checks return healthy responses.
Flaky Test Triage
Run failing tests repeatedly, classify each failure as flaky or real, and fix only confirmed regressions.
Format Until Clean
Run the formatter, fix any remaining style issues, and loop until the codebase formats cleanly with no diffs.
Fix CI Until Green
Fetch the latest failed CI run, reproduce the failure locally, fix it, and repeat until checks pass.
Security Audit Weekly
Weekly npm audit scan, triage vulnerabilities by severity, and propose or apply safe patches.
Dependency Audit Weekly
Weekly loop to check outdated dependencies, propose safe upgrades, and open a summary.
OpenAPI Sync Until Valid
Keep openapi.yaml valid and in sync with route handlers — lint the spec and fix drift each pass.
Knip Until Clean
Find and remove dead exports, unused files, and orphan dependencies — loop until knip reports clean.
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.
PR Watch Loop
Poll open PRs labeled codex-watch every 15 minutes, review activity, and flag regressions or stale threads.
Dependency Upgrade One-by-One
Upgrade a single outdated package per iteration, fix breakages, and commit — safer than bulk npm update.
Post-Merge Regression Guard
Hook that runs smoke tests after git merge or rebase to catch integration regressions immediately.
E2E Until Green
Run end-to-end tests, fix UI and integration failures, and loop until the E2E suite passes.
Lint and Typecheck Fix
Run lint and typecheck, fix reported issues, and loop until the codebase is clean.
Test Until Green
Run your test suite, fix the smallest root cause on failure, and repeat until every test passes.
Visual Regression Until Match
Run Playwright or Percy visual snapshots on UI changes; fix unintended diffs until baselines match intentionally.
常见问题
循环(loop)到底是什么?
- 循环是面向 AI 编码智能体的一种可复用工作流,由四部分构成:目标、用于客观验证进度的检查命令、退出条件,以及最大迭代次数上限。把启动提示词粘贴给你的智能体,它就会自主推进任务,每一轮都重新运行检查命令,直到满足退出条件为止。
这和写一句普通提示词有什么区别?
- 普通提示词是一轮对话里的一条指令;循环则是围绕多轮重复的一整套系统——它告诉智能体如何验证自己的产出、什么时候该停止,这样它就能持续推进,而不需要你在每次尝试后重新手动下达指令。这种做法就是 Loop Engineering(循环工程)。
这些循环支持哪些编码智能体?
- 本页大多数循环都不绑定特定智能体——启动提示词是纯文本,可以直接粘贴给 Claude Code、Cursor、Codex 或其他任意编码智能体使用。每条循环的详情页都列出了它专门构建并测试过的智能体。