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
- 参考文档agents/openai.yaml131 B
- 参考文档CONTRACT.md13.6 KB
- 参考文档CREDITS.md331 B
- 脚本scripts/runner.sh61.5 KB
- 脚本scripts/test-claim-durable.sh9.6 KB
- 脚本scripts/test-claim-race.sh7.2 KB
- 脚本scripts/test-detect-ask.sh6.4 KB
- 脚本scripts/test-fix-ci.sh14.8 KB
- 脚本scripts/test-triage-loop.sh9.2 KB
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 onerunner-claimmarker 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 withclaim_lostwhen 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 #Nis skipped. Failures count on GitHub (runner-attemptmarkers), and an issue stops being picked after the attempt cap untilreset. - 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-Nand resumed throughpickup, never restarted. - Landing follows the risk tier: low-risk PASS lands in the run, the rest wait for
ready-checkor 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-triageis 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 fromdocs/agents/triage-labels.md. Tickets collapsed from a cleared plan-map enter the same way: the agent prompt runs ship-triage intake on eachready-for-agentticket 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, andwhips/playbooks/issue-triage-loop.mdfor the on-loop playbook. Never prompt duringrunorcheckorship-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
whips
Route any non-trivial task through one entry: match a playbook, drive HIT skills plus subagents, open a reviewed ready PR with ship-pr-shaped evidence.
verify-upkeep
Periodic upkeep for a project's verification skill: source wave plus live pass per feature, at most one PR of proven corrections. Use to audit the verify skill.
verify-statechart
Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it as a Mermaid statechart. The report gives the shortest path to each state that breaks a rule. Use to show a bug as a path through states.
verify-new
Generate a project-local skill that drives the app like a user (launch, doctor, drive, evidence, feature map), proven once. Use when a project has no scripted proof.
ship-triage
Move issues and external PRs through a state machine of triage roles, categorise, verify, interview if needed, and write agent-ready briefs.
setup-ts-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module, with implementation hidden in subfolders and reachable only through its entry-point files. User-invoked.