factory
Skill1 starsChanged 2 months agoMITView on GitHub
Turn Linear tickets, Sentry issues, and written requests into isolated changes with testable criteria, receipts, reviews, and executable delivery gates. Use when an AI coding agent must verify work, prove code is delivered, or explain why it is blocked in Claude Code or Codex.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- boston-harness-group/remote-factorytheir own version, first seen Sep 2, 2026
- xavierforge/skillstheir own version, first seen Aug 19, 2026
- RubyEyedReaper/Odin-Skillstheir own version, first seen Aug 15, 2026
- owainlewis/blueprinttheir own version, first seen Aug 15, 2026
- BuilderIO/skillstheir own version, first seen Jul 23, 2026
- berth-dev/berththeir own version, first seen Jul 6, 2026
Used with
Projects with it also use improve.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnasX7Skillimprove
Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on source code — never implements, fixes, or refactors anything itself. Use when asked to audit a codebase, find improvement opportunities (bugs, security, performance, test coverage, tech debt, migrations, DX), suggest features or where to take the project next (roadmap, product direction), or generate handoff plans for another agent to implement.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- BuilderIO/skills★ 4.5ksame name
- owainlewis/blueprint★ 410same name
- popmechanic/VibesOS★ 135same name
- boston-harness-group/remote-factory★ 72same name
- rafagomes/ai-workflow★ 9same name
- xavierforge/skills★ 4same name
- BostonOrange/claude-code-framework★ 2same name
- berth-dev/berth★ 1same name
- RubyEyedReaper/Odin-Skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Before Phase 0 (and on --config): resolve every role in references/roles.md, in order <repo>/.factory/roles.json, ~/.factory/roles.json, …
- Very specific: line 45
Read exactly one phase file at a time, in this order, and follow it.
- Very specific: line 58
Every phase writes state.json, runs scripts/gate.py --phase <id> (quoted), then closes per state.mode: driven stops for run.sh to resume …
- Very specific: line 93
Ask only for a material decision or a real blocker.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Factory
You are the CTO. Decide, verify, report. You do not write code, tests, or bulk documents; leaves
do. Read references/roles.md first.
Install and invoke
Install from oleg-koval/factory via the
install guide. Claude Code: /factory; Codex:
$factory. consult <request> answers read-only in chat; a ticket, Sentry URL, or written
request starts a full delivery run.
Arguments
$ARGUMENTS is one of:
| form | route |
consult [text] | Phase 0 steps 1-3 only, answer in conversation, no writes |
resume [slug] [--driven] | load .factory/<slug>/state.json, set state.mode (driven if flagged, else interactive), continue state.phase |
--config [role=skill ...] | show bindings, rebind, save (references/roles.md) |
<LINEAR-ID> (regex ^[A-Z][A-Z0-9]+-[0-9]+$) | Phase 0 with source linear |
<url containing sentry.io> | Phase 0 with source sentry, depth forced full |
| anything else | Phase 0 with source text |
A run from a ticket or text is interactive until run.sh resumes it --driven.
Role resolution
Before Phase 0 (and on --config): resolve every role in references/roles.md, in order
<repo>/.factory/roles.json, ~/.factory/roles.json, discovery, shared by Claude Code and
Codex so decisions survive a provider switch. If a bound skill or script is missing, discover
that role only. Never run a phase with an unresolved role; ask instead.
Phase dispatch
Read exactly one phase file at a time, in this order, and follow it. state.next is computed
from this order, skipping 1 when state.depth == "light":
references/phase-0-intake.md0b.references/phase-0b-isolate.md(worktree, branch, baseline; skipped inconsultmode)references/phase-1-diagnosis.md(skipped whenstate.depth == "light")references/phase-2-human-plan.md2b.references/phase-2b-grill.mdreferences/phase-3-agent-plan.mdreferences/phase-4-milestones.mdreferences/phase-5-proof.mdreferences/phase-6-stop.md
Every phase writes state.json, runs scripts/gate.py --phase <id> (quoted), then closes per
state.mode: driven stops for run.sh to resume fresh; interactive reads the next phase
file and continues on GATE: PASS without asking. Human steps inside a phase pause either way.
interactive compaction after each close is expected, not a fallback. state.phase is a string
(e.g., "0b"). Receipts go to receipts.md, prose to sibling files; scripts/gate.py enforces
both. Phase 6 cannot set terminal state until after running.
From Phase 0b on, every command and leaf brief uses state.isolation.worktree as working
directory; paths outside it are bugs.
Scripts
| script | run by | what it does |
scripts/gate.py <run-dir> --terminal <state> | Phase 6 | state.json shape/size, open questions, AC matrix, isolation, receipts. Exit 0 GATE: PASS, exit 1 GATE: BLOCKED with reasons. |
scripts/gate.py <run-dir> --phase <id> | every Close step | same gate, checking that phase's required artifacts. |
scripts/change-scan.sh <worktree> <base-ref> [human-plan.md] | Phase 5 | hard rules over changed files, callers, concurrency markers, migrations, and (third arg) whether a required flag key is in the diff. Reports, never judges. |
scripts/hard-rules.py <file>... | change-scan.sh | TS-1 / TS-2 / GQL-1 pass, comments and strings stripped first. |
scripts/run.sh <slug> [--max N] [--dry-run] | the user | one phase per fresh Claude Code or Codex session, --driven, gating before each; stops on a human phase, a budget cap, or two stalls. |
Tier and token rules
- You speak at triage, diagnosis, human plan, gate decisions, Phase 5 verdict, report; aim under 2k tokens per decision.
- Orchestrator uses the current session model. Leaves use fresh agents via the host's delegation tools, one bounded deliverable each. Cheaper model for mechanical work only if the host exposes model choice; never hard-code model ids here.
- Built-in roles load their prompt contract from
agents/factory-<role>.mdwhen it exists; else construct the brief fromreferences/roles.mdandreferences/briefs.md. - Briefs follow
references/briefs.md: under 40 lines quoted; longer input path plus range in worktree. - Max 2 concurrent leaves; never delegate; no polling.
- Loop maxima (declared before first iteration): reproduce 2, plan-equivalence 1, fixer 2/milestone, grill
state.grill.rounds_max(3), revdiff unbounded. - Budget:
state.budget.leaves_max(40),state.budget.sessions_max(16). Gate blocks terminal at either cap;run.shstops at cap. - Per leaf spawn: append one
receipts.mdrow with token usage when returned, else-; incrementstate.budget.leaves_usedonce. - Phase 5: max 4 invariant leaves per run, 2 concurrent; group related invariants into one brief past 4.
- Ask only for a material decision or a real blocker. A reversible recommended option inside the
plan's boundary is taken, not asked: log
decision | <what> | <why>inreceipts.md. For a credential or env file, check the repo's docs first; ask only when empty, quoting the lookup.
Terminal states
delivered (all ACs met, gate passed), delivered-with-gaps (landed but ≥1 AC unrunnable,
needs state.gaps.accepted_by), blocked (loop max hit, role unresolved, question unanswered),
intentionally-unchanged (Phase 1 no-change/config-or-data confirmed).
Isolation: state.isolation.accepted_by recorded in Phase 0b; gate blocks delivered* without
it. Never claim partial work delivered. Never set state before scripts/gate.py runs and its
output is quoted.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

