babysit-pr
Monitor PR #$ARGUMENTS in the current repo. Fix CI failures and human or bot review feedback until everything is green and no new feedback arrives for 30 minutes.
Non-Negotiable Branch Ownership Rule
During /babysit-pr, the PR branch is the unit of ownership. Every tick must
commit and push all non-gitignored local changes on the current branch,
including changes made by the user or other concurrent agents. Do not limit
commits to files you personally edited. Do not stash, skip, or leave behind
local work unless it is learnings.md or an ignored/personal file.
If no PR number is given, auto-detect it: get the current branch (git branch --show-current), find the open PR for it (gh pr list --head <branch> --state open --json number --limit 1). If no open PR exists, check recent merged/closed PRs. Only ask the user if no PR can be found.
Setup
- Run a self-re-arming tick loop. Do ONE tick (see "Each tick"), then immediately schedule the next one with
ScheduleWakeupbefore yielding — pass this same/babysit-pr <number> …invocation back as the wake-up prompt so the next firing repeats the tick. The loop ends only at a stop condition (below); until then there is always a scheduled next tick. - Track when the last actionable item (new human/bot feedback, CI fix, merge-conflict resolution, or a local-change commit/push) occurred.
- After 30 minutes of no new actionable items with GitHub Actions CI green, cancel the loop (stop scheduling wake-ups) and report "All clear".