Skip to content

Add babysit-review skill - #125

Merged
haacked merged 1 commit into
mainfrom
haacked/babysit-pr
Jun 25, 2026
Merged

Add babysit-review skill#125
haacked merged 1 commit into
mainfrom
haacked/babysit-pr

Conversation

@haacked

@haacked haacked commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Adds ai/skills/babysit-review -- a skill for babysitting PRs I'm reviewing (external contributions), as the read-only mirror of babysit-prs.

For each PR, it checks CI, re-runs failures classified as flaky, and reports the real ones so I can decide whether to follow up with the contributor. It drives the ci-monitor scripts directly rather than invoking the skill, so it can sweep many PRs without the interactive fix/poll cycle. The only write action to GitHub is gh run rerun --failed on an existing run.

A small ledger at ~/.local/state/babysit-review/reruns.json tracks which run IDs have already been re-run, keyed by run ID (which is stable across re-runs but changes on a new commit). This bounds each flaky-looking failure to one re-run per commit: if it fails again after the re-run, the next sweep reports it as real instead of re-running it indefinitely.

Test plan

  • Run /babysit-review <pr-url> against a PR with a green CI run: expect the "green" row in the summary table.
  • Run it against a PR with an in-progress run: expect "CI running" row, no re-run attempted.
  • Run against a PR with a failed run the classifier calls flaky: expect gh run rerun fired, run ID recorded in the ledger.
  • Run again on the same PR (same run ID still failing): expect the ledger hit, run reported as "real (re-run didn't help)" instead of re-running.
  • Run /babysit-review --all --dry-run: verify no gh run rerun calls and the ledger file is not written or modified.

Sibling to babysit-prs, inverted for external contributions: check CI,
re-run failures classified as flaky, and report the real ones. --all
sweeps every open PR I've approved. The only GitHub write is re-running
a flaky workflow; it never edits, pushes, merges, or comments.

A small per-commit ledger (~/.local/state/babysit-review/reruns.json,
keyed by run ID) bounds re-runs to once per commit, so a deterministic
failure the classifier mislabels as flaky surfaces as a real failure
after one re-run instead of looping under /loop.
@haacked
haacked marked this pull request as ready for review June 25, 2026 19:42
@haacked
haacked requested a review from Copilot June 25, 2026 19:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new babysit-review skill intended to “babysit” PRs you’re reviewing by sweeping CI status, re-running failures classified as flaky (at most once per commit via a local ledger), and reporting real failures for follow-up.

Changes:

  • Introduces ai/skills/babysit-review/SKILL.md defining the skill’s scope, argument contract, and step-by-step procedure.
  • Specifies a local rerun ledger at ~/.local/state/babysit-review/reruns.json to prevent repeated reruns of the same failing run.
  • Documents direct usage of ci-monitor scripts for CI rollup, log fetching, and failure classification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ai/skills/babysit-review/SKILL.md
@haacked
haacked merged commit f3bd142 into main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants