You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .codex/skills/babysit-pr/SKILL.md
+21-18Lines changed: 21 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,14 +29,15 @@ Accept any of the following:
29
29
4. If `diagnose_ci_failure` is present, inspect failed run logs and classify the failure.
30
30
5. If the failure is likely caused by the current branch, patch code locally, commit, and push.
31
31
6. If `process_review_comment` is present, inspect surfaced review items and decide whether to address them.
32
-
7. If a review item is actionable and correct, patch code locally, commit, and push.
33
-
8. If the failure is likely flaky/unrelated and `retry_failed_checks` is present, rerun failed jobs with `--retry-failed-now`.
34
-
9. If both actionable review feedback and `retry_failed_checks` are present, prioritize review feedback first; a new commit will retrigger CI, so avoid rerunning flaky checks on the old SHA unless you intentionally defer the review change.
35
-
10. On every loop, verify mergeability / merge-conflict status (for example via `gh pr view`) in addition to CI and review state.
36
-
11. After any push or rerun action, immediately return to step 1 and continue polling on the updated SHA/state.
37
-
12. If you had been using `--watch` before pausing to patch/commit/push, relaunch `--watch` yourself in the same turn immediately after the push (do not wait for the user to re-invoke the skill).
38
-
13. Repeat polling until the PR is green + review-clean + mergeable, `stop_pr_closed` appears, or a user-help-required blocker is reached.
39
-
14. Maintain terminal/session ownership: while babysitting is active, keep consuming watcher output in the same turn; do not leave a detached `--watch` process running and then end the turn as if monitoring were complete.
32
+
7. If a review item is actionable and correct, patch code locally, commit, push, and then mark the associated review thread/comment as resolved once the fix is on GitHub.
33
+
8. If a review item from another author is non-actionable, already addressed, or not valid, post one reply on the comment/thread explaining that decision (for example answering the question or explaining why no change is needed). If the watcher later surfaces your own reply, treat that self-authored item as already handled and do not reply again.
34
+
9. If the failure is likely flaky/unrelated and `retry_failed_checks` is present, rerun failed jobs with `--retry-failed-now`.
35
+
10. If both actionable review feedback and `retry_failed_checks` are present, prioritize review feedback first; a new commit will retrigger CI, so avoid rerunning flaky checks on the old SHA unless you intentionally defer the review change.
36
+
11. On every loop, verify mergeability / merge-conflict status (for example via `gh pr view`) in addition to CI and review state.
37
+
12. After any push or rerun action, immediately return to step 1 and continue polling on the updated SHA/state.
38
+
13. If you had been using `--watch` before pausing to patch/commit/push, relaunch `--watch` yourself in the same turn immediately after the push (do not wait for the user to re-invoke the skill).
39
+
14. Repeat polling until the PR is green + review-clean + mergeable, `stop_pr_closed` appears, or a user-help-required blocker is reached.
40
+
15. Maintain terminal/session ownership: while babysitting is active, keep consuming watcher output in the same turn; do not leave a detached `--watch` process running and then end the turn as if monitoring were complete.
40
41
41
42
## Commands
42
43
@@ -94,10 +95,11 @@ When you agree with a comment and it is actionable:
94
95
1. Patch code locally.
95
96
2. Commit with `codex: address PR review feedback (#<n>)`.
96
97
3. Push to the PR head branch.
97
-
4. Resume watching on the new SHA immediately (do not stop after reporting the push).
98
-
5. If monitoring was running in `--watch` mode, restart `--watch` immediately after the push in the same turn; do not wait for the user to ask again.
98
+
4. After the push succeeds, mark the associated GitHub review thread/comment as resolved.
99
+
5. Resume watching on the new SHA immediately (do not stop after reporting the push).
100
+
6. If monitoring was running in `--watch` mode, restart `--watch` immediately after the push in the same turn; do not wait for the user to ask again.
99
101
100
-
If you disagree or the comment is non-actionable/already addressed, record it as handled by continuing the watcher loop (the script de-duplicates surfaced items via state after surfacing them).
102
+
If you disagree or the comment is non-actionable/already addressed, reply once directly on the GitHub comment/thread so the reviewer gets an explicit answer, then continue the watcher loop. If the watcher later surfaces your own reply because the authenticated operator is treated as a trusted review author, treat that self-authored item as already handled and do not reply again.
101
103
If a code review comment/thread is already marked as resolved in GitHub, treat it as non-actionable and safely ignore it unless new unresolved follow-up feedback appears.
102
104
103
105
## Git Safety Rules
@@ -124,13 +126,14 @@ Use this loop in a live Codex session:
124
126
3. First check whether the PR is now merged or otherwise closed; if so, report that terminal state and stop polling immediately.
125
127
4. Check CI summary, new review items, and mergeability/conflict status.
126
128
5. Diagnose CI failures and classify branch-related vs flaky/unrelated.
127
-
6. Process actionable review comments before flaky reruns when both are present; if a review fix requires a commit, push it and skip rerunning failed checks on the old SHA.
128
-
7. Retry failed checks only when `retry_failed_checks` is present and you are not about to replace the current SHA with a review/CI fix commit.
129
-
8. If you pushed a commit or triggered a rerun, report the action briefly and continue polling (do not stop).
130
-
9. After a review-fix push, proactively restart continuous monitoring (`--watch`) in the same turn unless a strict stop condition has already been reached.
131
-
10. If everything is passing, mergeable, not blocked on required review approval, and there are no unaddressed review items, report success and stop.
132
-
11. If blocked on a user-help-required issue (infra outage, exhausted flaky retries, unclear reviewer request, permissions), report the blocker and stop.
133
-
12. Otherwise sleep according to the polling cadence below and repeat.
129
+
6. For each surfaced review item from another author, either reply once with an explanation if it is non-actionable or patch/commit/push and then resolve it if it is actionable. If a later snapshot surfaces your own reply, treat it as informational and continue without responding again.
130
+
7. Process actionable review comments before flaky reruns when both are present; if a review fix requires a commit, push it and skip rerunning failed checks on the old SHA.
131
+
8. Retry failed checks only when `retry_failed_checks` is present and you are not about to replace the current SHA with a review/CI fix commit.
132
+
9. If you pushed a commit, resolved a review thread, replied to a review comment, or triggered a rerun, report the action briefly and continue polling (do not stop).
133
+
10. After a review-fix push, proactively restart continuous monitoring (`--watch`) in the same turn unless a strict stop condition has already been reached.
134
+
11. If everything is passing, mergeable, not blocked on required review approval, and there are no unaddressed review items, report success and stop.
135
+
12. If blocked on a user-help-required issue (infra outage, exhausted flaky retries, unclear reviewer request, permissions), report the blocker and stop.
136
+
13. Otherwise sleep according to the polling cadence below and repeat.
134
137
135
138
When the user explicitly asks to monitor/watch/babysit a PR, prefer `--watch` so polling continues autonomously in one command. Use repeated `--once` snapshots only for debugging, local testing, or when the user explicitly asks for a one-shot check.
136
139
Do not stop to ask the user whether to continue polling; continue autonomously until a strict stop condition is met or the user explicitly interrupts.
`codex-rs/tui/src/bottom_pane/mod.rs`, and similarly central orchestration modules.
41
41
- When extracting code from a large module, move the related tests and module/type docs toward
42
42
the new implementation so the invariants stay close to the code that owns them.
43
43
- When running Rust commands (e.g. `just fix` or `cargo test`) be patient with the command and never try to kill them using the PID. Rust lock can make the execution slow, this is expected.
@@ -66,12 +66,10 @@ Likewise, when reviewing code, do not hesitate to push back on PRs that would un
66
66
67
67
## TUI style conventions
68
68
69
-
See `codex-rs/tui_app_server/styles.md`.
69
+
See `codex-rs/tui/styles.md`.
70
70
71
71
## TUI code conventions
72
72
73
-
- When a change lands in `codex-rs/tui` and `codex-rs/tui_app_server` has a parallel implementation of the same behavior, reflect the change in `codex-rs/tui_app_server` too unless there is a documented reason not to.
74
-
75
73
- Use concise styling helpers from ratatui’s Stylize trait.
76
74
- Basic spans: use "text".into()
77
75
- Styled spans: use "text".red(), "text".green(), "text".magenta(), "text".dim(), etc.
0 commit comments