Loop/loopCIhigh riskadvancedsafety C · 70GitHub

Triage, review, and merge PRs

Run CI checks and merge pull requests after triage and review until the queue clears.

prompt
→ Claude Code
/loop /leader-tick ) that triages, reviews, runs CI checks, and merges PRs. See docs/team-orchestration.md for the full lifecycle and docs/leader-runbook.md for operator notes Cap the run at 15 passes.
claude-code

Use this when

A busy queue with reliable CI and an established merge policy, where triage-review-merge is already mechanical for a human. Advanced by design: this loop has merge rights.

Done when

✓ CI green is the only merge condition worth trusting — verify branch protection enforces it server-side rather than relying on the loop to check. Keep merges to non-production branches unless a human approves the release, and read the merge log after each run: this is the one loop here whose mistakes are hard to reverse.

Why it works

It chains three stages behind one scheduler, so CI status is the gate on every merge rather than a step someone can skip when the queue is long. The 15-pass cap bounds a run that would otherwise keep grinding through a queue that keeps refilling.

Implementation note

When to use: repos with an established PR queue where triage/review/merge is currently a manual bottleneck and CI coverage is solid enough to trust as a merge gate. Safety: this loop merges PRs autonomously — require branch protection and a passing-CI requirement on the target branch before enabling, and start it against a non-default branch or a low-traffic repo until you trust its judgment on what counts as reviewed.

Source: Jhin97 ↗graded C · 70/100 — how grades work →

More ci loops

Get the build green

Loop/goalcommunityB

Run the build, fix the first error, and repeat until npm run build exits 0, with a 10-turn cap.

prompt
→ Claude Code
/goal `npm run build` exits 0 — run the build, fix the first error, repeat until it succeeds; stop after 10 turns

Get the build green, every time

Loop/goalGitHubB

Work through each task in .toh/plan.md, fix blockers, until the build command succeeds or you hit 40 turns.

prompt
→ Claude Code
/goal every task in .toh/plan.md is checked and the build command exits 0 — or stop after 40 turns . A Haiku evaluator judges the condition FROM THE TRANSCRIPT — one more reason the QC gate quotes actual output: unquoted results are invisible to the evaluator. |

Get lint and E2E tests passing

Loop/goalGitHubA

Execute work from PLAN.md until npm run lint and npm run test:e2e pass, scoping changes per AGENTS.md.

prompt
→ Claude Code
/goal Implement the work described in PLAN.md. Stop only when npm run lint and npm run test:e2e pass. Follow AGENTS.md, keep changes scoped, and report verification evidence Stop after 25 turns even if the goal is not reached.
cimedium risk