Mutagent Blog · Strategy

Released Strategy

Governing a Software Factory: who may say yes

The code was ready. That did not give its author permission to merge. A factory can build, test and review a change. Authority to approve it is a separate question, with a separate answer.

Mutagent Blog · 2026-11-06 · by Burak Ozafsar

~9 min read

Illustration: lanes of built work cross an independent review line, one lane is stopped by a hold, and all converge on one gate a person controls. Only the reviewed change passes and lands with a pass mark.

TL;DR

Governance is identity, gates and provenance, enforced in code. The factory checks who acted, not which tool they used. Repository approvals need a person with write access; cloud agents act only as an App, without personal repository tokens, and cannot approve their own work.

Review, approval and merge authority stay separate and are rechecked live before merge. Anyone can stop the factory’s merge with merge:hold. Every decision keeps the identity behind it, with explicit operating controls.

Where you stand in the loop

Part 1 described the lifecycle: pickup, plan, build, review, merge. Governance decides who answers at the two gates (the plan and the pull request), who can stop a merge, and what the record shows afterwards. A person steers the factory from five surfaces:

SurfaceWhat you do there
repository host labels and review buttonsStart work, approve or revise a plan, approve a PR or send it back, veto a merge, or merge it yourself
repository host commentsAnswer a question the factory asked, and write the note a plan revision reads
Your coding agentAnything above, done for you, on your word
CLI and APIEvery gate decision directly, with no repository host delivery in between
The appWatch. It is a read-only window by design

The read-only app is deliberate. Its Inbox pins every open gate and question, with its options, the exact CLI command to answer it, and links to the PR, the item and the run. It has no approve or merge buttons. Decisions happen where an identity is recorded: on repository host, or under your own sign-in.

Who counts: an identity, not a tool

The factory never asks which tool was used. It asks which identity repository host or Mutagent recorded.

Locally, your agent is you. It works with your repository host login and Mutagent key, so repository host records its actions as yours. That is intended, so let it approve only on your word.

In the cloud, factory agents are the App. The planner, developer and reviewer that the factory starts in its sandboxes act only through a repository App installation token, minted for the bound repository. The sandbox does not receive personal repository credentials. It uses a scoped App identity, so its actions cannot count as the operator’s approval.

For a label to count as an approval, the factory reads the repository host’s record of who applied it last. That must be a person account with write, maintain or admin access, not a bot or an action marked as done through an App. The label must still be present when the factory reads it.

The result looks like this:

SignalA person with write accessYour local agentAn App or botThe factory itself
factory:pickup (start)startsstartsstartsignored
factory:approved (plan)countscounts as yourefusedignored
Review → Approve (PR)countscounts as youignoredignored
Review → Request changessends backsends back as youignoredignored
merge:hold (veto)blocksblocksblocksblocks

The factory ignores its own labels, assignments and comments: they never trigger, approve or answer anything. A board column move cannot approve either, because a status change does not identify who moved the card. The factory replies with a refusal rather than inventing a person from a delivery id.

The CLI takes a different route. It checks workspace permission, not repository-host permission: your Mutagent sign-in needs update permission, and the server records who approved.

The gates

The plan gate. The factory posts its plan and waits. To approve it, a person adds the factory:approved label. To revise it, the person comments with what must change and then adds factory:changes. The same run re-plans, and the planner receives the note as fenced, untrusted input: data, not instructions. An approval that carries extra text is refused. “Approve, but rename the table first” is not an approval with an amendment: the person is asked to request changes, then approve the revised plan.

The PR gate. Here the factory uses repository host’s own buttons. Review → Approve opens the gate for that pull request. Review → Request changes sends it back to build, with the review text as a fenced, untrusted note. Both count only from a person with write access to the PR’s repository. A person can also press Merge while the run waits at the gate: that merge is the approval, and nothing merges twice.

Questions. When the factory asks a question, it pauses. The first answer wins. Answering a question is never an approval of a plan or a PR. A reply on the issue counts from any commenter except the factory, so when the answer matters, answer through the CLI, where only your sign-in counts.

