The Slack App
maku-slack is Maku’s Slack adapter: a mention in a served channel, or a message in your DM with the App, plans the work as one proposal; its author confirms it in two steps (Confirm opens a Confirm card that binds the exact line, and that card’s Confirm files it); and the broker’s signed webhooks tell the same thread how it goes. After filing, the thread answers read questions (status, needs me, changes, pr) and runs the full asynchronous conversational loop behind an author-only ten-minute Confirm card: deciding a plan review (approve, revise, split) or a proposed split (accept, decline), answering a scoper question (answer), queuing next-run guidance (steer: / next run:, never mid-turn, triggering four-eyes), amending the task specification (amend:, quoted in every later brief and mirrored to the GitHub issue), stopping a queued or running task (stop), and retrying an escalated one (retry, retry_deeper). A DM-filed task can also post one read-only line per task in a team channel (the team feed), and the App’s Home tab lists what waits on you (App Home). Live mid-turn steering into a running agent, every approval class other than forge.push, and merges stay in the web UI (or GitHub); a forge.push approval is a read-only link to the Room UI in Socket Mode by default, or an actionable card under Hardened Events API (or when allowUnsignedDecisions: true is explicitly enabled).
The adapter holds no Slack signing secret and no Kubernetes access. By default it runs in Socket Mode: it opens an outbound WebSocket to Slack with an app-level token, so nothing of it is public. With transport: events it serves Slack’s Events API instead, and every request is verified by maku-broker, which alone holds the signing secret. Its thread map (which room is narrated in which thread) is the broker’s, kept in Postgres (chat_threads).
sequenceDiagram
participant U as Slack user
participant S as Slack
participant A as maku-slack
participant B as maku-broker
participant F as maku-factory
U->>S: @maku what to do (or a DM)
S->>A: app_mention / message (Socket Mode, or Events API)
A->>B: handoff
A->>S: proposal message (metadata)
U->>S: Confirm, then the Confirm card's Confirm
S->>A: block_actions
A->>B: POST /api/chat/tasks (confirm:task)
B->>F: task
B-->>A: webhook (signed, ids only)
A->>S: thread line (end line edited in place)
Install
The umbrella chart installs the App as the subchart slack (charts/maku-slack), off by default. Turn it on with one toggle (global.slack) layered over your cluster values file (or generate it with maku install), starting from values-slack.example.yaml:
global:
slack:
enabled: true
teamID: T0123ABCD # your Slack workspace ID
transport: socket # default: outbound WebSocket, zero public ingress, no signing-secret
principal: slack-app
# dmFeedChannel: C0123FEED # optional: read-only lifecycle lines for DM-filed tasks (no DM text)
# allowPrivateRepos: false # Lock 3: requires privateCode.acknowledged + internal planner too
# allowUnsignedDecisions: falseThe umbrella derives both the broker’s human.chat.providers.slack config and the maku-slack adapter wiring from global.slack, omits expose.slack automatically under transport: socket, and validates the four blocks that must still agree across subcharts (failing the render naming any key that disagrees):
| Block | What it must say |
|---|---|
global.slack & slack | global.slack sets enabled, teamID, transport, principal, and optional dmFeedChannel / allowPrivateRepos / allowUnsignedDecisions; slack sets the image, issuerURL, roomsURL, networkPolicy.mode, and optional channel overrides (config.channels; DMs need none) |
maku.broker.webhooks | an entry named global.slack.principal (slack-app), network: cluster, url: http://factory-slack-app.<namespace>.svc.<clusterDomain>:8081/webhooks, existingSecret equal to slack.webhookSecret |
maku.broker.human.mcp.sponsored | an entry named slack-app |
maku-factory.config.api.sponsored | an entry named slack-app |
global.slack.enabled: false with a broker subscriber that still targets factory-slack-app fails too: every event would go to a subscriber that does not exist, and the broker would disable it.
What it renders: one replica (factory-slack-app), its Service (webhooks 8081, metrics 9090, and events 8080 under transport: events only), a ServiceAccount with automountServiceAccountToken: false and no Role or RoleBinding, and the config built from global.slack / slack.config plus the derived file paths and addresses. The App reads and writes no Kubernetes object: the thread map (chat_threads) and replay fence (chat_replay_fence) live in the broker’s Postgres database.
The Secrets, by name:
slackSecretholdsbot-token(xoxb-) andbot-user-id, plusapp-token(the app-levelxapp-token withconnections:write) under Socket Mode.principalSecretholdsclient-idandclient-secret, plusproject-idunder the preset: ZITADEL.webhookSecretholdssigning-key. The broker mounts the same Secret.global.slack.signingSecret(signing-secret, Events API only): mounted exclusively onmaku-broker, never onmaku-slack(which refusessigningSecretFileat startup).
Exposure. Under Socket Mode, nothing (expose.slack is omitted automatically). Under the Events API, POST /slack/events must be public, through expose.slack.
Network. slack.networkPolicy.mode must equal maku.networkPolicies.mode, and the App then admits:
- the webhooks from the broker;
- the metrics from the scraper;
- under the Events API only, Slack’s requests from the gateway.
It reaches DNS, the broker’s :8080, Slack’s Web API and Socket Mode hosts, and the IdP; never maku-factory and never the Kubernetes apiserver. The broker’s own policy admits :8080 from the web front door alone, so the subchart adds room-broker-from-factory-slack-app, which admits the App, and nothing else, to the broker’s :8080.
Off removes the App, its route, its ServiceMonitor and the maku-slack alert group. Without it the factory loses mention/DM intake and proposals, thread lines, forge.push cards, App Home, and @factory link. MCP, the CLI and the web UI are unaffected.
What each transport proves
The adapter writes every Slack card, its buttons, and each button’s value; Slack signs what was clicked (under the Events API), not that surrounding blocks were honest. Choose between the two transports based on your threat model and ingress constraints:
- Socket Mode (
transport: socket, default — zero public ingress):maku-slackopens an outbound WebSocket usingapp-token(xapp-), requiring no public URL and no signing secret. What it proves: Slack delivers no HMAC over Socket Mode, so nothing is cryptographically proven tomaku-broker. Every lifecycle write (task,plan,split,answer,stop,retry,steer,amend) rests on the adapter’s word and is recorded withproof: unsigned(mirrored issue comments of unsigned amendments readvia Slack (unverified transport)). The broker still checkschat_links, GitHub standing (MayStart/IsMaintainer), redaction, per-person and principal daily budgets, room membership, and four-eyes for the user the adapter names. What a compromised adapter cannot do is release code:POST /api/chat/decisions(forge.push) fails closed (403 unsigned_decisions_disabled) and the card renders a read-only link to the OIDC Room Web UI. Enablingglobal.slack.allowUnsignedDecisions: trueturnsforge.pushbuttons on under Socket Mode and raises the persistentchat_unsigned_deputywarning onGET /api/installand the Web UI install banner. - Tier-2 Hardened Events API (
transport: events— broker-verified proofs): Switch to Events API when you want cryptographic click verification or clickableforge.pushapproval cards without an unsigned-deputy warning. Slack’s signing secret is mounted exclusively onmaku-broker(nevermaku-slack). Non-action events and non-write clicks go toPOST /api/chat/verifyfirst; every write click rides raw bytes plusX-Slack-SignatureandX-Slack-Request-Timestampto its/api/chat/*route, wheremaku-brokerverifies HMAC-SHA256 and the ±5-minute timestamp window, inserts a single-use row into Postgreschat_replay_fenceacross replicas (409 replay_detected), checks workspace/route/action/target/thread/by/confirmTTL, and checks bothth(first 32 hex chars of SHA-256 over exact UTF-8 bytes) and the signed card snapshot’s plain-textmaku_textblock (400 text_hash_mismatch). Every verified event recordsproof: signed, and downgrade attempts (transport: socketagainst aneventsprovider) are refused403 proof_required. Surrounding card dressing remains the adapter’s.
To upgrade an install from Socket Mode to Tier-2 Hardened Events API, set transport: events, point global.slack.signingSecret at a Secret containing signing-secret in the release namespace, enable expose.slack, and update the Slack App manifest (socket_mode_enabled: false + Request URL https://<hostname>/slack/events):
global:
slack:
enabled: true
teamID: T0123ABCD
transport: events
signingSecret:
existingSecret: factory-slack-signing # mounted on maku-broker ONLY (never maku-slack)
key: signing-secret
expose:
slack:
enabled: true
hostnames: [factory-slack.example.com] # Event Subscriptions + Interactivity -> POST /slack/events
sequenceDiagram
participant U as Slack user
participant S as Slack
participant A as maku-slack (no signing-secret)
participant B as maku-broker
participant PG as Postgres
alt Socket Mode (transport: socket, default)
A->>S: Outbound WSS (xapp- connections:write)
U->>S: Click Confirm / Decide
S->>A: block_actions over WSS (no HMAC)
A->>B: POST /api/chat/* (Bearer JWT + identity envelope)
B->>B: Check chat_links, GitHub standing, budgets, four-eyes
Note over B: Lifecycle writes record proof: unsigned — forge.push fails closed (403) unless allowUnsignedDecisions is true
else Hardened Events API (transport: events)
U->>S: Mention / message or click Confirm / Decide
S->>A: HTTPS POST /slack/events (raw body + X-Slack-Signature)
opt Non-write event or non-write click
A->>B: POST /api/chat/verify (raw body + headers)
B->>B: Verify HMAC-SHA256 with broker-only signing-secret (+/-5m)
B-->>A: 200 ok
end
opt Write click (Confirm or forge.push Decide)
A->>B: POST /api/chat/* (rawBodyBase64 + headers)
B->>B: Verify HMAC-SHA256, route/action/target/by/TTL, th + maku_text
B->>PG: INSERT chat_replay_fence (single-use across replicas)
B->>B: Check chat_links, GitHub standing, budgets, four-eyes
Note over B: Records proof: signed — downgrade to socket refused 403
end
end
Manifest
The App is one workspace’s: create it from this YAML manifest, install it, and put the bot token (xoxb-) and bot user ID in slackSecret. Under Socket Mode (the default), also create an App-Level Token (xapp-) with scope connections:write under Basic Information → App-Level Tokens and store it as app-token in slackSecret.
display_information:
name: Maku
features:
bot_user:
display_name: maku
always_online: true
app_home:
home_tab_enabled: true
messages_tab_enabled: true
messages_tab_read_only_enabled: false
oauth_config:
scopes:
bot:
- app_mentions:read
- chat:write
- channels:history
- groups:history
- im:history
- im:read
- im:write
- pins:write
- reactions:write
- users:read
settings:
event_subscriptions:
bot_events:
- app_mention
- message.channels
- message.groups
- message.im
- app_home_opened
interactivity:
is_enabled: true
org_deploy_enabled: false
socket_mode_enabled: trueSocket Mode (the default) needs no request URL: Slack sends events and button presses over the App’s own WebSocket, which the app-level token opens. Each envelope is acknowledged once the App’s bounded worker pool has taken it; one the pool refuses (full, or draining) is left unacknowledged and counted as busy. Slack delivers an unacknowledged event again; an unacknowledged button press is not redelivered (the person sees Slack’s error) and is pressed again.
The Events API (transport: events) sets socket_mode_enabled: false and one request URL in two places: https://factory-slack.<domain>/slack/events under Event Subscriptions and the same URL under Interactivity & Shortcuts. One door serves both: the content type says whether an event or a button press arrived. The App also answers POST /slack/interactions, the same door, for an install that routes that path itself; the umbrella’s expose.slack route is /slack/events alone. The App holds no signing secret, so it acts on nothing before the broker has verified it: an event goes to POST /api/chat/verify first; a button press that writes (Confirm cards, decisions) rides, raw bytes and Slack’s two signature headers, to the broker’s action route, which verifies and fences it there; any other press is verified first (security). A write press with no signature or a timestamp more than five minutes off is refused at the door. Both URLs change when the App moves (a cloud move, a new domain). Left stale, every button press gets Slack’s generic could not handle this payload while events still arrive. After any move, press one proposal’s Confirm before anything else and check that maku_slack_app_requests_total{route="interactions"} rose (operations).
A click that gets no answer (under the Events API, typically the broker could not be reached to verify it) can be pressed again: the broker fences every write, so a repeat of one that did land is answered as a duplicate and acts once.
chat:write covers chat.update (a card rewritten in place), chat.postEphemeral (the line one clicker sees) and the self-serve link’s answer, a direct message from the bot. pins:write pins a filed task’s Filed line; reactions:write allows lightweight bot reactions when enabled. users:read is optional: with it the link page names the Slack user by their handle, then their display name (users.info), without it by their id only. message.im and the im: scopes carry the DM intake; app_home_opened the App Home. No reaction is read: a check mark files nothing.
Replies (a reply re-plans a proposal, and a filed thread answers its closed phrases and draws its confirmations) need the message.channels (and, for private channels, message.groups) bot events. Without them, mentions work and replies are never seen.
Config
maku-slack --config <file>, strictly decoded (an unknown key is refused).
| Key | Meaning |
|---|---|
teamID | Required. The one workspace served; any other workspace’s events and presses are dropped |
transport | Optional, socket (the default) or events: how Slack reaches the App (Manifest) |
channels | Optional (a DM-only install lists none): <channel id>: {repositories: [owner/name], maxCostUSD, approvals, upkeep}, each id a C… or G… channel. The repositories a proposal there may name, and the max_cost it files with (at least 0.01); repositories and maxCostUSD on the parent channel are optional when upkeep is set (dedicated upkeep channel). A DM needs no entry |
channels.<id>.upkeep | Optional: {repositories, routines?, notify?, digest?: {cron}}. Routes upkeep routine threads, breaker alerts, and periodic scorecards to this channel. routines filters by routine name when non-empty; notify defaults to [room.pr_opened, room.waiting_for_human, room.ended, routine.paused] and also admits room.merged and room.reverted ([] disables webhook posts); digest.cron is a 5-field UTC cron |
channels.<id>.approvals | Optional, default false: a forge.push wait in that channel is drawn as the card, and a press on it reaches the broker. Under Socket Mode the card carries its buttons only with allowUnsignedDecisions: true (otherwise it is read-only and links the room page), because the broker refuses unsigned decisions unless its provider setting allows them. Off, the wait keeps the text line, and a press on a card posted while it was on is answered “approvals are not turned on in this channel” with the room link, without reaching the broker. Turning it off is the fast rollback; it is not the authority: the broker’s POST /api/chat/decisions decides, and a broker that does not serve it (no chat provider, or a legacy install without human.slackDecide) answers 404, and a press then says the factory could not be reached |
channels.<id>.intents | Optional, off (the default), shadow or on: whether tier 1 reads the replies of a filed thread that the phrase table does not know. shadow classifies each one, counts and logs it, and posts today’s unknown line. on lets a label act: a read label is answered at once, and a write label posts the same author-only ten-minute confirmation its phrase would (behind intentActions), never the act itself. The broker’s human.chat.intents.mode stays the authority: an answer it marks shadow is recorded only, whatever the channel says. Write it quoted or bare: YAML reads a bare off or on as a boolean, and the App reads it back as the word. Off is the rollback, and the fast one: tier 1 is never asked |
channels.<id>.collectReplies | Optional, default false: the channel’s agreement that its replies are stored, redacted, with the label the classifier gave them, for the broker’s retentionDays (30 by default) and then deleted. It needs intents shadow or on. A channel without it stores nothing a person typed |
channels.<id>.intentActions | Optional: the write actions the channel may offer, any of stop, retry, answer, steer, amend, plan, split, each once. Each is served on the phrase table without needing intents: on, always behind a ten-minute confirmation named to the requester: stop and retry on their phrases and as buttons on the waiting-for-human and escalated end lines; answer on any free-text reply while the task waits on a question; plan on approve plan, split, any free-text reply while the plan waits for review (a revise note) and the plan-review card’s buttons; split on accept split, decline split and the split card’s buttons; steer on steer: <text> (a note queued for the task’s next run, never sent to a running one); amend on amend: <text> (an amendment to the task, quoted in every later brief). A tier 1 label needs its act too: intents and intentActions only narrow what the broker allows |
channels.<id>.notify | Optional: the webhook transitions that post a line in that channel, by full name. Absent means the four defaults (room.task_triaged, room.waiting_for_human, room.pr_opened, room.ended), so a run start, a review verdict, a budget notice and an approval close post nothing by default; room.merged and room.reverted rewrite the end line in place rather than posting a separate line (listing room.reverted in notify also posts a line of its own); [] means none. A name that is not a webhook type, a name listed twice, and a type the App draws no line for (room.task_received, room.run_ended, room.monitor_verdict) are refused at start. A card and its close follow approvals, not this list |
botTokenFile, webhookKeyFile, botUserIDFile | Required mounted files; each must be readable and non-empty, and the webhook key must parse (one or two base64 lines of at least 32 bytes): the App refuses to start otherwise, naming the field and never the content |
appTokenFile | Required under Socket Mode: the app-level token, read at every connection, so a rotation applies |
signingSecretFile | Refused: Slack’s signing secret is the broker’s, which verifies every Events API request |
allowUnsignedDecisions | Optional, default false: mirrors the broker’s provider setting; under Socket Mode a forge.push card draws its decide buttons only when it is true |
confirmTTL | Optional, default 10 minutes, at most 1 hour: how long a Confirm card stays clickable, measured from its message timestamp as the broker measures it |
dmFeedChannel | Optional: the C… or G… channel a DM-filed task’s team feed line is posted in; empty posts none |
clientIDFile, clientSecretFile, projectIDFile, issuerURL | Required: the machine client at your identity provider, the project whose audience the token carries (preset: ZITADEL; generic takes audience instead, below), and the issuer (an absolute https URL; http is accepted only for a loopback host, in tests). The three files are checked at start like the others |
preset, tokenURL, scopes, audience | Optional. An empty preset is zitadel: the request above, projectIDFile required. generic mints at any OIDC issuer: tokenURL, else its discovery document’s token_endpoint, with scopes and audience sent as a parameter; projectIDFile is refused there. See identity |
brokerURL, roomsURL | The broker’s base URL, its human listener (http://<svc>.<ns>.svc.cluster.local:8080, no path: the App calls <brokerURL>/mcp), and the room pages’ base URL |
namespace | Accepted and unused: the thread map it named is the broker’s now |
escalatedHours | Optional, default 168: set it to the Factory’s spec.caps.escalatedHours, which the App cannot read. It words an escalated task’s If nothing is done, it stops in 7 days. (whole days as days, else hours); 0, no limit, says it stays parked. A negative value is refused |
eventsAddr :8080 | Under transport: events only, Slack’s requests, POST /slack/events (events and button presses; POST /slack/interactions is an alias of the same door): the public route. Under Socket Mode it is not opened |
webhooksAddr :8081 | The broker’s webhooks, POST /webhooks: cluster only |
opsAddr :9090 | Metrics and the probes |
The App’s token is a client-credentials grant from your identity provider (preset: ZITADEL: the project-audience scope, openid and urn:zitadel:iam:org:project:id:<project id>:aud). The factory serves a Slack user listed in its onBehalfOf.slack, or, with onBehalfOf.slackLinks, one who linked themselves (self-serve link, The factory).
The broker needs one webhooks entry for the App (operations):
webhooks:
- name: slack-app
network: cluster
url: http://<svc>.<ns>.svc.cluster.local:8081/webhooks
events: [room.task_triaged, room.run_started, room.waiting_for_human, room.pr_opened, room.verdict_posted,
room.merged, room.reverted, room.budget_reached, room.ended, room.approval_closed, routine.paused]
repositories: [Smana/ai-native-ref]
secretFile: /etc/webhook/key # the key file the App mounts as webhookKeyFilenetwork: cluster; the port:8081is mandatory and the path is exactly/webhooks.eventsare the eleven above, by their full names: the broker refuses a short one. The App posts no line forroom.task_received,room.run_endedorroom.monitor_verdict, and none forroom.run_startedunless a channel’snotifylists it.room.approval_closedis what makes a card inert after the deadline or another surface’s decision, so a subscriber serving a channel withapprovals: truemust list it, androutine.pauseddelivers yield-breaker alerts for upkeep channels using bounded IDs and enums only.repositoriesis required.secretFileis the same key as the App’swebhookKeyFile: one or two base64 lines, each at least 32 bytes decoded.
Private repositories
Chat filings never trust a client-supplied dataClass: the broker and factory derive it server-side from repository visibility (private: true → internal, failing closed with access_unverified if visibility cannot be read). Filing or reading private-repository tasks from Slack requires all three independent locks at once:
- Lock 1 — Repository owner consent: set
spec.privateCode.acknowledged: trueon theRepositoryCR (checked bymaku-factory; absent →private_code_unacknowledged). See Private code. - Lock 2 — Internal planner route (and optional internal classifier): configure
human.intake.plan.internalinmaku-brokerso private-repository planning text never crosses a public-only model route (absent →private_planner_unavailable). For Tier-1 natural-language classification on private rooms, also enablemaku-gateway’sclients.classifierInternalandmaku.broker.chat.intents.internal.enabled: true(human.chat.intents.internalURL+internalAPIKeyFile; gateway). Without an internal classifier route, Tier-1 skips cleanly (private_classifier_unavailable) while Tier-0 phrases and pause captures continue offline with zero LLM egress. Internal rooms and DMs never store reply samples. - Lock 3 — Per-provider chat opt-in: set
global.slack.allowPrivateRepos: true(human.chat.providers.slack.allowPrivateRepos: true, defaultfalsebecause Slack retains message history on SaaS infrastructure; absent →chat_private_repos_disabled).
When Lock 3 is off (allowPrivateRepos: false): filing a private-repository task from Slack is refused (chat_private_repos_disabled) with a one-line pointer to the OIDC Web UI or maku CLI. Private-repository tasks filed from the Web UI or CLI still stay protected across Slack reads: my tasks, inbox, App Home, and thread reads return an internal room only as a restricted stub (room id, restricted: true, and Room UI link — no title, repository name, summary, or diff text), and the optional team feed posts only its phase and Room UI link.
Flows
Proposal. A mention is the request, in the person’s own words; no template. A mention carrying a GitHub pull request URL and review drafts a review plan (one read-only reviewer verdict on that pull request). The App calls handoff (and the broker’s plan re-validation for the canonical plan hash and offered workflows) and posts one plan message (Plan v1) in the thread: the repository, the issue (with the planner’s suggestion when the repository’s catalogue answered — no merge policy or outcome is named before a pull request exists), and one workflow card section (Workflow, Will run, Cost), then Confirm and Cancel. The broker stores the plan for 24 hours under its handoff id; the message’s metadata (factory_proposal: id, hash, author, rev, repo) carries the handoff id and revision rather than the plan body. A plan the composer wrote because the planner could not is labelled as such. When the plan’s author maintains the repository and the re-validation offers workflows, the message also carries a static select whose first option is Factory's choice: <workflow> and whose other options carry each workflow’s bare name, description and dollar ceiling (trimmed at a word boundary within Slack’s 75-character option description limit); nothing for anyone else, nor while a gap remains. Choosing a workflow pins it: the App has the broker re-validate the stored plan with {id, on_behalf_of, workflow} (no model call, no daily plan) and redraws the message as the next revision with its new hash; Confirm binds the hash shown, so a Confirm on the hash the select replaced is refused plan_changed. The broker checks the pin against the presser’s own catalogue, so a person who is not a maintainer is refused not_maintainer in an ephemeral line and the message stays as it was. A refused plan is one Not proposed: … line per closed reason. With planning off or unavailable on the broker, a mention answers the fixed line Planning is not available here; file on GitHub.. In a thread that already holds a proposal whose planner later went away, a reply or a mention is told Not re-planned: this deployment no longer plans from Slack; … and nothing is planned beside it. The two refusals made before the planner is asked — a request past 16 KB and a thread already filed or cancelled — stay the proposal’s, with its lines, and count as a proposal mention.
- A slow plan says so. When
handoffhas not answered after 4 seconds, the App posts onePlanning…message in the thread. The proposal then replaces that message in place (same message, same buttons rules); when Slack refuses the edit, the proposal is a new message and the status is edited toPlanning finished.. A refusal also edits it toPlanning finished.and says the refusal below it. A plan that answers inside 4 seconds posts no status. - A refused first mention orients.
not_linked,repository_not_allowed,repository_not_served_here(the request names a repository this channel does not serve),repository_served_elsewhere(one the factory serves, but not from this channel) andno_writeare causes the person can fix, so the App says the cause, the fix (@factory link, or the repositories this channel serves) and the rooms page in achat.postEphemeralonly the mentioner sees (chat:writecovers it, no new scope), in the thread. When Slack refuses the ephemeral, the same line is posted in the thread. The thread itself stays clean. - A reply re-plans. A reply by the mention’s author continues the stored handoff (
handoffwith{id, answer}) and updates the same message in place, so its buttons always bind the plan they sit under. Changed sections are marked, and when a hashed field moved (the repository, the budget, an issue’s title, body or class, the roles or their order) the header saysrequires a new confirmation. At most 40 revisions per proposal. When Slack refuses the edit, the App posts the revision as a new message and makes the replaced one inert. - A plan that asks posts its question. When the planner asks one question (the plan still carries a
[NEEDS CLARIFICATION: gN …]marker, outcomeasked), there is nothing to confirm yet: the App postsThe plan needs one answer first. The planner asks: <question>, the planner’s recommendation, and how to answer (reply with the answer, or replyaccept the restto take the recommendation), and makes inert a proposal that plan supersedes. The author’s reply continues the handoff ({id, answer}, or{id, acceptRest: true}foraccept the rest); the broker asks at most one question per handoff (the planner), so the plan that comes back is the proposal with Confirm. The message’s metadata (factory_plan_question:id,author,rev) carries no plan, so nothing is filed from it. - Confirm is two steps, and the author’s alone. The proposal’s Confirm opens a Confirm card in the thread:
Confirm filing this task?, the exact line it files (<repository>: <title>, in a plain-text block the click echoes back), its ceiling, and Confirm and Cancel. The card’s Confirm (confirm:task) is held to the person who asked for the proposal (anyone else is told the proposal is theirs), toconfirmTTLfrom the card’s post time, and to the line it showed; the App checks all three, then the broker checks them again and files the stored plan throughPOST /api/chat/tasks(neverrun_create) withhandoffandplan_hash. The proposal then becomes the Filed line and the card turns inert. An expired card answersNot filed: this confirmation expired; press Confirm on the proposal again.; a newer revision, a repository the channel no longer serves, or a hash that no longer binds the plan is refused to the presser alone. Every other control of the proposal (Confirm, Cancel, the workflow select, the Confirm card’s Cancel) is the author’s alone too. - Cancel is the author’s alone (anyone else is told the proposal is not theirs); it rewrites the message into
Proposal cancelled by @author; mention me again to plan another., with no buttons, and starts nothing. - A check mark files nothing. Reactions are not read, and a ✅ reply is an ordinary reply.
- Someone else’s thread is theirs. A mention by another person inside an open proposal’s thread changes nothing there and is answered with an ephemeral line: start your own thread.
After filing, the thread answers questions. A reply in a filed thread is matched, lowercased and without its closing ?, . or !, against a closed list of phrases, and answered from the room the Filed line names — never from the thread’s text:
| Ask | Answer, from |
|---|---|
status, how is it going, where is it, what's the status | State:, the issue, Budget: $X of $Y (Z %) (so far until spendFinal), Merge: with the gate’s decision once there is one, and the room link (task) |
needs, needs me, what needs me | one line per task ordered by the five inbox types (question, plan, review, blocked, failed) with its action and link, or Nothing waits on this task right now. (inbox) |
changes, what changed, what has changed | the ten newest milestones, then More: the room page (task) |
the pull request, pr, the pr | its number and link, or No pull request yet in this room. (task) |
stop, stop it, how do i stop it, cancel | with stop in intentActions, a ten-minute confirmation (@<user>: stop task #<issue>? Its run ends now and the pull request stays open.) with Stop the task and Cancel; without it, I can't stop a run from here. Apply the `factory/stop` label on the issue, or use Stop on the room page: <link> and no broker call |
retry, try again | with retry in intentActions, a ten-minute confirmation (@<user>: retry task #<issue>? It runs again from where it stopped.) with Retry the task and Cancel; without it, I can't retry a task from here. Comment `/factory retry` on the issue, or open <link> and no broker call |
run it again deeper, retry deeper, retry with careful | with retry in intentActions, a ten-minute confirmation naming the target workflow and total ceiling (@<user>: run task #<issue> again under <workflow>? It may spend up to $<ceiling> in all.) with Run again deeper and Cancel; without it, same fallback as retry |
approve plan, approve the plan, split, split as planned | with plan in intentActions and the plan waiting for review, a ten-minute confirmation (Approve plan for #<issue> or Split task #<issue> as planned); outside that pause, This task has no plan waiting for review.; without plan, a line saying to comment /factory plan on the issue |
accept split, accept the split, decline split, decline the split | with split in intentActions and a split proposed, a ten-minute confirmation; outside that pause, This task has no split waiting for a decision. |
answer: <text> | with answer in intentActions and the task waiting on its author’s answer, a ten-minute confirmation quoting the answer; outside that pause, This task has no open question. |
steer: <text>, next run: <text> | with steer in intentActions, a ten-minute confirmation quoting the note, which queues it for the task’s next run (POST /api/chat/steers); a running harness never gets it |
amend: <text> | with amend in intentActions, a ten-minute confirmation quoting the amendment (POST /api/chat/amends), which every later brief quotes and the issue gets as a comment |
| anything else, from the requester | while the task waits on its author’s answer (answer on) or on its plan’s review (plan on), a ten-minute confirmation of the reply as the answer or the revise note; otherwise, in a channel with intents shadow or on, tier 1; otherwise the line below |
| anything else | I only understand these here: status, needs me, what changed, the pull request (and stop, which says how to stop), then the room link |
An answer is at most 12 lines; a longer one is cut at the tenth with …. Every value it quotes (a title, a need, a milestone) is escaped and stripped of control and invisible characters, so a <!channel>, a mention or a link in it fires nothing; the only links are the App’s own room page and the URLs the broker built. Each answer makes one sponsored read at most, and the disabled stop/retry and unknown answers none. A Filed line whose marker names no room is answered I can't tell which room this thread filed; open the room page from the Filed line above., a room the broker cannot read The room could not be read just now; try again in a minute., and a cancelled thread nothing.
Who may act. The reads above answer anyone in the thread. Everything that writes, the capture of a free-text reply as an answer or a revise note, and tier 1 belong to the task’s requester and its filer, as the thread store’s author and filer name them, and to nobody else, with one exception: a split decision is a maintainer’s card, so anyone in the thread may press Accept split or Keep as one, or say accept split or decline split, and draw its confirmation, which is then theirs alone, while the factory decides whether they maintain the repository (Only a maintainer of this repository can accept or decline a split.). A thread whose binding names neither, or that has none, gives nobody standing, and a thread store that cannot be read answers The factory could not be reached just now; try again in a minute.. Anyone else who asks for a write is told, alone, who may and where a maintainer does it instead (Only @<requester> or @<filer> can do this from Slack. Maintainers: apply the factory/stop label on the issue., or comment /factory retry, /factory plan, edit the issue, or the room page, by act), and that the reads stay theirs; their free text gets the unknown line, is never captured and never reaches the classifier. The confirmation itself is held to the person it names, as every Confirm is.
Changed in this release. Before it, anyone in a filed thread could draw the Stop or Retry confirmation and the factory then checked that the presser maintained the repository. Stop and retry from a filed thread, the plan card’s buttons and every new act except the split decision are now the requester’s or the filer’s alone. Another maintainer applies the factory/stop label, comments /factory retry or /factory plan on the issue, or uses the room page.
One thread, several tasks. A thread whose Filed lines name more than one room answers its reads for the latest one, and refuses a write or a capture with the room page of that latest room (This thread follows more than one task, so I won't guess which one you mean. Do it on the room page: …), alone to the person who asked. Tier 1 is not asked there.
Bounded text. The text a confirmation quotes is the text sent: control and invisible characters are dropped, then an answer and a revise note are one line of at most 2 KiB and 1 KiB, a steer note at most 1 KiB and an amendment at most 2 KiB, cut on a character boundary before the card is drawn. The broker checks the same bounds again.
The pause cards. When a task pauses on its plan (plan_review) or on a proposed split (split_proposed), and the thread’s channel lists plan or split in intentActions (a DM has both on), the thread gets one card instead of the waiting line. The plan card shows the plan’s task and its first five steps, quoted inert, with Approve plan and Split buttons, and says to reply in the thread with what to change (a revise note). The split card says the parts are on the issue and in the Room UI, with Accept split and Keep as one. A button opens a ten-minute confirmation for whoever pressed it (Approve plan for #<issue> and the like); the plan’s buttons are the requester’s, the split’s anyone’s in the thread. A restricted room’s card is its Room UI link alone, with no plan, issue number or button. One card is posted per pause round: the same pause announced again posts nothing, and once the round is decided (from Slack, its revise included) the card is rewritten to its outcome and its buttons go.
Stop, retry and answering a question. When a channel lists stop in intentActions, room.waiting_for_human lines carry a Stop button; when it lists retry, escalated room.ended lines carry Retry and Run again deeper buttons (merged, stopped and completed end lines carry none). Pressing a button posts the same ten-minute confirmation named to the presser as typing the phrase. When a channel lists answer in intentActions and the task waits on a scoper question (needs_author or an open scope.question on an escalated or waiting task), any reply that is not one of the closed phrases above posts a ten-minute confirmation named to the reply’s author (I understood: answer "<exact words>") with Answer and Cancel. Only the named presser may confirm or cancel (Only @<user> confirms this.); after ten minutes a press answers This confirmation expired. and clears the buttons. Confirm calls POST /api/chat/stops, /api/chat/retries, or /api/chat/answers under human.chat.providers.slack (with the click as its identity under Socket Mode and the raw signed request as proof under Events API; legacy human.slack* blocks and /api/slack/* routes remain accepted for one release cycle and cannot be mixed with human.chat), which re-resolves the GitHub login from chat_links and forwards to the factory’s POST /v1/tasks/{task}/stops, /retries and /answers to verify standing (repository maintainers, or for stop/retry the task’s requester where access.start lets them start, with write access) and apply the transition; the confirmation message is rewritten in place (Stopped., Retried., Stepped up and queued., Answered — scoper restarted., Answered — a maintainer will restart the task., Only a maintainer of this repository can stop a task., Only the issue author or a maintainer of this repository can answer this question., This task is not running., This task is not escalated., This task has no deeper workflow to step up to., The task's cap leaves less than a whole run, so a retry would only stop again: raise the cap on a new task., Stepping up costs more than the cost confirmed for this task. To run the deeper workflow, start the task again with it (New task, or maku start --workflow <name>), which confirms its higher cost., This task is not waiting for an answer.).
Understanding a reply
A reply in a filed thread is read in two tiers. Tier 0 is the table of phrases above, always first: a reply it knows, or a requester’s reply the task’s pause captures, never reaches tier 1. Tier 1 reads a reply tier 0 does not know, in a channel with intents shadow or on (or in a DM, which follows the broker’s mode), from the thread’s requester or filer, in a thread that follows one task, from a linked Slack user, against a broker that serves intent_classify. The broker makes one bounded call on a cheap model, through the model gateway’s classifier route (gateway), shown the reply alone and the thread’s phase as one closed word, never the thread’s history, and maps the reply to one of the intents status, needs, changes, pr, steer, amend, stop, retry, retry_deeper, answer, the plan decisions plan_approve, plan_revise and plan_split, the split decisions split_accept and split_decline, or unknown (stepping up once via retry_deeper is the one workflow change available from Slack). A plan, split or answer label counts only while the task waits on that decision. A private repository’s reply goes only to the gateway’s internal route. A label with a confidence under the threshold, or one the model got wrong in shape, is unknown.
In shadow nothing a person can see changes. The thread gets exactly today’s unknown line once the classifier has answered, and the App counts maku_slack_intents_total{tier="1", intent, outcome="shadowed"} and logs the label, its confidence, the phase and the reply’s SHA-256 and length, never its text. A classification the broker refuses (an author who is not linked, a cap reached, a model that timed out) leaves the same line and counts outcome="refused"; a broker without the tool counts not_enabled. A channel set to shadow, or an answer the broker marks shadow: true (its human.chat.intents.mode is shadow), is shadow whatever else holds.
Live is a channel set to on, or a DM, under a broker whose mode is on. A read label (status, needs, changes, pr) is answered as its phrase is (outcome="answered"). A write label posts the confirmation its phrase would, with the label’s text span (or the whole reply) as the quoted text (outcome="proposed"); its act must be on where the reply was made, or the thread gets the line saying it is off (outcome="act_off"). An unknown label, which is also what a low confidence or a label outside the task’s pause becomes, gets the unknown line (outcome="hinted"). No reply approves, steers, stops or confirms anything by itself: the most a label earns is a confirmation only the requester can press.
What shadow keeps is the channel’s choice. With collectReplies: true each classified reply is stored, with its label, through the redactor, for human.chat.intents.retentionDays (30 by default) and then deleted; the broker’s retention job removes it with the rooms. Without the flag nothing is stored, so the platform holds no copy of thread text. maku-broker intent-samples exports what is stored, to label it and to measure the classifier (operations).
File. The Confirm card’s Confirm files the task only when all of these hold: the card is the bot’s own, re-read from Slack, and binds the thread’s latest proposal with a matching hash; the presser is the proposal’s author; the card is younger than confirmTTL; its line is the one it showed; the user is linked, in onBehalfOf.slack or by a self-serve link, and the repository is still served where the proposal was made. The broker files the stored plan for slack:<team>/<user> and binds every room it made to the thread in its own thread store, so a second Confirm on any revision is a duplicate and files nothing. A thread too long to read (over 5 pages) fails closed: nothing is edited or filed.
Every refusal is said to the presser. A Confirm that filed nothing is one ephemeral line naming the reason and its fix:
| Case | Line |
|---|---|
| The channel no longer lists the proposal’s repository | Not filed: <repo> isn't served in this channel; ask an operator to add it to the channel's repositories. |
| The proposal’s hash fails, or a newer revision is in the thread | the plan changed; press that message's buttons |
| Another person pressed | the proposal is its author’s |
not_linked | Not filed: @u is not linked to a GitHub account here; mention me with link to link it, then press Confirm again. |
not_a_maintainer | Not filed: @u's GitHub account may not start tasks in <repo>; ask a maintainer. |
repository_not_allowed, repository_not_owned | ask an operator to add it to the Slack App's repositories |
principal_budget_exhausted | the Slack App's budget for today is spent; press Confirm again tomorrow |
daily_task_cap | the factory's daily task cap is reached; press Confirm again after 00:00 UTC |
confirm_expired, text_hash_mismatch | press Confirm on the proposal again |
replay_detected | Already handled: that click was received once. |
| Any other code | Not filed: <the broker's refusal> |
A passing failure (kill_switch, principal_task_cap, link_unverified, ledger_unavailable, tasks_unavailable, intake_failed, meter_unpriced, unavailable, rate_limited, the factory or Slack unreachable) says to press Confirm again.
Direct messages
A message in your DM with the App needs no channels: entry. The commands answer at once, in the DM; anything else is a request, planned over the repositories the broker answers for you (GET /api/chat/repos: the repositories you may file into from chat, under the lowest of your caps). With one eligible repository the plan names it; with several, the planner asks which one; a private repository chat may not file into is named once, with where to go instead. Each request is its own thread, rooted at your message, so several DM tasks stay apart; its proposal, Confirm card and narration all happen there. A DM thread is narrated like a channel with no settings (the default notify list, no decision card), except that a DM is the requester’s own cockpit: plan, split, answer, steer and amend are on there, so the pause cards, the phrases and the captures above work in it, and tier 1 follows the broker’s mode. stop and retry, which spend money, stay off in a DM until a DM has a configuration of its own: their phrases answer where to do it, and a Stop or Retry confirmation clicked in a DM is dropped.
Commands
A few messages are answered without a model, matched whole (case, extra spaces and a closing ., ! or ? aside; a sentence that holds one is a request): help; inbox, needs me or what needs me (what waits on you, with each task’s Room UI link and the channel its thread is in); my tasks, tasks or status (your open rooms, restricted ones as a count); link and unlink (self-serve link). inbox and my tasks read the broker’s GET /api/chat/home for you, once. In a DM they answer inline; as a channel mention (@maku inbox) they answer in a direct message from the bot, with a one-line pointer in the thread, because they name your rooms across the workspace. Inside a thread, status is that thread’s question, not my tasks. Every title or need they list is quoted inert.
The team feed
With dmFeedChannel set, a task filed from a DM posts one line in that channel when it is filed and updates the same line in place when its pull request opens, it ends or it merges: <repo> · issue #N <url> · PR #N <url> · <phase> · <Room UI link> · @<login>. The line never carries the DM’s words, the issue title or a button. A task on a private repository (an internal room) says only its phase and its Room UI link. Events of one room are handled one at a time, so the feed is one message per task.
App Home
Opening the App’s Home tab publishes a read-only view for you: whether your Slack account is linked (and as which GitHub login), up to ten needs waiting on you with their Room UI and Slack thread links, and up to ten open rooms; restricted rooms (internal rooms you may not read from chat) are a count with the Room UI link. It reads the broker’s GET /api/chat/home once per open. With no active link it says so and how to start linking (link in a DM); it does not promise that linking will succeed: a deactivated account reads as unlinked. Nothing on the Home writes anything.
The card
One forge.push wait is one card in the thread it was filed from, and the card’s two buttons are the only thing in a thread that decides anything (security has the route, the standings and the closed codes).
When a card is drawn. All four hold: the room was filed from Slack (so its thread is in the map), the channel has approvals: true and lists the wait’s repository, the class is forge.push, and the event carries an approval id and a branch inside the run pattern. Everything else keeps today’s text line, which sends a person to the room page: forge.pr, forge.other, mcp.write, shell.high, egress.new, and a forge.push without a branch. One approval, one message: the App reads the thread, finds the card whose tagged metadata names the same approval id, and rewrites it in place, so a webhook redelivery — or a restart that lost the in-memory delivery set — cannot double it. A thread too long to read posts the card anyway and counts too_long.
What it shows. The class prose the room page shows, the branch, the deadline as Slack’s own date token (the client renders it in the reader’s timezone, so the App holds neither a clock nor a zone in the message), the approval’s id, the buttons Allow the push and Deny, and Open the room. No agent text, no reason, no GitHub login, no other person’s name: invariant 7 holds over the card as over every line. A card drawn after its deadline is posted already inert — prose and room link, no buttons — because the store would refuse the press; the App’s clock decides only what is drawn, never what is decided.
A press. The buttons are decide:approve and decide:deny, valued {"room","approval","branch"}, which is a hint and never authority: the broker re-reads the approval, the class, the run’s branch and the clicker’s standing, and a card that outlived the state it was drawn from decides nothing. Slack answers a press within 3 seconds, so the one door verifies the signature, deduplicates and enqueues, and a worker does the rest. The clicker alone is told what became of it, in one fixed sentence in the card’s thread (an ephemeral): Decided: the push goes out., Not decided: your GitHub account cannot write to this room's repository., and so on — one line per closed code, naming no repository, branch, login or approver, and never repeating a broker’s prose. Only a recorded decision takes the buttons off.
Teardown. Two chat.update writes, both best effort and both idempotent: the press’s own, which turns the card into its header, class, branch, approval and the clicker’s line; and the broker’s room.approval_closed, which rewrites the same card for any close — approved, denied, expired, superseded — whoever decided, the room page included. A press names no room, so the room link leaves the card on the first write and comes back on the second. A failed update is logged as card update failed and counted error, and it is never retried: the card is a view, the store’s single-decision fence is what refuses a stale press, and three given-up webhook deliveries would disable the subscriber.
A close with no card is silent. In a channel with approvals: true, a wait that drew only a text line (another class, or a forge.push without a branch) gets no close line either: the thread already told that wait’s story, and its decision lives where its wait pointed, on the room page. A channel with approvals off draws no cards at all, and if its notify lists room.approval_closed its close is the thread’s line, The approval closed: <decision>. Room: <url>. A channel removed from channels: after its card was posted takes that same text-line path: the card keeps its buttons, and a press there is ignored before any broker call: the App does not serve that channel, so nothing decides.
Self-serve link
The link routes answer Referrer-Policy: same-origin (the rest of the rooms UI is no-referrer): under no-referrer a browser sends the form POST’s Origin: null, which the broker’s origin check refuses.
A Slack user links themselves instead of waiting for an onBehalfOf.slack entry in git (design):
linkin your DM with the App (or@maku linkin a served channel). The App calls the broker’schat_link_code(aliasslack_link_code) with its team and user id (and handle and display name, withusers:read) and answers in a direct message from the bot (only that user sees it; the first line is the labelled link and the bare URL follows on its own line; it says never to send it to anyone; the thread gets a one-line pointer, never the URL; if the DM fails, an ephemeral in the channel, not in the thread, is the fallback, and the Slack error is logged) withhttps://rooms.<domain>/link/chat/slack?code=<code>(alias/link/slack): single use, 10 minutes, replacing their earlier code.- The user opens it, signs in to the rooms UI (your identity provider), and sees
Link Slack user @handle (<id>) in workspace <team> to your account (GitHub: @login)?, the display name below it marked as set by that user, and “never confirm a link someone sent you”. Link posts the form, from the web UI’s session only (a maku or MCP token is refused); the broker recordschat:slack:<team>/<user> → the accountinchat_links. - From then on their Confirm files sponsored by that account’s current GitHub login, still held to the repository’s standing: a link grants nothing the account did not have.
unlink in your DM (or @maku unlink in a channel) removes the user’s self-serve link (never a config entry); the page, opened without a code, lists the account’s links with an Unlink button each. Refusals on the page: the code expired or was used, the code is for another workspace, the account has no GitHub link (with the broker’s GitHub account link on, the page sends them to /link/github), it holds 5 Slack users already, or the Slack user is linked to another account (it unlinks first: a link never moves silently). With human.chat.providers.slack off (and no legacy human.slackLink), both commands answer that self-serve linking is not turned on. link and unlink are the whole mention; a draft whose title holds the word is a draft.
Both sides must opt in: the broker’s human.chat.providers.slack (principal, workspace, optional linkRepository; integration) and the factory’s onBehalfOf.slackLinks (The factory). A user in onBehalfOf.slack keeps that entry whatever they link: the config wins.
Follow and the end line
The broker’s webhooks name a room; the App finds its thread in the map and posts under three notification classes:
| Class | Mention | Shape |
|---|---|---|
needs_you | Yes, the one person who can act (author for needs_author, otherwise filer) | What is asked, one recommended action (button, reply, command, or room link), and what happens if nothing is done (If nothing is done, it stops in 7 days., from escalatedHours, If nothing is done, it stays parked., or If nothing is done, it stays parked until the deadline.) |
changed | No | One line in the thread (room.task_triaged, room.run_started, room.pr_opened, room.stepped_up, room.verdict_posted, room.budget_reached, room.approval_closed) |
done | Yes, once | The end line (room.ended when not escalated, room.merged, room.reverted) |
By default, the App posts five transitions (room.task_triaged, room.waiting_for_human, room.pr_opened, room.stepped_up, room.ended):
room.task_triaged(changed):Started #<issue>. Room: <url>(after onetaskread for the issue number, orStarted. Room: <url>), with no mention.room.waiting_for_human(needs_you): the card forforge.pushwhenapprovals: true; when the task was bounced with a scoper question (needs_author),<@author> The scoper asks: <question>. Reply to answer. If nothing is done, it stops in 7 days.(falling back toNeeds youwhen no question text is recorded), never an end line; otherwise<@filer> Needs you (<reason>)— carrying the merge gate’s decision (waits for a human: policy <name> is in shadow here,waits for a human: touches a protected file, …) when the task waits on a merge — plus the room link and what happens if nothing is done.room.pr_opened(changed):Pull request #<pr> opened: https://github.com/<repo>/pull/<pr>, the repository from the event or the thread’s binding, with no mention.room.stepped_up(changed):Stepped up from <from> to <to> (<reason>) · new ceiling $<ceiling>., with no mention.room.ended: one end line per thread, stored as the room’s end message in the broker’s thread store: outcome (Merged #<pr>,Ended: done,Ended: stopped,Ended: escalated (out of budget),Reverted #<pr>), spend against budget ($0.16 of $2.00, markedso faruntilspendFinal), duration from the first run’sstartedAtto the last run’sendedAt, and the merge gate’s decision (merged automatically by policy <name>,merged on @<login>'s approval,waits for a human: touches a protected file). An escalatedroom.ended(state: failed) isneeds_you: it mentions the filer, offersRetryandRun again deeperbuttons (or/factory retrywhenretryis off inintentActions), and saysIf nothing is done, it stops in 7 days.(fromescalatedHours). A terminalroom.ended,room.merged, orroom.revertedisdone: it mentions the filer once (recorded indoneMentioned) and laterroom.mergedorroom.revertedevents editendTSin place (chat.update) without mentioning again (listingroom.revertedinnotifyalso posts a separate line without a second mention); ifroom.mergedarrives beforeroom.ended, it posts the end line with the one mention first androom.endedupdates it without mentioning again.
Upkeep channel and weekly scorecard
Channels with upkeep set receive scheduled routine activity without needing @factory proposal settings on the parent channel (repositories and maxCostUSD are optional on dedicated upkeep channels):
- Silent by default:
room.task_received,room.task_triaged,room.endedwithreason: "no_op", and non-escalated endings on rooms without an existing thread post nothing. - Top-level threads: the first qualifying event (
room.pr_opened,room.waiting_for_human, or escalatedroom.ended) opens a top-level channel message and binds the room in the broker’s thread store, so subsequentroom.mergedorroom.revertedtransitions update the thread in place and interactive thread replies work as on interactive tasks. - Breaker alerts:
routine.pausedposts a channel alert naming the repository, routine, and breaker reason, with a direct link to.github/agent-factory/upkeep/<name>.mdon the default branch. - Weekly scorecard (
upkeep.digest.cron): when the 5-field UTC cron matches, the App calls<brokerURL>/api/routines/digest?window=7dover its existingbrokerURLconnection (zero new NetworkPolicy egress) and postsWeekly upkeep scorecard (7d):summarizing runs, merge rate, spend, and paused state per active routine, skipping weeks where all counts are zero.
State
- The thread map is the broker’s (
/api/chat/threads, one row per room, scoped to the App’s workspace by its principal): channel, thread, repository, author, filer, and the per-room state the App patches (end message, done mention, coordination marker, feed message). A thread hosts several rooms. The broker expires rows it no longer needs; the App keeps nothing on disk and needs no Kubernetes access. - One replica. Slack events (on
event_id, on either transport), button presses (on the approval, the user, the action id and the action’s ownaction_ts, so Slack’s retry of one press is a duplicate) and webhooks (onwebhook-id) are deduplicated in an in-memory LRU, so a restart can post one duplicate line. Two concurrent redeliveries of one id can both pass the check before either finishes (known race): the worst case is one duplicate thread line, and for a press the store’s single-decision fence still records one decision. - The message metadata is tagged. Every message the App posts carries
event_typeand its payload:factory_proposal(id,hash,author,rev,repo),factory_filed(repo, theroomit started, andcancelledon a Cancel’s),factory_approval(approvalId,class,branch) on a card, andfactory_act(action,room,presser,expires, plustexton a text act (answer,plan_revise,steer,amend) andcard, the pause card’s ts, on a Confirm opened from one, rewritten tofactory_act_closedonce resolved) on a stop, retry, answer, plan, split, steer or amend confirmation. The tag is what finds a card again — a webhook redelivery rewrites it instead of posting a second one, androom.approval_closedreads the branch back from it — so a card posted without its tag would be doubled. - Switches, all off by default, and they do different things. The broker is the authority: its
POST /api/chat/decisions(served with a chat provider; a legacy install’s synthesized provider needshuman.slackDecide) decides, and a broker that does not serve it answers404, so a press says the factory could not be reached. The channel’sapprovalsis who gets the affordance: without it a wait is a text line and a press never reaches the broker. Under Socket Mode the card has buttons only when the App’sallowUnsignedDecisionsand the broker’s provider setting both allow unsigned decisions; under the Events API, the Interactivity request URL must be set before the first card with buttons is posted. - A webhook key the App cannot read answers
503 no_key. That is not a hold: the broker retries a receiver’s non-2xx after 10s, 1m and 5m, then counts a failure, and three given-up deliveries disable the subscriber until itsgenerationis bumped. A rotated or missing key, or a Slack outage that makes the App answer502, therefore loses those events and can disable the subscriber. Recovery: fix the key (or wait for Slack), bumpgenerationon the broker’swebhooksentry and restart the broker (awebhookschange applies only at restart); the events of the disabled window are not replayed, and a room’s page still shows its state. A failed card update is never one of these: it is logged and counted, and the close it was rewriting is answered200. - Series:
maku_slack_intents_total{tier, intent, outcome}counts what tier 1 read (tieris1,intentone of the sixteen labels,outcomeshadowed,refused,not_enabled,answered,proposed,hintedoract_off); the thread’s own question counter,maku_slack_thread_answers_total, keeps counting tier 0.maku_slack_app_requests_total{route, outcome}(events,webhooks,interactions; the closed list isnot_linked,repo_not_allowed,repo_not_served,repo_served_elsewhere,no_write(a first mention refused for that cause, see the flows),drafted,edited,proposed,asked,updated,reposted,multi_issue,answered,refused,filed,posted,card_posted,card_updated,card_closed,decided,ignored,not_enabled,not_supported,duplicate,link,unlinked,ok,bad_request,bad_signature,no_key,too_large,too_long,busyanderror).busyis an event or a press answered 503 because the App’s 8 workers and its 64 queued items are all taken, or it is shutting down: Slack retries it. A press’s own words aredecided(a decision was recorded),duplicate(the fence had already closed it),not_supported(the class is notforge.push),refused(any other closed code the broker answered) anderror(the broker, Slack or the clicker’s line failed). maku_slack_proposal_updates_total{action}counts the proposal’s actions (mention,reply,confirm,cancel,repost), andmaku_slack_thread_answers_total{question}the filed thread’s replies by their tier 0 reading (status,needs,changes,pr,stop,retry,retry_deeper,plan_approve,plan_split,split_accept,split_decline,steer,amend,answer,unknown): both on the broker’s metric set, served undermaku_.- Every refusal is one structured
Infoline withreason(the broker’s closed code, never the request’s text),channelanduser:proposal refusedfor a mention or a re-plan. With the three outcomes above,kubectl logsand the counter say which cause hit. - A refusal said once is remembered in memory (at most 4096): a restart can say it once more.
maku_slack_app_build_info{version}: the running build, constant 1.maku_slack_socket_state: 1 while the Socket Mode connection is up, 0 otherwise; theSlackSocketDownalert fires when it stays 0 for five minutes (alerts)./readyzdoes not follow it: no traffic is routed to the pod under Socket Mode. An envelope the worker pool refused counts as its route’sbusyinmaku_slack_app_requests_total.maku_slack_coordination_bind_abandoned_total: coordination parents whose room could not be bound to their thread within the 90 s budget; the family is then followed on its parent room page only.
What it never does
- Answer anything but a
forge.pushapproval, and only from a card’s button — or stop, retry, answer a task’s question, decide its plan or split, queue a note for its next run or amend it only from its confirmation’s button. A button click on the card the App itself posted (broker-verified under Events API, or refused by default under Socket Mode unlessallowUnsignedDecisions: true) decides that approval, forforge.pushonly, as the linked human the broker resolves — one class, no reason (the decision carries an empty one), and no steering; and a Confirm click on afactory_actconfirmation by the person it names stops a queued or running task, retries an escalated one, answers an open scoper question, approves, revises or splits a plan, accepts or declines a split, queues a note for the next run, or amends the task, as the linked human. Everything below still holds everywhere else. - Answer an approval, steer a run, or execute a command directly from a thread reply. A reply is an edit before filing (the author’s, re-planning a proposal), one of the closed phrases after (where a write, when listed in
intentActions, posts a confirmation card for the requester and never acts by itself), and never a way to steer a running harness:steer:queues a note for the next run. A reply that is only a ✅ files nothing; any other reply in a proposal’s thread from anyone else is dropped unread, and one in a filed proposal’s thread is answered and acts on nothing — sayingapprove,denyor/factory retryin the thread of a card does nothing at all, and neither does a ✅ on the card. - Decide any other class, from any surface it owns:
forge.pr,forge.other,mcp.write,shell.highandegress.newstay on the room page, and a press on a card for another class isnot_supported. - Merge. A card’s approval releases one push; merging stays a review of the current head on GitHub.
- Take a reason, or show one. A press sends a decision and nothing a model could read as a sentence, and no card carries agent text.
- Post a link code where anyone but its user sees it, or trust a GitHub login from Slack.
- Post room text or anything an agent wrote.
- Answer a slash command.
- Serve another workspace, an unlisted channel or a proposal it did not post.
- Hand its Slack token or its identity-provider client secret to the broker or a run.
What a live run shows
Offline, internal/chat/slack and internal/app/slackapp cover the proposal, the file, the card and the teardown; the two switches’ live behaviour is the design’s eight proofs, L1–L8, run on one channel with approvals: true. On the cluster, also confirm two things about Slack itself: conversations.replies with the reply’s ts and limit=1 returns the reply (not the thread’s parent), and a bot’s messages carry user=<the bot's U-id>. The check-mark filter relies on both. The App reads its own message metadata through conversations.replies, so metadata.message:read is not needed; confirm that too, and that the manifest’s bot scopes suffice.