Worktree per ticket
Workers implement each ticket on an isolated branch and worktree, not your main checkout.
label-driven autonomy
Turn well-scoped GitHub issues into reviewed, gated pull requests on your own machine. Let agents do the implementation. Keep human judgment where it matters.
npx skills add mikeroysoft/factory
uv tool install git+https://github.com/mikeroySoft/factory@v0.4.6
Latest release: v0.4.6 · October 23, 2026
CLI command pins this release. Use @stable for the released channel or @main for development; the bare URL follows the default main branch.
$ factory dispatch
claimed ready-for-agent → agent/<n>
attempt worker → factory gate
gate PASS
pr-opened agent/<n>
review APPROVE
merged main
reel
Factory works each ticket from triage to merge; District runs the fleet of factories on one host.
pipeline
GitHub labels, comments, and PRs plus a gitignored .factory/ directory. The dispatcher is stateless and safe to re-run.
control surfaces
Runs on your Linux machine with the agent CLIs you choose and no hosted control plane. v0.3.8 installs TOMLKit for comment-preserving Settings; there are no other required Python dependencies. Model calls use your configured providers.
Workers implement each ticket on an isolated branch and worktree, not your main checkout.
Any [[gate.check]] commands, exclusive lock for GPU or serial checks, and per-check timeouts.
Blocking findings must cite an acceptance criterion, a documented rule, or a concrete defect. Required fixes stay separate from optional suggestions.
Gate, reviewer, GitHub CI, and freshness. Fail-closed.
ready-for-human with the reason, log path, and handoff note.
Opt in to recover untouched escalations through retry, rewrite, split, route, or human handoff. Decisions are recorded before changes; invalid output stays with a human.
Inbox briefings bring the question, recommendation, alternatives, and consequences together. Preview the exact action before confirming it with your rationale.
Ask about a task or a specific log and get cited answers. Read-only questions use server-collected evidence and are not posted to GitHub.
Track attempts, review bounces, and time to merge. Distill finished-ticket evidence into repo-specific lessons you review and commit for future workers.
Nine bundled themes, title-first navigation, and Ops as the quiet default. Existing Inbox and deep links remain explicit destinations.
Set concurrency, ticket time limit, worker/gate attempts, reviewer rounds, and the Factory Manager model with source-aware, comment-preserving edits.
Use dashboard Chat with browser-local history, or add optional factory[atlas] Codebase history for commit-pinned maps and comparisons.
how a ticket moves
Issues labelled ready-for-agent move through a worktree, your deterministic checks, a second model, GitHub CI, and freshness against the configured integration branch (main by default).
Deterministic lint rejects bodies under 80 chars or without acceptance criteria; the model then picks one of four labels. wontfix is only ever proposed.
The dispatcher re-reads the issue, assigns itself, takes a per-ticket flock, and creates .factory/wt-<n> on agent/<n>.
The worker gets the issue, comments, standing instructions, a per-ticket brief, and on retries the previous gate report or reviewer findings.
Conflict markers, your [[gate.check]] list in order, then a leak-scan of added lines. Exclusive checks serialise on a host-wide lock.
The reviewer sees the diff, issue, and gate report. REVISE returns to the worker; APPROVE adds factory-approved.
One PR per pass, requiring gate PASS, factory-approved, green GitHub checks, and a head containing the configured integration branch tip (main by default).
Unresolved work gets ready-for-human with a reason, logs, and handoff evidence. The worktree stays for forensics. Human intervention takes precedence over automatic recovery.
When configured, the manager revisits untouched escalations within a round limit. Factory applies a closed decision menu and records the result; unresolved cases stay with a human. The configured executable is trusted, not sandboxed.
quick start
Linux, Python >= 3.11, git, authenticated gh with push access, and worker/reviewer CLIs. v0.3.8 installs TOMLKit; optional Codebase history adds graphifyy through factory[atlas], while terminal factory chat additionally needs Node and its pinned Pi runtime. Dashboard Chat and Ask FM require authenticated OMP and send evidence to the selected model provider.
cd your-repo
factory init # .factory.toml, .gitignore, issue template, labels
$EDITOR .factory.toml # put your real test/lint commands in [[gate.check]]
git add .factory.toml .gitignore .github/ISSUE_TEMPLATE/agent_task.md && git commit
factory doctor # tools, auth, remotes, model endpoint
factory install --dashboard # systemd user timer every 10 min + dashboard on :8765
factory triageLabel needs-triage issues via the local model.
factory dispatchOne stateless pass through upstream sync, merge, the optional manager stage, and eligible ticket execution.
factory gateRun the deterministic gate in the current worktree and write a Markdown report.
factory manageBounded recovery for untouched escalations. Inert until [manager].command is configured.
factory statsTicket table: attempts, review rounds, hours to merge; --json.
factory learnDistill lessons from finished tickets into .factory-lessons.md.
factory dashboardInbox decision briefings, cited Ask FM answers, and Ops telemetry. Binds to localhost by default; exposing it to a network also exposes its mutating API.
factory doctor / init / installOnboarding.
factory planRead initiatives, resolve decision owners, and inspect accepted baselines and drift. Reading a plan does not authorize execution.
factory chatA read-only terminal FM console with bounded evidence tools and explicit provider disclosure. Requires the optional Node/Pi setup.
factory codebaseWith the optional atlas extra: inspect commit-pinned code maps, history, and baseline comparisons.
configuration
Choose workers by ticket label or brief fields, bring your own reviewer, and use an OpenAI-compatible model for triage. Optional manager configuration adds bounded escalation recovery.
[workers] # ticket label -> argv
default = ["omp", "-p", "--cwd", "{cwd}", "@{prompt}"]
chore = ["droid", "exec", "-f", "{prompt}", "--auto", "medium", "--cwd", "{cwd}"]
[review]
command = ["codex", "exec", "{prompt}"]
[[gate.check]]
name = "tests"
run = ["cargo", "test", "--workspace"]
exclusive = true
[triage]
url = "http://127.0.0.1:11434/v1/chat/completions"
model = "qwen3:30b"
changelog
From a ticket pipeline to an evidence-backed operation. Selected milestones below; release notes and linked decisions keep the full record.
factory watch turns the factory's own runtime failures into bug issues that enter ordinary triage; nothing waits for a human to notice.factory score rates it for efficiency and compliance, the raw material for self-improvement.factory stats counts failure classes per week so a repeated code becomes a factory defect, not another human decision.when = "release" gate checks run only on tags, so main and a release get different scrutiny.The decision: every routine escalation that lands on a human is a bug. The loop now records enough to find and fix them.
factory mcp exposes repository discovery and the four evidence reads to any stdio MCP client across every registered repository. Read-only; no mutation tools, resources, or network transport./api/act is removed; human actions use expiring previews and restart-safe receipts.factory learn, report-only mutation testing as a pr-tier gate check, candidate escaped-defect attribution, and human-correction metrics.The decision: the factory's state is GitHub plus its journal, so the agent interface is a read surface, not a control plane. Writes stay on the reviewed ticket intake.
events.jsonl rotates into gzip segments while every outcome row stays readable.The decision: cap what the factory writes, never what it can prove. Rotation drops only closed-execution lifecycle noise; audit rows survive.
The decision: keep one canonical GitHub plan and one review-only contributor lane. Initiative execution is guarded; reading, filtering, or discussing evidence grants no mutation authority. Track the held two-human acceptance checkpoint.
The decision: let the model recommend, let code constrain the action, and keep the evidence. A passing gate is not permission to ignore a real defect. Read the review-contract decision.
Label-driven triage, one worktree per ticket, repo-defined gates, second-model review, and fail-closed merging established the core loop. The dashboard, handoff notes, and learning loop made that work inspectable.
The decision: automate the implementation, not the definition of success. Your acceptance criteria and checks remain the contract.
roadmap
Direction, not delivery dates. This snapshot reflects September 18, 2026; linked issues carry current status, dependencies, and acceptance criteria. Capabilities marked “in v0.3.5” ship in the current release.
Routing, execution guards, immutable plan bindings, durable routed handoffs, and shared roadmap/owner-attention reads are implemented in v0.3.5. They keep plans canonical and decisions human-owned without treating a declaration or merged implementation ticket as delivery proof.
Still held: the real distinct-runner, two-human initiative-to-delivery pilot. Programme completion requires owner-confirmed evidence from that workflow, not just merged code.
Collaboration programme #52 · Open acceptance checkpoint #59
The manager frontier observes factory-owned open PRs, waits on pending CI, and escalates red CI, unresolved current-head feedback, or inactivity into bounded FIX, CLOSE, or human handling. Late feedback is delivered at most once per evidence revision and never from partial or unverified evidence.
Why: opening a PR is not finishing a ticket. Recovery has an accountable next step, exact-head approval stays fail-closed, and human intervention still takes precedence.
Opted-in contributor PRs can receive cited, SHA-bound GitHub reviews, be reviewed again after a head change, and surface fail-closed CI readiness in the Ops queue and Inbox.
The boundary: Factory does not edit or push contributor branches and this lane never merges their PRs. Readiness is advisory, not merge authority.
Calibrate review against known defects, not just whether a model agrees. The required/optional contract has shipped; reliable defect detection remains an open problem.
The decision: do not force a second reviewer to disagree. Explore evidence-seeking review instead. Self-reported coverage is not proof, and the small calibration experiment is not an accuracy benchmark.
Also exploring: a tested local-model configuration for triage and review. Still an unscoped idea, not a zero-cloud guarantee; the pipeline continues to use GitHub.
Have evidence, a use case, or a different tradeoff? Join the linked issue discussions. Plans can change as implementation teaches us more.