add-dep
Vet a new or changed third-party dependency for license, provenance, and supply-chain risk before any install runs.
Watch a PR's CI to completion — diagnose on red, notify and offer the merge on green. Never auto-merges.
> /plugin marketplace add arbiterForge/codeArbiterHow it fires
How this command gets triggered: by you, by Claude, or both.
/watchContext preview
What this command does when you run it.
Watch a PR's CI to completion — diagnose on red, notify and offer the merge on green. Never auto-merges.
description: Watch a PR's CI to completion — diagnose on red, notify and offer the merge on green. Never auto-merges. argument-hint: "<PR number | url | branch>"
<!-- catalog-compatibility-notice:start --> > Compatibility route. Prefer `{{CMD:pr}} --watch` for new usage. This installed route remains > functional under the command-route compatibility policy at {{PLUGIN_ROOT}}/includes/command-compatibility.md; > continue with the unchanged watcher workflow below. <!-- catalog-compatibility-notice:end -->
Watch a pull request's checks to completion without babysitting them by hand. The wait happens server-side, so it costs nothing while CI runs; arbiter wakes once, on the verdict — diagnoses a red, or offers you the merge on a green. Arbiter never pulls the merge trigger.
Requires the GitHub CLI authenticated (`gh auth status`). If `gh` is absent or unauthenticated, report the precondition failure naming `gh` and STOP — do not start a phantom watcher.
1. **Resolve the PR** from `$ARGUMENTS` (number, URL, or branch; default to the current branch's PR). 2. **Watch to completion** — run the watch as a **detached background task** built on the server-side block:
gh pr checks <PR> --watch
This blocks until every check finishes and then exits non-zero on failure. It is NOT a polling loop — there is no interval-based wake-up. Arbiter is re-invoked once when the watch process exits. 3. **On red** — retrieve the failing job's logs (`gh run view --log-failed` / `gh pr checks`) and act at the configured depth. Resolve that depth with the canonical resolver rather than reading the env var by hand (so the accepted values can't drift). Resolve the interpreter once by presence — `PY=python3; { command -v python3 >/dev/null 2>&1 && python3 --version >/dev/null 2>&1; } || PY=python` — never `python3 X || python X`, which reruns X on any nonzero exit (#577):
"$PY" "{{PLUGIN_ROOT}}/hooks/babysit.py" --root "{{PROJECT_DIR}}"It prints one JSON line; act at its `on_red` value (`CODEARBITER_BABYSIT_ONRED`, default `propose`):
any tracked file; applying the fix routes through `{{CMD:fix}}` or `{{CMD:feature}}`.
change for review. That branch is a spike: it can never PR or merge. The default branch is left untouched. 4. **On green** — notify the user and present a merge **offer** (the `gh pr merge` command, ready to run). The watcher itself NEVER merges. If the PR targets the default branch, the merge routes through the merge-to-default hard gate — the offer cannot bypass it.
A global flag, `CODEARBITER_BABYSIT` (default **off**, mirrors `CODEARBITER_PRUNE`), governs auto-attachment: when on, `{{CMD:pr}}` auto-attaches a watcher to the PR it opens. `{{CMD:watch}} <PR>` works ad-hoc regardless of the flag. The flag is never set on the user's behalf — enabling it is the user's explicit choice. Both the command and the flag are dormant in a repo without `arbiter: enabled`.
`gh pr merge`.
the green offer cannot and does not bypass it.
is the server-side `gh pr checks --watch` block.
no-op.
change lands only on an unmergeable `spike/fix-*` branch.
When you can't trust yourself with your code base, trust Arbiter.
Repo: arbiterForge/codeArbiter
Vet a new or changed third-party dependency for license, provenance, and supply-chain risk before any install runs.
Report the health of Architecture Decision Records — aged, unchallenged, supersession candidates, unresolved CONFIRM-NN. Read-only.
Author a numbered, dated, user-attributed Architecture Decision Record under .codearbiter/decisions/.
Assemble the governance record for a range — commits, overrides, ADRs, sprint auto-decisions, open questions, checkpoint findings — into one dated audit…
Lightweight Q&A about the project — answer from context and return, no routing, no state change.
Periodic multi-reviewer sweep of the whole codebase — surfaces a triaged checkpoint report.