label-driven autonomy

Issues in. Merged PRs out.

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.

skill
npx skills add mikeroysoft/factory
CLI
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.

ticket lifecycle · example PASS
$ factory dispatch

claimed       ready-for-agent → agent/<n>
attempt       worker → factory gate
gate          PASS
pr-opened     agent/<n>
review        APPROVE
merged        main

reel

From issue to fleet in 45 seconds.

Factory works each ticket from triage to merge; District runs the fleet of factories on one host.

pipeline

State lives where the work does.

GitHub labels, comments, and PRs plus a gitignored .factory/ directory. The dispatcher is stateless and safe to re-run.

needs-triage
factory triage
needs-info
ready-for-agent
factory dispatch
ready-for-human
agent/<n> PR
factory-approved
merge stage
main

control surfaces

Deterministic where it matters.

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.

Isolation

Worktree per ticket

Workers implement each ticket on an isolated branch and worktree, not your main checkout.

Gate

Your gate, not ours

Any [[gate.check]] commands, exclusive lock for GPU or serial checks, and per-check timeouts.

Review

Second-model review

Blocking findings must cite an acceptance criterion, a documented rule, or a concrete defect. Required fixes stay separate from optional suggestions.

Merge

Four-way condition

Gate, reviewer, GitHub CI, and freshness. Fail-closed.

Handoff

Evidence-bound escalation

ready-for-human with the reason, log path, and handoff note.

Recovery

A bounded manager stage

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.

Human judgment

Understand. Compare. Decide.

Inbox briefings bring the question, recommendation, alternatives, and consequences together. Preview the exact action before confirming it with your rationale.

Context

Ask FM, with evidence

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.

Learning

Make the next run better

Track attempts, review bounces, and time to merge. Distill finished-ticket evidence into repo-specific lessons you review and commit for future workers.

Dashboard · v0.3.8

Make the dashboard your own

Nine bundled themes, title-first navigation, and Ops as the quiet default. Existing Inbox and deep links remain explicit destinations.

Settings · v0.3.8

Five controls, locally saved

Set concurrency, ticket time limit, worker/gate attempts, reviewer rounds, and the Factory Manager model with source-aware, comment-preserving edits.

Read-only · v0.3.8

Chat and code history

Use dashboard Chat with browser-local history, or add optional factory[atlas] Codebase history for commit-pinned maps and comparisons.

how a ticket moves

Evidence at every handoff.

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).

  1. 01

    Triage

    Deterministic lint rejects bodies under 80 chars or without acceptance criteria; the model then picks one of four labels. wontfix is only ever proposed.

  2. 02

    Claim

    The dispatcher re-reads the issue, assigns itself, takes a per-ticket flock, and creates .factory/wt-<n> on agent/<n>.

  3. 03

    Work

    The worker gets the issue, comments, standing instructions, a per-ticket brief, and on retries the previous gate report or reviewer findings.

  4. 04

    Gate

    Conflict markers, your [[gate.check]] list in order, then a leak-scan of added lines. Exclusive checks serialise on a host-wide lock.

  5. 05

    Review

    The reviewer sees the diff, issue, and gate report. REVISE returns to the worker; APPROVE adds factory-approved.

  6. 06

    Merge stage

    One PR per pass, requiring gate PASS, factory-approved, green GitHub checks, and a head containing the configured integration branch tip (main by default).

  7. 07

    Escalation

    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.

  8. 08

    Manage · opt-in

    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

Bring your own checks. Keep your own machine.

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.

shellquick start
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 triage

Label needs-triage issues via the local model.

factory dispatch

One stateless pass through upstream sync, merge, the optional manager stage, and eligible ticket execution.

factory gate

Run the deterministic gate in the current worktree and write a Markdown report.

factory manage

Bounded recovery for untouched escalations. Inert until [manager].command is configured.

factory stats

Ticket table: attempts, review rounds, hours to merge; --json.

factory learn

Distill lessons from finished tickets into .factory-lessons.md.

