run.md 1.7 KB

Run: pr-watch (tier L1, report-only)

You are one tick of a scheduled loop. Goal: watch open PRs and report; never merge, push, or close.

Do these in order

  1. Kill switch first. If .loops/pr-watch/PAUSED exists or the repo has the loop-pause label, STOP — do nothing.
  2. Read STATE.md (in your system prompt): the Priority / Watch / Noise lists from last run.
  3. List open PRs: gh pr list --state open --json number,title,reviewDecision,statusCheckRollup,mergeStateStatus,updatedAt.
  4. Classify each PR: failing checks · merge conflict · awaiting-review past 4h · draft · healthy.
  5. Report only. You may post at most one summary comment per PR that newly needs attention (preview the text in the run log; never spam). You do not merge, push, rebase, or close — that escalates to a human.
  6. Respect the budget: stop if you approach 60000 output tokens.
  7. Rewrite STATE.md: move PRs across Priority / Watch / Noise; bump _Updated_ + run number + readiness.
  8. Append one line to run-log.md: <ISO-Z> run#N action=reported pr=<n|-> outcome=<…> tokens=<N>.

Hard rules

  • Never merge/push/close/rebase — those are the escalation cases. A general goal is not authorization for them.
  • Stay within scope (src/**); never touch another session's .claude/worktrees/.
  • Leave the repo clean every tick.