@sumrco/cli 0.4.10 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/ARTIFACT-MANIFEST.json +4 -4
  2. package/THIRD_PARTY_NOTICES.md +3 -3
  3. package/ai/modules/mission/resources/decision-brief.rf.md +123 -0
  4. package/ai/modules/mission/resources/flow-actions.rf.md +19 -3
  5. package/ai/modules/mission/resources/flow-config.rf.md +46 -1
  6. package/ai/modules/mission/resources/flow-safety-boundaries.rf.md +48 -4
  7. package/ai/modules/mission/resources/lifecycle/inbox-session-start.lc.md +87 -0
  8. package/ai/modules/mission/resources/lifecycle/session-start.lc.md +57 -0
  9. package/ai/modules/mission/resources/overview.md +77 -8
  10. package/ai/modules/mission/resources/stage-closeout.rf.md +12 -1
  11. package/ai/modules/mission/resources/stage-delivery.rf.md +65 -6
  12. package/ai/modules/mission/resources/stage-intake.rf.md +18 -0
  13. package/ai/modules/mission/resources/stage-orchestration.rf.md +205 -9
  14. package/ai/modules/mission/resources/stage-planning.rf.md +102 -21
  15. package/ai/modules/mission/resources/stage-pull-request.rf.md +27 -8
  16. package/ai/modules/mission/resources/stage-quality.rf.md +13 -1
  17. package/ai/modules/mission/resources/task-transfer-authorization/overview.md +10 -4
  18. package/ai/modules/mission/resources/team-members/delivery-lead.tm.md +1 -0
  19. package/ai/modules/mission/resources/team-members/implementer.tm.md +2 -0
  20. package/ai/modules/mission/resources/team-members/orchestrator.tm.md +49 -0
  21. package/ai/modules/mission/resources/team-members/planner.tm.md +4 -3
  22. package/ai/modules/mission/resources/team-members/pr-writer.tm.md +4 -1
  23. package/ai/modules/mission/resources/team-members/quality-lead.tm.md +1 -0
  24. package/ai/modules/mission/resources/visual-plan.rf.md +3 -3
  25. package/ai/modules/mission/resources/workflows/daily-triage.cmd.md +45 -8
  26. package/ai/modules/mission/resources/workflows/full-delivery.cmd.md +11 -6
  27. package/ai/modules/mission/resources/workflows/mission-cycle.cmd.md +14 -8
  28. package/ai/modules/mission/resources/workflows/orchestrate.cmd.md +67 -0
  29. package/ai/modules/mission/resources/workflows/planning-only.cmd.md +9 -6
  30. package/ai/modules/mission/resources/workflows/pr-assist.cmd.md +7 -2
  31. package/ai/modules/mission/resources/workflows/standard-delivery.cmd.md +11 -6
  32. package/ai/modules/mission/sumr.module.yaml +32 -5
  33. package/index.js +1295 -1062
  34. package/index.js.jsc +0 -0
  35. package/package.json +2 -2
  36. package/sbom.cdx.json +19 -19
@@ -10,15 +10,33 @@ order: 65
10
10
 
11
11
  # Mission Orchestration Stage
12
12
 
13
- One controlling session drives a run of an approved batch. Mission never launches an agent. It records the run,
14
- offers typed actions, and refuses every write to a run-managed Mission that does not carry a current credential. The
15
- session's host launches each worker with its own subagent tool.
13
+ One controlling session drives a run of an approved batch. Mission launches a host agent CLI only from `run drive`, and only
14
+ for a run whose controller credential the operator supplied; everywhere else it never launches an agent. It records the run,
15
+ offers typed actions, and refuses every write to a run-managed Mission that does not carry a current credential. A chat session's
16
+ host launches each worker with its own subagent tool; `run drive` is the headless alternative that needs no chat session.
17
+
18
+ ## Propose, then create
19
+
20
+ Before `batch create`, let Mission propose the batch instead of writing the definition by hand:
21
+
22
+ ```bash
23
+ sumr mission batch propose --out batch.json
24
+ ```
25
+
26
+ `batch propose` reads recorded facts only, offline and read-only: the approved Missions with open work that no open run
27
+ controls, each accepted plan's `## Mission Dependencies` list, the tracker sub-issue links `mission sync` recorded, and the
28
+ files each plan names. It writes the definition to a new file (it never overwrites one) or prints it, and it creates,
29
+ revises and approves nothing. Dependencies follow the plans; Missions whose plans name a common file share a `files-N`
30
+ concurrency group, so they never run together. Every approved Mission it leaves out is listed with the reason, including one
31
+ that waits for a Mission that cannot join; a Mission with a Mission blocker, or with a task blocker that names a person, is left out too. The proposal warns when the files git tracks cannot be listed, and when a dependency, or a Mission left out, came from a recorded tracker link, which holds an issue number and no repository: check each such dependency before `batch create`. `--json` adds each dependency's source, each group's shared paths and the
32
+ exclusions. Read the facts, edit the file to narrow or reorder it, then `batch create --from`, and have a person approve the
33
+ batch revision as before.
16
34
 
17
35
  ## Start or resume
18
36
 
19
37
  ```bash
20
38
  sumr mission batch show <batch-id>
21
- sumr mission run start <batch-id> --controller <session-id>
39
+ sumr mission run start <batch-id> --controller <session-id> [--max-attempts <n>]
22
40
  ```
23
41
 
24
42
  `run start` prints the controller token once, as `SUMR_MISSION_CONTROLLER_TOKEN=<value>`, and `run resume` issues a
@@ -41,6 +59,8 @@ Act on each action, then read the actions again:
41
59
  | Action | What the controlling session does |
42
60
  | --- | --- |
43
61
  | `dispatch_worker` | Create and ready the Mission's workspace when the brief has none (dispatch is refused without a ready one), run `run dispatch <run-id> <issue-key>`, launch one worker with the brief and the lease, then record the host's handle with `run launched <run-id> <issue-key> --attempt <n> --agent-id <handle>` |
62
+ | `rework_member` | A paused integration stopped on a conflict in this delivered member. Run `run dispatch` for it like a `dispatch_worker` (the member is a new attempt with its own lease) and launch a worker with the brief the action carries; see Rework after a paused integration |
63
+ | `escalate_member` | The member spent its attempts. Run the command the action names, `sumr mission block <issue-key> --reason <text> --ask <who>`, so the Mission records who can answer; the action ends and the run goes on with every other member. See Attempt limits |
44
64
  | `await_worker` | Wait for the worker. Renew its lease with `run renew <run-id> <issue-key> --attempt <n>` while it works, and end the attempt with `run attempt-end <run-id> <issue-key> --attempt <n> --outcome done\|failed\|abandoned` when it returns |
