AGENT SKILL

ship-runner

Run ready-for-agent issue queues on any schedule through /whips intake, one fresh worktree each, landing per risk tier, with the agent and model you pick at setup.

License 许可
MIT
最近更新
2026-11-05
Stars
★ 1
Forks
0

01 前言 Front Matter

name
ship-runner
description
Run ready-for-agent issue queues on any schedule through /whips intake, one fresh worktree each, landing per risk tier, with the agent and model you pick at setup.
disable-model-invocation
true

02 资源文件 9

03 SKILL.md 正文

Ship runner

Loop runner for the agent-ready queue, on any schedule (cron, an interval loop, or one manual run; renamed from nightshift, which sounded nights-only). Hand the queue to an agent while nobody is watching. Distinct from /plan-worklog, which designs personal workflows and never runs them: ship-runner runs repo issue queues, nothing else. One script, scripts/runner.sh, claims each ready-for-agent issue, runs /whips ship-triage intake on it in a fresh worktree, and lands per the risk tier. The human reviews high-risk in the morning; low-risk already landed.

The agent command and the model are the user's choice, made once at setup and saved to each consumer repo's docs/agents/harness.md plus a thin host override. Nothing is defaulted. CONTRACT.md holds the config keys, commands, exit codes, and outcomes. Any scheduler can call runner.sh run; wiring one is out of scope here.

1. Check the repos

Each target repo needs the /setup-repo output: docs/agents/issue-tracker.md for the tracker and its commands, docs/agents/triage-labels.md for the label strings. The script reads both from the default branch on every run, so a rename in those docs takes effect without re-running setup.

A missing file means stop for that repo and tell the user to run /setup-repo in it, like /whips playbooks/triage.md does. A tracker with no CLI mapping (local markdown, or a freeform "other") is skipped and reported.

/whips must be reachable by the agent in each repo, installed per repo or globally.

2. Set up: detect, then ask

Run scripts/runner.sh detect and show the user what it found: agent binaries on PATH (opaque names from RUNNER_AGENT_PROBES), models recorded in consumer harness docs, provider key env var names (never values), and per repo the tracker and label strings it resolved.

Then ask, one question at a time, leading with what detection found:

  • Which agent command. No preset table ships: confirm the full non-interactive command with the user.
  • Which model. Never pick one for them.
  • Which local clones to work on.
  • An optional model allowlist. When set, a model outside it makes every command refuse.
  • How many issues per run.

Save with scripts/runner.sh setup --agent-cmd ... --model ... --repos ... [--allowlist ...] [--max-issues ...]. In a terminal, the user can run scripts/runner.sh setup bare and answer the same questions there. A legacy nightshift config is honored once with a migration warning; re-running setup writes the new paths.

3. Prove one run

Run scripts/runner.sh check, then one scripts/runner.sh run while the user watches. Read the log it names and scripts/runner.sh status back to them: the outcome, the PR link, and anything kept for inspection.

What a run guarantees

  • One run per machine at a time (flock). Each issue is claimed with the tracker's own claim, assigning it to the authenticated user, plus one runner-claim marker comment, and released when the run ends. Assigned issues are never picked. After the assign write the runner re-reads the issue and backs off with claim_lost when another runner holds or beat the claim, so a cross-machine race launches at most one agent.
  • An issue with an open PR that says Closes #N is skipped. Failures count on GitHub (runner-attempt markers), and an issue stops being picked after the attempt cap until reset.
  • A claim left by a run that died is released at the next start once its marker passes the TTL with no fresh branch commit, so a missed run is picked up by the next one. Timeout work is pushed to wip/runner-issue-N and resumed through pickup, never restarted.
  • Landing follows the risk tier: low-risk PASS lands in the run, the rest wait for ready-check or the human.
  • Every issue appends one line to runs.jsonl; every run prints a one-line summary.
  • The closing summary of a batch follows the learn-catchup shape (learn-catchup): how many action items there are, what landed, and each item waiting on the human as a short executive summary. ship-triage is the intake pass that feeds this queue: it labels unlabeled, needs-triage, and replied needs-info issues up to a per-tick cap, oldest first, using the repo vocab from docs/agents/triage-labels.md. Tickets collapsed from a cleared plan-map enter the same way: the agent prompt runs ship-triage intake on each ready-for-agent ticket and builds from its brief with no second fog interview, since the map already settled the destination and the decisions. See CONTRACT.md Triage for flags, bounds, and outcomes, and whips/playbooks/issue-triage-loop.md for the on-loop playbook. Never prompt during run or check or ship-triage; a missing config fails with a pointer to setup.

fix-ci is the team-only repair pass: it claims red or conflicted PRs through labels, runs the agent once per claim, and caps out with needs-human after the attempt budget. See CONTRACT.md Fix-ci for flags, bounds, and outcomes. Wire it on a timer per #61; solo repos skip since they poll no hosted CI.

04 同仓库更多 Skills