factory-friction

factory-friction is a command for Claude Code from watt-mind/factory. It costs 14 tokens per session (1,064 once invoked), scanned A, original, Apache-2.0.

A command that records repeated problems or wasted effort encountered during an interactive coding-agent session. It files the friction for later review but does not fix it.

In plain words
What is it for?
Use it to capture recurring tool errors, retry loops, repeated process violations, or other per-ticket costs that should be fixed once in the agent harness.
Why use it?
It preserves useful evidence when no automatic session transcript exists, while avoiding duplicate reports when a factory run already records one.

Command for Claude Code

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

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

Good fit Use it to capture recurring tool errors, retry loops, repeated process violations, or other per-ticket costs that should be fixed once in the agent harness.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/watt-mind/factory/factory-friction/github.svg)](https://agentmods.dev/commands/watt-mind/factory/factory-friction)
Your own site
<a href="https://agentmods.dev/commands/watt-mind/factory/factory-friction"><img src="https://agentmods.dev/badge/commands/watt-mind/factory/factory-friction/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-friction

Your own site · 80×15
<a href="https://agentmods.dev/commands/watt-mind/factory/factory-friction"><img src="https://agentmods.dev/badge/commands/watt-mind/factory/factory-friction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 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,064 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.00014 $0.01064
Opus 5.5 $0.00006 $0.00426
Sonnet 5.5 $0.00003 $0.00213
Haiku 4.5 $0.00001 $0.00106

Measured 3mo ago against content hash 952b6573aad2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

factory-friction 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 3mo 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-friction.md · 80 lines

How it starts

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

Capture harness friction from an interactive session where no orchestrator transcript exists.

Runs dispatched through runners/run-agent.sh or orchestrator/tick.mjs already write JSONL to ~/.factory/logs/ — /factory-retro measures those mechanically via factory friction. This command is the backstop when you ran /factory-work, /factory-merge, /factory-ticket, /factory-ship, or similar directly in a harness (Claude, Codex, Pi, Cursor) without FACTORY_RUN_ID set.

1. When to use

  • At the end of an interactive factory command session (also invoked inline from those commands' closing step).
  • Ad hoc when a session was painful and you want it recorded before context is lost.
  • Skip when FACTORY_RUN_ID is set — the transcript is the primary sensor; don't duplicate it with memory.

2. What qualifies

Same bar as docs/friction-log.md — only two things:

Repeats or likely repeats. A tool error you hit twice, a retry loop (same command 3+ times), the same floor violation recovered from more than once in the session (sleep waits, unquoted zsh globs, wrong Linear label names, missing FACTORY_ROOT).

Per-ticket costs that could be paid once. The same expensive setup on every ticket in a batch, a harness gap that blocked every subagent (slash command not installed, MCP missing, worktree script absent).

Do not file: one-off ticket bugs (those go to product Triage via /factory-capture), product intent questions, vague annoyances with no actionable harness layer, or anything that is already that ticket's problem rather than the harness's.

3. Scan the session

$ARGUMENTS names specific friction if given; otherwise scan the conversation for qualifying items. If more than one distinct friction surfaced, file each separately — don't merge unrelated shapes into one issue.

4. Search before filing

Search Linear (factory ticket or docs/protocol.md §13) for:

  • Existing FIP: issues describing the same shape
  • Prior issues whose body contains ## Session friction with the same Shape
  • Entries in docs/friction-log.md (F-*) already tracking it

Read the full file on GitHub · 80 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. 3mo ago First seen · 80 lines · 14 tokens per session scan A 952b6573aad2

Subscribe to this mod's changes

factory-friction is a command published in the GitHub repository watt-mind/factory (24 stars, last pushed yesterday), licensed Apache-2.0. It adds 14 tokens to every session and 1,064 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-friction compared with commands from other repositories

factory-friction next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
factory-frictionwatt-mind/factoryCommand24yesterdayApache-2.0A14Claude Code
initruvnet/rufloCommand83ktodayMITA0Claude Code
workflow-selectruvnet/rufloCommand83ktodayMITA0Claude Code
repo-analyzeruvnet/rufloCommand83ktodayMITA0Claude Code
checkHuskyauto/VisionClaw-Agent-Public-ReleaseCommand263d agoMITA35Claude Code
checklistgithub/spec-kitCommand153ktodayMITA13Claude Code
clarifygithub/spec-kitCommand153ktodayMITA27Claude Code