45
65
  | `review_task` | Launch an independent, read-only reviewer for the submitted task, then import the evidence it returns with `review --from` |
46
66
  | `reconcile_attempt` | Nobody confirmed a dispatch, or a takeover left a worker unsettled. Check the host for the worker, then record `run launched` (a dispatch whose lease is still valid) or `run attempt-end --outcome failed\|abandoned`. Never dispatch that member again before it is settled |
@@ -56,8 +76,11 @@ A `dispatch_worker` brief names:
56
76
 
57
77
  - the Mission, its exact plan hash and revision, and its dependencies and concurrency groups;
58
78
  - the workspace to work in;
59
- - the checks the accepted plan's Validation section names;
60
- - the steps: the Mission commands to run, in order, for every task of the plan;
79
+ - the checks the accepted plan names: its automated checks when it declares any, otherwise the lines of its Validation section;
80
+ - the merge-forward ref, which is the target branch of the run's latest integration that is not abandoned, else the workspace's
81
+ base ref, else the configured base branch;
82
+ - the steps: the Mission commands to run, in order, for every task of the plan. The claim step leaves out `--confirm-branch`
83
+ when the worker claims in the Mission's own workspace or on its recorded branch, because that repeats the owner's choice;
61
84
  - the limits.
62
85
 
63
86
  Keep a brief short and durable: it points at the approved plan, the Mission state and the commands instead of retelling
@@ -69,7 +92,10 @@ Pass the brief as written. The worker:
69
92
 
70
93
  - works only in that workspace, and only on its Mission's tasks, in ledger order;
71
94
  - carries the lease in `SUMR_MISSION_LEASE_TOKEN` on every Mission command;
72
- - never pushes, merges, releases, writes to a tracker, imports a review, approves a plan or a batch, or records an automatic-cleanup approval;
95
+ - never pushes, merges a pull request, releases, writes to a tracker, imports a review, approves a plan or a batch, or records an automatic-cleanup approval; the one merge it makes is the base, or the commit a rework brief names, into its own Mission branch;
96
+ - merges forward before it submits its last task: it merges the latest base into the Mission branch, resolves any conflict,
97
+ reruns the checks, and names the merged commit in its evidence, so the submission is checked against the base it will meet;
98
+ a reviewer then judges the change from that merged commit to the head;
73
99
  - submits each task with its evidence and records the verification receipt, waits for the controlling session's reviews,
74
100
  completes the task, and ends its own attempt with `done` only when every task is done;
75
101
  - returns its submitted head and evidence paths, never just a claim that it finished.
@@ -78,6 +104,156 @@ A lease covers one Mission, records the workspace it was dispatched into, and ex
78
104
  message or environment only. The fence guards against mistakes, stale sessions, and workers that stray into another
79
105
  Mission; it is not isolation from a process that sets out to bypass it.
80
106
 
