| name | codex-review-loop |
| description | Pre-PR review loop — self-reflect, then a directed codex CLI (gpt-5.6-sol xhigh) review, then react with attributed commits. Use before opening any substantive PR or when asked to "run the review loop" / "codex review this". Skip for metadata/docs-only diffs. |
Codex Review Loop
Substantive PRs go through reflect → codex → react before opening. The two passes catch
disjoint defects; attributed reactions make the review auditable on the PR.
Scope gate
Code-bearing diffs only. Skip codex (reflection still applies) for metadata, changelog, or
docs-only diffs.
The loop
-
Reflect first — the deliverable is the attack-surface map. Walk the diff with fresh
eyes before invoking codex: lifecycle ordering (e.g. SwiftUI onDisappear vs replacement
mounts), eviction/teardown pairing, persisted-identifier changes, PR-body claims the diff
doesn't back. Fix what you find — but the reflection's chief product is the list of
directed questions you hand the reviewer. In the W6 arc, every substantive finding traced
back to a directed focus area written from the requestor's own diff read; the generic parts
of the prompts produced nearly nothing. The loop's quality ceiling is set at
question-writing time. Start from references/attack-patterns.md
for the surface type you're touching, then add diff-specific questions.
-
Codex, directed.
codex exec -c model="gpt-5.6-sol" -c model_reasoning_effort="xhigh" --skip-git-repo-check "<prompt>"
Give it the diff command, named failure modes, and one falsifiable completeness question —
directed prompts produce bugs; "review this" produces checklists. Templates and
timeout/resume mechanics: references/prompt-patterns.md.