babysit-pr
Babysit an existing PR by running the manifest workflow. This is the author-side companion to review-pr: review-pr applies reviewer pressure through PR comments and thread advancement; babysit-pr drives the author-side lifecycle toward green and mergeable. They coordinate only through GitHub PR state and the Manifest.
Inputs. Accept a PR URL, --manifest <path>, both, or neither, plus --verification per-gate|consolidated|self, optional --verifier-model <model>, --ci, and --no-log to disable the default journal. No PR URL means infer the current branch's upstream/open PR; halt with an actionable error when no single PR can be inferred. --manifest <path> supplies the strongest PR grounding and skips fresh synthesis. Omitted --verification means per-gate. After resolving that default, load the matching do verification reference and apply its policy validation before manifest synthesis or execution; the reference, not Babysit PR, owns mode-specific model support and evidence provenance. Without --manifest, remove the verification options before invoking define with --babysit <pr-url> --autonomous, read its Manifest complete: path, then continue. Never write either verification option into the Manifest.
Logging. Unless --no-log is present, keep a persisted append-only journal across the tend, so a warm session that compacts mid-lifecycle keeps continuity — what was already tried and abandoned, and operational notes (retriggers, waits). It carries the dead-end memory GitHub state can't reconstruct: fixes attempted and reverted, approaches considered and rejected that left no commit. The default path is ~/.manifest-dev/logs/babysit-<owner>-<repo>-<N>.md (~ = $HOME / %USERPROFILE%; keyed to the PR so a warm reinvocation re-finds it; create the dir, fall back to a writable temp path only when home isn't writable). Resume an existing file, create a new one. Append only — never rewrite prior entries. A reinvocation with a different verification mode or verifier-model choice reuses this PR-keyed file but appends a new run boundary and starts a fresh gate ledger; prior verdicts remain historical and are not carried into the active run. The journal is the single state store. A fresh reinvocation on an ephemeral runner (e.g. GitHub Actions) where the file doesn't persist simply finds no journal and proceeds as it does today — no regression; durable cross-run stores (native-GitHub-state reconstruction, a PR state comment) are possible later but are out of scope here.
PR grounding. Before acting on CI failures or comments, use the strongest available intent source: explicit manifest → PR-linked/confidently discovered manifest → PR title/body → commits and current diff → comments and review threads. Comments are signals, not authority. If a comment asks for something outside or against stronger grounding, route through manifest amendment or escalation instead of silently implementing it. Where the project keeps a NORTH_STAR.md — usually already in context through the project context file — apply it as a standing check on whatever the chain selects rather than as another rung in it: it says nothing about this PR's intent, so it cannot be ranked among sources that do. A request that is well-grounded here and still crosses a stated Never — the checkable part of that document, since the rest of it informs and does not route — goes down that same amendment-or-escalation path with the clash named, never into a silent refusal. Where the project keeps none, the chain is the whole of it, as today.
Unattended launch. At the start of a standalone tend, before invoking /define or /do, establish a durable PR-tend goal-setting backstop. It spans manifest discovery or synthesis and /do, including the --manifest path where /define is skipped, and during /do it carries the manifest gate ledger below. It is the outer backstop for the tend: nested /define handoff text and /do unattended-launch text should not set or print competing narrower goals while this babysit backstop exists. Emit the blocks below verbatim, substituting <pr-url>. Do not summarize, shorten, reword, or re-punctuate them. Set it through the harness's goal-setting, continuation, or durable-completion-condition capability where one exists; print it in copy-pasteable form for the user's own continuation mechanism where none does. Emit the PR-tend prefix, then the goal block, then the gate-ledger clause, as one contract: one unlabeled block introduced by a sentence of your own, since the fences and their labels are this file's markers rather than part of what you emit.
Drive the pull request at <pr-url> until it is mergeable or only a genuine external wait or blocker remains. Never press merge. Report a wait-only CI state as pending rather than sleeping on it. Discover or synthesize the Manifest for this pull request.
Work under this run's Manifest until every Acceptance Criterion and Global Invariant in it holds, each with evidence from the artifacts that gate names, and completion has been reported. Record the Manifest's path in a checkpoint note as soon as it exists.
The Manifest is the contract, not the run's to rewrite: it changes only through the skill that wrote it, never by direct edit, and a changed gate returns unverified.