107
+ ## Attempt limits and escalation
108
+
109
+ Every failed or abandoned attempt of a member counts; an open or done attempt does not. A member's limit is the run's
110
+ `maxAttempts` (`run start --max-attempts`, else the batch definition's `maxAttempts`, else 3) plus the attempts a person
111
+ granted it. `--max-attempts` may lower the limit and never raise it; raising it takes a batch revision a person approves, or a
112
+ grant. A member at its limit, whose Mission records a blocker, or with a task blocker that names a person (`task block --ask` or
113
+ `--owner`; a question the question queue parks also cites a `question:<id>` reference as its evidence) is `needs_person`: it is never dispatched, holds no slot, keeps the run from
114
+ completing, and leaves its dependents waiting, while the run goes on with every other member. `run show` lists every reason that holds
115
+ it. A task blocker that names no one does not hold the member. An attempt that ends, failed or abandoned, parked on a question
116
+ is not counted: a worker that parks a question and stops did nothing wrong, and the run marks that attempt `parked`. A worker can
117
+ record a blocker itself, so an attempt is uncounted only when all of these hold: the task blocker names a person, its evidence is a
118
+ `question:<id>` reference (a free-text blocker still counts), it was recorded after the attempt started (an older one counts), the
119
+ question store records that question for this Mission and it was asked after the attempt started (a typed or older reference counts), and the
120
+ member has fewer than two parked attempts in the run (the third counts, so a loop of parks still reaches the limit and a person). When the person has answered, clear the task blocker with `sumr mission task unblock <issue-key> <task> --actor <actor>`.
121
+ Run it from the Mission's workspace, as the task's recorded actor, and with the controlling session's credential or, for a person,
122
+ after `run pause`; a Mission blocker blocks task changes until `sumr mission unblock` clears it, and that command clears only a Mission
123
+ blocker. When nothing is offered and the run does not complete, read the `run show` reasons.
124
+
125
+ For a member at its limit the run offers `escalate_member` until its Mission records a blocker, or until a task blocker names the person it waits on. A person then has two exits (the controlling session runs `unblock` and `finish` with its credential once the person decides, or the person runs them after `run pause`):
126
+
127
+ - `sumr mission run grant <run-id> <issue-key> --attempts <n> --reason <text>` previews the new limit. Show the preview to a
128
+ person and run it with `--yes --fingerprint <sha256>` only after they approve it, never on the controlling session's own
129
+ initiative; Mission cannot tell who runs it, so it is a human step by convention. After the grant, clear the blocker with
130
+ `sumr mission unblock <issue-key>` and the member is dispatched again.
131
+ - `sumr mission finish <issue-key>` with an abandoned disposition settles the member and blocks its dependents.
132
+
133
+ ## Rework after a paused integration
134
+
135
+ When `integration create` stops on a conflict, the integration pauses and records the member, the paths and the merge commits
136
+ before it. The run reads that: the delivered member whose latest head the paused integration stopped on is `needs_rework`, and
137
+ the run offers `rework_member` with the integration id, the paths and the commit to merge, which is the merge commit of the
138
+ member merged just before it (or the target's base when it was first). Dispatch it like any member. The rework brief tells the
139
+ worker to reopen the last task as its recorded actor, merge that commit into the Mission branch, resolve the conflict, rerun the
140
+ checks, resubmit, record the receipt, wait for fresh reviews, complete the task as that same actor, and end the attempt done. A
141
+ rework is a new attempt and spends attempts like any other. When an earlier rework attempt already reopened the task and stopped,
142
+ the next brief does not reopen it again: it says the task is already reopened (and that the commit may already be merged), or,
143
+ when the task was blocked since, tells the worker to read the task blocker, stop and report when it asks a person, and otherwise
144
+ clear it with `sumr mission task unblock <issue-key> <task> --actor <recorded actor>` as the recorded actor. A task blocker that names someone to answer holds the
145
+ member before it is dispatched (see Attempt limits and escalation), so a brief reaches a worker only with a blocker that names no one.
146
+ Every value a brief writes into a command is quoted when it holds a space or a shell character. A member that needs rework and waits
147
+ for a slot or a concurrency group says so in its reasons in `run show`.
148
+
149
+ Leave the paused integration alone until the member is delivered again, then abandon it and plan a new one: the new plan leaves
150
+ the member out while the paused integration still names its latest head. Integrate the reworked member together with the
151
+ members it merged, in batch order, and prefer the merge mode: if those members later land by squash or rebase, the reworked
152
+ member can stop again. If the controller abandons the paused integration first, the next integration stops again and offers
153
+ the rework then.
154
+
155
+ ## Headless driver
156
+
157
+ `sumr mission run drive <run-id> --host claude|codex` acts as the run's controller without a chat session: it reads the same typed
158
+ actions and works them in-process, so the run keeps going while nobody watches. Use it for a run whose members are approved and
159
+ whose workspaces need no setup you have not run yourself; use the chat loop above when a person steers each step. Mission launches host
160
+ agent CLIs only here.
161
+
162
+ ```bash
163
+ sumr mission run drive <run-id> --host claude --controller-token-file ~/.sumr-controller --dry-run
164
+ sumr mission run drive <run-id> --host claude --controller-token-file ~/.sumr-controller --workers 2 --allow-tools "Bash(bun run *),Bash(bun test *)"
165
+ ```
166
+
167
+ **Options.** `--workers` (default 1) bounds the host processes at once, reviewers included; `--sandbox seatbelt|bubblewrap|none`;
168
+ `--once` returns when nothing is left that the driver can do without a person, instead of polling every 30 seconds; `--dry-run` prints each
169
+ action with its redacted command and the names of its environment variables; `--json` adds the sandbox and a description of the write set, and issues no lease, creates no
170
+ workspace, records no run event and starts no process; `--lease-minutes`; `--turn-minutes` (1 to 240, default 120);
171
+ `--model`; `--allow-tools`; `--escalate-to`, who an escalation blocker asks (default `--actor`); `--controller-token-file`;
172
+ and `--allow-unsandboxed`.
173
+
174
+ **The credential.** The driver needs the run's current controller credential, from `--controller-token-file` or `SUMR_MISSION_CONTROLLER_TOKEN`.
175
+ Prefer the file: it must be a regular file you own, not a link, with no group or other permission bits, because a value in the driver's
176
+ starting environment can be read by same-user processes that read process arguments (`ps -E` on macOS, `/proc/<pid>/environ` on
177
+ Linux). The driver refuses a credential that is not the run's current one, a process that carries a lease, and a second driver for the
178
+ same run (the drive lock `locks/drive-<run-id>.lock`, first in the lock order; a lock a crashed driver left is removed by hand after you
179
+ check that no driver runs). Every child gets an explicit allowlisted environment: the controller credential, an SSH agent, git credential
180
+ helpers, git-host and tracker tokens, and MCP servers never reach a worker or a reviewer. A worker carries only its lease. When the run
181
+ completes, the driver rewrites the token file in place (mode 600) with the credential `run resume` issued, or prints it once.
182
+
183
+ **Sandbox.** Without `--sandbox` the driver uses Seatbelt on macOS, bubblewrap where `bwrap` is installed, and otherwise refuses to start
184
+ unless you pass `--allow-unsandboxed`, which also lets `--sandbox none` run; a requested sandbox that is missing refuses to start. A sandbox restricts
185
+ writes. A worker may write its workspace, its worktree's git directory, the common `objects` directory, its branch's ref and reflog
186
+ files, its own Mission's directory and lock, its private temporary directory and host home, the shared temporary folder on macOS, and the
187
+ device files a shell needs, and its attempt's relay outbox. It cannot write another Mission, the run record, the workspace registry, the common git `config` or `hooks`,
188
+ your home (so not the question and trace database `~/.sumr/state/mission/trace.db`), or the driver's own logs and journals, and it cannot read the controller token file, `~/.ssh`, or the git host CLI
189
+ configuration. A reviewer may write only its private temporary directory, its host home and the device files. Network stays open because
190
+ each host needs its model API, and reads stay open except those credential files: the sandbox is not a network or read sandbox. Known limits:
191
+ Codex's home (`~/.codex`, or `CODEX_HOME`) is writable for a Codex worker, except its configuration and instruction files, so its login and sessions can be rewritten;
192
+ the Seatbelt profile allows everything it does not deny, so launchd stays reachable and a determined worker could start an unsandboxed job; the shared temporary folder on macOS
193
+ is shared with other tools; a worker can write its own Mission's state; under bubblewrap every branch ref beside the worker's (all of `refs/heads` for a branch name without a slash) and the store's `locks` directory are writable and a missing protected Codex
194
+ file can be created. Without a sandbox, a worker can read the token file and your whole home, and its tool rules are best effort.
195
+ The sandbox hides only the files it names: other credential files (`~/.git-credentials`, `~/.npmrc`, `~/.codex/auth.json`) and the login keychain stay reachable, and a Seatbelt worker can list
196
+ process environments, so a controller credential given through the environment is exposed to it (`ps -E`): use `--controller-token-file`.
197
+ The host's process group is killed when its turn ends, but a process that left the group (`setsid`) survives and keeps its write access, and a background process that holds the host's output open keeps the turn from ending.
198
+ Tool rules are not confinement either: `Bash(bun run *)` runs any script a worker writes, and only the sandbox confines it.
199
+ Claude Code under a sandbox cannot use your keychain login: create a token with `claude setup-token` and export
200
+ `CLAUDE_CODE_OAUTH_TOKEN` (or set `ANTHROPIC_API_KEY`), or run unsandboxed. Codex keeps `~/.codex` and its login.
201
+
202
+ **What workers and reviewers may do.** A Claude Code worker runs headless with `--permission-mode dontAsk --permission-prompts none`, project
203
+ settings off, no MCP servers, and an allowlist of path-scoped file rules for its workspace and private temporary directory, `Bash(sumr mission *)`
204
+ and a few git subcommands (never `git push` or `gh`); `--allow-tools` adds rules of the form `Bash(<prefix> *)` for `bun run`, `bun test`,
205
+ safe git subcommands or `sumr mission`, and anything else is refused. A Codex worker runs `codex exec --sandbox workspace-write`; `--allow-tools` is ignored for it. Reviewers are
206
+ read only (`--sandbox read-only` for Codex, no Edit or Write tool for Claude Code) and carry no run credential. No launch ever uses a flag or mode that skips a host's
207
+ permission checks or its sandbox (`--dangerously-skip-permissions`, `bypassPermissions` or `auto` permission modes, `--dangerously-bypass-approvals-and-sandbox`,
208
+ `danger-full-access`): a guard refuses them.
209
+
210
+ **Worker turns and the agent name.** A worker attempt is a series of fresh headless sessions, called turns; Mission state, not the session,
211
+ carries progress. The driver records each turn's handle, `drive:<host>:<pid>:<start>:<sandbox>:<turn>`, in the attempt's `launched` event
212
+ (a sandbox of `none-unsandboxed` is the warning), renews the lease every third of its length while the attempt is open, and ends the attempt from
213
+ Mission state: `done` when every task is done, `failed` after a nonzero exit, a turn that changed nothing in the Mission, the turn cap of 12
214
+ or the turn time limit, and `abandoned` when you stop it. A turn that submitted a task and then crashed or ran over its limit keeps its attempt open for the reviews. Every attempt
215
+ and rework at a member uses one agent name: the agent the Mission's claim recorded, or `drive-<issue-key>` before any claim. After two
216
+ consecutive host exits that failed without changing any Mission, the driver stops launching and exits 1 with the host's last stderr lines, so a broken login does
217
+ not use up every member's attempts.
218
+
219
+ **Reviews.** For each `review_task` action the driver launches one reviewer per missing kind, takes its structured verdict and findings, supplies the base and head commits, plan
220
+ hash, kind, time and reviewer name itself, validates the input, and imports it from the member's workspace. Output that does not validate imports nothing and names the log; after two failed launches
221
+ for one kind and submission the review is left to a person. The driver never runs `git status` in a worker's workspace, and refuses to import into one that holds a nested repository.
222
+
223
+ **Members that wait.** A member waits, keeping its open attempt and lease but getting no new turn, while its Mission records a blocker or a task is blocked; a task parked on a question
224
+ (`question:<id>`) waits while the question store holds that question for the Mission and it is open. Once a person answers or withdraws it, the member's next session starts and the worker, as the task owner, unblocks the task; a reference the store does not hold for the Mission, or a store that cannot be read, keeps the member waiting like any other blocker. A sandboxed worker parks through the driver, described next. A member whose workspace awaits setup waits too: the driver prints the setup commands and
225
+ `workspace ready <id>`, and never runs them.
226
+
227
+ **Questions from a sandboxed worker.** The question and trace database stays outside every write set, because a worker that could write it
228
+ could answer its own questions. Instead the driver gives a sandboxed worker `SUMR_MISSION_RELAY_OUTBOX`, the path of its attempt's `outbox`
229
+ directory, which the driver creates owner-only and which is the one part of the attempt's directory a worker may write besides `tmp` and its host home.
230
+ With a lease and that variable, `sumr mission question ask` works as usual but sends the question to the outbox instead of the store: it writes one
231
+ request file (exclusive create, mode 600, renamed into place) with the fields `question ask` takes, the lease's run, attempt and token hash, and the Mission,
232
+ and parks the task on the question's id, which is known first (the hash of the repository id and the topic, or the id the store already holds for the
233
+ topic when the worker can read it). Its output says `relayed`. The worker writes no trace events: the driver derives them itself from the Mission
234
+ ledger, comparing the state it read when the turn started with the state it reads while the turn runs and when it ends, and records only the
235
+ kinds a worker's commands cause (claim, task started, blocked, unblocked, submitted, completed and reopened, verification recorded, finding resolved,
236
+ report recorded), so a review the driver imported or a blocker it recorded meanwhile is never attributed to the worker. It never takes trace events
237
+ from a worker: a `trace.events` request is refused by name.
238
+ The driver relays the outbox on every pass, at the end of each turn, and before it ends an attempt: each request is read without following a link, capped at
239
+ 384 KiB, and validated strictly; its lease must name this run, this member, this attempt and its token, the attempt must still be a worker's, and its
240
+ Mission must be the member's own. A question is recorded through the normal ask path, with the same checks (a `money`, `security`, `irreversible`,
241
+ `external_write`, `acceptance_criteria` or `owner_only` choice is never assumed), as asked by the attempt's agent name. Its `question.asked` event and
242
+ every derived event carry only what the driver knows: that agent name, the host it launched, the model it asked for, the session id it gave the turn,
243
+ the run and attempt, its own revisions, the workspace and branch from its workspace registry (never the ledger's), and `relayed: true` with `relayedBy`. The driver never records an answer or a withdrawal: such a request is refused by name. A refused request is reported as a
244
+ problem (the driver exits 1) and kept in the attempt's `logs` as `relay-refused-<name>`; a relayed one is kept there as `relayed-<name>`. The member then waits
245
+ on the question like any parked task, and an attempt that ends parked on a relayed question spends no attempt. If the store already held the topic under an
246
+ earlier repository id the worker could not read, the question is recorded under that id and the driver reports that a person must unblock the task.
247
+
248
+ **Escalation and rework.** For `escalate_member` the driver records the Mission blocker the action names with `--escalate-to` as who can answer, and goes on with every other member. For `rework_member` it
249
+ dispatches the member and launches a worker with the rework brief through the same launch, renew and end path. It never resolves a conflict itself and never runs `run grant`: more attempts stay a person's
250
+ approved step.
251
+
252
+ **Reconcile, stopping and recovery.** The driver acts only on attempts it can verify as its own, from the driver journal in the attempt's directory under the Mission store: it adopts a live worker of an earlier driver (still held to the turn limit, counted from the process's recorded start, so an adopted turn past it is stopped with its process group and fails), continues or ends an attempt
253
+ whose worker is gone (continue while its lease is unexpired, `done` when every task is done, otherwise `failed`), stops and abandons a superseded or never-launched one, and leaves every other attempt to a person.
254
+ The first SIGINT or SIGTERM stops new launches and lets running turns finish; the second stops the host processes and ends their attempts `abandoned`. On a pause or cancel the driver stops its workers and ends their attempts
255
+ `abandoned`; on a takeover it stops its workers and exits, leaving the attempts to the new controller. The driver never pushes, merges, approves, releases, or writes to a tracker.
256
+
81
257
  ## Integration and release
