AAWEA.ORG
AAWEA.ORG
AAWEA.ORG
CI Manual trigger πŸ‘‘ Official πŸ›‘ Hardened

Ship PR Until Green

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.

πŸ‘ 2,039 views πŸ“₯ 1,857 installs πŸ‘€ by loops!
Download loop
Share Now
Manual start
↓
  1. 1
    Implement and test

    Make the scoped change and run local tests.

    > npm test
  2. 2
    Commit and push

    Commit with a clear message and push the branch.

  3. 3
    Open or update PR

    Open a PR with summary and test plan, or update existing PR.

    > gh pr view --json statusCheckRollup,url
  4. 4
    Fix CI

    If CI fails, read logs, fix once locally, push, and re-wait.

↓
βœ“
Exit condition: ci_green

PR checks pass and PR is merge-ready

> gh pr checks --watch
πŸ“Š Flow Diagram
flowchart TD Start(["Manual start"]) Start --> S0 S0("Implement and test") S1("Commit and push") S0 --> S1 S2("Open or update PR") S1 --> S2 S3("Fix CI") S2 --> S3 Exit{"PR checks pass and PR is merge-ready"} S3 --> Exit Exit -- "No" --> S0 Exit -- "Yes" --> Done(["Success"]) style Exit fill:#fffbeb,stroke:#f59e0b,stroke-width:2px,color:#92400e style Done fill:#ecfdf5,stroke:#10b981,stroke-width:2px,color:#065f46
Run "Ship PR Until Green" in your agent
Prompt only
Deeplinks and "Open in Cursor" only paste the kickoff prompt. They do not install hook files β€” your agent cannot tell whether files are on disk until you add them yourself.
Two separate pieces
  • Kickoff prompt β€” tells the agent the goal, check command, exit condition, and how to self-pace.
Kickoff prompt
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.
Anti-gaming rules
Rules the agent must follow so it cannot cheat the exit condition.
  • Do not modify the check command or exit criteria to force success
  • Do not skip, disable, or bypass checks to pass the exit condition
  • If stuck after several iterations, stop and report blockers instead of gaming metrics