GitHub PR Review Fix
Use this as the sole active GitHub PR review remediation workflow. The canonical implementation is codex-dev; this skill is the operating procedure.
Default Behavior
When the user invokes $gh-pr-review-fix, run the full closeout loop unless blocked:
- Read repo
AGENTS.mdand inspectgit status --short. - Capture fresh hosted review work:
codex-dev --json pr review start --repo <owner/repo> --number <pr> --fresh
- If the worklist reports zero actionable unresolved items, stop with a no-op summary.
- Verify each item against current code; skip stale findings with a brief reason.
- Apply minimal fixes, using exact suggestion fences only when
codex-dev pr review apply-suggestionsreports an exact hunk match. - Run focused repo-native validation, then broad required gates once before publishing.
- Create scoped, semantically grouped, reviewable Conventional Commits following
references/closeout-and-commits.md. - Push the PR branch once after all intended semantic commits pass validation.
- Re-capture fresh PR head/thread state and resolve every matching fixed hosted thread:
codex-dev --json pr review closeout --repo <owner/repo> --number <pr> --worklist <json> --expected-head-sha <pushed-head> --commit <sha> --validation-command <cmd> --apply
- Re-run
codex-dev --json pr review start --fresh --repo <owner/repo> --number <pr>and continue until zero actionable unresolved items remain or a real blocker appears.
Hosted Closeout Policy
- Default is fix, commit, push, and resolve fixed hosted threads.
- Do not auto-reply by default. Reply only when a finding cannot be fixed/resolved cleanly or the user asks for comments.
- Resolve only current hosted thread IDs that map to verified fixes or already-fixed current head state.
- Never resolve when the PR head changed unexpectedly, validation failed, the finding was skipped, or the thread cannot be matched to closeout evidence.
Commit Policy
- Read
references/closeout-and-commits.mdbefore committing. - Use
codex-dev --json commit planto inspect semantic groups in a mixed tree. - Use
codex-dev --json commit validate --subject "<subject>"before committing. codex-dev commit validateowns forbidden process-wording checks; do not maintain a second local phrase list here.
Route Away
- Local review file, Codex review, Zen review, or manual notes ->
$review-remediation. - Passive post-push monitoring ->
codex-dev --json pr readinessplus GitHub status checks. - CI-only failure with no review-thread context -> GitHub plugin or
ghworkflow-log remediation.
Outputs
codex-dev.pr-review-worklist.v1worklist- verified fix/skipped-item summary
- validation commands and outcomes
- semantic commit SHAs
codex-dev.pr-review-closeout.v1thread-to-commit closeout evidence- terminal status:
completed,blocked, orno-op
Resources
references/closeout-and-commits.md