babysit-pr
PR Babysitter
Objective
Babysit a PR persistently until one of these terminal outcomes:
- PR is merged or closed.
- CI succeeded, no unaddressed review comments, not blocked on review approval, and mergeable.
- A situation requires user help (infra issues, exhausted flaky retries, permissions, or ambiguity).
Do not stop merely because a single snapshot returns idle while checks are still pending.
Inputs
- No PR argument: infer from the current branch (
--pr auto) - PR number or PR URL
Commands
# One-shot snapshot
python3 scripts/gh_pr_watch.py --pr auto --once
# Continuous watch (JSONL)
python3 scripts/gh_pr_watch.py --pr auto --watch
# Trigger flaky retry cycle
python3 scripts/gh_pr_watch.py --pr auto --retry-failed-now
# Explicit PR target
python3 scripts/gh_pr_watch.py --pr <number-or-url> --once
Core Workflow
- Start with
--watchfor monitoring requests; use--onceonly for one-shot diagnostics. - Inspect
actionsin the JSON response and act accordingly:diagnose_ci_failure→ inspect logs, classify as branch-related or flaky.process_review_comment→ address actionable feedback, commit and push.retry_failed_checks→ rerun flaky jobs (prioritize review fixes first).
- After any push or rerun, immediately resume polling on the updated SHA.
- Repeat until a stop condition is met.
For detailed workflow steps, CI classification, review handling, git safety rules, polling cadence, and output expectations, see references/workflow.md.
Stop Conditions
Stop only when:
- PR merged or closed.
- PR is ready: CI green, no unaddressed reviews, mergeable, not blocked on approval.
- User intervention required and cannot safely proceed alone.
Keep polling when:
- Checks are still pending or running.
- CI is green but mergeability is unknown/pending.
- CI is green but blocked on review approval — continue on green-state cadence.
Final Summary
Include: final PR SHA, CI status, mergeability, fixes pushed, flaky retry cycles used, remaining unresolved items.
References
- Detailed workflow and patterns:
references/workflow.md - Heuristics and decision tree:
references/heuristics.md - GitHub CLI/API details:
references/github-api-notes.md
More from qredence/skills
agent-converter
Converts agent definitions between Markdown (with YAML frontmatter) and TOML formats. Use when transforming agent configurations for different agent systems — MD format for rich tool restrictions, TOML format for Codex-style agents with sandbox modes.
14dspy-core
Core DSPy framework guidance — signatures, modules, programs, compilation, and testing. Use when creating DSPy signatures, building modules, compiling programs, or learning DSPy fundamentals.
7dspy-gepa
>-
7dspy-fleet-rlm
fleet-rlm-specific DSPy patterns, debugging, and integration with the qredence/fleet-rlm-dspy codebase. Use when working on fleet-rlm DSPy modules, debugging fleet-rlm DSPy issues, or following fleet-rlm architecture conventions.
7dspy-optimization
DSPy optimization workflows — teleprompters, metrics, evaluation, and compilation strategies. Use when optimizing DSPy programs with BootstrapFewShot, MIPROv2, or custom metrics.
7fastapi-router-py
Creates FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.
7