Skip to content

Commit 1f82f46

Browse files
committed
docs: sync codex review skill
1 parent 82fd88d commit 1f82f46

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

.agents/skills/codex-review/SKILL.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Use when:
2121
- Prefer small fixes at the right ownership boundary; no refactor unless it clearly improves the bug class.
2222
- Keep going until Codex review returns no accepted/actionable findings.
2323
- If a review-triggered fix changes code, rerun focused tests and rerun Codex review.
24+
- Stop as soon as the review command/helper exits 0 with no accepted/actionable findings. Do not run an extra direct `codex review` just to get a nicer "clean" line, a second opinion, or clearer closeout wording.
25+
- Treat the helper's successful exit plus absence of actionable findings as the clean review result, even if the underlying Codex CLI output is terse.
2426
- If rejecting a finding as intentional/not worth fixing, add a brief inline code comment only when it explains a real invariant or ownership decision that future reviewers should know.
2527
- Do not push just to review. Push only when the user requested push/ship/PR update.
2628

@@ -32,6 +34,12 @@ Dirty local work:
3234
codex review --uncommitted
3335
```
3436

37+
Use this only when the patch is actually unstaged/staged/untracked in the
38+
current checkout. For committed, pushed, or PR work, review the branch against
39+
its base instead; do not force `--mode local` / `--uncommitted` just because the
40+
helper docs mention dirty work first. A clean `--uncommitted` review only proves
41+
there is no local patch.
42+
3543
Branch/PR work:
3644

3745
```bash
@@ -62,7 +70,7 @@ Format first if formatting can change line locations. Then it is OK to run tests
6270
scripts/codex-review --parallel-tests "<focused test command>"
6371
```
6472

65-
Tradeoff: tests may force code changes that stale the review. If tests or review lead to code edits, rerun the affected tests and rerun review until no accepted/actionable findings remain.
73+
Tradeoff: tests may force code changes that stale the review. If tests or review lead to code edits, rerun the affected tests and rerun review until no accepted/actionable findings remain. Once that rerun exits cleanly, stop; do not spend another long review cycle on redundant confirmation.
6674

6775
## Context Efficiency
6876

@@ -91,13 +99,17 @@ The helper:
9199
- chooses dirty `--uncommitted` first
92100
- otherwise uses current PR base if `gh pr view` works
93101
- otherwise uses `origin/main` for non-main branches
102+
- should be left in `--mode auto` or forced to `--mode branch` for committed/PR work; do not force `--mode local` after committing
94103
- writes only to stdout unless `--output` or `CODEX_REVIEW_OUTPUT` is set
95104
- supports `--dry-run` and `--parallel-tests`
105+
- prints `codex-review clean: no accepted/actionable findings reported` when the selected review command exits 0
96106

97107
## Final Report
98108

99109
Include:
100110
- review command used
101111
- tests/proof run
102112
- findings accepted/rejected, briefly why
103-
- final clean review command, or why a remaining finding was consciously rejected
113+
- the clean review result from the final helper/review run, or why a remaining finding was consciously rejected
114+
115+
Do not run another Codex review solely to improve the final report wording. If the final helper run exited 0 and produced no accepted/actionable findings, report that exact run as clean.

.agents/skills/codex-review/scripts/codex-review

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ run_review() {
151151

152152
if [[ -z "$parallel_tests" ]]; then
153153
run_review
154-
exit $?
154+
review_status=$?
155+
if [[ "$review_status" == 0 ]]; then
156+
printf 'codex-review clean: no accepted/actionable findings reported\n'
157+
fi
158+
exit "$review_status"
155159
fi
156160

157161
review_status_file=$(mktemp)
@@ -186,3 +190,5 @@ printf 'tests exit: %s\n' "$tests_status"
186190
if [[ "$review_status" != 0 || "$tests_status" != 0 ]]; then
187191
exit 1
188192
fi
193+
194+
printf 'codex-review clean: no accepted/actionable findings reported\n'

0 commit comments

Comments
 (0)