factory-ship

A release command that opens a pull request from an integration branch to a deployment branch, waits for automated checks, merges it, and verifies the deployment.

In plain words
What is it for?
Use it to ship changes from branches such as develop to master or main after checking branch state, CI results, the merge, and the deployed result.
Why use it?
It turns the steps of releasing tested changes into one tracked flow and stops when the release is not ready.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/watt-mind/factory/factory-ship
Clone the repo
git clone --depth 1 https://github.com/watt-mind/factory
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,221 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.01221
Opus 5 $0.00009 $0.00611
Sonnet 5 $0.00004 $0.00244
Haiku 4.5 $0.00002 $0.00122

Measured 2d ago against content hash b3c96ecec4b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

factory-ship scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/core/commands/factory-ship.md · 50 lines

How it starts

The opening of the file, as written. The whole thing — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ship the current release: merge everything on the integration branch to the deploy branch. My invoking this command is the human master decision — the one call the autonomous loop never makes on its own. That means you carry it through to a verified deploy or a clear stop; don't hand it back to me half-done.

Interpret $ARGUMENTS as a repo name from config/repos.yaml (run from that repo's checkout); default is the repo you're standing in.

1. Resolve branches and preflight

  • Branches come from config/repos.yaml where the repo has an entry: base (integration, usually develop) and deploy_branch (usually master). No entry or no deploy_branch: use the repo's actual branches (developmaster/main); if base and deploy are the same branch, there is no release flow here — say so and stop.
  • git fetch origin first. Everything below reads origin/<branch>, never a possibly-stale local ref.
  • Nothing to ship? git log origin/master..origin/develop --oneline — empty means done, report and stop.
  • Is develop itself healthy? Latest CI run on the base branch must be green (gh run list --branch develop --limit 1) and, where the repo has a smoke check (smoke_workflow/smoke_url in repos.yaml), the dev smoke must be green too. Shipping a red develop just promotes the breakage; fix or revert there first — that's a stop-and-notify, not something to push through.
  • Anything mid-flight? Open PRs targeting develop are fine — they ride the next release. But if a merge landed on develop in the last few minutes and its CI hasn't finished, wait for that run rather than shipping an unverified tip.

2. Open the release PR

  • Reuse an existing open develop → master PR if one exists (gh pr list --base master --head develop) — don't stack a second.
  • Otherwise create it. Title: release: develop → master (<date>). Body: the commit list since last release (git log origin/master..origin/develop --oneline --no-merges) with Linear ticket IDs pulled out into their own line each, so the Linear integration links every shipped ticket. Do not put Fixes <ID> in the body — these tickets are already Done; a release PR references, it doesn't close.

Read the full file on GitHub · 50 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 50 lines · 18 tokens per session scan A b3c96ecec4b8

Subscribe to this mod's changes

factory-ship is a command published in the GitHub repository watt-mind/factory (10 stars, last pushed 2d ago), licensed Apache-2.0. It adds 18 tokens to every session and 1,221 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.