modular-factory
A software factory you install into any repository. Label a GitHub issue. Agents decide whether it is worth building, write a spec, build it on a branch, and review it. By default a maintainer merges the pull request. A project can turn the merge step on so the factory merges it.
It runs inside the coding tool you already use: Claude Code, Cursor, or Codex.
Everything a project changes lives in factory/: pipelines as YAML in
factory/pipes/, and the rest in factory/factory.toml.
Status: not yet run inside a real tool. Automated tests play the orchestrator and the agents against a stand-in for GitHub. Nobody has yet run a job end to end in Claude Code, Cursor, or Codex. Expect problems on the first real run. See what is untested.
Contents
Requirements
- Python 3.11 or later
git- GitHub CLI
gh, signed in (gh auth login) - One of Claude Code, Cursor, or Codex
The factory adds nothing to the project's dependencies. Pipelines need PyYAML.
A uv tool or pipx install brings it. mfactory doctor checks for it.
Install
Install the mfactory command once:
uv tool install modular-factory
pipx install modular-factory is the same install. The
install guide has both, and a script for a machine without
either:
curl -fsSL https://raw.githubusercontent.com/danielsmag/modular-factory/master/install.sh | bash -s -- --global
Read the script before you pipe it to a shell.
Then, in each repository:
mfactory install --tool claude
Use --tool cursor or --tool codex instead, or repeat --tool for several.
In your coding tool:
/mfactory setup
That reads the project and fills in factory/factory.toml: what the project is
for, and the commands that install, lint, and test it. Commit factory/,
.factory/, and the generated agent files to your base branch, and push.
To install straight into one repository, without the command on your PATH:
curl -fsSL https://raw.githubusercontent.com/danielsmag/modular-factory/master/install.sh | bash -s -- --tool claude
Use
| In the tool | What it does |
|---|---|
/mfactory run |
Work through every issue labeled factory |
/mfactory run 12 |
Run issue 12 now |
/mfactory run 12 --pipe hotfix |
Run issue 12 on the named pipe |
/mfactory approve 12 |
Answer a job that is waiting |
/mfactory plan summary |
What needs attention, what is held, the last scan |
/mfactory plan |
Talk through findings. Nothing changes until you say so |
/mfactory plan <request> |
Manage issues: create, list, open, move, comment, close |
/mfactory <anything else> |
Ask about jobs, or describe a feature to file as an issue |
The same verbs work from a terminal: mfactory run, mfactory plan summary,
mfactory plan approve F-3, mfactory issue list.
From /mfactory plan, or a terminal, you can also manage your own work on
GitHub and Jira without starting a job: "create a test issue", "show my open
Jira cards", "move PROJ-12 to In Progress", "comment on #34". These run
mfactory issue list | show | create | comment | move | close. A new issue
stays out of the factory's queue unless you ask for --queue, and a card with
a running job is moved by step with mfactory move. Before changing an issue,
the orchestrator runs mfactory issue guide and follows your own skills,
plugin skills and rules for tickets ([skills].issues and [rules].issues,
every one on the machine by default).
A job that needs a person stops and says so on the issue or the pull request.
Answer there, for example /mfactory changes Use the existing Money type, or
in your tool. Other jobs keep running.
Jobs can come from a Jira kanban board instead of, or as well as, GitHub
issues. With kind = ["github", "jira"] both queues feed one project, and
each job talks on its own tracker. See
Tracker: a Jira board.
Pipeline
A pipeline is a pipe: YAML in factory/pipes/, checked against the JSON Schema
in .factory/schema/pipe.schema.json. mfactory install writes
factory/pipes/default.yaml. This is that default, printed by
.factory/bin/mfactory graph:
intake agent ACCEPT -> spec | NEEDS-INFO -> ask-author (max 2) | REJECT -> rejected
ask-author human ANSWER -> intake | REJECT -> rejected
spec agent DONE -> spec-approval
spec-approval human off, continues as APPROVE -> build
build agent READY -> gate | BLOCKED -> escalated
gate checks PASS -> review | FAIL -> debug (max 2)
debug agent off, continues as FOUND -> build
review review PASS -> approve | CHANGES -> build (max 2)
approve agent APPROVE -> ready-to-merge | ESCALATE -> escalated
ready-to-merge human FEEDBACK -> build (max 3) | REJECT -> rejected
merge merge off, continues as MERGED -> ready-to-verify
ready-to-verify human off, continues as VERIFY -> verify
verify verify off, continues as PASS -> done
escalated human FEEDBACK -> build | REJECT -> rejected
The factory does not merge unless the project turns that step on. Spec
approval, debug, a wait for deploy, and a check after merge ship switched off.
Edit factory/pipes/default.yaml in place. A second file can extend default
and change only what differs. A job keeps the pipe it starts with.
Recipes for merging, optional steps, your own steps, loop limits, several pipes, and a follow-up after merge are in the configuration reference.
mfactory pipes list
mfactory pipes validate
mfactory graph --pipe hotfix
mfactory migrate pipes moves old [steps.*] tables out of factory.toml.
mfactory migrate layout moves a root factory.toml or a pipelines/ folder
into factory/. mfactory doctor says when either is due.
Planner
Once several issues are open, the planner reads the queue across every project in the workspace. It reports what one job cannot see: duplicates, an issue that must wait for another, two issues that touch the same files, a low-priority job ahead of a critical one. It only suggests. Nothing in a tracker or a job changes until you approve a finding.
/mfactory plan summary scans when tickets changed, then reports plainly, with
Needs attention first. In /mfactory plan you can ask about a finding. The
orchestrator runs plan approve, plan dismiss, or plan release only when
you say so, and shows what it will do first. Between queue passes,
/mfactory run runs a due scan without holding up a job.
The dashboard badge counts open findings at or above alert_at. The Planner
view (#/planner) lists each finding and the action it proposes. Browser
notifications are opt-in. Settings are in Planner.
Dashboard
mfactory start dashboard
mfactory stop
The page comes with the global install (uv tool install modular-factory). It is
read-only and stays on your machine. Approvals and feedback go through
/mfactory or an issue comment.
- Board: Jira boards you choose, GitHub issues, and factory jobs by step.
- Jobs: every job, filtered and sorted, with the state of each step. A job opens its pipeline as a graph, its visits, files, cost, and agent logs.
- Config: each pipe, its graph, its YAML, schema problems, and the merged
factory/factory.tomlwith the source of each value. - Planner: open findings and the action each one proposes.
mfactory install adds the project to ~/.mfactory/workspace.toml. The
dashboard lists every project there. One checkout that is not listed still
opens its own page. See several projects.
If Jira credentials come from JIRA_EMAIL and JIRA_API_TOKEN, start the
dashboard from a shell that has them.
Commands
mfactory install | upgrade | uninstall | doctor | status | sync
mfactory config show | graph | models | skills
mfactory pipes list | show | validate | schema
mfactory migrate pipes | layout
mfactory queue | create | next | done | answer
mfactory plan summary | show | approve | dismiss | release
mfactory issue list | show | create | comment | move | close | guide
mfactory checks | telemetry status | events | validate | export | prune
mfactory dashboard | start dashboard | stop | version
mfactory workspace add | remove | list | queue | init
From anywhere in a repository, .factory/bin/mfactory <command> is the same
CLI. The full reference is the CLI page.
Documentation
Read the docs. The same guides are in the repository:
| Guide | What it covers |
|---|---|
| Install | Install, setup, upgrade, remove, several projects |
| Configuration | Every key in factory/factory.toml and in a pipe |
| Telemetry | Local execution records, privacy, export |
| Design | How it works, guards, what is untested, what changed |
Development
python3 -m pip install pytest ruff # skip when .venv already has them
make check # ruff, bash -n install.sh, pytest
make help # mfactory CLI targets
make sample-dashboard # the dashboard with made-up jobs
The factory itself uses Python's standard library and PyYAML.
Licence
GPLv3. See NOTICE and what changed.
Metadata
Release files for modular-factory 0.40.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| modular_factory-0.40.0.tar.gz | 321.8 kB | With provenance | Details for modular_factory-0.40.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| modular_factory-0.40.0-py3-none-any.whl | Python 3 | none | any | Details for modular_factory-0.40.0-py3-none-any.whl |
Total release size: 723.4 kB
Release files / modular_factory-0.40.0.tar.gz
| Download URL | modular_factory-0.40.0.tar.gz |
|---|---|
| Size | 321.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3193549ba1ca2e12d4cfcca163770e44848e340240a95e0feee39181804c2b66
|
|
BLAKE2b-256 checksum How to use checksums |
67b508a9719dc034fdf7dc4183806cc96ed182de8e07b420a69c88b6523cd21f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / modular_factory-0.40.0-py3-none-any.whl
| Download URL | modular_factory-0.40.0-py3-none-any.whl |
|---|---|
| Size | 401.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f7800b2f7a4424e2bdb5dc45ab441e8f322d4e7c3996d301dd2dcd5d98f0ff8
|
|
BLAKE2b-256 checksum How to use checksums |
3e0ac48afd502228142ec39a84fca52523f977b4c33e7065b93c2d9e85eeb70f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for modular-factory 0.40.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for modular_factory-0.40.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.