82
258
 
83
259
  When the workers have delivered, the controlling session integrates them serially: `integration create` merges each
@@ -104,6 +280,8 @@ Run every Mission command that records evidence or a review (`task submit`, `ver
104
280
  from the Mission's workspace, whoever runs it: outside it Mission refuses the write because the repository does not match the
105
281
  recorded workspace.
106
282
 
283
+ For many issues at once, from the backlog to one decision brief, follow the `orchestrate` workflow (`resources/workflows/orchestrate.cmd.md`); it uses this stage for its run.
284
+
107
285
  ## Host adapters
108
286
 
109
287
  Each host maps the actions to its own tools. A host without a subagent tool is advisory: drive the Missions one at a time
@@ -113,14 +291,17 @@ instead.
113
291
  | --- | --- | --- | --- |
114
292
  | Claude Code | the Agent tool, one worker per `dispatch_worker`, with the brief and the lease in its prompt | the agent id the tool returns | the completion notice; continue a worker with SendMessage |
115
293
  | Codex | the multi-agent `spawn_agent` tool, with the brief and the lease in its message | the agent id `spawn_agent` returns | `wait_agent`; continue with `send_input`, and finish with `close_agent` |
294
+ | Claude Code, `run drive` | a headless `claude -p` session per worker turn, started by the driver, with the lease in its environment | `drive:claude:<pid>:<start>:<sandbox>:<turn>`, recorded by the driver | the driver waits for the process and reads Mission state |
295
+ | Codex, `run drive` | a headless `codex exec` session per worker turn, started by the driver, with the lease in its environment | `drive:codex:<pid>:<start>:<sandbox>:<turn>`, recorded by the driver | the driver waits for the process and reads Mission state |
116
296
 
117
- Neither host is a new chat for the user or a background service. Workers run inside the controlling session's host.
297
+ Neither host is a new chat for the user or a background service. Workers run inside the controlling session's host, except under `run drive`, where the driver starts them as headless processes.
118
298
 
119
299
  Only Claude Code has run the six-step smoke test of `docs/operations/validation.md`, and it did so before the last integration,
120
300
  delivery and takeover fixes. The Codex run was last done at
121
301
  an earlier build, where Codex launched no reviewer and ended an attempt that a task still blocked, and could not be repeated on the
122
302
  current one. Treat Codex orchestration as advisory until that smoke test passes on it: drive the Missions one at a time, or repeat
123
- the six steps first.
303
+ the six steps first. This covers the chat path (`spawn_agent`); the headless driver launches `codex exec` itself and has its own live smoke run in
304
+ `docs/operations/validation.md`, which the owner runs with real logins before a release.
124
305
 
125
306
  Notes from running both hosts (Codex only as far as described above):
126
307
 
@@ -136,6 +317,16 @@ Notes from running both hosts (Codex only as far as described above):
136
317
  - A command the worker repeats without its lease may still exit 0 when it changes nothing (starting a task that is
137
318
  already started). Only a write is fenced.
138
319
 
320
+ ## Questions in a run
321
+
322
+ - A worker asks only about its own Mission (`sumr mission question ask`), with its lease; a lease cannot ask about another member or
323
+ an unmanaged Mission, and it can never answer or withdraw a question.
324
+ - Answering and withdrawing belong to a person or the controlling session. They never read or write the Mission file, so they need
325
+ no run pause and the run keeps going.
326
+ - A member whose task blocker has the evidence reference `question:<id>` waits on that question, not on a defect.
327
+ - When `run actions` offers nothing and members wait on questions, publish the decision brief
328
+ (`resources/decision-brief.rf.md`), then apply the answers file with `sumr mission question answer --from <answers.json>`.
329
+
139
330
  ## Manual intervention
140
331
 
141
332
  To change a run-managed Mission by hand, pause the run first: `run pause <run-id> --reason <text>`, with the controller
@@ -151,3 +342,8 @@ preview, then run the same command with `--yes --fingerprint <sha256>` to approv
151
342
  run stays paused, so a person editing by hand is not interrupted, and the new controller resumes it. A process that holds
152
343
  a worker's lease can never take a run over. Mission binds the approval to the exact preview but cannot tell who ran the
153
344
  command, so the approval is a human step by convention.
345
+
346
+ ## Attribution
347
+
348
+ The trace records who changes a Mission and with which model. Read any Mission from any directory and say who you are as
349
+ "Reading Any Mission, and Saying Who You Are" in the workflow overview describes.
@@ -20,10 +20,24 @@ sumr mission approve <issue-key> --revision <revision> --fingerprint <sha256>
20
20
  ```
21
21
 
22
22
  Plans are drafts until accepted. Acceptance rejects placeholder or incomplete content. Run the
23
- separate bound approval command only after the user or trusted automation has explicitly approved
24
- the exact presented revision and fingerprint. Never ask for approval from a status summary or plan
23
+ separate bound approval command only after the user, or trusted automation (an active autonomy grant, see
24
+ `sumr mission autonomy show` and the safety boundaries), has explicitly approved the exact presented revision and
25
+ fingerprint. `approve --grant <grant-id>` is allowed only for a revision that adds and removes no scope item against the
26
+ approved scope, for a Mission that already had an approved plan, before any of its tasks has started, and outside any batch
27
+ that still needs it; it asks `gh` nothing and records the approver as the grant. A grant compares only the task headings and
28
+ the list items under Scope and Acceptance Criteria, and it refuses any revision that is not plain Markdown it can read
29
+ exactly (code fences, HTML, quotes, tables, setext underlines, extra headings, non-ASCII spaces and the like), so the owner
30
+ approves those revisions. Never ask for approval from a status summary or plan
25
31
  path alone.
26
32
 
33
+ `approve` records who approved as the verified login of the authenticated `gh` session
34
+ (`plan.acceptedBy`, with `plan.approver.source: github`). When `gh` reports no login the approval is
35
+ refused and nothing is written: ask the person to run `gh auth login`. Pass
36
+ `--unverified-approver <name>` only when the person tells you to record the approval without a
37
+ verified identity; it is stored as `approver.source: unverified`. The login names the account whose
38
+ session ran the command, so an agent using the owner's session records the owner's login: wait for the
39
+ person's approval before you run it.
40
+
27
41
  Before asking the user to approve, run `plan show --json` and render all of these fields in the
28
42
  conversation or native approval surface:
29
43
 
@@ -31,17 +45,24 @@ conversation or native approval surface:
31
45
  2. Full plan Markdown, without summarizing away task detail.
32
46
  3. Every structured task.
33
47
  4. Every decision requiring input and contradiction.
34
- 5. Every risk.
35
- 6. Revision and immutable plan fingerprint.
36
- 7. Approval status and blockers.
37
- 8. The returned approval controls.
48
+ 5. Every assumption.
49
+ 6. Every risk.
50
+ 7. Revision and immutable plan fingerprint.
51
+ 8. Approval status and blockers.
52
+ 9. The returned approval controls.
38
53
 
39
54
  Do not present an approval control when `approval.eligible` is false. Unresolved product decisions
40
55
  and contradictions block approval; resolve them and register a revised plan first. Clients must use
41
56
  the command and argument array returned in `approvalPrompt.controls`, rather than reconstructing an
42
57
  unbound approval command. Discover all draft plans in the current repository with
43
- `sumr mission approvals pending --json`; render each complete presentation and approve selections
44
- individually because multi-Mission writes are not group-atomic.
58
+ `sumr mission approvals pending --json`; render each complete presentation.
59
+
60
+ For several plans in one sitting, after the person chooses, write their exact revisions, fingerprints and kept scope into a
61
+ manifest outside the checkout (`{"version":1,"entries":[{"mission","revision","fingerprint","keepScope"?}]}`, at most 50 entries) and
62
+ run `sumr mission approve --manifest <file>` once. Each entry is checked and written on its own and reported, so an interruption
63
+ leaves the earlier entries approved; run the same manifest again and they report `already_approved`. Write only the plans the person
64
+ approved, with exactly what they saw: a manifest is the person's act, not a shortcut around the presentation, and approvals are not
65
+ group-atomic.
45
66
 
46
67
  An implementation plan must contain one or more top-level headings outside code fences and block
47
68
  quotes in this exact form:
@@ -62,6 +83,10 @@ Plans record unresolved review material as list items under explicit headings:
62
83
 
63
84
  - Which compatibility behavior should be retained?
64
85
 
86
+ ## Assumptions
87
+
88
+ - Dates use the account time zone; changing it later is a one-line change.
89
+
65
90
  ## Contradictions
66
91
 
67
92
  - The acceptance criterion conflicts with a later comment.
@@ -71,7 +96,33 @@ Plans record unresolved review material as list items under explicit headings:
71
96
  - Existing automation may require migration.
72
97
  ```
73
98
 
74
- Use `None.` when a section has no entries. Checked decision items are treated as resolved.
99
+ Use `None.` when a section has no entries. Checked decision items are treated as resolved. Assumptions are listed, never
100
+ blocking: the heading must start with `Assumptions`, and bulleted or numbered items count.
101
+
102
+ ## Automated and Manual Checks
103
+
104
+ Say which checks an agent runs and which only a person can do. Put `### Automated checks` and `### Manual checks`
105
+ subsections, written as list items, inside each `### Task N` and inside the Validation section (a level 1 or 2 heading named
106
+ `Validation`, `Verification` or `Testing`):
107
+
108
+ ```markdown
109
+ ### Task 2: Add the export button
110
+
111
+ ### Automated checks
112
+
113
+ - `bun test tests/export.test.ts`
114
+
115
+ ### Manual checks
116
+
117
+ - Sign in to staging and click Export.
118
+ ```
119
+
120
+ - Mission-level checks go under that Validation section only; a differently named section, such as `## Test plan`, is ignored.
121
+ - Both subsections are optional, and `None.` marks an empty list. A plan without them registers and approves as before.
122
+ - A manual check is one only a person can do: a sign-in, a physical device, a page behind the owner's account, or a
123
+ product judgment. Anything an agent can run is an automated check.
124
+ - Manual checks never block approval and never count as scope. `plan show` lists every task's checks and the
125
+ Mission-level ones.
75
126
 
76
127
  ## Discovery and Design
77
128
 
@@ -87,8 +138,16 @@ Spend discovery in proportion to risk:
87
138
  tests as any other code.
88
139
 
89
140
  Look facts up before asking. Ask the user only what research cannot answer, group independent questions, and give a
90
- recommendation with each. Record every open question under `Decisions Requiring Input`. A question only someone outside
91
- the session can answer becomes a blocker that names who can answer it, and nothing is sent to them without approval.
141
+ recommendation with each.
142
+
143
+ Sort each open question before you write it down:
144
+
145
+ - **A reversible choice goes under `## Assumptions`**, with the default you will take. The owner sees it in `plan show` and
146
+ the PR body, and it never blocks approval. If the owner disagrees later, the choice is cheap to change.
147
+ - **A question goes under `Decisions Requiring Input` only when the answer is not reversible or touches money, security,
148
+ an external or irreversible write, an owner-only action, or an acceptance criterion.** These are never assumed.
149
+ - A question only someone outside the session can answer becomes a blocker that names who can answer it, and nothing is
150
+ sent to them without approval. Park that Mission and move to other ready work, as the park rule in the overview says; do not stop the whole goal.
92
151
 
93
152
  Put new domain terms in `docs/domain`, and record a costly or surprising trade-off in the architecture decisions; never
94
153
  start a second glossary. Architecture friction found along the way is a risk with its evidence, not an unplanned
@@ -101,31 +160,48 @@ Order the tasks so each builds on finished ones, and say what a task needs from
101
160
  cannot be sliced is allowed when the plan says why and ends with an integration check.
102
161
 
103
162
  When work spans several Missions, keep each Mission's tasks sequential and put the dependencies between Missions in a
104
- batch (`tasks_done`, `pr_created`, or `pr_merged`), not in prose. Creating tracker issues for slices is an external
105
- write and needs approval.
163
+ batch (`tasks_done`, `pr_created`, or `pr_merged`), not in prose. State them as a `## Mission Dependencies` list, one item per
164
+ Mission this one waits for, with the Mission's issue key as the item's first code span and the condition it must reach. Write each item at the start of the line:
165
+ only top-level items count, so a nested note can cite another Mission without making it a dependency.
166
+
167
+ ```markdown
168
+ ## Mission Dependencies
169
+
170
+ - `SMR-12` has its pull request created (`pr_created`).
171
+ - `SMR-14` is merged.
172
+ ```
173
+
174
+ Write the condition as one of the tokens `tasks_done`, `pr_created` or `pr_merged`; an item that names none means `pr_merged`. The list takes effect only in a batch: `sumr mission batch propose` reads it
175
+ from the accepted plan and turns it into the batch's dependencies, and Missions whose plans name a common file (a code span with
176
+ a path) share a concurrency group. Creating tracker issues for slices is an external write and needs approval.
106
177
 
