agentleFS
chrolinechroline/oliver/skills/oliverspec/oliverspec-babysit/SKILL.md

oliverspec-babysit

Skill0 starsChanged 3 months agoMITView on GitHub

Babysit all open PRs for an OliverSpec Linear project — loop until completion fixing PR comments and CI failures, waiting for real CI (ignoring stack merge-readiness gates). Use when the user wants to babysit, /oliverspec babysit, or oliverspec-babysit after apply has opened the stack.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Run the loop to completion — do not stop after one PR or one fix cycle unless hard-blocked (needs human judgment).

    line 16
  2. Very specific:

    If no open PRs exist, stop and say so (suggest oliverspec-apply if tickets are still open).

    line 41
  3. Distinctive:

    Prefer parallel sub-agents (1 PR → 1 agent → 1 worktree) when multiple PRs need fixes in the same round — same aggression as apply, without …

    line 83
  4. Distinctive:

    After pushing fixes (or if CI was still running):

    line 91
  5. Distinctive:

    Do not: treat stack merge-readiness, "Rebase stack" prompts, or merge-queue position as something to wait on or fix

    line 94
  6. Distinctive:

    If real CI fails → go back to step 2

    line 95
  7. Distinctive:

    If real CI is still pending → wait/poll (reasonable intervals).

    line 96
  8. Distinctive:

    Stop the loop and report when:

    line 108
  9. Distinctive:

    Ignore stack merge-readiness status: always

    line 143
  10. Distinctive:

    Wait for real CI to finish.

    line 144
  11. Distinctive:

    Prefer parallel per-PR sub-agents when multiple PRs need work, each in its own git worktree outside the repo

    line 149
  12. Distinctive:

    Keep Linear links/status sensible if you touch issues (optional: leave tickets In Review)

    line 151

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Babysit every open PR tied to an OliverSpec Linear project until the stack is clean.

Run the loop to completion — do not stop after one PR or one fix cycle unless hard-blocked (needs human judgment).

Stacks are GitHub stacked pull requests (gh stack), not Graphite.


Input

  • Linear project name (or infer from conversation / recent apply)
  • Optional: subset of ticket IDs or PR numbers

Announce: Babysitting OliverSpec project: <name>.


Discover the PR set

  1. Resolve the Linear project (list_projects / get_project)
  2. Load tickets (list_issues with project)
  3. Collect open PRs for the project:
    • Issue links / attachments pointing at GitHub PRs
    • gh pr list filtered to branches matching Linear issue git branch names from get_issue
    • The stack itself: gh stack view --json when a stack is checked out, or gh stack checkout <stack-number> to pull a remote stack down locally first
  4. Build the working set: all non-merged, non-closed PRs for those tickets (the full stack when applicable)

If no open PRs exist, stop and say so (suggest oliverspec-apply if tickets are still open).


Completion criteria

Babysit is done when, for every PR in the set:

  • No actionable unresolved review comments / threads remain (or each is explicitly declined with a reply explaining why)
  • CI is finished and green for checks that are real CI (see exclusions below)
  • Fixes from this session are pushed and the stack is linear (gh stack rebase + gh stack push where a lower layer moved)

Babysit is not waiting on:

  • Human approval / CODEOWNERS sign-off
  • Merge into trunk
  • Stack merge-readiness gates — the merge box reporting on the whole stack, "Rebase stack" prompts, merge queue position, or "all PRs below must be approved". Ignore these entirely; do not block the loop on them and do not treat them as CI failures

The loop (run until completion)

Repeat until completion criteria are met:

1. Snapshot status (all PRs)

For each open PR in parallel where practical:

  • gh pr view <n> --json statusCheckRollup,reviews,reviewDecision,url,title,number,headRefName,baseRefName
  • Unresolved review threads / comments (filter out already-resolved threads; read comment bodies + locations only — don’t dump huge JSON)
  • CI conclusions — exclude stack merge-readiness / merge-gate statuses from the failure set

Summarize a board: PR → comments needing action / CI failing / CI pending / clean.

2. Fix open PR comments and CI failures

