babysitlisted
Install: claude install-skill rudi193-cmd/willow-2.0
@markdownai v1.0
# Babysit PR (Willow)
**b17:** BBSIT · ΔΣ=42
Get a PR to **mergeable + green** without holding the chat thread on `gh pr checks --watch`.
## Lanes
| Work | Tool |
|------|------|
| `gh`, `git`, pytest, push | `agent_task_submit` → `kart_task_run` (see `/kart`) |
| PR metadata, handoff context | Willow MCP or Kart `gh pr view` |
| **Waiting on CI** | **Background shell loop** + sentinel — not agent spin-wait |
| Merge when green | Kart `gh pr merge` (user asked to merge) |
## Foreground pass (once per wake)
1. Resolve repo + PR: `gh pr view <n> --json url,headRefName,baseRefName,mergeable,statusCheckRollup`
2. Triage **comments** — only unresolved; skip Bot noise unless valid.
3. If **merge conflict** — Kart: `git fetch && git merge origin/<base>` (or rebase per repo policy); fix in editor; commit via Kart.
4. If **CI failed** — Kart runs failing job locally or reads `gh run view --log-failed`; fix; commit; push with `allow_net=True`.
5. If **branch behind base** — Kart merge/rebase + push before re-watch.
Do **not** block the session on CI. After push or when CI already running → **arm watcher** (below).
## Background CI watcher (required for “babysit”)
Use the same contract as Cursor **`loop`** skill — monitored shell, unique sentinel.
```bash
# Example: PR #20 on safe-app-willow-grove — adjust REPO and PR
REPO=rudi193-cmd/safe-app-willow-grove
PR=20
SLEEP=90
while true; do
sleep "$SLEEP"
STATUS=$(gh pr checks "$PR" --repo "$REPO" 2>&1 | tail