PR ReviewMedium risk
PR Babysitter Loop
Monitor a pull request until CI is green and review comments are resolved.
What this Loop Engineering template does
Monitor this pull request and drive it to a mergeable state: keep CI green and resolve review comments, without merging.
This is an active pull request. Read the failing checks and review threads before acting. Prefer small, focused changes.
When to use it
Long-running pull requests
CI repair
Review comment follow-up
When not to use it
High-risk merges without human approval
Unclear product decisions
Database migrations without rollback
Validation checks
validation
✓All GitHub checks pass
✓No unresolved review comments remain
✓npm test exits 0
✓npm run lint exits 0
Boundaries & stop rule
!Do not merge without human approval
!Do not delete tests to make CI pass
!Do not modify unrelated files
!Do not force-push unless explicitly allowed
Stop rule — Stop when all checks pass or after 5 failed attempts. If blocked, summarize failing checks, attempted fixes, and the recommended human decision.
Copy the loop prompt
claude-goal.txt
/goal Monitor this pull request and drive it to a mergeable state: keep CI green and resolve review comments, without merging.Work toward this goal until all validation checks pass or the stop rule is reached.Loop cycle:1. Discovery — Read the latest signal for this template before acting: CI output, issue detail, review comment, dataset report, or content brief.2. Handoff — Hand the work to one agent in an isolated branch, worktree, or clearly scoped session. Keep final approval with a human.3. Verification — Use an independent review pass to confirm the result, inspect the diff or artifact, and reject shortcut work.4. Persistence — Save a short run note with the signal reviewed, actions taken, validation result, and next recommended step.5. Scheduling — Run manually until the loop is reliable; only then consider a scheduled or event-triggered run.Context:This is an active pull request. Read the failing checks and review threads before acting. Prefer small, focused changes.Validation:All GitHub checks passNo unresolved review comments remainnpm test exits 0npm run lint exits 0Independent checker:Use an independent review pass to confirm the result, inspect the diff or artifact, and reject shortcut work.Boundaries:Do not merge without human approvalDo not delete tests to make CI passDo not modify unrelated filesDo not force-push unless explicitly allowedStop rule:Stop when all checks pass or after 5 failed attempts.Maximum iterations: 5Budget:Stop before exceeding the agreed per-run token budget.Human approval:Required before merge, deploy, delete, purchase, or external communication.Fallback:If blocked, summarize failing checks, attempted fixes, and the recommended human decision.Do not delete tests, bypass checks, or modify unrelated files just to satisfy the validation condition. If blocked, stop and summarize the blocker, attempted fixes, and recommended next action.
Failure modes to watch
Agent deletes or weakens tests
Agent changes unrelated files
Agent loops on the same CI error
Agent merges without review
Loop Engineering FAQ
No. The boundaries forbid merging without human approval. The loop drives the PR to a mergeable state and stops for a human to merge.