107
178
  <!-- channel:claude -->
108
179
  ## Visual plan
109
180
 
110
- When this session has the Artifact tool, ask the user once, before drafting, whether they want the
111
- plan as a visual Artifact too. If they say yes, follow the [Visual Plan](./visual-plan.rf.md)
181
+ When this session has the Artifact tool, ask the user once per session, before drafting the first plan,
182
+ whether they want the plan as a visual Artifact too, and reuse the answer for later Missions. If they say yes, follow the [Visual Plan](./visual-plan.rf.md)
112
183
  reference after registering the plan and before the approval presentation.
113
184
  <!-- /channel:claude -->
114
185
  <!-- channel:cursor -->
115
186
  ## Visual plan
116
187
 
117
- When this session can create Canvases, ask the user once, before drafting, whether they want the
118
- plan as a Canvas too. If they say yes, follow the [Visual Plan](./visual-plan.rf.md) reference
188
+ When this session can create Canvases, ask the user once per session, before drafting the first plan,
189
+ whether they want the plan as a Canvas too, and reuse the answer for later Missions. If they say yes, follow the [Visual Plan](./visual-plan.rf.md) reference
119
190
  after registering the plan and before the approval presentation.
120
191
  <!-- /channel:cursor -->
121
192
  <!-- channel:codex -->
