ループとは正確には何ですか?
ループは、目標、進捗を客観的に検証する検査コマンド、退出条件、最大反復回数の4つで構成される、AI コーディングエージェント向けの再利用可能なワークフローです。起動プロンプトをエージェントに貼り付ければ、退出条件を満たすまで検査コマンドを再実行しながら自律的にタスクを進めます。
コーディングエージェントがタスクを完了するまで自律的に進められる、再利用可能なプロンプトと段階的なワークフロー。
Run automated accessibility checks on changed routes, fix violations, and repeat until the audit is clean.
Run the production build, fix compile and bundling errors, and loop until the build succeeds.
Add focused tests until coverage meets your threshold (e.g. 80%), without changing production behavior unnecessarily.
Poll CI on an interval, investigate failures when checks go red, and push fixes until green.
Every 15 minutes, inspect open PRs with a watch label: nudge reviewers, fix CI, rebase if behind main.
Hook that runs tests before git commit commands to block commits when the suite is red.
Run the formatter, fix any remaining style issues, and loop until the codebase formats cleanly with no diffs.
Poll open PRs labeled codex-watch every 15 minutes, review activity, and flag regressions or stale threads.
Hook-based loop that runs related tests after file edits to catch regressions early.
Run failing tests repeatedly, classify each failure as flaky or real, and fix only confirmed regressions.
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.
Keep openapi.yaml valid and in sync with route handlers — lint the spec and fix drift each pass.
Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.
After code changes, find affected docs and update README, API references, and inline comments to match.
When a check fails twice the same way, append a guardrail sign to .ralph/guardrails.md so the next iteration avoids repeating it.
After shipping a feature, loop until CHANGELOG.md has a user-facing entry and conventional commits are reflected.
On an interval, hit health and smoke endpoints after a deploy until all checks return healthy responses.
Run database migrations, fix schema issues, and loop until migrations apply cleanly in dev.
Find and remove dead exports, unused files, and orphan dependencies — loop until knip reports clean.
On each failed repro attempt, write a short reflection to disk, then retry with that memory — avoids repeating the same wrong fix.
After implementation, run a cleanup pass: remove debug code, tighten naming, delete dead branches, and align with project conventions.
Test-first loop: write a failing test, implement the minimum code to pass, refactor, and repeat.
When implementation claims done, a separate verifier pass runs build, lint, and tests with no access to the implementer's rationale.
Fix high/critical npm audit findings one at a time with test verification — not a blind npm audit fix --force.
Fetch the latest failed CI run, reproduce the failure locally, fix it, and repeat until checks pass.
Rebase or merge target branch, resolve conflicts file by file, and loop until the branch is current and tests pass.
Run lint and typecheck, fix reported issues, and loop until the codebase is clean.
Upgrade a single outdated package per iteration, fix breakages, and commit — safer than bulk npm update.
Fresh-context loop: pick one incomplete story from prd.json, implement it, run backpressure checks, commit, and update progress before the next iteration.
Weekly npm audit scan, triage vulnerabilities by severity, and propose or apply safe patches.
AI コーディングエージェント向けの再利用可能な Loops に関するよくある質問
ループは、目標、進捗を客観的に検証する検査コマンド、退出条件、最大反復回数の4つで構成される、AI コーディングエージェント向けの再利用可能なワークフローです。起動プロンプトをエージェントに貼り付ければ、退出条件を満たすまで検査コマンドを再実行しながら自律的にタスクを進めます。
通常のプロンプトは1ターンの1つの指示です。ループは繰り返されるターンを取り巻くシステムで、エージェントに自分の作業をどう検証し、いつ停止するかを伝えます。そのため、毎回プロンプトを入力し直さなくても作業を継続できます。この手法は Loop Engineering と呼ばれます。
このページのほとんどのループは特定のエージェントに依存しません——起動プロンプトはただのテキストなので、Claude Code、Cursor、Codex など任意のコーディングエージェントに貼り付けて使えます。各ループの詳細ページには、専用に構築・テストされたエージェントが記載されています。