diff --git a/.mux/skills/pull-requests/SKILL.md b/.mux/skills/pull-requests/SKILL.md index 7ecae7a3..3f27f33e 100644 --- a/.mux/skills/pull-requests/SKILL.md +++ b/.mux/skills/pull-requests/SKILL.md @@ -31,10 +31,11 @@ Always check `$MUX_MODEL_STRING`, `$MUX_THINKING_LEVEL`, and `$MUX_COSTS_USD` vi ## CI & Validation -- After pushing, you may use `./scripts/wait_pr_checks.sh ` to wait for CI to pass. -- Use `wait_pr_checks` only when there's no more useful work to do. +- During active iteration, using `./scripts/wait_pr_checks.sh ` is optional. +- Before declaring a PR complete, you MUST wait until all required checks pass. +- When you are done coding and want end-to-end readiness waiting, prefer `./scripts/wait_pr_ready.sh ` (Codex wait first, CI checks second). - Waiting for PR checks can take 10+ minutes, so prefer local validation first (for this repo: `make verify-vendor`, `make test`, `make build`) to catch issues early. -- If asked to fix an issue in CI, first replicate it locally, get it to pass locally, then use `wait_pr_checks` to wait for CI to pass. +- If asked to fix an issue in CI, first replicate it locally, get it to pass locally, then wait for required CI checks to pass. ## Status Decoding @@ -80,15 +81,17 @@ When Codex leaves review comments, you **must** address them before the PR can m ### Required Loop Discipline -After a PR is open, stay in a review loop until completion: +Completion criteria are strict: you MUST continue this loop until Codex explicitly approves, all Codex review threads are resolved, and all required CI checks pass. You MUST NOT mark work complete earlier. + +After a PR is open, you MUST stay in a review loop until those completion criteria are met: 1. Run local validation and push fixes. 2. Request review with `@codex review`. 3. Run `./scripts/wait_pr_codex.sh ` and wait for Codex to respond. 4. If Codex leaves comments, address them, resolve each thread, push, and repeat from step 2. -5. Once Codex explicitly approves, run `./scripts/wait_pr_checks.sh ` and wait for required checks. +5. Once Codex explicitly approves, run `./scripts/wait_pr_checks.sh ` and wait for required checks to pass. -Only stop the loop early if a reviewer is clearly misunderstanding the change intent and further edits would be counterproductive. In that case, leave a clarifying PR comment and pause for human direction. +The only early-stop exception is when a reviewer is clearly misunderstanding the change intent and further edits would be counterproductive. In that case, leave a clarifying PR comment and pause for human direction. ## PR Title Conventions diff --git a/AGENTS.md b/AGENTS.md index 165eaf9e..d1c94d0e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -96,12 +96,16 @@ Run from repository root. - Use `./scripts/wait_pr_ready.sh ` for a one-command wait flow after requesting review. - Prefer `gh` CLI for GitHub interactions over manual web/curl flows. -When a PR exists, stay in this loop until ready: +> PR readiness is mandatory. You MUST keep iterating until the PR is fully ready. +> A PR is fully ready only when: (1) Codex explicitly approves, (2) all Codex review threads are resolved, and (3) all required CI checks pass. +> You MUST NOT report success or stop the loop before these conditions are met. + +When a PR exists, you MUST remain in this loop until the PR is fully ready: 1. Push your latest fixes. 2. Run local validation (`make verify-vendor`, `make test`, `make build`). 3. Request review with `@codex review`. 4. Run `./scripts/wait_pr_codex.sh ` and wait for Codex. 5. If Codex leaves comments, address them, resolve threads with `./scripts/resolve_pr_comment.sh `, push, and repeat. -6. After explicit Codex approval, run `./scripts/wait_pr_checks.sh `. +6. After explicit Codex approval, run `./scripts/wait_pr_checks.sh ` and wait for required checks to pass. -Only stop the loop early if the reviewer is clearly misunderstanding the intended change and further churn would be counterproductive. In that case, leave a clarifying PR comment and wait for human direction. +The only early-stop exception is when the reviewer is clearly misunderstanding the intended change and further churn would be counterproductive. In that case, leave a clarifying PR comment and pause for human direction.