factory dashboard

Inbox 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 / install

Onboarding.

factory plan

Read initiatives, resolve decision owners, and inspect accepted baselines and drift. Reading a plan does not authorize execution.

factory chat

A read-only terminal FM console with bounded evidence tools and explicit provider disclosure. Requires the optional Node/Pi setup.

factory codebase

With the optional atlas extra: inspect commit-pinned code maps, history, and baseline comparisons.

configuration

Agent CLIs you already have.

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.

.factory.tomlconfig sample
[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

What changed.
And why.

From a ticket pipeline to an evidence-backed operation. Selected milestones below; release notes and linked decisions keep the full record.

  1. Latest release v0.4.6

    v0.4.6 release notes.

    • Gate checks replace invalid UTF-8 bytes in captured output instead of crashing before the gate report is written (#361).
    • Structured schema-1 decision records now capture triage, initiative binding, scheduler admission, worker selection, and claim alternatives, inputs, rationale, causes, actor, and model cost in the rotating journal. `factory explain N [--json] [--since ISO]` projects those rows plus legacy audit events into a bounded decision graph with cross-ticket edges and coverage gaps (#356).
    • Automatic release PRs now keep public installation guidance current (#351): `factory release` updates and stages the version file, `CHANGELOG.md`, the fixed-version install pins in `README.md` and `docs/index.html`, the project page's latest-release date, and a new page history entry built from that version's changelog notes. Every expected documentation spot must match exactly once or the release is refused.
  2. Release v0.4.4

    v0.4.4 release notes.

    • Worker and reviewer capabilities are explicit instead of tied to an `omp` executable name (#334): `[workers.<label>].transcript = "omp-session"` captures compatible JSONL for token usage, scoring and learning, while `[review].json_mode = true` enables OMP-compatible JSON review parsing. Commands named `omp` retain both defaults, undeclared workers still report usage as `n/a (not reported)`, and `factory stats --by-worker` now includes reported worker token totals.
    • `factory watch` no longer reports repeated `review_revise` escalations as engine defects (#324): every `review_revise` is a ticket outcome, whether bounded review rounds are exhausted, review after a manager `FIX` still requests changes, or fresh review after a merge-stage refresh/rebase requests changes.
    • A refresh conflict onto moved `main` no longer escalates (#295): the merge stage withdraws `factory-approved`, journals a `conflict-requeue` row (PR, head, conflicting files, round) and releases the ticket, removing `ready-for-human` and adding `ready-for-agent` (including after a manager `FIX`), so the next claim runs a worker in the same worktree on the same `agent/<n>` branch with a brief to rebase onto current `origin/main`, resolve the conflicts, keep the approved intent and not widen scope; the normal gate, lease push, independent review and round limits follow, and only a fresh approval restores the label. It still escalates as `refresh_conflict`, with the conflicting files in the packet, for a protected path without `factory-protected-override`, after `review_rounds` conflict requeues, or when the ticket is not open. A manager `FIX` whose kept worktree is ahead of the PR head with a head a journaled worker attempt produced (#264) pushes it with a lease on the recorded PR head and goes on; any other head escalates as `refresh_head`, a refused lease as `lease_refused`.
    • Automatic releases publish the GitHub Release (#320): after pushing the `v*` tag and `stable`, `factory release` runs `gh release create <tag> --verify-tag --latest` titled with the tag, with that version's `CHANGELOG.md` section as notes. A Release that already exists is left alone; a `gh` failure is journaled as a `release` row with outcome `publish_failed` and retried at the start of the next pass without rolling back the tag. v0.4.2 had stayed behind v0.4.1 as GitHub's latest until it was published by hand.
  3. Release v0.4.1

    The factory watches itself.

    • Post-ship monitor: factory watch turns the factory's own runtime failures into bug issues that enter ordinary triage; nothing waits for a human to notice.
    • Session evidence: every OMP worker transcript is kept per ticket and factory score rates it for efficiency and compliance, the raw material for self-improvement.
    • Escalations as data: every escalation carries a mechanical code; factory stats counts failure classes per week so a repeated code becomes a factory defect, not another human decision.
    • Release tier: 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.

  4. Release v0.4.0

    One agent, many factories.

    • MCP server: 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.
    • Outcome-control workspace: one packaged operator application with live Flow, attention and outcome evidence, persistent FM chat, Atlas ticket-flow reference, and revision-checked Settings. Direct /api/act is removed; human actions use expiring previews and restart-safe receipts.
    • Meta loop: automatic factory learn, report-only mutation testing as a pr-tier gate check, candidate escaped-defect attribution, and human-correction metrics.
    • Dispatcher identity: a separate machine account for the dispatcher; workers and reviewers never hold a GitHub credential.

    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.

  5. Release v0.3.8

    Run lean. Keep the record.

    • Bounded journal: idle passes no longer journal parked tickets, and events.jsonl rotates into gzip segments while every outcome row stays readable.
    • Lighter dashboard: the Ops snapshot bounds its executions list, and a docked ticket drawer replaces the overlay on desktop.
    • Steadier sync: upstream sync lands the conflict-free prefix instead of parking the whole backlog behind one conflict.
    • Resume and wrap: workers resume from retained accepted results; a host-owned argv prefix wraps every worker launch.
    • Experiments: bounded observation, experiment-informed roadmap next actions, and a split-aware eval promotion contract.

    The decision: cap what the factory writes, never what it can prove. Rotation drops only closed-execution lifecycle noise; audit rows survive.

  6. Release v0.3.5

    Collaborate with evidence. Operate from one console.

    • Retained results: independently accepted worker handoffs survive worktree cleanup with exact-head provenance, integrity, bounded lifetimes, and explicit incomplete states; readable through the evidence interface, console, and briefings.
    • Shared planning: initiative routing, execution guards, immutable bindings, durable routed handoffs, and shared roadmap/owner-attention reads are implemented. The real two-human acceptance checkpoint remains open; the collaboration programme is not yet proven delivered.
    • PR recovery: the manager frontier handles stalled Factory-owned PRs and late feedback with bounded recovery and exact-head approval.
    • External PR review: opt-in discovery, cited SHA-bound reviews, changed-head re-review, CI readiness, and the human queue are available. This lane reviews only; it never edits contributor branches or merges their PRs.
    • Operator UI: nine themes, title-first navigation, and Ops as the default; five local Settings controls; read-only dashboard Chat; and optional Codebase history.

    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.

  7. Release v0.3.0

    Recover deliberately. Review with evidence.

    • Manager recovery: opt-in, bounded decisions for untouched escalations, journaled before GitHub changes. Failed mutations are not replayed.
    • Grounded review: blockers need a criterion, rule, or concrete defect; optional suggestions no longer masquerade as required fixes.
    • Safer merges: refresh from the remote PR branch when no local branch exists, reject empty refreshes, and preserve upstream-sync ancestry.
    • Authoritative runtime evidence: execution, child-process, wait, and handoff records; a read-only runtime projection; human-touch and per-label pass metrics.

    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.

  8. Foundation The original pipeline Before tagged releases

    Start with a ticket. End with evidence.

    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.

    • Use the agent CLIs and deterministic checks the repository already has.
    • Keep operational state in GitHub and local event files, with a re-runnable dispatcher rather than a hosted control plane.

    The decision: automate the implementation, not the definition of success. Your acceptance criteria and checks remain the contract.

Full changelog · Tagged releases · Changes since v0.3.8

roadmap

Less supervision.
Clearer ownership.

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.

In v0.3.5 · acceptance pending

Shared plans. The right human.

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

In v0.3.5 · manager opt-in

Keep open PRs moving

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.

PR frontier #15

In v0.3.5 · review only

Review contributor PRs, too

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.

Review intake #5 · Dashboard queue #9

Research · no ship date

Measure what review misses

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.

Calibration #34 · Adversarial-review discussion #35

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.