From 3e82b6de88960de31170ad9fcc35af2738b3c492 Mon Sep 17 00:00:00 2001 From: Patrick Taylor <1963845+pstaylor-patrick@users.noreply.github.com> Date: Sun, 21 Jun 2026 05:31:30 -0500 Subject: [PATCH 1/2] docs(pst): rule 5 -- explicit CI-watch loop for await-then-merge pattern In admin-bypass/auto-merge mode, "await green CI then merge" is a run-to-completion directive (rule 13). Add explicit guidance: use `gh pr checks --watch`, merge immediately on pass, report on fail. Also covers the CI-didn't-trigger case: kick manually then watch. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_019BCr5Qxi8jXnG2Rr7zdkw1 --- skills/pst/SKILL.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/skills/pst/SKILL.md b/skills/pst/SKILL.md index 51f93fe..be433c2 100644 --- a/skills/pst/SKILL.md +++ b/skills/pst/SKILL.md @@ -57,6 +57,11 @@ rules a hook reminds about (non-blocking). Detail and examples are in 5. **Merge** `[HOOK]`. PR then prefer squash, by the chosen merge mode. A direct `gh pr merge` is blocked unless CI is fully green; `--auto` defers to GitHub; override `PST_ALLOW_RED_MERGE=1`. `/pst:ready` and `/pst:rebase` assist. + **Awaiting CI (admin-bypass or auto-merge):** treat "await green CI then merge" + as a single run-to-completion directive (rule 13) -- do not stop and wait for + re-prompt. Use `gh pr checks --watch` to block until all checks settle, + then immediately merge on pass or report failures on fail. If CI did not trigger, + kick it with `gh workflow run` or `gh pr comment -b "/rerun"` and then watch. 6. **CI root cause.** Fix CI for real; no band-aids that mask the issue. Flag any unavoidable quick fix as debt. 7. **Adversarial review before merge** `[HOOK]`. At least one round From 364ad4fa7492afc5f0bd202b1682739af30dfa4d Mon Sep 17 00:00:00 2001 From: Patrick Taylor <1963845+pstaylor-patrick@users.noreply.github.com> Date: Sun, 21 Jun 2026 05:32:37 -0500 Subject: [PATCH 2/2] fix(pst-rule5): correct CI re-trigger command and add rule-7 gate - Replace wrong `gh pr comment -b "/rerun"` (posts a comment, not a rerun) and `gh workflow run` (fires workflow_dispatch, not pull_request) with `gh pr checks --rerun-failed` which actually re-queues failed checks - Clarify that the watch-then-merge sequence is only valid after adversarial review is already recorded (rule 7), preventing a race past the review gate Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_019BCr5Qxi8jXnG2Rr7zdkw1 --- skills/pst/SKILL.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/skills/pst/SKILL.md b/skills/pst/SKILL.md index be433c2..9edb29d 100644 --- a/skills/pst/SKILL.md +++ b/skills/pst/SKILL.md @@ -57,11 +57,12 @@ rules a hook reminds about (non-blocking). Detail and examples are in 5. **Merge** `[HOOK]`. PR then prefer squash, by the chosen merge mode. A direct `gh pr merge` is blocked unless CI is fully green; `--auto` defers to GitHub; override `PST_ALLOW_RED_MERGE=1`. `/pst:ready` and `/pst:rebase` assist. - **Awaiting CI (admin-bypass or auto-merge):** treat "await green CI then merge" - as a single run-to-completion directive (rule 13) -- do not stop and wait for - re-prompt. Use `gh pr checks --watch` to block until all checks settle, - then immediately merge on pass or report failures on fail. If CI did not trigger, - kick it with `gh workflow run` or `gh pr comment -b "/rerun"` and then watch. + **Awaiting CI (admin-bypass or auto-merge):** after adversarial review is + recorded (rule 7), treat "await green CI then merge" as a single + run-to-completion directive (rule 13) -- do not stop and wait for re-prompt. + Use `gh pr checks --watch` to block until all checks settle, then + merge on pass or report failures on fail. If CI did not trigger, re-run with + `gh pr checks --rerun-failed` and watch. 6. **CI root cause.** Fix CI for real; no band-aids that mask the issue. Flag any unavoidable quick fix as debt. 7. **Adversarial review before merge** `[HOOK]`. At least one round