factory-work

factory-work is a command for Claude Code from watt-mind/factory. It costs 16 tokens per session (3,786 once invoked), scanned A, original, Apache-2.0.

A workflow command that sends ready Linear tickets to coding subagents, tracks their pull requests, verifies the results, reviews them, and lands the completed changes.

In plain words
What is it for?
Use it to process agent-ready tickets for the current repository, with optional limits on the number of tickets and simultaneous tasks.
Why use it?
It removes the repeated coordination work involved in moving several well-defined tasks from the queue into the repository.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model in frontmatter; mentions subagents; mentions Claude Code.

Part of the core plugin — 38 skills, 22 commands, 5 agents, 1 hook shipped together

Good fit Use it to process agent-ready tickets for the current repository, with optional limits on the number of tickets and simultaneous tasks.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/watt-mind/factory/factory-work
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.

Clone the repo
git clone --depth 1 https://github.com/watt-mind/factory

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 38 skills, 22 commands, 5 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for factory-work

README.md
[![agentmods](https://agentmods.dev/badge/commands/watt-mind/factory/factory-work/github.svg)](https://agentmods.dev/commands/watt-mind/factory/factory-work)
Your own site
<a href="https://agentmods.dev/commands/watt-mind/factory/factory-work"><img src="https://agentmods.dev/badge/commands/watt-mind/factory/factory-work/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for factory-work

Your own site · 80×15
<a href="https://agentmods.dev/commands/watt-mind/factory/factory-work"><img src="https://agentmods.dev/badge/commands/watt-mind/factory/factory-work.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,786 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00016 $0.03786
Opus 5.5 $0.00006 $0.01514
Sonnet 5.5 $0.00003 $0.00757
Haiku 4.5 $0.00002 $0.00379

Measured 14d ago against content hash 73d9ab8ee4d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

factory-work 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 14d 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-work.md · 116 lines

How it starts

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

Work the agent-dispatchable Linear queue for this repository to completion — claimed, implemented, verified, reviewed, and landed — following $FACTORY_ROOT/docs/protocol.md (§7 execution, §14 loops).

Interpret $ARGUMENTS as specific issue IDs, a total ticket cap, and/or an in-flight concurrency cap. Defaults: up to 6 tickets, 3 in flight. no-merge stops after PRs are opened.

1. Check capacity and build the queue

Run bun orchestrator/pulse.mjs (or factory pulse) before building or widening dispatch. Read CAPACITY & FLOW (runnerCap, activeRuns, queuedRuns, openReadyPrs, openMergeablePrs, openEscalatedPrs, diskFreeGb, worktreeCount, mergedLastHour, verdict):

  • DRAIN_MERGES_FIRST: stop dispatching new work and run /factory-merge first to drain open mergeable PRs (held escalated PRs do not trigger this).
  • DRAIN_OR_CLEANUP: when diskFreeGb < 5, prune merged/stale worktrees (bin/worktree-down.sh / git worktree prune) before creating new worktrees.
  • HOLD_OR_BUNDLE: do not widen single-PR concurrency while CI runners are saturated or queued (queuedRuns > 0 or activeRuns >= runnerCap); keep target implementation lanes full (for example, 10 implementation lanes — counted separately from reviewer, merge, and triage/spec subagents which run on top) by coalescing work into 3–6 ticket bundles or staging local branches for bulk merge rather than shrinking active implementation lanes. Only Owned Paths overlap, disk/port/DB exhaustion, or tracker quota may reduce implementation concurrency (and must be surfaced via the Feasibility valve).
  • WIDEN: runner headroom and low open-PR backlog support widening up to target slots.

Never widen based on backlog depth alone; widen only on observed mergedLastHour flow and runner headroom.

Resolve the repo/team from this checkout (§1 mapping). Query the ready queue via factory ticket queue (state:Todo, ai:agent-ready, unassigned, sorted priority asc then createdAt asc; use factory ticket get <ID> to read each candidate's full description, falling back to factory ticket raw only where documented in the floor). Confirm every candidate has all five §5 sections — a ticket missing one goes back to Triage with a comment, not into the queue.

Triage feeder: When readyQueue < 2 * concurrencyCap and Triage is non-empty, fan out parallel read-only spec-validation subagents (10–15 Triage issues per batch) to populate ticket-spec sections and keep the ready queue fed.

Log the queue (ticket, title, owned paths) and start immediately without waiting for approval — assume the operator is AFK.

Read the full file on GitHub · 116 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. 14d ago Changed · +5 lines 73d9ab8ee4d3
  2. 16d ago Changed · +39 lines bdb5d5604c95
  3. 17d ago Changed · +1 lines af1d380897cf
  4. 3mo ago Changed a10ab4b0497d
  5. 3mo ago First seen · 71 lines · 16 tokens per session scan A 665d7b9c2c9a

Subscribe to this mod's changes

factory-work is a command published in the GitHub repository watt-mind/factory (25 stars, last pushed 3d ago), licensed Apache-2.0. It adds 16 tokens to every session and 3,786 once invoked, about $0.0001 per session on Opus 5.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.

Related

factory-work compared with commands from other repositories

factory-work next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
factory-workwatt-mind/factoryCommand253d agoApache-2.0A16Claude Code
swarm-initruvnet/rufloCommand83ktodayMITA0Claude Code
release-swarmruvnet/rufloCommand83ktodayMITA0Claude Code
release-managerruvnet/rufloCommand83ktodayMITA0Claude Code
repo-architectruvnet/rufloCommand83ktodayMITA0Claude Code
sync-coordinatorruvnet/rufloCommand83ktodayMITA0Claude Code
issue-trackerruvnet/rufloCommand83ktodayMITA0Claude Code