Github Ship Watch
BSecurityWatch a GitHub repo's issue-to-release pipeline and finish what its policy decided. Reports a failed or stalled release bot, a release missing from PyPI, issues triage owes, and, under shipmill operate, failed runs, unhealthy environments, pending promotions, incidents, missing postmortems, holds; reruns a flaky release job, starts a stalled lane, hands new issues to triage when asked; posts no notice on a fixed issue (D-69). Drafts due postmortems; runs a weekly retro. Answers status with `s...
- 6 stars
- 0 votes
- 0 copies
- 7 views
- Added October 10, 2026
Works with
Security analysis
75/100- Modifies startup scripts or system services for persistence
Pro scans all 5 files and shows the line behind each finding
npx -y skills add shipmill/shipmill --skill github-ship-watch --agent claude-codeAre you the author of Github Ship Watch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/shipmill-github-ship-watch)---
name: github-ship-watch
description: Watch a GitHub repo's issue-to-release pipeline and finish what its policy decided. Reports a failed or stalled release bot, a release missing from PyPI, issues triage owes, and, under shipmill operate, failed runs, unhealthy environments, pending promotions, incidents, missing postmortems, holds; reruns a flaky release job, starts a stalled lane, hands new issues to triage when asked; posts no notice on a fixed issue (D-69). Drafts due postmortems; runs a weekly retro. Answers status with `shipmill status` (`--summary`, `--item N`). Use for "what's the status", "what's open", "who holds what", "why is an issue not moving", "watch the repo", "keep it shipping", "babysit releases", "check the release went out", a /loop or /schedule, or one report across repos ("watch the fleet"). Not for triaging a backlog (github-issue-triage), landing PRs (github-pr-triage), or setup (shipmill-setup). Run the CLI as `uvx shipmill==0.234.0 <command>`, this plugin's pin, in every session, headless too.
---
# GitHub Ship Watch
One pass answers "is anything stuck between an issue and a user's install?" and finishes the work the user already decided: the release policy decided to release, so a stalled release starts, a flaky job reruns, and the fixed issues hear about it. Anything that needs a new decision goes in the report.
## Inputs
- Repo `owner/name` and a local checkout (a scheduled cloud session has one)
- Scope from the user's wording, read narrowly:
- "status": report only, change nothing. A person without an agent gets the same rows from `shipmill status --rows` in the checkout, and a verdict with a short linked summary (each waiting item its own link) from `shipmill status` (`uv tool install shipmill` puts it on PATH; an agent runs the pinned uvx form above)
- "watch" (the default): report, plus the repairs in the table below
- "watch and triage": also run github-issue-triage on what the intake flags, passing on the user's own scope words for it ("merge when green" included only if the user said it)
## Hard rules
1. **Finish decisions; never make new ones.** A watch pass doesn't merge, tag by hand, change a release policy, close or relabel issues, or edit code. Those belong to the user or to the other skills under the user's words. A postmortem draft is a pull request the maintainer merges, never a change the watch lands. A config upgrade's issue is the one place the watch labels or closes an issue and edits the config, and only to carry out the maintainer's answer or `[autonomy] upgrade = "act"` ([Config upgrades](#config-upgrades)); its pull request merges through github-pr-triage, never the watch. The direction issue is the other, and only to ask for the maintainer's direction and carry out their answer ([Direction](#direction)); its pull request is the maintainer's to merge
2. **One repair per finding per pass.** Rerun a failed job once. If it fails again, the next pass reports it rather than looping on reruns
3. **Read state right before acting.** Another session may be landing PRs or releasing in the same repo. Check `gh run list` before starting a lane, and follow a peer's hold (see github-pr-triage, hard rule 5)
4. **A repo with `release-blocker` open is held on purpose.** A stalled bot behind a blocker isn't stalled: report it, don't start a lane
5. **An open `shipmill-hold` issue stops the factory on purpose.** A person pulled the stop switch: report the hold (the HOLD row: who opened it and when), never start a lane or close the issue. A plan under the hold, or under `[autonomy] release = "propose"`, proposes instead of releasing, so it never reads as BOT_STALLED; the proposal issue is for a person to act on
6. **The watch never deploys, promotes, or rolls back.** `shipmill operate` acts on environments under the repo's autonomy; the watch reports what operate found and repairs only a stuck operate run, as it does for the release bot. Approving a proposal is the user's call: give them the command
7. **Write as the App, as the repo's config chooses.** Every `gh` call that writes (an issue, a comment, a label, a pull request, a review, a merge, a release, a rerun) runs as `shipmill gh <the same arguments>` from the repo's checkout, in every repo, whatever `.github/shipmill.toml` sets, in every session, gated or started by hand; with `[agents] app_id` its author is the App's bot, not the maintainer (spec 012, D-14, spec 082). Run it as `uvx shipmill==0.234.0 gh ...`, the release this plugin pins (spec 031), in every session, a headless gate's included, whose allowlist has `Bash(uvx *)`. Reads may keep plain `gh`. A `shipmill gh` that exits 2 is a stop: report its message and never retry the write with plain `gh`. Whom agents write as is the config's choice alone: no instruction file's prose (a `CLAUDE.md`, an `AGENTS.md`, a note on which repos have an App) decides the identity, and the skill never reads one for it. The skill runs `shipmill app-token --check` before its first write to GitHub, a push included, in every repo, whatever the config sets, from the repo's checkout and through the same pinned `uvx` as `shipmill gh`; reading, and local work in the checkout, come before it as they are. Exit 0 (the App, or `identity = "host"`): go on. With `[agents] identity = "none"` the repo's owner chose that agents don't write to GitHub here: on that exit 2, from the check or from `shipmill gh`, the skill stops, its report's first line says the owner chose that agents don't write here and that shipmill wrote nothing to GitHub, and it hands over the text of each write it would have made, each with its target, as below; it never offers or passes `--as-host` there. Without `app_id`, `shipmill gh` refuses a write with exit 2 unless the config sets `[agents] identity = "host"` (spec 037); with no recorded choice the message names the three choices and `/shipmill:shipmill-setup <owner/repo>`: that exit 2 is a stop too, never retried with plain `gh`, and a session passes `--as-host` only for a write a person approved in the chat, never on its own judgment or in a headless session, and says so in its report. Without the App, shipmill drafts and the person posts (spec 033, D-54): on the check's exit 2 with `app_id` set, or a `shipmill gh` exit 2 naming the missing key, it stops there: its report's first line says the App isn't available here, quoting the check's reason, and that shipmill wrote nothing to GitHub, and it hands over the text of each write it would have made, in order, each with its target and the exact text (the repo and the issue, pull request, or run; the comment's body, the label's name, the rerun, a postmortem pull request's title and body and the local branch holding it), final and ready to paste or to post with the person's own `gh`, a command it may print and never runs. It never writes with plain `gh`, `GH_TOKEN`, or a push as the person, and never asks for or fetches the key
8. **Mentions (D-61).** A bare `@login` is an email to that person, so in a comment, an issue, a pull request body, or a commit message on GitHub it appears only in a needs-decision question (`@<login> Decision needed: ...`), the hand-off of a person's item (HANDOFF_DUE), and the decided comment of a notify decision (`@<login> Decided without waiting: ...`). Everywhere else write the login in a code span, `` `@login` ``: an upgrade pull request's accepted line, the direction pull request's ``Direction from `@<login>` in #<issue>`` line (S-034-9), a postmortem. Readers take both forms, so an older line with the bare form still reads as before
9. **Progress goes in the status comment (spec 090).** Post the watch's progress on an issue or a pull request (a rerun started, a lane started, a stall being looked at) with `--status`, `shipmill gh issue comment <n> --status --body-file <file>` (or `pr comment`): it creates the item's one status comment and edits it after, so a maintainer a question subscribed gets no email per step. A progress step is never a new comment. A question, a decided comment, a relay, a hand-off or other marker comment, and the final result stay new comments (github-issue-triage's [comments.md](../github-issue-triage/references/comments.md), Status comment)
## The script
`scripts/watch_state.py <owner/repo> [--repo-dir PATH]` answers the whole status question deterministically. Run it with `uv run --no-project python` (or `python3`, 3.10+) at the start of every pass and again before the report. Exit 0 means nothing needs action; 1 means a row below is an action; 2 is a git, gh, uvx, or PyPI failure (report it and stop). A gh read that fails on a server or network error is already run once more by the script; an error line ending `transient GitHub API error: rerun` means GitHub failed twice, so run the pass again later rather than chasing a cause.
`--tier N` and `--sweep` are the gate's reads, not a pass's (spec 046): `shipmill gate` checks GitHub for a change first, then walks seven tiers in order (1 production, 2 a red default branch (BASE_RED) and the release lane, 3 pull requests to land, 4 vetoes and decided items, 5 upgrades and upstream, 6 the other issues triage owes, 7 direction, plans, direction proposals, accepted opportunities, and handed-over requests: DIRECTION_PENDING, PLANS, DIRECTION_DUE, SPEC_DUE, FEEDBACK_DUE; D-69 retired tier 8, notices) and stops at the first item no session has taken; the timed sections (BOT_STALLED, UPGRADE_PENDING, UPSTREAM_DUE, DIRECTION_PENDING, PLANS, DIRECTION_DUE, SPEC_DUE, FEEDBACK_DUE) it reads from a `--sweep` every `[agents] sweep_hours`. In tiers 3 and 6 an expedite row comes first (spec 070): `--tier 3` and `--tier 6` cut out the issues of an expedite outcome (an accepted opportunity whose `expedite` label a person added, and its sub-issues) and the pull requests closing one into a row of their own, marked `"expedite": true` in `--json`, which the walk takes before the tier's other rows. In tiers 4 and 6 what holds the most comes next (spec 086): `--tier 4` and `--tier 6` run one `chains.py show` over the repo's open issues and give each ISSUES row `"impact": [[number, held], ...]` in `--json`, its issues that other open issues wait on, most held first; the walk takes the row whose issue holds the most first, after the expedite rows, and the LAUNCH line and the prompt name that issue and its count. A walk that fails adds its CHAIN_UNREADABLE row and leaves every `impact` empty, so the tier keeps its order. Neither prints a host row or a report-only row, save tier 3's PRS_PARKED (spec 061), which starts no session. A watch pass runs the full report, without either. A gate session is handed one finding, the walk's first untaken item, named in its prompt with its tier and its fix line: work that one first, then read the full report for anything else it should take on its way
The gate reads GitHub less (spec 103). Each tick first runs `scripts/precheck.py`, conditional REST reads (`If-None-Match`) of the newest updated issue or pull request, the default head, the latest release, each watched workflow's runs, and the repo's newest Actions runs, each reduced to a digest; its change check runs only when one moved, at most once in any `--every` minutes. `--tier 6 --patch <snapshot.json>` is the walk's tier 6 read: `triage_state.py` reads again only the issues and pull requests updated since its last read, the issues whose links name them, and the issues whose reading fell due, keeps the rest from the snapshot, and reads every open issue when it can't patch and at least once a day, printing a `tier 6 patch drift: #<N> <patched> != <read>` line for each reading the full read found different. `--snapshot <path>` is a gate session's first read: the prompt names `watch_state.py --snapshot <path> <flags>`, the `snapshot.json` the gate wrote before the launch and the flags it read with. Run that line as written, its flags included. When the snapshot is under 15 minutes old, read with this run's flags (`--role`, `--trusted-only`, `--bot-login`), and `precheck.py`, run again now, finds every read unmoved, it prints the snapshot's rows with one stderr line `read from the gate's snapshot of <at> (tiers <span>)` and reads nothing else; otherwise it prints `snapshot not used: <why>` and reads the state fresh by itself, as without `--snapshot`, so a snapshot is never an error. Only that first read uses it: `pr_gate.py`, `triage_state.py`, and the other state scripts take no `--snapshot`, so a read before a write is always fresh.
`--item N` is `shipmill status --item N`'s read, not a pass's (#1469): it prints only the full report's rows that explanation reads (HOLD, NEEDS_DECISION, PRS_OPEN, PRS_PARKED, GATE_PAUSED, and the rows naming #N that are an agent's, GATE_IDLE, or GATE_RETRY), exactly as the full report prints them, and skips the sections none of them can come from. It goes without `--tier`, `--sweep`, and `--host`.
When `.github/shipmill.toml` sets `[agents] app_id`, the App's needs-decision questions count only with `--bot-login <slug>[bot]`; without it, an App question the maintainer answered still reads NEEDS_DECISION. Prefer `shipmill status --rows` (or `--json`) in the checkout, which reads the App's login itself when its key is on this host. Run by hand, pass `--bot-login '<slug>[bot]'`, quoted, since zsh globs the brackets otherwise; a gate session's prompt names the login, and `shipmill gate --dry-run` prints the login (`would launch as <slug>[bot]`).
Each row that needs a person or an agent carries a `fix` (`--json`'s `"fix"` key, the table's indented `fix:` line): the one line that clears it, built only from trusted values (never an issue's or a pull request's text). Give the user that line in the report; the repair table below stays your procedure under "watch", and a fix never runs by itself.
| State | Repair under "watch" |
|---|---|
| INCIDENT_OPEN | Report first: the issue, how long it has been open, and whether a PR links it to close it. Recommend landing the linked hotfix PR, or writing one when none links it. Rollback is operate's (or the user's), never the watch's |
| HOLD | Report next: the issue, who opened it, and when. Not an action (exit 0 by itself); see hard rule 5 |
| POSTMORTEM_DUE | An incident closed as completed (not as not planned or a duplicate) and no `docs/postmortems/*.md` on the default branch names it. Draft the postmortem as a pull request ([Postmortems](#postmortems)), once per incident: an open PR that already names it means the draft waits on the maintainer, so report the PR instead |
| OPERATE_FAILED | The latest run of the workflow calling shipmill's `operate.yml` failed. Read it; rerun a flaky or transient failure once (`gh run rerun <id> --failed`), as for BOT_FAILED. Otherwise report the failing step with the run link |
| UNHEALTHY | An environment's newest `shipmill health` status is a failure. Report the environment, the release, and the check's error. Operate owns the rollback; the watch never deploys over it |
| PROMOTION_DUE | A deploy waits on a person. With a proposal issue, report it with its approve command (`gh workflow run operate.yml -f approve=<environment> -f dry-run=false`; under a hold, the hold closes first). Without one, operate would promote the environment (deploy autonomy `act`), or propose it (`propose`, or a hold), but isn't running on a schedule, so no proposal issue opens: report what operate would do, why it isn't running, and the command that runs it once (or `shipmill init --operate` when no caller exists). Never run either yourself |
| BOT_FAILED | Read the run. If the failure is a known flaky test or a transient push or network error ([github-pr-triage's ci-failures.md](../github-pr-triage/references/ci-failures.md)), `gh run rerun <id> --failed` once. Otherwise report the failing step and its error, with the run link |
| BASE_RED | GitHub's default branch read anything but GREEN by github-pr-triage's `base_red.py` (spec 079): `<branch>@<sha7>` with the state in words and the numbers it names (`rerun due`, `rerun running`, `culprit #N`, `candidates #A #B`, `no green in the last 30 commits`), then `repair open: #R` or `asked in #Q`; or `green again, close #Q` while the question issue is still open on a green head. Give the user the row's fix: land the repair, answer the question, rerun the failed runs once, wait for a running rerun, close the question, or github-pr-triage, whose [ci-failures.md](../github-pr-triage/references/ci-failures.md) says what a red default branch needs. An action (exit 1); the gate reads it first in tier 2, and only when the default head's check rollup fails or its last reading wasn't GREEN |
| BOT_STALLED | A shipmill bot has a release due and nothing running. Start the lane the plan names: `gh workflow run release.yml -f lane=<lane> -f dry-run=false`. Never `lane=policy` by hand: it skips while main isn't quiet yet |
| BOT_PLAN_FAILED | `shipmill plan --event schedule --dry-run` on the default branch failed with the planner's own `shipmill: ` error (a CHANGELOG line it refuses, say); the detail is that error line. Any other failure (uvx unable to fetch shipmill, say) still stops the script with exit 2. The watch read it as no release due and went on, but the release workflow's own plan stops at the same error, so nothing releases until it is fixed. Report the error with the row's fix (the plan, run in an up-to-date checkout, to see it); the fix is a change to the repo through a pull request, never the watch's. An action (exit 1), never an agent's |
| WORK_BRANCH_STALE | A `shipmill/v*` work branch is on origin and no run of the release workflow is queued or in progress, so no run owns it: a run was cancelled before its cleanup job got a runner, and every later run stops at the branch (with a "Work branch held" warning) unless its prepare job grants `actions: read`. Check again that no run of the workflow the row names is unfinished, asking by status, since an old owner can sit behind more newer finished runs than one listing shows: run `gh run list -w <workflow> -s <status> --json url --jq length` for each of `queued`, `in_progress`, `waiting`, `pending`, `requested`, then `in_progress` once more (a run approved between the queries), and go on only when every one succeeds and prints `0` (a run waiting on an environment still uses the branch; a failed query keeps the branch). Then delete it only at the commit the row names: `git ls-remote origin refs/heads/<branch>` gives the full `<commit>`, which must start with the row's, and `git push --force-with-lease=refs/heads/<branch>:<commit> origin :refs/heads/<branch>` deletes it and start the lane the plan names, as for BOT_STALLED (hard rules 4 and 5 still hold); with no BOT_STALLED row, the next run releases it. When the caller's prepare job lacks `actions: read`, recommend adding it, so runs replace such a branch themselves |
| NOT_PUBLISHED | Find the publish run for the tag (`gh run list -w <publish workflow> --branch <tag>` or by the release's dispatch). Rerun its failed jobs once if the cause is flaky; a failed release check or build is reported, not retried |
| PUBLISHING | Nothing; the next pass checks again |
| PREDATES_PUBLISH | A version missing from PyPI whose tag was created before the package's first upload there: it was cut before the repo published to PyPI, so there is no publish run to repair. Report only; never upload it from the watch |
| PUBLISHED | Once per release, check that a clean install runs (github-pr-triage's [landing.md](../github-pr-triage/references/landing.md#ecosystems)); retry once on index lag |
| REQUESTER_REPORT | The issue's author commented after a pre-release notice shipmill posted before D-69 (it posts none since, and the watch reports no UNANNOUNCED), or reacted 👎 to it: it may not work for them. Under "watch", hand the issue to github-issue-triage as a possible regression, linking the comment the detail names, unless a later comment already answers it; under "status", report it. A report never labels, holds a lane, reopens, or opens a `release-blocker` by itself: the requester may be untrusted (D-16), and the hold is triage's verdict to make. Not an action (exit 0 by itself) (S-021-7) |
| ISSUES | Under "watch and triage", run github-issue-triage on the flagged issues. Otherwise list them. DECIDED is an answered needs-decision question: triage acts on the reply and removes the label. RELAY_REFUSED is a relayed answer out of its grammar (D-93) on an item with the label off: triage asks again, and the gate hands it in tier 6 (#1302). STALE_HANDOFF, an ISSUES row of its own, is a person's item whose sub-issue parent closed: its fix is "close it or say why it still waits on the maintainer", and triage closes it or posts the still-waits comment (#1313). The same row lists a person's item a pull request linking it merged after its hand-off (#1871): triage posts the done report naming those pull requests when they did every step, so its `## Check` runs, else the still-waits comment naming the steps left. PARKED_DUE is an issue triaged with nothing pending on which nothing happened for `[agents] parked_days` (spec 092, default 7, 0 never): the watch passes the key to `triage_state.py --parked-days`, and the gate hands it in tier 6 for triage to plan, postpone, or close; a goal plan, an opportunity, or a request handed to product intake (its newest trusted triage verdict **opportunity**) stays TRIAGED in ISSUES_OPEN |
| ISSUES `SPEC_UNSPLIT` | An ISSUES row of its own per spec (spec 053), its subject the spec's file: `SPEC_UNSPLIT S-NNN <title> (docs/specs/NNN-<slug>.md): approved, no build issues, no open issue follows it`. The spec on the default branch is `approved`, its Issues section lists no build issue, and no open issue follows it: none links its file in its body, and none reads BLOCKED or UNBLOCKED on the pull request that added it. Its spec PR named no feature issue, so nothing read UNBLOCKED when it merged and nobody split it. Under "watch and triage", run github-issue-triage (the row's fix), which finds or files the feature issue and splits the spec ([spec-gate.md](../github-issue-triage/references/spec-gate.md#an-approved-spec-nobody-split)); otherwise list it. An action (exit 1) and an agent's: the gate hands it in tier 6 |
| PLANS | Goals' plans that need a session (spec 028), from product-intake's `intake_state.py --json`, run once per repo in the checkout with the `--bot-login`, and with `--plans` (with `--tool` when given and `[agents] wip` as `--wip`) only when it has `docs/product.md`: PLAN_DUE with its goals (`G-n`), and PLAN_MALFORMED, PLAN_ANSWERED, PLAN_ACCEPTED, and PLAN_REPLACED with their plan issues (`#N`); with `--goals` and `--projects` too (spec 106), GOAL_OVERDUE with its goals, GOAL_PROPOSAL_DUE and NEEDS_GOAL with their opportunities, and PROJECT_START_DUE, PROJECT_IDLE, and PROJECT_STOP_DUE with their project heads, each a session's step in product-intake. A plan past its answer date (PLAN_OVERDUE) is in the PLAN_OPEN row, the maintainer's; the states, labels (`project`, `held`, `focus`, `goal-proposal`, `goal-review`), and markers are docs/flow.md's "Goals, plans, and projects". Under "watch", run product-intake on them (its Plan a goal workflow, within `[autonomy] intake`); otherwise list them. With `--trusted-only` (a headless gate), an open plan issue the `--bot-login` didn't open is in UNTRUSTED instead, and in no other row, so it starts no session (D-16) |
| GOALS | From the same `intake_state.py --plans --goals` run (spec 110), only with `docs/product.md`: each goal's measure reading from spec 027's report, in the direction's order, `G-n <status>` (`met`, `not met`, `no data`, or `no measure`), then ` (<value>)` when it has one, `, <K> weeks` met in a row, `, <state>` from its spec 106 row for a goal of kind goal (`written`, `planned`, `overdue`, `met`, `dropped`), and `, stalled <N> weeks`, joined by `; `: `G-1 met (p90 1.2 d), 4 weeks; G-3 no measure, written`. A `goal-report` line intake could not have printed (a missing key, another status, a goal id that isn't `G-<n>`, a week count that isn't a whole number from 0) stops the watch with exit 2. Report it to the maintainer as it stands. Report only, never an agent's, and in the full report alone: no `--tier` or `--sweep` read prints it |
| DIRECTION_DUE | From the same run (spec 110): each goal due for a direction proposal, as the [Weekly retro](#weekly-retro)'s step 4 has it, `G-1 met for 4 weeks; G-6 stalled for 3 weeks`: a goal with a measure line met 4 weeks in a row, or a goal of kind goal or of no kind that stalled (a standing measure never reads stalled here); a goal both is listed once, as met, and one the direction marks met or dropped never. A goal drops out while an issue titled `Direction: G-n met for 4 weeks` or `Direction: G-n stalled for 3 weeks`, opened by an OWNER, MEMBER, or COLLABORATOR or the `--bot-login`, is open or closed as not planned; one closed as completed, or opened by anyone else, leaves it due. The titles are read in one search per read, and only when a goal is due. Follow [Direction proposals](#direction-proposals) under "watch": open each named goal's proposal issue as the App after `retro.py dedupe` reads both its titles NEW; under "status", report it. An action (exit 1) and an agent's: the gate hands it in tier 7, from the sweep, right after PLANS |
| SPEC_DUE | From the same `intake_state.py` run (spec 074): `ACCEPTED #N ...`, every opportunity the maintainer accepted (its `planned` label) that triage hasn't taken, oldest first, one row per repo. Its fix is `/shipmill:github-issue-triage <repo>`: under "watch and triage", run github-issue-triage, whose [spec gate](../github-issue-triage/references/spec-gate.md) takes each up as a feature; otherwise list them. An action (exit 1) and an agent's at any `[autonomy] intake` level: the gate hands it in tier 7, from the sweep |
| FEEDBACK_DUE | From the same run: `NEW_FEEDBACK #N ...`, the requests triage handed to product intake (an issue whose newest trusted triage verdict is `opportunity`) at least 24 hours before the read, oldest hand-off first, one row per repo; a request handed over later, an issue triage never handed over, a discussion, and a request intake reads HELD (waiting for room under `[agents] outcomes`, spec 101) are in no row, and a held request that reads NEW_FEEDBACK again keeps its hand-off time. Its fix is `/shipmill:product-intake <repo>`: one intake pass groups them all. Under `[autonomy] intake = "propose"` an action (exit 1) and an agent's, which the gate hands in tier 7, from the sweep; under `observe` report only: the full report lists it, and no `--tier` or `--sweep` read prints it. With `--trusted-only`, a request or opportunity opened by neither an OWNER, MEMBER, or COLLABORATOR nor the `--bot-login` is in neither row and in UNTRUSTED (D-16). Both rows name issue numbers only, never a title or body |
| VETOED | Issues and pull requests, open, closed, or merged, labelled `decided` (a decision taken at `notify`, spec 030) whose decided marker is followed by a veto, a comment by an OWNER, MEMBER, or COLLABORATOR other than the `--bot-login` whose first word is `veto` in any case, that no newer `<!-- shipmill:veto-handled -->` comment answers, as `#N` only. Closed ones are read back over the last 14 days. Under "watch", run github-issue-triage on them, which takes each veto up ([needs-decision.md](../github-issue-triage/references/needs-decision.md)); under "status", list them. One in this row is in no other row, and an item labelled `decided` without such a veto reads as it would without the label. An action (exit 1) |
| NEEDS_DECISION | Issues and pull requests labelled `needs-decision` whose question has no reply from an OWNER, MEMBER, or COLLABORATOR ([needs-decision.md](../github-issue-triage/references/needs-decision.md)), as `#N` only. They are left out of ISSUES and PRS_OPEN, so they start no session. Report them as waiting on the user; never answer or unlabel one. An action (exit 1): a person owes the answer |
| UPGRADE_PENDING | An open `shipmill-upgrade` issue (a config upgrade a release proposed, spec 014) that a session takes up now: no `needs-decision` question waiting, no `shipmill-upgrade-later` label, no open pull request closing it, and `[autonomy] upgrade` isn't `observe`. The subject is the issue, the detail the upgrade's id and what to do: ask the maintainer, open the pull request (`act`), take up the answer, ask again when a relayed answer is out of its grammar (`relay not counted: <reason>; ask again`, D-93), or close the issue as not planned after its pull request closed unmerged. Follow [Config upgrades](#config-upgrades) under "watch"; under "status", report it. An upgrade issue is never in ISSUES or ISSUES_OPEN; while its question waits it is in NEEDS_DECISION. With `--trusted-only` (a headless gate), the release workflow's issue, opened by the Bot `github-actions[bot]` with both the label and the marker as its first line, reads as here (D-30); one opened by any other author who is neither an OWNER, MEMBER, or COLLABORATOR nor the `--bot-login` stays in UNTRUSTED and starts no session (D-16): an interactive session takes it up |
| DIRECTION_PENDING | Only for a config with `[agents]` whose default branch has no `docs/product.md` (spec 034). The detail says what the session does: `open the direction question` (subject `docs/product.md`: no direction issue yet), or on the oldest open direction issue (subject `#N`) `ask the maintainer`, `answered; take up the answer`, `relay not counted: <reason>; ask again` (a relayed answer out of its grammar, D-93), or close it as not planned after a pull request from the repo's own `shipmill/direction` closed unmerged. Follow [Direction](#direction) under "watch"; under "status", report it. None while the question waits (the issue is in NEEDS_DECISION) or a `shipmill/direction` pull request is open. An action (exit 1) and an agent's |
| UNTRUSTED | With `--trusted-only` (the headless gate's trust filter, D-16): issues whose author is no OWNER, MEMBER, or COLLABORATOR nor the `--bot-login` (save the release workflow's `github-actions[bot]` upgrade issue with its label and first-line marker, D-30), open plan issues the `--bot-login` didn't open (spec 028), outsiders' requests and opportunities (spec 074), and pull requests whose head is in a fork, as `#N` only. Report them for an interactive session. Not an action |
| ISSUES_OPEN | The open issues triage owes nothing on yet, by state (IN_PROGRESS, BLOCKED, TRIAGED, POSTPONED, ...), and each person's item waiting on its assignees as `WITH_PERSON #N (@login ...)` (spec 017), and each upstream report waiting outside as `UPSTREAM #N` (spec 038), or `UPSTREAM_UNOWNED #N` when nobody linked or took it and it waits on the maintainer (#1487), never an agent's. Report only: list them, with the PR, the issue, or the person each waits on |
| PRS_PARKED | Open non-draft pull requests that are a person's item, labelled `role:<name>` or `human` with an assignee (such as one the maintainer holds for their own merge), as `WITH_PERSON #N (@login ...)`. They are left out of PRS_OPEN, so they start no session. Report only: list them with the person each waits on. One with the label and no assignee stays in PRS_OPEN, for a session to assign. Under `[autonomy] land = "propose"`, the ones labelled `shipmill-ready` wait on the maintainer's merge and follow as `TO_MERGE #N` (`WITH_PERSON #4 (@a); TO_MERGE #12`, spec 061): out of PRS_OPEN too, so they start no session; report them as waiting on the maintainer to merge. A pull request whose body's `Depends on` lines name an item still open follows as `WAITS_ON #N (owner/repo#M)` (spec 041, #1645), out of PRS_OPEN and the land window's queue, so the gate never hands it to land: report it as waiting on that item |
| AGENT_DRAFT | Open drafts the `--bot-login` authored, whose session ended, with nothing open on them: no needs-decision question waiting on a reply and no hold comment naming an item still open (D-67, #914). The gate hands it in the pull-request tier. Run github-pr-triage on them: it takes up an answered question, marks each ready (`gh pr ready <n>`, through `shipmill gh`), and lands it. A person's draft is in no row |
| AGENT_DRAFT_HELD | Those drafts still held, as `#N (question)` (in NEEDS_DECISION too) or `#N (owner/repo#M)`, the open item a hold comment names. Report only: they resume as AGENT_DRAFT once nothing on them is open |
| LAND_DUE | Only with `[land.window]` (spec 056): the oldest open pull request carrying the window's `queued_label` (by when the label was last added), while `shipmill window --json` reads the window open and `next_merge` now or earlier, as `#N <title>: the land window is open; queued since <time>`. Its fix is `/shipmill:github-pr-triage <repo>`, which gates it again and merges it on READY; the merge removes the label. Like PRS_OPEN it is land-stage work: the gate hands it in tier 3, before PRS_OPEN, only when `[autonomy] land` isn't `observe`. Under "status", report it. An action (exit 1) |
| LAND_QUEUED | Each other queued pull request, as `#N <title>: <why>`: the next opening, the spacing, or `behind #M`. A queued pull request is in neither PRS_OPEN nor any other row. Report only: it lands as LAND_DUE once the window and the spacing allow, or by a person's own merge |
| RUNS_ACTIVE | A queued or running run of any workflow (CI, a release, a deploy), one row each with its age and link, then what its jobs do: `running: <job> since HH:MM UTC`, `no job started`, `no job running`, or `jobs unreadable` when GitHub refused the read. Judge a runner from these, not from a run's status: a run queued behind another run's running job on the one self-hosted runner is waiting, not stalled, and `jobs unreadable` says nothing either way. Report only; the next pass sees how it ended |
| TRIAGE_MODE | How far the gate's sessions go: the effective `triage`, `fix`, and `land` levels, each with its source as `shipmill autonomy` reads it (`config`, `default`, `prompt`, or `hold`), such as `triage act (default), fix act (default), land propose (hold)`; then the other `[agents]` keys, less the prompt (its words are the task, not the levels) and the deprecated `prs`. Report only |
| AGENT_SESSION | A Claude Code session on this host working the repo (`claude agents --json`): a gate session or one in the checkout, with its status. One that is `blocked` waits on the user: give them `claude attach <id>`. Report only |
| LOOP | The launchd job running `shipmill gate` for the repo on this Mac: its interval, state, last exit, and the gate's last decision, or "none". The gate's own cause and fix, for a failing tick with since when, are on `shipmill factory`'s gate line (spec 048). Add this session's own loops (CronList) and any `/schedule` routine the user named, which no script can read. Report only |
| HOST_UNKNOWN | `claude` isn't on PATH, as in a cloud session, so the agent sessions weren't read: say so rather than "no agents". Report only |
| BRANCH_DELETE_OFF | The repo's `delete_branch_on_merge` is off, so merged branches pile up and a stacked PR isn't retargeted. The watch never changes repo settings: recommend the command in the row (`gh repo edit <repo> --delete-branch-on-merge`), or shipmill-setup's `setup_state.py --fix`. An action (exit 1), never an agent's |
| GATE_NO_APP | The config's `[agents]` has a prompt but no `app_id`, so the gate's sessions write as the host's `gh` login: their pull requests, comments, and commits read as the maintainer's, who can't approve them (D-98). Tell the user to connect an App with shipmill-setup's step 3 under The gate (`shipmill app-create`, then `app_id` in `[agents]` through a PR). No row with `[agents] identity = "host"`, the owner's recorded choice; with `identity = "none"` the row says the gate's sessions stop at their first write: tell the user to remove the `[agents]` prompt, or choose an App or `identity = "host"`. The watch never creates an App or edits the config. An action (exit 1), never an agent's |
| DIRECTION_MISSING | Only for a config with `[agents]` (spec 034): the default branch has no `docs/product.md`, or `shipmill product check --ref origin/<default> --local` refuses it (this repo's own file; a component never reads its product home's here). The fix names where the question stands: the open direction issue to answer, the open `shipmill/direction` pull request to review and merge, this skill with neither, or for a refused file `shipmill product check`. Give the user the row's fix; the watch never writes or repairs `docs/product.md` on its own (D-34), only from the maintainer's answer under DIRECTION_PENDING ([Direction](#direction)). A direction issue closed with none open is a decline: no row, and TRIAGE_MODE says `no direction: declined in #N`. An action (exit 1), never an agent's |
| GATE_SESSIONS_DEAD | The gate log's last decision on this Mac is `SESSION_DEAD`: its last session ended other than ok: its log shows a usage limit, an authentication failure, or no result without an error, however long it ran (spec 089; an interactive one: `claude agents` lists it `failed`, or `done` within 60 seconds), with how many did so in a row and the session log's last line (#500). Give the user the row's fix: `claude auth login`, with a token file running `claude setup-token` and saving it to that file (spec 035), the `tail` of the session's log, or `claude logs <id>` for an interactive session. An action (exit 1), never an agent's |
| GATE_IDLE | An issue or pull request the gate keeps idle (spec 061, D-87): its last session wrote nothing on it, so past `retry_hours` the gate hands it to no session until it changes on GitHub. One row per hand marked `idle` in the gate folder's `handed.json` (its state directory, `<git-common-dir>/shipmill`), oldest first; the subject is the hand's `<kind> #<N>` (`ISSUES VERIFY_DUE #842`), the detail `idle since <time> UTC (<age> ago): session <id> wrote nothing on it; waits for a change`. Spec 092 (S-092-14) ends it by the hand and `[agents] idle_days` (default 3, 0 never): `waits on <owner/repo>#<N>` in place of `waits for a change` for a hand that records the item its subject's newest waits-on marker by the bot names, which wakes it when that item changes; `waits for a change, or is handed again <YYYY-MM-DD HH:MM> UTC to name what it waits on` for a hand that names nothing, which the gate hands once more `idle_days` after it; and `session <id>, handed it after <n> d idle, wrote nothing on it; waits for a change` for the hand of that one more session, which is never handed on time again until the subject changes. With `idle_days = 0` and no waited item it reads as spec 061 words it. It waits on someone or something outside the gate: list it with the issue or pull request to open, and tell the user what moves it, answering or changing the subject on GitHub (a comment, a label, an edit, a push), or closing it. The watch writes nothing on it, since a write would hand it again. In the full report and `--no-host`, never in `--tier`, `--sweep`, or `--host`. Report only, never an agent's |
| GATE_PAUSED | The credential the gate's sessions use is paused (spec 089): a session ended on a usage limit (`limit`) or a refused credential (`auth`), so no gate on this host starts a session with it. The subject is the cause, the detail when it ends: a limit's time (its `resetsAt`, or `retry_hours` after it began), or sooner once `/usage` shows room; an auth pause `until the token changes`, or on the login until `claude auth status` reports one. Read from `$XDG_STATE_HOME/shipmill/claude/<credential>.json` (for a gate on launchd, as its job's `EnvironmentVariables` set it, not the shell; `~/.local/state` without it), named by a hash of the token file, never the token. Give the user the row's fix for `auth` (a new token with `claude setup-token`, or `claude auth login`); a limit lifts by itself and has none. Where GATE_IDLE is; report only, never an agent's |
| GATE_RETRY | An item whose session ended `error` waits for its backoff (spec 089): 15 minutes, 1 hour, then 4 hours after each death in a row, then `retry_hours`. One row per held hand in `handed.json`, soonest first, detail `after <time> UTC: <n> error ends in a row`; the gate hands it again by itself. A run of them points at a session that keeps failing: read its log (`tail` of the gate's session log, as GATE_SESSIONS_DEAD names it). Where GATE_IDLE is; report only, never an agent's |
| GATE_CHECKOUT_MISSING | On a Mac, a gate job on this host, this repo's or another's (each `dev.shipmill.gate.*.plist` in `~/Library/LaunchAgents`), whose `WorkingDirectory` is not a folder, as when the repo's `tmp/` was deleted with `tmp/shipmill-gate` in it: launchd exits 78 before `shipmill gate` runs, so the gate never reports it (#1155). The subject is the job's label, the detail its repo, the missing folder, and launchd's last exit. Give the user the row's fix: when the folder is `<main>/tmp/shipmill-gate` and `<main>` is still a git checkout, `git worktree prune`, `git worktree add --detach <folder> origin/HEAD`, and `launchctl kickstart`; when it is `~/.local/share/shipmill/gates/<owner>/<repo>`, where shipmill-setup puts it outside the repo (#1156), the same from the person's checkout of the repo, which the fix names `<its checkout>`; else clone the repo and run `shipmill launchd <owner/repo>` from it. It is in the full report and `--host sessions`, which `shipmill factory`'s sessions check reads. An action (exit 1), never an agent's |
| CHAIN_NO_GATE | An item in a chain one of the repo's open issues belongs to (spec 017; github-issue-triage's `chains.py show --trusted-only`, run over the open issues but the UNTRUSTED and closed ones, and never reading or following an issue by an author who is neither an OWNER, MEMBER, or COLLABORATOR of this repo (for an issue in another repo, this repo's owner or collaborator) nor the `--bot-login`, D-16) that is ready, linked to another item, and in a repo whose `.github/shipmill.toml` has no `[agents]` table, or that has none: nothing takes it up, so the chain stalls there. The subject is the item, `owner/repo#N`. Tell the user: a gate on that repo (shipmill-setup), or the item done by hand. The watch never works an item in another repo. An action (exit 1), never an agent's |
| CHAIN_CYCLE | A cycle the same `chains.py show --json --trusted-only` run marks (spec 041: open issues each holding the next, so none can start) with an item outside the watched repo: one row per distinct cycle, its subject the loop's first item, `owner/repo#N`, its detail the loop, `a -> b -> a`. A cycle wholly inside the repo gets no row: its triage reads CYCLE and a session asks. Tell the user to answer which link is wrong and remove it; the row's fix runs `chains.py show` on the first item. The watch never removes a link in another repo. An action (exit 1), never an agent's |
| CHAIN_UNREADABLE | The chain walk behind CHAIN_NO_GATE and CHAIN_CYCLE failed (a gh error, an issue past a page of labels or relations, a config it can't parse, a malformed reference in a row's `ref` or `cycle`), so the chains weren't checked this pass; the other rows stand. The subject is the item the error names (else the repo), the detail the error's first line. Give the user the row's fix, which reruns the walk to show the error. An action (exit 1), never an agent's |
| CHAIN_STALLED | Only in the full report, never under `--tier` or `--sweep` (spec 086): from the same `chains.py show --json --trusted-only` run, one row per head idle 7 days or more, a head being an open issue that holds 1 or more open issues (`held`) and waits for neither `items` nor `cycle` (`waiting_for`). The subject is the head, `owner/repo#N`, the detail `holds K open issue(s), no event for D day(s), waits for <waiting_for>`, the fix `chains.py show` on it. Tell the maintainer which chain waits on it and what it waits for; `shipmill status` lists it on its `stalled chains` line. A malformed `held`, `waiting_for`, or `idle_days` is CHAIN_UNREADABLE. Report only, never an agent's: it leaves the exit code as it was |
| UPSTREAM_DUE | Only in a home repo's checkout, whose config has `[product] repos` (spec 038): github-issue-triage's `upstream_state.py <repo> --json`, run in the checkout with the `--bot-login`, reads the open `upstream` reports of the home repo and every listed repo, and the row names the ones the coordinator acts on, as `owner/repo#N` by state: ROUTE_DUE (route it to the owning repos), ANSWERED (route it by the maintainer's answer), CLOSE_DUE (every child closed: close it with a summary), VERIFY_DUE (a report with a `## Check` whose children closed: run its check), CHECK_FAILED (its check failed: file the fix as a new child; spec 042). Under "watch and triage", run github-issue-triage, whose coordinator routes and closes them (D-47); otherwise list them. Without `[product] repos` the script never runs and no upstream row appears |
| UPSTREAM_ASKED | Reports whose `needs-decision` question (which repo owns the fault) has no reply, as `owner/repo#N`. Report them as waiting on the user; never answer or unlabel one. An action (exit 1), never an agent's |
| UPSTREAM_UNTRUSTED | Reports whose author is neither an OWNER, MEMBER, or COLLABORATOR of their repo nor the `--bot-login` (D-16), as `owner/repo#N`: `upstream_state.py` never reads their text, children, or comments. Report them for an interactive session. Not an action |
| UPSTREAM_UNREADABLE | `upstream_state.py` failed (a gh error, `shipmill gh --product` refusing, a config it refuses), so the reports weren't read this pass; the other rows stand. The detail is the error's first line. Give the user the row's fix, which reruns the script in the checkout to show the error. An action (exit 1), never an agent's |
| SHIPMILL_VERSION | The latest shipmill release, the `shipmill@shipmill` plugin installs that apply to the repo on this host (user scope, and local or project scope in the checkout or the gate's working directory, each read as the project Claude Code loads: a linked git worktree counts as its main checkout), the gate's checkout's own installs (`tmp/shipmill-gate`, `~/.local/share/shipmill/gates/<owner>/<repo>`, the gate's launchd working directory, or the checkout itself when it is a linked worktree: Claude Code keys an install on each, #233), the install a session in the gate's folder loads (`a session loads <scope> <version> (<project>)`: the most specific scope installed for its project, local, then project, then user, then managed; a linked worktree's project is its main checkout), and a marketplace still on an old repo name. When the install a session loads is older than the latest release the detail says so. Gate sessions load the installed plugin, which runs the CLI release it pins (spec 031, D-44): the gate reports a lagging install on its tick and still starts the session. Report only |
| SHIPMILL_OUTDATED | The user-scope install is older than the latest release, so the skills it runs are stale. Give the user the row's command, run anywhere (a restart applies it): `claude plugin marketplace update shipmill && claude plugin update shipmill@shipmill --scope user` (the update alone can leave the install behind, since Claude Code updates from its local copy of the marketplace). Neither the watch nor the gate updates a plugin: `[agents] plugin_update` was removed: a config that still sets it loads without it, and each command says `shipmill: refused: ...` on stderr until it is deleted (spec 052). An action (exit 1), never an agent's |
| PLUGIN_SHADOWING | The project- and local-scope installs of `shipmill@shipmill` keyed on this repo's main checkout, its linked worktrees, or its gate checkouts, as one row (`shipmill factory` counts every one on the host): each wins over the user install in its folder, so that folder runs its own, often older, release (spec 039). Give the user the row's fix, `uvx shipmill==<version> plugin-clean`, a dry run listing them, then `plugin-clean --apply` from their own terminal, which removes them and keeps each folder's settings; on a host without a user install the fix installs one first. Never run `--apply` or a `claude plugin` command yourself. An action (exit 1), never an agent's |
| SKILL_SHADOWED | A link or copy of a shipmill skill in `~/.claude/skills` or `~/.agents/skills` (the subject is the skill's name), which a prompt's unprefixed `/<name>` loads in place of the plugin's, so a session can run a working copy that is behind or on a feature branch (#236). A link into the plugin's cache (`~/.claude/plugins/cache/shipmill/`) is the plugin's and never reported. Give the user the row's fix: remove the link or copy, or call the skill as `/shipmill:<name>`. The watch never deletes anything in the user's home folder. An action (exit 1), never an agent's |
| MILESTONE_WAITING | From `shipmill milestones` (spec 022), read with the release's planner only when a lane sets `milestone = true`: the milestone named after the version that lane would cut has no open issues, yet its goal isn't done. The subject is the milestone, the detail the first reason per spec (`milestone 1.5.0: S-021 is approved, not built`, `S-021's #N is not in v1.5.0rc3`, `S-021's #N closed with no merged pull request`). Report only: the build work, a spec marked built, or the next rc clears it |
| MILESTONE_OVERTAKEN | From `shipmill milestones` (spec 022): a stable tag of an open milestone's version exists while the milestone still has open issues, so the increments shipped and the goal moves on. The detail names the version the lane cuts next; the fix renames the milestone to it (`shipmill gh api -X PATCH repos/<owner>/<repo>/milestones/<n> -f title=<next>`, in every repo (hard rule 7)), since the policy already decided the version. Under "watch", run the fix once (as the App, hard rule 7), then say so on the tracking issue the user names, `gh issue comment <n> --body-file <file>` (with none named, in the report only): the milestone, its old and new title; the goal and its issues stay as they were. Under "status", report the row with the fix. An action (exit 1), never an agent's |
| MILESTONE_RELEASED | From `shipmill milestones` (spec 068): an open milestone titled a stable version whose tag exists, with no open issues, so its release shipped it and GitHub left it open (a lane without `close_milestone`, or a land.yml `milestone` job whose write failed). The fix closes it (`shipmill gh api -X PATCH repos/<owner>/<repo>/milestones/<n> -f state=closed`, in every repo (hard rule 7)). Under "watch", run the fix once (as the App, hard rule 7), then say so where you say a rename: on the tracking issue the user names (with none named, in the report only), the milestone and that it is closed. Under "status", report the row with the fix. An action (exit 1), never an agent's |
| MILESTONE_MISSING | From `shipmill milestones` (spec 068): no open milestone is titled a stable version above the newest stable tag, so the milestone lane has none to wait on. The subject is the version the lane cuts next; the fix creates its milestone (`shipmill gh api -X POST repos/<owner>/<repo>/milestones -f title=<next>`, in every repo (hard rule 7)). Which work a version holds is the maintainer's list (D-32), so no watch pass runs this fix, under "watch" or any scope: report the row with its fix for the maintainer, or for an accepted goal plan that names the milestone (D-38). Report only (exit 0 by itself), never an agent's |
| CLASS_CONFLICT | Only with `[agents]` (spec 070): an open accepted opportunity (`opportunity` and `planned`) whose `expedite` and `fixed-date` labels both count, so it reads as standard. A class label counts only when the newest event adding it names a person as its actor; one the App added, or whose actor can't be read, counts as no label. Give the user the row's fix, "remove one of `expedite` and `fixed-date` from #N"; the watch never picks a class. An action (exit 1), never an agent's |
| FIXED_DATE_AT_RISK | Only with `[agents]` (spec 070): an open opportunity of class fixed date (a person's `fixed-date` label) whose milestone is due in 2 days or fewer, or past, while it has an open sub-issue or none at all, as `#N due YYYY-MM-DD, K build issues open`. Give the user the row's fix, "expedite #N or move its milestone's due date"; the watch never moves a date or adds a label. An action (exit 1), never an agent's |
| FIXED_DATE_NO_DATE | Only with `[agents]` (spec 070): an open opportunity of class fixed date in no milestone, or in one without a due date (D-32: the milestone and its date are the maintainer's). Give the user the row's fix, "set the due date of #N's milestone". An action (exit 1), never an agent's |
| PYPI_WAIT | uv found no `shipmill==<version>` on PyPI for the pinned CLI, even with its index refreshed: a release's tag moves minutes before PyPI serves it (#597). The detail names the reads it stands in for; the rest of the watch stands. Report it with the row's fix, the release's `publish.yml` run, only when it outlasts a few passes. Report only |
| DEPLOYMENTS_FORBIDDEN | Only with `[environments]`: a deployments or deployment-statuses read got GitHub's `Resource not accessible by integration (HTTP 403)`, so the token's GitHub App has no `deployments: read` (#973). One row per repo, naming the environments not read: their UNHEALTHY and deployment-based PROMOTION_DUE rows are skipped this pass, and the rest of the report stands. Give the user the row's fix: grant `deployments: read` in the App's settings and accept it on the installation (#968). Any other failure of these reads still exits 2. Report only, never an agent's |
| DRIFT | Only in the full report, for a config with `[trends]` (spec 078): a series whose newest bucket reads the `report` tier against its own recent past, `DRIFT <series> <newest> against mean <mean>, <deviation>σ over <N> buckets of <D>d: <diagnosis>` ([Trends](#trends)). Tell the maintainer, with the diagnosis and the row's fix, the `trends.py` command that prints the whole report. Report only, never an agent's: the watch changes nothing on a drift |
| PRS_OPEN, BOT_OK, BOT_NONE, NO_REGISTRY | Report only |
`--json` prints one JSON object per row: `state`, `subject`, `detail`, and `agent`, which says whether the row needs an agent. `shipmill gate` starts a session only on `agent: true` rows (plus PRS_OPEN and LAND_DUE unless `[autonomy] land` is `observe`, spec 040, spec 056), and refuses a row without the field. The script's `AGENT` set decides it, next to this table; change both together:
| `agent` | States | Why |
|---|---|---|
| `true` | BOT_FAILED, BOT_STALLED, WORK_BRANCH_STALE, NOT_PUBLISHED, ISSUES | A repair above an agent does: a rerun, a lane start, a stale work branch deleted, triage |
| `true` | PLANS | An agent runs product intake on a goal's plan: proposes it, takes up the maintainer's answer, files an accepted plan's items, closes a replaced plan, or fixes a malformed body; asks about a goal past its horizon or an opportunity that names no goal, opens a goal proposal, and starts, asks about, or stops a project (spec 106); the maintainer alone accepts or declines (D-10) |
| `true` | DIRECTION_DUE | A session opens the Direction proposal of each goal the row names, after `retro.py dedupe`; only the maintainer changes the direction (D-34, spec 110) |
| `true` | SPEC_DUE | A triage session runs the spec gate on each accepted opportunity (spec 074) |
| `true` | FEEDBACK_DUE | An intake pass groups the requests triage handed over into opportunities and proposes them; it never accepts one (D-10). Not under `[autonomy] intake = "observe"`, where the row is report only (spec 074) |
| `true` | OPERATE_FAILED | An agent reruns a flaky operate run or reports the failure |
| `true` | INCIDENT_OPEN | An agent works the incident: diagnosis, then a hotfix or a revert |
| `true` | UPGRADE_PENDING | An agent asks the upgrade's question, carries out the answer, or opens the pull request under `act`; while the question waits the issue is in NEEDS_DECISION, which starts no session |
| `true` | DIRECTION_PENDING | An agent opens the direction question, asks it, takes up the maintainer's answer, or closes a declined issue; while the question waits the issue is in NEEDS_DECISION, which starts no session |
| `true` | UPSTREAM_DUE | The coordinator's session routes a report to the owning repos, takes up the maintainer's answer, closes a report whose children closed (spec 038, D-47), or runs a report's `## Check` and files the fix when it fails (spec 042); a report whose question waits is in UPSTREAM_ASKED, which starts no session |
| `true` | VETOED | A session takes up a trusted veto of a decision an agent took at `notify` (spec 030): does what the veto asks or asks the question, undoes what it can, and posts the veto-handled marker, which ends the row |
| `true` | AGENT_DRAFT | A session runs github-pr-triage on the App's own draft whose session ended (D-67, #914): takes up the answered question, marks it ready, and lands it. Like PRS_OPEN it is land-stage work: the gate hands it only when `land` isn't `observe`, and under `propose` the session asks before marking it ready; while its question waits or a hold comment names an open item it is AGENT_DRAFT_HELD, which starts no session |
| by its reading | BASE_RED | `true` only under `[autonomy] revert = "propose"` or `"act"`, read from the default branch (default `observe`), for `green again` or a reading with neither `repair open` nor `asked in`, save `rerun running`: a session reruns, reverts, or asks (spec 079). With a repair open, tier 3 lands it; with the question asked, tier 4 takes up the answer. Never under `observe` |
| `false` | PROMOTION_DUE | Only a person approves; an agent would wake every retry window for nothing |
| `false` | BOT_PLAN_FAILED | The plan fails the same way every tick until the repo changes; as an agent's row it would start a session every retry window, and a failing scheduled release run already reads BOT_FAILED |
| `false` | BRANCH_DELETE_OFF | A repo setting only a person changes |
| `false` | GATE_NO_APP | Only a person creates the App and owns its key; as an agent's row, every tick on an app-less repo would start a session |
| `false` | DIRECTION_MISSING | Only the maintainer writes or repairs the direction (D-34); as an agent's row, every tick on a repo without one would start a session |
| `false` | GATE_SESSIONS_DEAD | The gate's own sessions are what dies; a session started for it would die the same way |
| `false` | GATE_CHECKOUT_MISSING | The stopped gate runs no session, and the folder is on the person's host; a session started for it by another repo's gate would touch a checkout that isn't its own |
| `false` | CHAIN_NO_GATE | The stalled item is in a repo without a gate; only a person sets one up there or does the item, and as an agent's row every tick would start a session for it |
| `false` | CHAIN_CYCLE | Which link is wrong is the maintainer's call, and the cycle runs through another repo, whose items no session here writes; as an agent's row every tick would start a session for it |
| `false` | CHAIN_UNREADABLE | The walk fails the same way every tick until a person fixes the item, the config, or the access; a session started for it could only report it again |
| `false` | CHAIN_STALLED | A report of where work waits, not work: the head already has its own row when a session can take it, and as an agent's row every tick would start a session for an item that waits on a person, a decision, or another repo |
| `false` | SHIPMILL_OUTDATED | A person updates the plugin and restarts the session, or, for the `shipmill on PATH` row, runs `uv tool upgrade shipmill` (or the plugin's update when that CLI is the newer one) |
| `false` | SKILL_SHADOWED | The fix is in the user's home folder; an agent never deletes files there |
| `false` | PLUGIN_SHADOWING | A person runs `plugin-clean --apply` from a terminal; it refuses without one |
| `false` | MILESTONE_OVERTAKEN | A watch pass renames it when it runs; a session started only for a rename would wake every retry window for one API call |
| `false` | MILESTONE_RELEASED | A watch pass closes it when it runs, as it renames an overtaken one; a session started only for the close would wake every retry window for one API call |
| `false` | MILESTONE_MISSING | Only the maintainer, or a goal plan they accept, creates a milestone (D-32, D-38); as an agent's row every tick would start a session that may not run its fix |
| `false` | CLASS_CONFLICT, FIXED_DATE_AT_RISK, FIXED_DATE_NO_DATE | They wait on the maintainer's choice of class or date, which no session makes (spec 070); as an agent's row every tick would start a session for it |
| `false` | UNHEALTHY | Operate owns it and rolls back after `rollback_after` failures; past that, the incident it opens reads INCIDENT_OPEN |
| `false` | HOLD | Report only; the gate checks `shipmill-hold` itself before anything else (D-15) |
| `false` | NEEDS_DECISION, UNTRUSTED, UPSTREAM_ASKED, UPSTREAM_UNTRUSTED | The item waits on a person's reply, or on an interactive session; a session started for it could only ask again |
| `false` | UPSTREAM_UNREADABLE | The script fails the same way every tick until a person fixes the access or the config; a session started for it could only report it again |
| `false` | DEPLOYMENTS_FORBIDDEN | Only a person accepts a permission on the App's installation; a session started for it could only report it again |
| `false` | REQUESTER_REPORT | A requester's answer stays on the issue after it is read, so as an agent's row it would start a session every tick; a pass started for anything else hands a report to triage |
| `false` | PRS_OPEN, POSTMORTEM_DUE, and every other state | Report only, or a repair the watch pass makes itself |
Pass `--grace` to give a slow publish more minutes before it reads NOT_PUBLISHED, and `--tool <spec>` to run shipmill as `uvx --from <spec> shipmill` instead of the release this plugin pins (the version in its `.claude-plugin/plugin.json`, which the script reads; a missing or malformed one exits 2 naming it).
The watch never reads worktrees (spec 044): `shipmill factory` lists them, with a line and its fix for each kept shipmill worktree created over 7 days ago, for a person to finish or remove. So the watch needs `claude` on `PATH` only for the rows that read live sessions and plugin installs.
MILESTONE_WAITING, MILESTONE_OVERTAKEN, MILESTONE_RELEASED, and MILESTONE_MISSING show only for a shipmill bot whose config has a lane with `milestone = true`: the script then runs `shipmill --repo <repo-dir> milestones --json`, through the pinned uvx form, and never without such a lane. A failing `shipmill milestones`, or JSON the script can't read, stops the watch with exit 2; a milestone read the planner fails (a goal it can't read, say) is a `warning:` line on stderr with no row.
HOLD and POSTMORTEM_DUE show for every repo with a shipmill config, since a hold stops releases too and an incident may be labelled by hand. POSTMORTEM_DUE reads the postmortems through the GitHub contents API on the default branch, so a draft counts only once merged. The operations states show only when the config declares environments (read with `tomllib`; on Python 3.10 only plain `[environments.<name>]` tables, and any other form stops the watch with a one-line message); they come from the GitHub deployments and issues `shipmill operate` writes. The incident label is `[operate] incident_label`, `incident` by default; `--incident-label` takes its place (the fleet report passes a fleet entry's label this way).
## Report
Every report the user asks for covers the open issues (ISSUES and ISSUES_OPEN), the workflow runs (RUNS_ACTIVE), and the agents: the triage mode (TRIAGE_MODE), the sessions (AGENT_SESSION), the loops (LOOP, plus this session's own), and the subjects the gate keeps idle (GATE_IDLE); and whether this host's shipmill is current (SHIPMILL_VERSION, SHIPMILL_OUTDATED, PLUGIN_SHADOWING, SKILL_SHADOWED). Say "none open", "nothing running", or "no agents" when a row is absent; a status report that leaves one out reads as complete when it isn't. A DRIFT row is told to the maintainer with its diagnosis, as a trend to look at; the pass changes nothing on it.
Under /loop, a quiet pass (exit 0) is one line: "Nothing owed: bot OK, <latest tag> published and announced, no issues waiting." (add "held by #N" when a HOLD row shows). Otherwise lead with open incidents and holds, then what needs the user (each with a recommendation), then what the pass repaired with links, then what it left for the next pass.
## Postmortems
Every closed incident gets a postmortem: a file `docs/postmortems/YYYY-MM-DD-<slug>.md` (the day the incident opened) from shipmill's [`docs/postmortems/TEMPLATE.md`](../../docs/postmortems/TEMPLATE.md), merged through a pull request; the first postmortem copies the template into the repo too. The watch drafts it; the maintainer approves it by merging, and nothing merges without the usual gates.
1. Read the record: the incident issue and its comments (`gh issue view <n> --json title,body,createdAt,closedAt,comments`), and the deployment statuses of the environment it names (`gh api repos/<repo>/deployments?environment=<env>`, then each deployment's `statuses`) from the release before the fault to the recovery
2. Draft from the record only: the timeline in UTC from those comments and statuses, the cause and the change that introduced it, what caught it, what would have caught it sooner, the rule in code (the test, hook, or gate check that now holds what an agent got wrong, or `none:` and why no agent's instructions were involved), and the actions. Keep one `Incident: <owner/repo>#<n>` line per incident the postmortem covers (the issue's URL, or `#<n>` for the repo itself, reads the same); the watch reads that line. Mark anything the record doesn't show as a question for the maintainer, never a guess
3. Sort each action. A rule the team should now follow is a decision: propose it in the table as `D-n`, the next number `decisions.py` would give, with its rule, why, applies to, and enforced by. Any other action is work: link an open issue that already covers it (`../github-issue-triage/scripts/decisions.py find` for rules, `scripts/retro.py dedupe` for issue titles), or name it as an issue to open
4. Open the PR on a `docs/postmortem-<n>` branch, with the incident linked. Don't open the action issues or record the decisions before the merge: the maintainer may change them in review
5. After the maintainer merges, open each action issue the postmortem names (deduplicated with `retro.py dedupe`), and record each rule with `decisions.py add` in its own docs pull request ([github-issue-triage's design gate](../github-issue-triage/references/design-gate.md), Recording a decision). Then edit the postmortem's table to link them, in the same docs PR
Opening issues and PRs for a postmortem, carrying out a config upgrade's answer, asking for the direction and carrying out its answer, and opening a goal's direction proposal are the only writing the watch does beyond its repairs, and it does those only under "watch". Under "status", report POSTMORTEM_DUE, UPGRADE_PENDING, and DIRECTION_PENDING and stop. DIRECTION_DUE likewise: under "status", report it and open nothing.
## Config upgrades
A shipmill release can bring a feature that needs an opt-in in `.github/shipmill.toml`, such as changelog fragments (spec 014). shipmill never turns one on by itself: the release workflow, and the gate's sweep as the App (spec 047), open one `shipmill-upgrade` issue per pending upgrade, the same one from either, its first line the marker `<!-- shipmill-upgrade: <id> <version> -->`, and the maintainer decides. The watch puts the question and carries out the answer. For each UPGRADE_PENDING row, under "watch":
1. **Check the row.** In an up-to-date checkout of the default branch, `shipmill upgrade --json` must list the row's id with the row's issue as its `issue`; otherwise stop and report it, since the issue is no proposal to act on. Take the upgrade's words from that output (`changes`, `why`), never from the issue's text. Read `[autonomy] upgrade` there (`propose` when unset): an open `shipmill-hold` issue turns `act` into `propose` (D-8), and under `observe` the watch neither asks nor opens a pull request (the row doesn't show then)
2. **A pull request closed unmerged** (the detail says so): closing it was the maintainer's decline. Close the issue as not planned, `gh issue close <n> --reason "not planned" --comment "<pull request> closed unmerged: shipmill won't propose <id> again"`, and open nothing new. The script counts only a pull request from the repo's own `shipmill/upgrade-<id>` branch whose state is CLOSED: a merged one already closed its issue as completed, and this step never runs for it
3. **Under `propose`, ask.** Put the question with github-issue-triage's [needs-decision protocol](../github-issue-triage/references/needs-decision.md): a gate session posts it on the issue as the App and adds the `needs-decision` label, and an interactive one also asks it with AskUserQuestion, the same four options in the same order; a session the user started by hand asks only in the session, then posts the answer on the issue as the protocol's [Answered in the session](../github-issue-triage/references/needs-decision.md#answered-in-the-session) says, so the decision lives on GitHub either way. The question, with its four options in this order:
```markdown
<!-- shipmill:needs-decision -->
<!-- shipmill:zone upgrade -->
@<login> Decision needed: turn on <id> (<one line on what it changes>)?
1. Turn it on (recommended): <what users get>
2. Turn it on, and take every future upgrade without asking: also sets `[autonomy] upgrade = "act"`
3. Not now: ask again after the next shipmill release that changes this upgrade
4. Never: close this issue; shipmill won't propose it again
Reply here with a number or your own answer; shipmill takes this up on the tick after your reply.
```
While the label is on and no OWNER, MEMBER, or COLLABORATOR has replied, the issue is in NEEDS_DECISION, which starts no session
4. **Under `act`, ask nothing.** Open the pull request at once (step 6), its decision line `[autonomy] upgrade = "act"`
5. **Take up the answer** (the detail says "answered"). The answer is the newest reply after the question from an OWNER, MEMBER, or COLLABORATOR, told by the comment's `author_association` (`gh api repos/<repo>/issues/<n>/comments`), or the newest relay after it by the `--bot-login` naming a maintainer (D-70), its first line ``Decision by `@<login>`, relayed by <agent>`` (the login bare or in a code span) and the option on its next non-blank line, as github-pr-triage's rule for upgrade pull requests reads it; a relay naming anyone else is no answer, and otherwise the answer is told never by a name or a claim in a comment's text. Remove the `needs-decision` label, then:
- **1**: open the pull request (step 6)
- **2**: open it with `upgrade = "act"` added to `[autonomy]` too (the table added at the end of the file when the config has none)
- **3**: leave the issue open and add the `shipmill-upgrade-later` label (`gh issue edit <n> --add-label shipmill-upgrade-later`; shipmill-setup creates it, and when it is missing create it first with `gh label create shipmill-upgrade-later --description "A config upgrade the maintainer put off until shipmill changes it"`). `shipmill upgrade --propose` takes the label off, and the question comes back, only once a newer shipmill release changes the upgrade
- **4**, or a reply that declines in its own words: close the issue as not planned (`gh issue close <n> --reason "not planned"`), a decline: shipmill never proposes the upgrade again
- A reply that answers none of the options, or asks something back: ask again with the protocol
- The detail says `relay not counted: <reason>; ask again`: the relay is out of its grammar (D-93), so it is no answer. Ask again with the protocol, with `<!-- shipmill:relay-refused <reason> -->` and its visible `Relay not counted` line right under the zone line ([needs-decision.md](../github-issue-triage/references/needs-decision.md#the-relay-grammar)), and put the label back only with that comment
6. **The pull request.** In a new worktree from `origin/<default>`, on a branch `shipmill/upgrade-<id>`, run `shipmill upgrade --apply <id>`, which makes the upgrade's edit and nothing else; add `upgrade = "act"` for answer 2; add the changelog entry the repo's rules ask for (a fragment when `[changelog] fragments` is set); commit, push, and open the pull request as the App (hard rule 7) through `--body-file`. Its body says what the upgrade changes and how to turn it off (from `shipmill upgrade --json`), holds `Closes #<issue>`, and a line naming the decision it carries out: ``Accepted by `@<login>` in #<issue>``, the person who answered, in a code span (hard rule 8), or `[autonomy] upgrade = "act"`. The first upgrade pull request of a repo also says that setting `upgrade = "act"` once takes every future upgrade without a question. The watch never merges it: github-pr-triage does, under its rule for upgrade pull requests
## Direction
A repo with `[agents]` keeps its direction in `docs/product.md`, and only the maintainer changes it (D-34), so shipmill never writes one on its own: the watch asks once, in one issue, where the maintainer answers the loop's other questions, and turns the answer into a pull request the maintainer merges (spec 034). For each DIRECTION_PENDING row, under "watch" only (under "status", report the rows and stop), take the step its detail names:
1. **`open the direction question`** (subject `docs/product.md`: no direction issue yet). Open the issue as the App (hard rule 7) through `--body-file`, then ask its question at once (step 2):
- title `Write the product's direction (docs/product.md)`
- label `shipmill-direction`, created first with `gh label create shipmill-direction --description "shipmill's question for the product's direction"` when the repo lacks it
- the body's first line the marker `<!-- shipmill-direction -->`: with the label and an author who is an OWNER, MEMBER, or COLLABORATOR or the `--bot-login`, it is how `triage_state.py` and `watch_state.py` tell the direction issue from any other. The body then says what the loop loses without the file (triage names no goal, `pr_gate.py` checks no plan, `specs.py check` asks for no `serves:`), that only the maintainer changes it, and links shipmill's guide, https://github.com/shipmill/shipmill/blob/main/docs/direction.md, so the maintainer reads what each section is for before answering
A user who asks a session to write the direction while a direction issue is closed gets the newest one reopened (`gh issue reopen <n>`), never a second one opened
2. **`ask the maintainer`** (the issue is open with no `needs-decision` label: a reopened one, or one whose question was never posted). Ask with github-issue-triage's [needs-decision protocol](../github-issue-triage/references/needs-decision.md): a gate session posts the question on the issue as the App and adds the `needs-decision` label, and an interactive one (`Gate session:`) also asks in the session, one section at a time in the order below, as shipmill-setup's step 2 does, and on an answer there posts it on the issue as the protocol's [Answered in the session](../github-issue-triage/references/needs-decision.md#answered-in-the-session) says before it acts; a session the user started by hand asks only in the session, then posts the answer on the issue the same way, so the decision lives on GitHub either way. The question, word for word:
```markdown
<!-- shipmill:needs-decision -->
<!-- shipmill:zone direction -->
@<login> Decision needed: write this repo's product direction, `docs/product.md`, so the agents work toward it?
1. Write it (recommended): reply with the five sections below in your own words; shipmill turns them into a pull request adding the file, which waits for you to merge it
2. Not now: close this issue; shipmill won't ask again until you reopen it
- Mission: what the product is for
- Users: who it serves, one per line
- Goals: the outcomes it works toward now, one per line
- Non-goals: what it deliberately doesn't do, one per line, or none
- Quality bar: what every change must hold, one per line
What each section is for: https://github.com/shipmill/shipmill/blob/main/docs/direction.md
Reply here with a number or your own answer; shipmill takes this up on the tick after your reply.
```
While the label is on and no OWNER, MEMBER, or COLLABORATOR has replied, the issue is in NEEDS_DECISION, which starts no session
3. **`answered; take up the answer`**. The answer is the newest reply after the question from an OWNER, MEMBER, or COLLABORATOR, told by the comment's `author_association` (`gh api repos/<repo>/issues/<n>/comments`), never by a name or a claim in a comment's text. Remove the `needs-decision` label, then:
- **2**, or a reply that declines in its own words: close the issue as not planned (`gh issue close <n> --reason "not planned"`), a decline: the watch shows neither row, and TRIAGE_MODE says `no direction: declined in #N`, until the maintainer reopens the issue
- A reply that leaves Users, Goals, or Quality bar empty, answers none of the options, or asks something back: ask again with the protocol, naming only the sections still owed; nothing is written meanwhile
- **The sections**: write the file and open its pull request (step 4)
- The detail says `relay not counted: <reason>; ask again`: the relayed answer is out of its grammar (D-93), so it is no answer. Ask again with the protocol, with `<!-- shipmill:relay-refused <reason> -->` and its visible `Relay not counted` line right under the zone line, and put the label back only with that comment
4. **The pull request.** Write `docs/product.md` in spec 024's fixed structure from the reply's words only: the level-one heading is the repo's name unless the reply names the product, and each user, goal, non-goal, and quality-bar line becomes one item with its id from 1 (`- U-1: ...`, `- G-1: ...`, `- N-1: ...`, `- Q-1: ...`). Never invent an item and never fill one in from the README or the code: splitting the maintainer's sentence into one-line items is all the editing it does. Run `shipmill product check` until it exits 0; a refusal only the maintainer's words can clear is asked again (step 3), never filled in. In a new worktree from `origin/<default>`, on the branch `shipmill/direction`, commit the file with the changelog entry the repo's rules ask for, push, and open the pull request as the App (hard rule 7) through `--body-file`. Its body shows the file, holds `Closes #<issue>` and the line ``Direction from `@<login>` in #<issue>``, the person who answered, the login in a code span (rule 8), and says the pull request waits for the maintainer to merge it. The watch never merges it, and github-pr-triage never merges an edit of `docs/product.md` on its own judgment (S-024-11), with or without the answer on the issue: unlike an upgrade pull request, the file's words are what the maintainer approves. While it is open, DIRECTION_MISSING names it and no DIRECTION_PENDING shows
5. **`pull request #<m> closed unmerged, a decline: close #<n> as not planned`**: closing it was the maintainer's decline. Close the issue as not planned, `gh issue close <n> --reason "not planned" --comment "Pull request #<m> closed unmerged: shipmill won't ask for the direction again until this issue is reopened"`, and open nothing new. The script counts only a pull request from the repo's own `shipmill/direction` branch whose state is CLOSED (never a fork's, never a merged one, which already closed its issue) and that closed after the issue was opened or last reopened
## Direction proposals
The watch reads spec 027's goal report on every pass, through the GOALS row, so a goal met or stalled gets its direction proposal without a scheduled retro (spec 110). Only the maintainer changes the direction (D-34): the watch proposes it in an issue and never edits it. For each goal the DIRECTION_DUE row names, under "watch" only (under "status", report the row and stop):
1. **Read the goal's reading** from the GOALS row of the same full report: its status, its value, and the weeks it was met in a row; for a goal due as stalled, the weeks no work served it. DIRECTION_DUE says which it is due as, `met for 4 weeks` or `stalled for 3 weeks`, the watch's thresholds (spec 027's defaults)
2. **Dedupe** both of the goal's titles, as the retro's step 4 does: `scripts/retro.py dedupe <owner/repo> --title "Direction: G-n met for 4 weeks" --title "Direction: G-n stalled for 3 weeks"`, which matches a title without case, punctuation, or extra spacing, as the watch does. On a DUPLICATE or a DECLINED for either title, open nothing for that goal and comment on nothing: an open one already holds the proposal, and a declined one is never proposed again (D-10). Go on only when both read NEW
3. **Open the issue as the App (hard rule 7)**, `shipmill gh issue create --title "<title>" --body-file <file>`, titled as the row names it: `Direction: G-n met for 4 weeks`, proposing to retire the goal, raise its target, or record it met, or `Direction: G-n stalled for 3 weeks`, proposing to retire it, re-word it, or ask for the work that reaches it. A goal both met and stalled is named met, and its body says it is stalled too. The body:
- cites the goal's reading from the GOALS row: its status, its value, and the weeks it was met in a row or the weeks no work served it (`G-1 met (p90 1.2 d), 4 weeks`)
- names the command the maintainer would run: `shipmill product retire G-n`, `shipmill product measure G-n "<metric> <comparison> <target>"` to raise its target, or `shipmill product met G-n` for a goal of kind goal they find met
- says the direction changes only by the maintainer, and that closing the issue as not planned declines it for good
`shipmill gh` ends the body with the agent marker, so the issue is no filing of the maintainer's (D-62)
4. **Write nothing else.** The step makes no other write: no comment on a tracking issue or on any other issue, no label, no edit of `docs/product.md` or `docs/product/`, no `shipmill product` edit command (`add`, `edit`, `retire`, `measure`, `met`, `drop`), and no pull request (D-34). The proposal is an issue, no work in progress, so it takes no room under `[agents] wip` (D-32). The next read finds the issue and the goal leaves the row
## Weekly retro
The watch reads the goal report and opens the direction proposals on its own ([Direction proposals](#direction-proposals), spec 110), so a repo needs no scheduled retro for them. The rest of the retro (the metrics beside last week's, the rule proposals, the decision-policy proposals, the review records) is an option the user schedules, never a default: `/schedule` a weekly routine that follows this section for the repo and the tracking issue the user names. A scheduled retro still reports the Goals section in its tracking comment, and its step 4 finds the watch's issue through `retro.py dedupe`, so it opens no second one. It proposes; the user decides.
1. Gather: `scripts/retro.py gather <owner/repo> [--days 7]` runs `metrics.py --json` for this week and the week before it (`--until` this week's start) and lists the week's refused PRs (closed without a merge) and reworked ones (merged after a review requested changes). Pass the repo's `--incident-label`, `--environment`, and `--bot` as for metrics.py. Always pass `--goals --checkout <dir>`, a checkout of the repo fetched with `git -C <dir> fetch origin`, on any branch: it reads `origin/HEAD`'s commit, never the working tree (#1876), and adds the report per goal of `docs/product.md` (spec 027), or says the repo has no direction. It reads the repo's own goals with `shipmill product show --local`, so in a component a product home it can't read doesn't stop it. A verdict comment counts only from an OWNER, MEMBER, or COLLABORATOR or a `--bot` login (D-29), so with `[agents] app_id` also pass `--bot <slug>[bot]`, the App that posts triage's verdicts. Keep `--met-weeks` (4) and `--stalled-weeks` (3) at their defaults unless the user names others. When the config has `[agents]`, also pass `--decisions`: it adds the counts per zone of the decision policy (spec 030) from the same checkout's `[decisions]`, and the level changes they propose. Pass with it the `--role` flags `shipmill roles --flags` prints: a question whose zone line has no `answer=` is read from its first answer, and the App's relay counts as one only when it names the maintainer they give (S-030-18). A zone at `ask` is proposed `notify` on a rate (spec 058): its answered questions over the `--lower-after` windows number at least `--lower-min`, and at least `--lower-rate` percent of them took the recommended option; a question with no answer yet is left out, and a zone at its floor is never proposed lower. Each decided item counts vetoed, reverted (its issue reopened, or its merged pull request reverted by another merged one, within `--revert-days` after the marker), or held. Keep `--raise-at` (2), `--lower-after` (4), `--lower-rate` (90), `--lower-min` (10), and `--revert-days` (14) at their defaults unless the user names others. With a `--bot` login, also pass `--reviews`: it adds the week's review records (spec 075), the refusals a second look verified or not (with the unverified ones' pull requests), the refusals it overturned, the confirmed, rejected, and minor findings, and `first reviewer wrong`, the percent of them the second look rejected. Report its line as it stands; propose nothing from it on its own
2. Recurring findings, as [references/rule-proposal.md](references/rule-proposal.md) says (spec 077): run `scripts/retro.py findings <owner/repo> --bot <slug>[bot] --json`, which lists what the reviews raised on the pull requests closed in the last 28 days as `F-n` items, and the earlier rule proposals in any state. Group the `F-n` items that state the same rule or the same kind of fix; a group spanning two or more pull requests is a recurring finding. Drop a group for one of three reasons: an earlier proposal in any state states the same rule (an open one gets one comment naming the new pull requests; an accepted or declined one nothing); a check the default branch already runs refuses it; or the repo's prose (`REVIEW.md`, `CLAUDE.md`, `AGENTS.md`) already says it where no check can hold it. Rank the rest by pull requests, then the newest, and propose at most three per retro, none while three proposals wait on an answer: each in the strongest place the repo's CI can hold it, shown failing on the real case, checked with `retro.py proposal`, and filed as the App with the `rule-proposal` and `needs-decision` labels and its question
3. Read what the numbers don't hold: the week's stuck states, from this week's watch reports, or a `watch_state.py` run when there are none (a state that held across passes, such as BOT_STALLED or PROMOTION_DUE, is stuck). Propose at most three changes from them and from the metrics, each the smallest one that removes a recurring cause: a skill edit, a check (a test, a lint, a `watch_state.py` state), or a decision. Step 3's change proposals no longer come from review findings, in any repo, shipmill's own included: a finding that recurs is step 2's rule proposal. A week with nothing recurring proposes nothing
4. Propose a change to the direction, on top of those three, in two cases only; N is the flag's value, so the title stays the same from week to week:
- A goal whose `met_weeks` reached `--met-weeks`: `Direction: G-n met for N weeks`, proposing to retire it or to raise its target
- A goal whose `stalled` is true: `Direction: G-n stalled for N weeks`, proposing to retire it, re-word it, or ask for the work that reaches it
The body cites the week's numbers, links the tracking comment, and names the command the maintainer would run (`shipmill product retire G-n`, `shipmill product measure G-n "<metric> <comparison> <target>"`). At most one is open per goal: dedupe passes both of the goal's titles, and while either is open the goal gets no new one (a goal both met and stalled gets the met issue, its body saying it is stalled too). A high off-direction count or a non-goal cited again and again is reported, never proposed: adding a goal is the maintainer's call
Each of `--decisions`' `proposals` opens too, under its `title` (`Decision policy: <zone> from <level> to <level>`), its body citing the zone's counts (for `ask` to `notify`, its rate and sample, as the proposal's `why` gives them) and naming the `[decisions]` line the maintainer would set
5. Deduplicate: `scripts/retro.py dedupe <owner/repo> --title "<title>" ...` checks each proposal's title against the open issues, and then against the issues closed as not planned (a rule proposal is checked by `retro.py proposal` in step 2 instead). A DUPLICATE gets a comment on that issue only when the week adds evidence; a DECLINED one was closed as not planned and is never opened again, nor commented on (D-10); a NEW one opens as an issue with the evidence and links
6. Post one short comment on the tracking issue the user names with `gh issue comment <n> --body-file <file>`: the metrics beside last week's, what recurred with the week's rule proposals and their links beside it, the proposals with their issue links, and a section **Goals**: a row per goal (id, served this week and the week before, measure status with its value, stalled, and for a goal with a `grew_most` key the line `grew most: <measure>, <statistic> <previous> to <value>`, or `grew most: no stage to compare` when it is null, as gather's text output prints it), then the quality-bar row, the off-direction counts with the most-cited non-goal, and the unlinked pull requests. Without a direction it says so in one line. With `--decisions`, a section **Decisions**: a row per zone with a count or a proposal (level, decided, vetoes, asks and those answered recommended; over the windows the answered questions and the rate, `rate_over_windows`, and the decided items' outcomes, vetoed, reverted, and held), then one row for the questions with no zone line (`unzoned`: asks, answered, recommended, and their items) and one for every question (`all`). A reverted item is reported, never proposed on
The retro writes only the proposal issues, a rule proposal's question and its one comment when an open proposal gains evidence, and that one comment. It never edits a skill, a check, or the decisions log itself; each proposal goes through triage like any issue. In the repo it never edits `REVIEW.md`, `CLAUDE.md`, `AGENTS.md`, the repo's checks (lint, type-checker, and import-contract config, tests), or its CI workflows, and opens no pull request that does: an accepted rule proposal is the maintainer's to add (spec 077). It never edits `docs/product.md` or `docs/product/`, never runs a `shipmill product` edit command (`add`, `edit`, `retire`, `measure`), and never opens a pull request that changes the direction: only the maintainer changes it (D-34). It never edits `[decisions]` either: a level changes only by the maintainer's own edit (D-48).
## Running it on a schedule
- In a session: `/loop 30m /shipmill:github-ship-watch <owner/repo> — watch and triage`
- In the cloud: `/schedule` a routine whose prompt clones shipmill and follows this file, as `docs/flow.md` shows. A cloud session may not load plugins from the repo's settings
- Don't start a loop or a routine unasked; offer it
## Metrics
`scripts/metrics.py <owner/repo> [--days 30] [--until TIME]` measures the line over a window from what GitHub already holds: the four DORA measures (deploy frequency, lead time for changes, change failure rate, time to restore) plus issue to release (an issue opened to the stable release that shipped the pull request closing it), human touch (merges a person merged or approved), agent share (merges whose own work says an agent made them), decided work credited and decided work written as the decider (of the merges a person decided, the share GitHub credits to every decider, and the share written as the decider with the agent as co-author), and four measures of how the agent pull requests landed (rework cycles, first-pass merge rate, review time, plan match). Run it with `uv run --no-project python`; it changes nothing. `--json` is for a dashboard, `--markdown` for a post. The script's docstring defines each measure; the choices that matter when reading it:
- A repo that has never deployed counts stable GitHub releases, and its change failures are `release-blocker` issues plus hotfix releases (on a `release/X.Y` branch). Pass `--environment` to count only the environments that matter (a `github-pages` deployment counts otherwise), and `--incident-label` when `[operate] incident_label` isn't `incident`
- Lead time ends at the first stable release whose tag adds the PR's merge commit over the previous stable version, from GitHub's compare (one query per release in the window). It misreads one backport shape: a patch cut from main before the window, when the previous version is a later hotfix on a `release/X.Y` branch without it, has its commits credited to the next minor release (the docstring has the example)
- Human touch reads the merge actor and approvals: an app is a bot, a `[bot]` login is a bot, and `--bot <login>` names a machine user. An agent merging with a person's token counts as that person. With `[agents] app_id` set, the gate's sessions merge and review as the GitHub App's `<slug>[bot]`, which counts as a bot without `--bot`, so the metrics tell agent work from the maintainer's (spec 004)
- Agent share reads what the work itself says, not who clicked merge: a PR is agent-made when its body carries Claude Code's "Generated with [Claude Code]" footer or a commit carries a `Co-Authored-By: Claude` or `Claude-Session:` trailer (case-insensitive; add another agent's mark to `AGENT_MARKS`). Its detail counts the agent-made merges a person approved in a GitHub review, the human gate. Where agents merge with the owner's token, human touch reads 100% and agent share is the number to watch
- Two measures follow Agent share, over the pull requests merged in the window that name a decider (spec 109: an approver, a needs-decision answerer, the author of an issue it closes, or the person who planned it, as spec 049 reads them). **Decided work credited** is the share whose merge commit GitHub credits to every decider's account (the git author and each `Co-authored-by` trailer GitHub resolves); **Decided work written as the decider** is the share whose merge commit's git author is a decider and whose message names the agent in a `[bot]@users.noreply.github.com` trailer (spec 051). Each reads "no data" with no decided merge; their JSON's `people` list gives each decider's own counts, and the table and markdown name no login. The registry metrics `decided_credited` and `decided_written_as_decider` read them
- Four measures follow those, over the agent pull requests merged in the window, the ones Agent share counts (spec 078). A verdict is a review record (its first line a `shipmill:review` marker, by a Bot, a `[bot]` login, or a `--bot` login) or an APPROVED or CHANGES_REQUESTED review by an OWNER, MEMBER, or COLLABORATOR person; a review round is one commit verdicts were given at; a fix commit is a one-parent commit authored after the pull request opened, so a merge of the base or a rebased older commit is none
- **Rework cycles**: per pull request, its review rounds beyond the first plus its fix commits; the mean, with the mean rounds and fix commits in the detail
- **First-pass merge rate**: the share with 0 rework cycles, `n of m` in the detail
- **Review time**: the pull request's creation to its first verdict, median and p90 in hours; one with no verdict is left out, and the detail says how many
- **Plan match**: of the pull requests whose one `## Plan` has a `Files:` line with a backticked path, the share whose every changed file equals one, is under one ending in `/`, or matches one as a glob; the detail counts the ones with no such plan
- A measure with nothing to measure says "no data", never 0. A 0% change failure rate means releases shipped and none failed
The weekly metrics post is an option the user schedules, never a default: `/schedule` a weekly routine that runs `metrics.py <repo> --markdown` and posts the table as one comment on the tracking issue the user names (`gh issue comment <n> --body-file <file>`). Posting is the routine's only write.
## Trends
`scripts/trends.py <owner/repo> --repo-dir <dir> [--until TIME] [--json]` compares each configured series' newest bucket with its own recent past, so CI health or review speed sliding shows before something is stuck (spec 078). It reads GitHub through gh and the checkout's config, changes nothing, and no model reads or judges anything. It runs only for a config with a `[trends]` section; without it nothing is read and nothing is reported:
```toml
[trends]
series = ["ci_pass_rate", "flaky_reruns", "review_time", "lead_time"] # required, at least one
bucket_days = 7 # default; at least 1
baseline = 8 # default; at least 4: the buckets before the newest one
log_sigma = 1.0 # default; above 0
report_sigma = 2.0 # default; at least log_sigma
```
The four series, each bucket's value:
- `ci_pass_rate`: the default branch's workflow runs that concluded `success` over those that concluded `success`, `failure`, or `timed_out`; lower is worse
- `flaky_reruns`: the runs on any branch that went green only on a rerun (attempt above 1, `success`); higher is worse
- `review_time`: the median Review time of the agent pull requests merged in the bucket; higher is worse
- `lead_time`: the median lead time for changes of the pull requests a stable release published in the bucket first shipped; higher is worse
The tiers, from the newest bucket's distance from the baseline's mean in the worse direction, in sample standard deviations σ (a better bucket is 0): `no data` when the newest bucket has no value or fewer than 4 baseline buckets have one; `ok` below `log_sigma`; `log` from `log_sigma`, a line in `trends.py`'s own output and nowhere else; `report` from `report_sigma`. A flat baseline (σ 0) reads `report` with `flat baseline` when the newest bucket is worse, else `ok`.
The watch's full report (no `--tier`, `--sweep`, or `--host`) runs `trends.py` for a config with `[trends]` and adds one DRIFT row per series at `report`: `DRIFT <series> <newest> against mean <mean>, <deviation>σ over <N> buckets of <D>d: <diagnosis>`, the diagnosis the up to 3 workflows with the most failed or rerun-green runs (each with its count and newest run's URL), or the up to 3 pull requests with the longest time (each with its number and hours). Its fix is the `trends.py` command that prints the whole report. A DRIFT row is reported, never acted on: it is no action and no agent's, it leaves the exit code as it was, it is in no tier and not in the sweep, so no gate tick reads it or starts a session on it (D-58). Tell the maintainer the drift with its diagnosis; the watch changes nothing on it. `--no-trends` leaves the read out, and a `trends.py` failure stops the watch (exit 2) like any other read. The fleet report shows a repo's DRIFT rows with its other report-only rows.
## Fleet
A maintainer with several shipmill repos reads one report instead of one per repo, so an incident or a stalled release in one product doesn't hide among the others. The fleet report only reads: each repo's own watch pass still repairs.
A fleet file lists the repos, in TOML:
```toml
[[repos]]
repo = "shipmill/shipmill"
[[repos]]
repo = "owner/other"
incident_label = "sev" # optional; the label that repo's incidents carry (default: its config's)
```
`scripts/fleet.py report --fleet <file>` (run it with `uv run --no-project python`, 3.10+) clones each repo afresh (blobless, in a temporary folder it removes), runs `watch_state.py` on the clone, and prints one table: the repo, then each row's state, subject, and detail as `watch_state.py` prints them. The action rows of every repo come first, then the report-only rows. Exit 0 means no repo needs action, 1 that a row is an action, 2 that a repo's check failed or the fleet file is malformed.
- `--metrics` adds `metrics.py`'s measures for each repo over the same 30 days, side by side, one column per repo; "no data" stays no data. A repo's incidents carry its fleet entry's `incident_label`, else its config's `[operate] incident_label`, else `incident`: the watch and the metrics use the same label, read from the clone with `watch_state.py`'s reader
- `--json` prints the same report as one JSON object: the repos, each with its rows, and its metrics with `--metrics`
- A repo whose check fails (not found, no access, a gh error) gets one REPO_ERROR row naming the failed step and the error's first line; the other repos are still reported, and the run exits 2 after printing everything
- The fleet file is refused (exit 2, naming the file and the problem) when it is missing, isn't TOML, has no `[[repos]]`, has an entry without `repo`, has a key other than `repo` and `incident_label`, names a repo not in `owner/name` form, or lists a repo twice. On Python 3.10 only the plain form above is read
- An action row is handed to that repo's own watch pass: run this skill on the repo, with the user's scope words
The fleet watch is an option the user schedules, never a default. Keep the fleet file in a repo the routine clones (for example `.github/fleet.toml` in the user's ops repo), then `/schedule` a routine whose prompt is:
```text
Clone shipmill/shipmill and <the repo holding the fleet file>. Run
`uv run --no-project python skills/github-ship-watch/scripts/fleet.py report --fleet <path to fleet.toml> --metrics`.
On exit 0, report one line: "Fleet: nothing owed". Otherwise report the incidents and
holds first, then every action row with its repo and a recommendation, then each
REPO_ERROR, then the metrics table. Change nothing: a repo that needs repairs gets its
own github-ship-watch pass.
```
In a session, `/loop 1h` the same report.
### The maintainer's queue
`scripts/fleet.py queue --fleet <file> [--login LOGIN] [--bot-login <slug>[bot]] [--json]` reads the same fleet file, with the same refusals, and prints only what waits on a person, across every repo, oldest first (spec 069). It reads the same fresh clones as `report`, runs the state scripts with the watch's trust (`--trusted-only` and the `--bot-login`, D-16) and the clone's roles, and reads each item's waiting time from GitHub; it keeps no state and writes nothing. Each line: the repo, the kind, `#N`, what is asked and the item's title, and how long it has waited (`3d 4h`, `5h`, `12m`); a tie goes to the fleet file's order, then the number. The rows:
- `QUESTION`: an open item labelled `needs-decision` whose newest question has no trusted reply, since that question. An item in `QUESTION` is in no other row
- `YOUR_ITEM`: a person's item (WITH_PERSON) assigned to the reader, `--login` or else `gh api user`'s login, since its hand-off. One assigned only to others or to a team is none
- `OPPORTUNITY`: an opportunity waiting for accept or decline, since its opening
- `PLAN`: a goal plan waiting for its answer, since its newest revision. A plan the maintainer held (`hold until <condition>`, spec 098) is no `PLAN` row until its condition is met and product intake has re-checked it: PLAN_HELD and PLAN_HOLD_MET are no row. Once re-checked it is a `PLAN` row again, waiting since the later of its newest revision and the hold's `met_at`, so a plan held for a month doesn't come back as the oldest item
- `SPEC_TO_MERGE`: an open, non-draft spec pull request (its body's first line `Spec for #N`) that no question holds and nothing lands by itself, read with `pr_gate.py`'s readers: no trusted answer taking every recommendation (D-49) and no decided comment of the `--bot-login` at `accepted-spec` (D-88). One that edits `docs/product.md` or `docs/product/` is a row either way, since only the maintainer merges it (D-34). Since it was marked ready, else its opening
- `TO_MERGE`: a pull request labelled `shipmill-ready` under `[autonomy] land = "propose"`, since the label
- `PROMOTION`: an open "Ready to promote" proposal issue of `shipmill operate`, since its opening
- `NO_REASON`: an opportunity closed as not planned with no reason recorded, since its close
- `UPSTREAM`: an `upstream` report nobody linked to an issue in another repo or took (`triage_state.py`'s UPSTREAM_UNOWNED, #1487): report it where it belongs, or assign it, since its label. In a product, `triage_state.py` reads with the clone's `[product] home` as `--home`, or in the home repo (its config has `[product] repos`) the repo itself, so the coordinator's report is none
An item an outsider opened is in no row; without `--bot-login`, an item the App opened reads as an outsider's. `--json` prints one object: `login`, `items` (each with `repo`, `kind`, `number`, `url`, `asked`, `title`, `since`, `waited_minutes`) in the table's order, and `errors`. A repo whose read fails gets one REPO_ERROR line after the queue, naming the step and the error's first line. Exit 0 on an empty queue, 1 with a row, 2 after printing everything when a repo's read failed, and 2 on a malformed fleet file.
`--order impact` puts first what holds back the most work (spec 086): after the repos' reads it runs one github-issue-triage `chains.py impact --json --trusted-only` (with the `--bot-login`) with a `--repo` for every repo of the fleet file, so an item's count takes in its waiters across the fleet. Each row gains `holds`, how many open issues wait on its item, directly or through others (0 when nothing does), and the rows sort by `holds`, most first, then oldest first. Each line puts `holds K` before the wait, and `--json`'s items gain `holds` and its object `"order": "impact"`. A walk that fails keeps the oldest-first order, prints one `IMPACT_ERROR` line with the error's first line after the queue (in `--json`, `"order": "age"` and `impact_error`), and exits 2. Without it (`--order age`, the default) the queue and the commands it runs are the ones above.
The queue is an option the user schedules, never a default. `/schedule` a routine whose prompt is:
```text
Clone shipmill/shipmill and <the repo holding the fleet file>. Run
`uv run --no-project python skills/github-ship-watch/scripts/fleet.py queue --fleet <path to fleet.toml> --bot-login <slug>[bot] --login <your login>`.
On exit 0, report one line: "Queue: nothing waits on you". Otherwise report every row
oldest first, as the script prints them: the repo, the kind, the item's link, what is
asked, and how long it has waited, then each REPO_ERROR. Change nothing: each step stays
where it is, the question, the item, or the pull request.
```
### The report and the queue in one pass
`scripts/fleet.py overview --fleet <file> [--login LOGIN] [--bot-login <slug>[bot]] [--jobs N] [--json]` prints what `report` (without `--metrics`) and `queue` print, reading each repo once: one clone, on which the report's watch and the queue's reads run. Use it when you want both: it saves a clone per repo and reads the repos concurrently, at most `--jobs` at once (default 4), so it costs less of the host login's rate budget and time than the two commands one after the other. The queue's watch still runs on its own on that clone, since `--trusted-only` and the `--bot-login` change how the watch reads an item. The output keeps the fleet file's order and the queue stays oldest first: the report's table, a blank line, then the queue's lines. `--json` prints `{"report": ..., "queue": ...}`, each as its own command's `--json` prints it. A repo whose clone fails gets its REPO_ERROR in both. Exit 2 when either command would exit 2, else 1 when either would exit 1, else 0.
## Improve the skill
When a pass misses something stuck, or repairs something it shouldn't have, add a state to `watch_state.py` (with a test in shipmill's `tests/test_ship_watch.py`) or a rule here. When a rule must hold, put it in code too (a script with its test, a hook, or the gate), since a skill's prose only makes it likely; the evals stopped (D-74), so add no case under `evals/`.
Files in this skill
- SKILL.md
- agents/openai.yaml
- scripts/fleet.py
- scripts/metrics.py
- scripts/retro.py
Attribution
Related skills
View all in devops →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.