linear CLI and your own Linear login. Code, pull requests,
reviews and merges stay on GitHub.
Connect the Mutagent app
1
Start the connection
In Mutagent, open Configuration › Integrations and select Connect on the Linear card.
Or sign in as yourself with A person finishes the connection in a browser, so a workspace API key can’t start it.
architech factory login and run:2
Approve in Linear
Open the consent page and choose the Linear workspace that owns your team. Use an account that
can install apps there. The recommended team access is All public teams. Whatever you
choose, the team you bind must be visible to the app: binding looks up its key in the connected
Linear workspace and refuses a key it can’t find with
BOARD_TEAM_NOT_FOUND.The app asks to read and write issues and to be assigned and mentioned. It is installed once
per Linear workspace and shared by your organization’s Mutagent workspaces.3
Check the connection
Return to Configuration › Integrations and check that Linear shows as connected. Also
connect the Mutagent GitHub App and give it access to the code repositories.
Factory runs check out code and open pull requests on GitHub.
Reconnect
To give the app a fresh consent, for example when its grant expired or was narrowed, run the reconnect from the CLI. The Linear card in Configuration › Integrations has no Reconnect button.architech factory login.
Disconnect
Each Mutagent workspace has its own Linear connection, used by the Factory and by gateway Linear triggers. The Linear grant behind it is shared: the app is installed once per Linear workspace and used by every Mutagent workspace in your organization that connects to it. Two ways to disconnect differ in what they do to this workspace’s boards:
If Linear can’t confirm the revocation, Remove and
mutagent gateway disconnect still
disconnect in Mutagent and warn you to revoke the Mutagent app in Linear’s settings. The
architech factory integrations disconnect command gives no such warning; after it, check that the
Mutagent app is gone from Linear’s settings.
Bind a Linear team
From your repository, write a factory file for your team. The team key is the prefix of its issue identifiers, such asENG in ENG-42:
repos:
linear CLI is signed in, init reads the team’s workflow states and writes a
statusMap onto them. Then push the file and enable the Factory. Push binds the
team. Every issue in the bound team is on the board; there is no separate Project to add it to.
Map statuses to your workflow states
The Factory moves each issue through your team’s own workflow states.statusMap maps each
Factory status to a state name, matched exactly and then ignoring
case. Map existing states: Architech never creates a workflow state, and binding refuses a map that
names a state the team doesn’t have.
- The names are examples. In Review and On-Hold are the Factory’s default names, not required
ones. If your team calls them
ReviewingandPaused, map those. Add a state in Linear only if you want one, or leave the key out. - A status you leave out isn’t mirrored. The Factory doesn’t move the issue for that status.
- Map
doneto a completed state if you want the Factory to close an open issue when its work lands; without it, the Factory can’t close a Linear issue. Mapdroppedto a canceled state. - With no
statusMapat all, the Factory uses the six default names: Triage, In Progress, In Review, On-Hold, Done and Dropped. Then each must exist on the team, or binding fails withBOARD_STATUSES_MISSING. - The state you map to
triageparks an issue: an issue in it is never started.
Start work on an issue
There are two ways to hand an issue to the Factory:
An assignment or delegation starts a run only when:
- an active, non-app member of the bound team makes the change;
- the change reaches the Factory by webhook (see below);
- the issue is still assigned or delegated to the app when the run is admitted;
- a trigger on
assignedtofactorymatches. The default triggers include one. If your file has an explicittriggerslist, which replaces the defaults, keep an entry like this:
triage state, and it must
not carry the hold label (merge:hold by default). An issue already in a completed, canceled or
duplicate state can’t start a run.
A person can stop an open run from Linear: moving the issue to a completed, canceled or duplicate
state, or to the state you mapped to dropped, cancels it. The move must be the issue’s newest
status change, and it counts only while the issue is still in that state when the Factory reads it;
a move that was undone, or that a newer move replaced, cancels nothing. The Factory’s own moves never cancel a run.
A person can also pause a run from Linear: comment pause on the issue, and resume to continue.
The comment must be the word alone, in any case. See
Pause or resume a run by comment.
Webhooks and polling
The app receives signed webhooks for issue and comment changes, and the Factory also polls the bound team. A pickup label is picked up from either one. An assignment starts a run only from its webhook. If one didn’t start a run, remove the assignment and assign the issue again, or add the pickup label. The Factory ignores its own updates.Decide on the plan
The Factory posts its plan as a comment on the Linear issue. Apply labels to answer it, using the names in your factory file. Use plain team labels, not a label group, so an issue can carry more than one of them.
Only an active, non-app member of the bound team counts as a person here, and for the
pause and
resume comments; the app and other automation never do. The Factory removes each plan label as it uses it. Moving an issue to another
state doesn’t approve it. Pull request reviews and merge controls stay on GitHub; see
Approvals and merge controls.
Pull requests and the Final Status
Each pull request the Factory opens names its Linear issue in its description by the issue’s own identifier: your team key and number, such asENG-42 (or MUT-7 on a team whose key is MUT).
- A pull request for a task that is a Linear sub-issue says
Fixes ENG-43, plusPart of ENG-42for its parent. - When the plan’s parts aren’t separate sub-issues, only the sole part of the plan’s last wave says
Fixes ENG-42. Earlier parts, and parts that share the last wave with another part, say onlyPart of ENG-42: then the Factory closes the issue when its work lands.
Surface: line, such as
Surface: none — docs only for a change to docs, configuration or tests alone. A trunk pull request,
the one pull request of a feature built in waves, declares each child’s surface in its Evidence
Ledger instead. Whether a pull request needs UI evidence depends on that declaration, on the files
and on the review; see The Surface line.
Limits
- The scheduled daily brief doesn’t read Linear. A
/daily-briefroutine runs in a cloud sandbox with no Linear access, so its brief covers the Factory’s own activity: runs, merged pull requests and open questions. /triagein the cloud writes nothing to Linear. On a Linear board, a cloud/triagerun doesn’t comment on or file a Linear issue, and it doesn’t fall back to filing a GitHub issue either: its plan is in the run’s summary.
Work with the board locally
On your machine, Architech uses thelinear CLI, signed in as you, so its updates are made as you,
not as the app:
/publishcreates a Linear Project for a spec, with its parent issue and, by default, one sub-issue per task. Withpolicy.plan.subItems: none, the tasks are a checklist in the parent issue instead./syncreads the team’s issues and moves them to the states yourstatusMapnames./triage ENG-412comments its plan on that issue./triage "<description>" --issuefiles a new issue that carries the plan, or comments on an existing issue that already describes the problem. With--local, it writes nothing to the board./daily-briefonly reads the team’s issue changes into the brief; it writes nothing to Linear.