From review to merge: three separate decisions

Approving a PR is not the same thing as permission to merge. The factory keeps these apart and rechecks each one live, just before it merges:

AUTHORITY IS NOT A SIDE EFFECT Ready to merge is not permission to merge. Fresh review → Person approves → No hold → Live checks → Exact change lands

Any change to the reviewed code must go back through the checks.

The factory supplies review evidence: a verdict on one exact commit from a reviewer that is never the builder. A new push requires a new review. A person answers the PR gate; merge authority comes separately from policy. In our repository that policy is “as-ready”: a fresh APPROVE or WATCH verdict, plus green CI on the live commit.

The hold belongs to anyone. A merge:hold on the PR, its parent issue or its sub-item blocks the factory’s merge, even when a bot set it. No approval, label or policy overrides it, and every hold must be removed to release it. It cannot stop a person pressing Merge on the repository host, but a merge made under a hold is recorded with no approval.

The merge itself is bound to the reviewed commit. If the branch moved after the review, the factory does not merge.

One label vocabulary

A label can be a control or a signpost, and the prefix tells you which. The trigger prefixes make something happen or block it while present: factory: starts or steers a run, merge: controls merging, and ci: runs CI.

By contrast, review:, origin: and the other visibility labels are for people reading the list. Nothing acts on them. A review:approve label mirrors the newest verdict, but the factory reads that verdict from the review stage itself, never from the label.

A run keeps the label names of the factory version it started on. Rename a trigger label only after the runs that use the old name have ended. Visibility labels describe a result; they do not grant authority.

Autonomy is a dial

Our factory file has four autonomy presets, set with policy.autonomy:

PresetWhat waits for a personStatus
calibratingEvery plan, and every pull requestThe default, and how we run today
approve-plansEvery plan; a reviewed pull request merges on green CI unless it has to askPlan approval, merges as-ready
approve-mergesEvery spec, and every pull request; small plans start on their ownMerge approval
unsupervisedEvery spec; small plans start on their own and reviewed pull requests merge on green CIGates follow the factory file

policy.plan.approve and policy.merge.approve override the preset for one stage. Under every preset, unless you set a stage to never, a change to a protected zone you name waits for a person at least once: on the plan that named it, or on its pull request.

The gate conditions fail closed. If the factory cannot read a gate’s condition, the gate applies. A typo can only make it ask a person too often, never skip one.

Today every PR in our repository waits for a person. You move up the dial with receipts: runs where the review, the CI on the exact commit and the person’s approval agreed.

Operational controls

Use merge:hold to stop a merge, including after a gate has passed. A plain PR comment answers an open question or steers work through plain-language steering, echoed back before taking effect.

Cloud factories use an organisation-owned project board; local mode also supports personal boards. The CLI answers gates directly, while a connection check verifies the repository-host delivery route.

The audit trail

Every decision leaves a record. Approvers are recorded as repository-host identities, and each run keeps a ledger of its stage runs, gate decisions and traces. The factory also replies on the item or PR, including when it refuses a label and why.

In the resumed job, a request for changes sent the work back through build and independent review. A person approved the revised result, and the factory merged the reviewed change. The record separates the builder, the reviewer and the approver.

Let the factory work. Keep authority explicit.

The important choice is not which tool gets an approve button. It is whose identity may say yes, and whether the pipeline refuses everyone else, including your own automation. Cloud agents should act as an App, without personal tokens that could put them in the approver set.

Keep review, approval and merge as separate decisions, recheck them live, and land only the reviewed commit. Give everyone a veto through a hold, and leave the dashboard read-only so decisions happen where an identity is recorded.

Start at “calibrating”. More autonomy should follow evidence that the review, tests and human decisions agree, not impatience with the gates. Be equally clear about the operating boundaries: an auditor needs to know which controls apply and how decisions are recorded.

Next in this series: Defence in depth for a Software Factory.

Tags

#software-factory #governance #ai-agents