Machine reference¶
Every machine type the canvas offers — its id, category, blurb, config fields and defaults — generated from the machine registry.
28 machine types: 8 triggers · 12 processors · 8 sinks. How each one compiles (guards, grants, obligations, emitted jobs) is explained in ARCHITECTURE.md § 4; the user-facing tour is the app's Docs tab (_docs/machines-and-belts.md). Add a machine with /add-machine, then regenerate this file.
| Type | Category | Machine | Config fields |
|---|---|---|---|
trigger.issue_opened |
trigger | 📥 Issue opened | — |
trigger.issue_labeled |
trigger | 🏷️ Issue labeled | label |
trigger.pr_opened |
trigger | 🔀 PR opened | fireOn, alsoOnSync, label |
trigger.comment |
trigger | 💬 Comment | phrase |
trigger.cron |
trigger | ⏰ Schedule | cron |
trigger.manual |
trigger | 🕹️ Manual lever | mode |
trigger.workflow_run |
trigger | 🚦 On workflow result | workflow, conclusion |
trigger.repository_dispatch |
trigger | 📡 Cross-repo signal | eventType, sourceRepo |
agent.claude |
processor | ⚙️ Claude agent | promptRef, model, maxTurns, checks |
filter.condition |
processor | 🧪 Filter | expression |
processor.dependabot_meta |
processor | 📋 Dependabot metadata | allow |
gate.approval |
processor | 🚧 Approval gate | environment |
rate.limiter |
processor | 🚥 Rate limiter | maxPerDay |
gate.enablement |
processor | 🔌 Enablement gate | variable |
processor.ledger |
processor | 📒 Ledger | ledgerPath, selectCmd, updateCmd, reportBranch |
gate.budget |
processor | 🧮 Budget gate | maxOpenPrs, maxItemsPerRun, skipWithinDays, prLabel |
processor.evidence |
processor | 🔏 Evidence seal | measureCmd, evidencePath, artifactName |
gate.verified_fix |
processor | ⚖️ Verified fix gate | verifyCmd, onFail, maxRounds |
processor.feedback_controller |
processor | 🔁 Feedback controller | promptRef, model, ledgerPath, windowDays, maxTurns |
processor.issue_batcher |
processor | 🗂️ Issue batcher | promptRef, model, maxGroupSize, maxTurns |
sink.comment |
sink | 📝 Post comment | instruction |
sink.label |
sink | 🏷️ Apply labels | labels |
sink.create_issue |
sink | 🧾 Create issue | titleHint |
sink.open_pr |
sink | 🚚 Open PR | branchHint |
sink.repository_dispatch |
sink | 📤 Cross-repo signal (send) | targetRepo, eventType, tokenSecret |
sink.cross_repo_issue |
sink | 🚉 Cross-repo issue | targetRepo, tokenSecret, titleHint |
sink.merge_pr |
sink | ✅ Merge PR | method, when |
sink.commit_files |
sink | 📦 Commit files | pathScope |
Triggers¶
Triggers start an assembly line — they map to the workflow on: block.
trigger.issue_opened¶
📥 Issue opened — Fires when a new issue lands on the intake belt.
Canvas summary with the defaults: on: issues [opened]
No config fields.
trigger.issue_labeled¶
🏷️ Issue labeled — Fires when a specific label is applied to an issue.
Canvas summary with the defaults: on label: any
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
label |
Label | text | (empty) | e.g. needs-triage |
trigger.pr_opened¶
🔀 PR opened — Fires when a pull request is opened (optionally on new pushes too).
Canvas summary with the defaults: on: pull_request [opened]
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
fireOn |
Fire on | select: opened · labeled |
opened |
"labeled" fires when a label is added — the deterministic merge-line keystone (ADR-027): pair with the label field below and a terminal merge sink. |
alsoOnSync |
Also on new pushes | select: no · yes |
no |
— |
label |
Only this label | text | (empty) | With "labeled": the line runs only when exactly this label is added (a job-level guard on github.event.label.name). e.g. dep:safe-to-merge |
trigger.comment¶
💬 Comment — Fires on new issue/PR comments containing a phrase. Bot-guarded by the compiler.
Canvas summary with the defaults: on comment: "@factory"
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
phrase |
Trigger phrase | text | @factory |
— |
trigger.cron¶
⏰ Schedule — Fires on a cron schedule (UTC). The factory night shift.
Canvas summary with the defaults: cron: 0 3 * * *
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
cron |
Cron (UTC) | text | 0 3 * * * |
— |
trigger.manual¶
🕹️ Manual lever — Run on demand via workflow_dispatch. In plan-first mode a manual run only PLANS (dry run) unless you tick “apply”; scheduled runs always apply.
Canvas summary with the defaults: on: workflow_dispatch
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
mode |
Manual run mode | select: apply · plan-first |
apply |
plan-first: a manual run is a dry run (plan only) unless the “apply” box is ticked. Scheduled/other events always apply. |
trigger.workflow_run¶
🚦 On workflow result — Fires when another workflow finishes — gate on success/failure. Runs in the trusted default-branch context (write token + secrets), so it can safely act on Dependabot/fork PRs after their checks run.
Canvas summary with the defaults: on: CI → success
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
workflow |
Watched workflow name | text | CI |
— |
conclusion |
When it concludes | select: success · failure · any |
success |
— |
trigger.repository_dispatch¶
📡 Cross-repo signal — Fires when another repo (or any system holding a repo-scoped token) POSTs a repository_dispatch event of this type — the receiving end of an inter-repo belt (Fleet C). Senders are write-privileged principals; the payload body never enters prompts. Only client_payload.number crosses, as an entity pointer, and a first step fails the run unless it is a positive integer and client_payload.source is a well-formed repo (one of Source repo, when set).
Canvas summary with the defaults: on: repository_dispatch [factory-signal]
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
eventType |
Event type | text | factory-signal |
Scopes the trigger to exactly this dispatch type (repository_dispatch: types). Empty = every type (warns). |
sourceRepo |
Source repo | text | — | Accept the signal only from this repo: the run fails before any other step unless client_payload.source matches. Empty = any sender holding a token for this repo. e.g. owner/name |
Processors¶
Processors agents, filters, gates and loop machines between a trigger and its sinks.
agent.claude¶
⚙️ Claude agent — The motor. Runs Claude Code via claude-code-action with a repo prompt and scoped tools.
Canvas summary with the defaults: claude-opus-5-5 · .factory/prompts/triage.md
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
promptRef |
Prompt file | text | .factory/prompts/triage.md |
Path in the target repo — edit the prompt without recompiling. |
model |
Model | select: claude-opus-5-5 · claude-sonnet-5-5 · claude-haiku-5-5 |
claude-opus-5-5 |
— |
maxTurns |
Max turns | number | 8 |
— |
checks |
Verification checks | textarea | — | One repo-declared check command per line. Each compiles to exactly that Bash(<command>:*) grant plus a VERIFY obligation — the narrow alternative to deferring every gate to PR CI. e.g. python3 tools/spec_validator.py; python3 tools/backlog_lint.py |
filter.condition¶
🧪 Filter — Gates the line on a GitHub Actions expression (AND-joined into the job if:).
Canvas summary with the defaults: if: <empty — passes everything>
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
expression |
Actions expression | textarea | (empty) | e.g. !contains(github.event.issue.labels.*.name, 'wontfix') |
processor.dependabot_meta¶
📋 Dependabot metadata — Reads a Dependabot PR via dependabot/fetch-metadata and gates the downstream sinks by update type. Only works on a PR-opened line (needs the pull_request event); scopes the line to Dependabot automatically.
Canvas summary with the defaults: dependabot: allow patch-and-minor
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
allow |
Let through | select: patch · patch-and-minor · any |
patch-and-minor |
Which semver update types reach the downstream sinks (e.g. auto-merge). |
gate.approval¶
🚧 Approval gate — Runs the line in a GitHub Environment whose protection rules require a human reviewer — the run pauses until someone approves. You must create the environment + required reviewers in repo Settings → Environments (the compiler cannot).
Canvas summary with the defaults: approve via env: factory-approval
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
environment |
Environment name | text | factory-approval |
— |
rate.limiter¶
🚥 Rate limiter — Stops the line once it has run N times today — a guard step counts the workflow’s runs and fails fast past the cap. Cheap insurance against runaway loops and agent cost.
Canvas summary with the defaults: ≤ 10 runs/day
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
maxPerDay |
Max runs / day | number | 10 |
— |
gate.enablement¶
🔌 Enablement gate — A default-OFF kill switch. The line only runs when a repo variable is "true" (and, for agent lines, Claude auth is present). Flip the variable to turn the whole line on/off instantly — no redeploy. A compromised agent can’t flip it back (needs no admin scope). The governance backbone for autonomous lines.
Canvas summary with the defaults: enabled if vars.CONTENT_FACTORY_ENABLED == 'true'
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
variable |
Repo variable | text | CONTENT_FACTORY_ENABLED |
A repository Actions variable. Unset or ≠ "true" = the line is idle. Set it in Settings → the line toggle, or repo Settings → Variables. |
processor.ledger¶
📒 Ledger — The perfection loop’s source of truth, and the reason it converges. A committed ledger records what has been measured and what is certified done. Before the run, a DETERMINISTIC step picks the highest-priority not-yet-perfect slice — no model chooses the work. After the run, a DETERMINISTIC step folds the sealed evidence back in and recomputes “done”. An agent can never write that field.
Canvas summary with the defaults: ledger .factory/ledger.json · deterministic select + update
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
ledgerPath |
Ledger file | text | .factory/ledger.json |
Committed to the repo — the loop’s memory across runs. Rides the report PR only, never a content PR. |
selectCmd |
Select command | text | python3 scripts/ledger.py select --json |
Deterministic, and the only thing that chooses work. Must print a GitHub Actions matrix object to stdout — e.g. {"slice":["a","b"]} — which the line then fans out over one slice at a time. |
updateCmd |
Update command | text | python3 scripts/ledger.py update --evidence evidence/ |
Deterministic. Folds sealed evidence into the ledger and recomputes the done flag. |
reportBranch |
Report branch prefix | text | factory/ledger |
— |
gate.budget¶
🧮 Budget gate — Backpressure clamped to HUMAN REVIEW SPEED, not machine capacity. Stops planning new work once too many PRs already await review, caps how much one run may take on, and skips anything recently certified. Without this an autonomous loop out-runs its one reviewer and buries them.
Canvas summary with the defaults: ≤3/run · pause at 6 open · skip 7d
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
maxOpenPrs |
Max open PRs awaiting review | number | 6 |
— |
maxItemsPerRun |
Max items per run | number | 3 |
— |
skipWithinDays |
Skip items certified within (days) | number | 7 |
— |
prLabel |
Label to count | text | automated |
Which open PRs count against the review-queue cap. |
processor.evidence¶
🔏 Evidence seal — Measures BEFORE the agent runs, then seals the result. The agent reads the evidence and writes the report — it can never produce the evidence it is graded on. Also solves a real constraint: Claude Code scrubs auth from its Bash subprocesses, so a measurement engine launched inside an agent cannot authenticate. Run it as a plain workflow step instead.
Canvas summary with the defaults: seal → evidence/ before the agent
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
measureCmd |
Measure command | text | python3 scripts/measure.py --out evidence/ |
A deterministic workflow step. Its output is the only evidence the agent and the ledger may use. |
evidencePath |
Evidence path | text | evidence/ |
— |
artifactName |
Artifact name | text | perfection-evidence |
The durable handoff — a later fix run reuses this by run id instead of re-paying to measure. |
gate.verified_fix¶
⚖️ Verified fix gate — Anti-self-grading. After the agent edits, an INDEPENDENT deterministic check decides whether the edit survives — the model’s own claim that it helped is never the signal. If the check does not improve, the working tree is reverted and nothing is proposed. This is what keeps an autonomous repair loop from congratulating itself into a mess.
Canvas summary with the defaults: verify → revert · breaker 3 rounds
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
verifyCmd |
Verify command | text | python3 scripts/verify.py --fail-under-baseline |
Must exit non-zero when the edit did not improve. Never let the agent supply this verdict. |
onFail |
When verification fails | select: revert · keep-and-flag |
revert |
“revert” restores the tree so nothing unproven is ever proposed. “keep-and-flag” proposes it but marks the PR for human judgement. |
maxRounds |
Circuit breaker — max fix rounds per item | number | 3 |
An item repaired this many times without being certified stops being a candidate. |
processor.feedback_controller¶
🔁 Feedback controller — The loop-tuner. A scheduled agent that reads the factory’s OWN telemetry (run failures, time-to-merge, throughput), finds the upstream cause, makes the smallest change to a prompt/config, records it in a verified improvements ledger, and opens ONE tuning PR. It never merges. This is the feedback loop that makes the factory improve itself.
Canvas summary with the defaults: loop-tuner · claude-opus-5-5 · 7d window
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
promptRef |
Prompt file | text | .factory/prompts/loop-tuner.md |
Extra operating instructions layered on the built-in loop-tuner contract. |
model |
Model | select: claude-opus-5-5 · claude-sonnet-5-5 · claude-haiku-5-5 |
claude-opus-5-5 |
— |
ledgerPath |
Improvements ledger | text | .factory/metrics/improvements.yml |
Where the controller records each change + the metric it should move, so the next run can verify it. |
windowDays |
Look-back window (days) | number | 7 |
— |
maxTurns |
Max turns | number | 30 |
— |
processor.issue_batcher¶
🗂️ Issue batcher — The intake sorter. A scheduled agent that surveys open issues, filters the actionable ones, groups related issues into batch work orders (one tracking issue per batch, labeled factory:work-order), and marks members factory:queued. It never fixes anything itself — a downstream fix line consumes the work orders, one PR per order.
Canvas summary with the defaults: batch ≤ 4 issues/order · claude-sonnet-5-5
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
promptRef |
Prompt file | text | .factory/prompts/issue-batcher.md |
Extra operating instructions (triage policy, priorities) layered on the built-in batching contract. |
model |
Model | select: claude-opus-5-5 · claude-sonnet-5-5 · claude-haiku-5-5 |
claude-sonnet-5-5 |
— |
maxGroupSize |
Max issues per work order | number | 4 |
Batches larger than this get split — one PR must plausibly close the whole batch. |
maxTurns |
Max turns | number | 30 |
— |
Sinks¶
Sinks what a line does to the repository — or, downstream of an agent, its obligations.
sink.comment¶
📝 Post comment — Posts a comment on the triggering issue/PR.
Canvas summary with the defaults: comment: summarizes your findings
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
instruction |
Agent instruction / body | textarea | summarizes your findings |
Downstream of an agent: obligation wording. Direct from a trigger: the literal comment body. e.g. summarizes your findings in 3 lines |
sink.label¶
🏷️ Apply labels — Applies labels to the triggering issue/PR.
Canvas summary with the defaults: labels: agent decides
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
labels |
Labels (comma-sep, empty = agent decides) | text | (empty) | e.g. bug, p1 |
sink.create_issue¶
🧾 Create issue — Files a new issue (reports, alarms, follow-ups).
Canvas summary with the defaults: new issue: agent decides title
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
titleHint |
Title hint | text | (empty) | e.g. Nightly report: … |
sink.open_pr¶
🚚 Open PR — Ships changes as a pull request on a factory branch.
Canvas summary with the defaults: PR from factory/*
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
branchHint |
Branch hint | text | (empty) | e.g. factory/fix-… |
sink.repository_dispatch¶
📤 Cross-repo signal (send) — POSTs a repository_dispatch event to ANOTHER repo — the sending end of an inter-repo belt, pairing with the 📡 Cross-repo signal trigger. Uses a repo secret holding a PAT scoped to the target (default FLEET_TOKEN). Sends the entity number as client_payload.number and this repo as client_payload.source; the compiler refuses self-dispatch loops.
Canvas summary with the defaults: signal → owner/name [factory-signal]
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
targetRepo |
Target repo | text | (empty) | e.g. owner/name |
eventType |
Event type | text | factory-signal |
— |
tokenSecret |
Token secret name | text | FLEET_TOKEN |
— |
sink.cross_repo_issue¶
🚉 Cross-repo issue — Files an issue in ANOTHER repo — the proven fleet pattern. The workflow’s GITHUB_TOKEN can’t write to other repos, so this uses a repo secret holding a PAT scoped to the target (default FLEET_TOKEN). Create that secret first.
Canvas summary with the defaults: issue → owner/name (via FLEET_TOKEN)
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
targetRepo |
Target repo | text | (empty) | e.g. owner/name |
tokenSecret |
Token secret name | text | FLEET_TOKEN |
— |
titleHint |
Title hint | text | (empty) | e.g. Downstream: … |
sink.merge_pr¶
✅ Merge PR — Merges the pull request (grants contents + pull-requests: write). "auto" merges only once required checks pass. Deterministic only: wiring it downstream of a Claude agent is a compile error (agents never merge, ADR-039) — gate it on a label instead (ADR-027). Scope it with a Filter or Dependabot-metadata — never merge untrusted PRs blindly.
Canvas summary with the defaults: merge: squash · auto
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
method |
Merge method | select: squash · merge · rebase |
squash |
— |
when |
When | select: auto · now |
auto |
— |
sink.commit_files¶
📦 Commit files — Commits file changes directly (grants contents: write — use sparingly).
Canvas summary with the defaults: commit in repo root
| Field | Label | Kind | Default | Notes |
|---|---|---|---|---|
pathScope |
Path scope | text | (empty) | e.g. docs/** |