122
193
  ## Visual plan
123
194
 
124
- In the Codex app with the Sites plugin installed, ask the user once, before drafting, whether they
125
- want the plan as a private Site too. If they say yes, follow the [Visual Plan](./visual-plan.rf.md)
195
+ In the Codex app with the Sites plugin installed, ask the user once per session, before drafting the first plan,
196
+ whether they want the plan as a private Site too, and reuse the answer for later Missions. If they say yes, follow the [Visual Plan](./visual-plan.rf.md)
126
197
  reference after registering the plan and before the approval presentation.
127
198
  <!-- /channel:codex -->
128
199
 
200
+ ## Decisions met during delivery
201
+
202
+ Decisions that come up during delivery go to the question queue (`sumr mission question ask`), never to a stop; see the delivery
203
+ stage. Only decisions that change the plan's scope or acceptance criteria return here, as a plan revision.
204
+
129
205
  ## Scope checkpoint on plan revisions
130
206
 
131
207
  The first approval records the plan's scope as the Mission's baseline (`scope.baseline`). Scope
@@ -142,8 +218,8 @@ file is missing or no longer matches its approved fingerprint, the baseline is `
142
218
  no items, so every item of the revision goes to the owner.
143
219
 
144
220
  While a delta is pending, the next action is a scope checkpoint that needs the owner, whatever the
145
- `plan.approve` step's `advance` setting. Trusted automation must not approve it; Mission cannot tell
146
- an agent from the owner, so this rule is yours to keep. `plan show --json`
221
+ `plan.approve` step's `advance` setting. An autonomy grant never approves it, and neither does any other automation;
222
+ Mission cannot tell an agent from the owner, so this rule is yours to keep. `plan show --json`
147
223
  then returns `scopeDelta`, `approval.ownerRequired: true`, and a `scopePrompt` that lists every
148
224
  added item with keep, cut, and defer choices. Render that list, and ask the owner to choose for
149
225
  every item:
@@ -166,3 +242,8 @@ present it only after the owner has chosen to keep all of them. Approval records
166
242
  items. Kept items count as approved scope in later revisions.
167
243
 
168
244
  Planning-only flows stop after plan creation and do not claim work, create worktrees, edit code, or open PRs.
245
+
246
+ ## Attribution
247
+
248
+ The trace records who changes a Mission and with which model. Read any Mission from any directory and say who you are as
249
+ "Reading Any Mission, and Saying Who You Are" in the workflow overview describes.
@@ -29,9 +29,15 @@ PR body structure:
29
29
 
30
30
  ## Verification
31
31
  - Commands run and result.
32
- - Manual/UI checks when relevant.
32
+ - Manual/UI checks when relevant, when the plan declares no check kinds.
33
33
  - Skipped checks with reason.
34
34
 
35
+ ## Manual checks for a person
36
+ - The accepted plan's manual checks, as generated; a check the accepted validation report confirms is ticked.
37
+
38
+ ## Assumptions
39
+ - The accepted plan's assumptions, as generated (the body lists at most 20 and says where the rest is); keep the list. A refusal for a placeholder or a local path names the line to edit.
40
+
35
41
  ## Mission Evidence
36
42
  - Plan recorded/approved status.
37
43
  - Implementation, review, validation, and quality evidence recorded status.
@@ -45,6 +51,11 @@ PR body structure:
45
51
  Show the change's evidence, not a claim: before-and-after output for behavior people see, the checks that ran, what
46
52
  could break and for whom, and how to undo it.
47
53
 
54
+ When the Mission has recorded questions, the generated body adds the sections `Assumptions to confirm`, `Questions waiting on a
55
+ person` and `Overridden assumptions`, each only when it has items, with the command that answers each one. Question text appears
56
+ as inline code with local paths removed. Publish the decision brief (`resources/decision-brief.rf.md`) and have a person answer
57
+ before the preview is accepted, so the body names no unconfirmed assumption.
58
+
48
59
  Do not paste machine-local paths, screenshots under `/private/tmp`, `.sumr-cache` artifact paths,
49
60
  home-directory paths, raw commit logs, or raw diff stats into the public PR body. Mission can keep
50
61
  those details internally; the PR should summarize portable evidence and reviewer-relevant outcomes.
@@ -58,8 +69,9 @@ evidence gates pass, and the external write receives explicit approval.
58
69
 
59
70
  After the PR is merged and its deployment workflows succeed, `branch.cleanup` is the next step in
60
71
  the delivery presets. Preview it with `sumr mission cleanup <issue-key>`; it deletes the merged
61
- branch, locally and on the remote, only after the human approves `--yes`. Mission never merges the
62
- PR or dispatches the deployment.
72
+ branch, locally and on the remote, only after the human approves `--yes`. Mission never merges
73
+ the PR on its own and never dispatches the deployment; the one merge path is `sumr mission merge`, which merges exactly the
74
+ pull request of an integration that a person approved from its preview.
63
75
 
64
76
  ## Keep the pull request ready
65
77
 
@@ -95,8 +107,10 @@ Something to fix comes before something to wait for, and that before something o
95
107
  clear, so the next step always names what helps. A status read at another commit than the checkout
96
108
  is stale and never ready, so run `pr status` again after every push.
97
109
 
98
- The loop: run `pr status`, fix what it names, push once the person approves (Mission never pushes a fix, and
99
- a push is an external write like any other), run `pr status` again so each finding is read at the pushed
110
+ The loop: run `pr status`, fix what it names, push once the person approves, or without asking under an active autonomy
111
+ grant that covers `pr_feedback_push` (to the Mission's recorded branch only, never as a force push and never from a worker
112
+ lease; name the grant id in `pr feedback resolve --reason`). Mission never pushes a fix itself, and
113
+ a push is an external write like any other, run `pr status` again so each finding is read at the pushed
100
114
  head, resolve each finding with `pr feedback resolve`, and run `pr status` until it is `ready`. A fix is a
101
115
  commit on the delivered branch: record a passing verification at the new HEAD with `sumr mission verify
