Commit 8ae6328
authored
🤖 fix: clarify mandatory PR readiness criteria (#9)
## Summary
Clarifies PR workflow language so readiness requirements are unambiguous
and mandatory for agents.
## Background
The previous guidance allowed interpretation gaps around what "ready"
means and when it is valid to stop iterating.
## Implementation
- Added strict MUST-level readiness criteria in `AGENTS.md`.
- Updated `.mux/skills/pull-requests/SKILL.md` to require waiting for
required checks before completion.
- Defined completion as Codex explicit approval + resolved Codex review
threads + passing required CI checks.
## Validation
- `git diff --check`
- `make verify-vendor`
- `make test`
- `make build`
---
<details>
<summary>📋 Implementation Plan</summary>
# Plan: Make PR-ready waiting requirements unambiguous in agent guidance
## Context / Why
The goal is to make both `AGENTS.md` and
`.mux/skills/pull-requests/SKILL.md` explicitly **MUST-level** about
waiting for PR readiness before declaring work complete. "Ready" must be
concretely defined so agents cannot interpret it loosely.
## Evidence
- `AGENTS.md` (`## PR Workflow (Codex)`, lines 95–107): says "stay in
this loop until ready" and lists steps, but does not define "ready" or
use explicit "MUST NOT finish early" language.
- `.mux/skills/pull-requests/SKILL.md`:
- `## CI & Validation` (line 34) uses permissive wording: "you may use
`wait_pr_checks`".
- `### Required Loop Discipline` (lines 83–91) says "stay in a review
loop until completion" but does not define completion as Codex approval
+ required CI checks passing.
These are sufficient to justify tightening wording and adding explicit
completion gates.
## Implementation details
1. **Edit `AGENTS.md` `## PR Workflow (Codex)` to define readiness with
hard requirements.**
- Add a short "PR readiness is mandatory" block immediately before the
loop.
- Define "ready" as all of the following:
- Codex has explicitly approved.
- No unresolved Codex review threads remain.
- Required CI checks are passing.
- Add a prohibition: do not claim completion / stop the loop before all
conditions are true.
```md
> 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 threads are resolved,
> and (3) all required CI checks pass.
> You MUST NOT report success or stop the loop before these conditions
are met.
```
2. **Edit `AGENTS.md` loop text to be imperative and unambiguous.**
- Change "stay in this loop until ready" to "you MUST remain in this
loop until PR-ready conditions are met".
- Keep the existing step order; optionally point to
`./scripts/wait_pr_ready.sh <pr_number>` as the default blocking command
when done coding.
```md
When a PR exists, you MUST remain in this loop until the PR is fully
ready:
...
6. After explicit Codex approval, run `./scripts/wait_pr_checks.sh
<pr_number>` and wait for required checks to pass.
```
3. **Edit `.mux/skills/pull-requests/SKILL.md` in `## CI & Validation`
to distinguish optional vs required waits clearly.**
- Keep guidance that local validation should happen first.
- Add explicit MUST for final readiness wait:
```md
- During active iteration, `wait_pr_checks` is optional.
- Before declaring the PR complete, you MUST wait until required checks
pass
(prefer `./scripts/wait_pr_ready.sh <pr_number>` for Codex+CI end-to-end
waiting).
```
4. **Edit `.mux/skills/pull-requests/SKILL.md` `### Required Loop
Discipline` to define completion and forbid early stop.**
- Add one normative sentence before the numbered loop that completion is
impossible until both Codex approval and required CI pass.
- Add explicit "MUST NOT" language about responding as done before those
conditions.
```md
Completion criteria are strict: you MUST continue the loop until Codex
explicitly approves
and all required CI checks pass. You MUST NOT mark work complete
earlier.
```
5. **Keep the existing narrow early-stop exception, but scope it as an
exception to the MUST rule.**
- Retain the misunderstanding clause, but phrase as "only exception" and
require pausing for human direction.
## Validation approach
- Re-read the edited sections in both files and verify:
- "MUST" language is present for waiting requirements.
- "PR-ready" / completion is explicitly defined as Codex approval + CI
pass (and thread resolution if included).
- No contradictory permissive wording remains in those sections.
</details>
---
_Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking:
`xhigh` • Cost: `$0.12`_
<!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh
costs=0.12 -->1 parent f8b95f6 commit 8ae6328
2 files changed
Lines changed: 16 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
89 | | - | |
| 92 | + | |
90 | 93 | | |
91 | | - | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
105 | | - | |
| 109 | + | |
106 | 110 | | |
107 | | - | |
| 111 | + | |
0 commit comments