For every PR that needs work:

  1. Fix the layer the problem belongs to. A change that belongs in a lower PR goes in that PR's branch, not worked around in a higher one. Then carry it upward with gh stack rebase --upstack from that branch, followed by gh stack push
  2. Comments / review threads — address valid change requests and bug reports; commit and push on the PR's own branch. Reply on threads when you disagree or need clarification; resolve threads when fixed
  3. CI failures — fix failures caused by this PR's scope. Never gut or skip CI workflows just to go green. If a failure looks unrelated and the branch is behind its base or trunk, run gh stack sync (or gh stack rebase + gh stack push) and re-run. Prefer scoped fixes
  4. Rebase conflicts — resolve the markers, git add the files, then gh stack rebase --continue. gh stack rebase --abort restores every branch to its pre-rebase state. Use restack-conflict-resolution for the resolution method itself (combine both sides; do not blindly take one)
  5. Prefer parallel sub-agents (1 PR → 1 agent → 1 worktree) when multiple PRs need fixes in the same round — same aggression as apply, without collapsing the whole stack into one agent unless justified

Concurrency rule (same as apply): gh stack commands check out branches and take a stack-wide lock (exit code 8), and git refuses a branch already checked out in another worktree. Sub-agents never run gh stack — they commit and git push on their own branch inside their own worktree. The parent removes the worktrees, then runs gh stack rebase / sync / push serially from the main checkout.

Bugbot / bot comments: validate before acting; skip noise; explain when declining.

3. Wait for CI to finish (except stack merge-readiness)

After pushing fixes (or if CI was still running):

  1. Watch CI on each PR until checks complete (success or failure)
  2. Do not treat stack merge-readiness, "Rebase stack" prompts, or merge-queue position as something to wait on or fix
  3. If real CI fails → go back to step 2
  4. If real CI is still pending → wait/poll (reasonable intervals); keep fixing other PRs in parallel while waiting

Note: a gh stack push force-pushes rebased branches with --force-with-lease, which re-triggers CI on every branch above the change. Expect a fresh round of pending checks after any rebase.

4. Re-enter the loop

Re-snapshot. Continue until every PR is comment-clean and real CI green, or escalate hard blockers.


Hard blockers (pause and report)

Stop the loop and report when:

  • Conflicting human review feedback that can’t be reconciled
  • CI failure that requires changing shared pipelines / secrets / flaky infra outside the PR scope
  • Missing permissions / auth for GitHub, or gh stack exiting 9 (stacked PRs not enabled for the repo)
  • A diverged stack that gh stack sync cannot reconcile non-interactively — report it rather than unstacking on your own
  • Ambiguous product/design change that needs the user (offer to update PRD/TRD via propose)

Output on completion

## OliverSpec Babysit Complete

**Project:** <name>
**Stack:** #<stack-number>

| PR | Ticket | Base | Comments | CI (excl. stack merge gates) |
|----|--------|------|----------|------------------------------|
| #n | LEM-… | <branch> | clean / declined-with-reason | green |

### Remaining non-blocking
- Awaiting human review / merge (not babysit’s job)
- Stack merge-readiness ignored by design

### Suggested next step
- Run `oliverspec-ship` to merge the stack and move the project to Completed

Guardrails

  • Scope = this OliverSpec project’s open PRs / stack — don’t wander into unrelated PRs
  • Ignore stack merge-readiness status always
  • Wait for real CI to finish; fix failures; don’t fake green
  • GitHub stacks, not Graphite — gh stack rebase / sync / push, never gt
  • Only the parent runs gh stack, serially, from the main checkout with worktrees removed
  • Fix each problem in the layer it belongs to, then propagate with gh stack rebase --upstack
  • Don’t merge PRs — merging and moving the project to Completed is oliverspec-ship's job, run after babysit is clean
  • Prefer parallel per-PR sub-agents when multiple PRs need work, each in its own git worktree outside the repo
  • Don’t rewrite CI workflows solely to pass
  • Keep Linear links/status sensible if you touch issues (optional: leave tickets In Review)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.