102
116
  record` and resolve the finding with `--fixed-by`. It needs no `reopen`, and a finished task stays current
@@ -105,9 +119,10 @@ as the branch moves on. Mission records evidence and gates, it does not edit cod
105
119
  `sumr mission reopen` is for a QA rejection: it drops the validation and quality reports. What clears the
106
120
  recorded pull request is a new validation or quality report, a changed plan, or `sumr mission task reopen`
107
121
  (which also clears the finish disposition), and `pr status` then says Mission records no pull request.
108
- Walk the delivery again to `pr --create`, which asks for approval: the reports, the preview,
109
- `--accept-preview`. The findings Mission imported, their resolutions, and the last reading stay, and the
110
- next `pr status` judges them at the new head. If the provider already has a pull request open for the
122
+ Walk the delivery again to `pr --create`, which needs approval (a prompt, or its previewed fingerprint): the reports, the preview,
123
+ `--accept-preview`. The findings Mission imported and their resolutions stay, and the
124
+ next `pr status` judges them at the new head. A changed plan also clears the last readiness reading, so run `pr status` again
125
+ after `pr --create`. If the provider already has a pull request open for the
111
126
  branch, tell the person instead of working around it.
112
127
 
113
128
  Findings:
@@ -137,3 +152,7 @@ instead. `pr feedback list --json` prints `findings`, each with `finding` and `s
137
152
  reads, such as a closed mission, a changed plan, or the wrong checkout, prints one error to stderr and
138
153
  nothing to stdout. `status` and `feedback` are words of `pr`, not mission keys.
139
154
 
155
+ ## Attribution
156
+
157
+ The trace records who changes a Mission and with which model. Read any Mission from any directory and say who you are as
158
+ "Reading Any Mission, and Saying Who You Are" in the workflow overview describes.
@@ -62,6 +62,12 @@ defect outside the slice is `{"severity": "critical", "class": "follow_up", ...}
62
62
  quality report whose findings are all follow-ups is `Clean`, with the follow-ups listed.
63
63
  `Needs Attention` and `Blocked` need a blocking finding.
64
64
 
65
+ A validation report keeps automated results apart from manual confirmations. When the accepted plan declares check kinds,
66
+ the report template has `### Automated results` and `### Manual confirmations`. Record each automated result with its
67
+ command. Tick a manual confirmation only after the person confirms it, and write who confirmed and when on the line below.
68
+ `sumr mission status` lists the manual checks still outstanding. The decision brief (`sumr mission question brief`) collects waiting
69
+ questions and assumptions, not manual checks, so `status` and the PR body stay the place for them.
70
+
65
71
  Validation should compare implementation against the issue, the approved plan, implementation evidence, and review findings.
66
72
 
67
73
  Verify each acceptance criterion by its type. VALUE criteria are asserted on the value; DISPLAY and COPY criteria are asserted by confirming the required element (a line, label, field, state, region, or wording) is present on that exact surface. A presentation or consistency issue is resolved when the surface matches the expected layout, not when the underlying value is correct — a correct value with a missing element is a failing criterion. A surface passes only when all of its criteria pass.
@@ -73,6 +79,12 @@ A quality report records one explicit decision: `Clean`, `Needs Attention`, or `
73
79
  may be accepted as truthful evidence in any of those states, but only `Clean` passes the flow gate or
74
80
  permits remote PR creation.
75
81
 
76
- Devkit's stop-time quality receipt (`SUMR-QUALITY-RECEIPT: <fingerprint> <decision>`) is a separate contract. It attests
82
+ Devkit's stop gate is a separate contract: it takes the quality lead's decision, with the fingerprint of the net change, from
83
+ `<git-dir>/sumr-quality/decision.json` and never reads the final message. It attests
77
84
  to the exact authored content at the end of an agent's turn. It never replaces a Mission quality report, and a Mission
78
85
  quality report never stands in for it.
86
+
87
+ ## Attribution
88
+
89
+ The trace records who changes a Mission and with which model. Read any Mission from any directory and say who you are as
90
+ "Reading Any Mission, and Saying Who You Are" in the workflow overview describes.
@@ -7,10 +7,16 @@ description: "Trusted identity, repository permission, and fail-closed authoriza
7
7
 
8
8
  # Mission Task Transfer Authorization
9
9
 
10
- The authenticated GitHub identity must currently have `admin` or `maintain` permission on
11
- `SUMRco/cli-mission`. Mission checks that permission using `gh` at preview and again during apply.
12
- Missing authentication, unavailable permission lookups or insufficient permission fail closed
13
- without changing ownership. A task actor label is attribution, not authorization.
10
+ The authenticated GitHub identity must have `admin` or `maintain` permission on the repository the
11
+ Mission works in: the `owner/name` named by the checkout's `origin` remote on `github.com`. Mission
12
+ checks that permission using `gh` at preview and again during apply, against that host and
13
+ repository. A checkout without a `github.com` origin remote fails closed: there is no repository to
14
+ check permission on. Missing authentication, unavailable permission lookups or insufficient
15
+ permission also fail closed without changing ownership.
16
+ A task actor label is attribution, not authorization.
17
+
18
+ The preview shows the repository permission was checked on, and that repository is part of the
19
+ preview fingerprint, so an apply from a checkout whose origin changed since the preview is refused.
14
20
 
15
21
  Authorization does not bypass the transfer's task-state, accepted-plan, repository/workspace,
16
22
  branch/HEAD, evidence, or revision/fingerprint checks. Changed preview inputs require a fresh