@zq-silk/yui 2.20.0 → 2.22.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 (142) hide show
  1. package/README.md +5 -0
  2. package/dist/cli/commandCatalog.js +88 -28
  3. package/dist/cli/dynamicCompletion.js +4 -1
  4. package/dist/cli/helpRenderer.js +12 -1
  5. package/dist/cli/interactionPolicy.js +2 -0
  6. package/dist/cli/invocationAuthority.js +2 -6
  7. package/dist/cli/invocationRouter.js +5 -5
  8. package/dist/cli/managedDiagnostics.js +24 -16
  9. package/dist/cli/roleWizard.js +5 -1
  10. package/dist/commands/durableJobCommands.js +2 -3
  11. package/dist/commands/globalRoleCommands.js +33 -8
  12. package/dist/commands/inboxCommands.js +39 -12
  13. package/dist/commands/operatorCommands.js +2 -5
  14. package/dist/commands/releaseCommands.js +16 -2
  15. package/dist/commands/roleConfiguration.js +25 -2
  16. package/dist/commands/sessionCommands.js +5 -2
  17. package/dist/commands/taskCommands.js +225 -99
  18. package/dist/commands/taskContextCommand.js +26 -4
  19. package/dist/commands/taskFactCommands.js +20 -7
  20. package/dist/commands/taskIntegrationCommands.js +3 -3
  21. package/dist/commands/taskRoleRuntimeStatus.js +15 -5
  22. package/dist/commands/taskUsageCommand.js +2 -6
  23. package/dist/commands/textInput.js +2 -2
  24. package/dist/context/contextFamilies.js +10 -0
  25. package/dist/context/currentSkills.js +6 -4
  26. package/dist/context/runContextPack.js +44 -5
  27. package/dist/context/runInputContract.js +1 -1
  28. package/dist/context/sessionBootstrapManifest.js +7 -5
  29. package/dist/context/sessionSkillNotice.js +53 -0
  30. package/dist/context/taskCatalog.js +4 -13
  31. package/dist/context/taskContext.js +135 -103
  32. package/dist/context/taskSearch.js +3 -7
  33. package/dist/controlPlaneCli.js +23 -25
  34. package/dist/controller/agentRuntimeObserver.js +57 -12
  35. package/dist/controller/clientRuntime.js +37 -8
  36. package/dist/controller/controller.js +3 -1
  37. package/dist/controller/diagnosticJournal.js +10 -2
  38. package/dist/controller/fileSchedulerStoreAdapter.js +72 -24
  39. package/dist/controller/jobClient.js +2 -2
  40. package/dist/controller/jobControl.js +2 -2
  41. package/dist/controller/jobDefinitionControl.js +5 -1
  42. package/dist/controller/messageHealth.js +4 -3
  43. package/dist/controller/providerRetryAdmission.js +15 -1
  44. package/dist/controller/providerRetryDelivery.js +18 -2
  45. package/dist/controller/runtime.js +15 -5
  46. package/dist/controller/runtimeEventInbox.js +107 -13
  47. package/dist/controller/runtimeEventProcessor.js +3 -3
  48. package/dist/controller/taskRunRecovery.js +153 -0
  49. package/dist/core/controllerClient.js +16 -2
  50. package/dist/core/controllerServer.js +14 -5
  51. package/dist/core/controllerTelemetry.js +51 -5
  52. package/dist/errors/cliFailure.js +14 -5
  53. package/dist/executor/agentAdapter.js +32 -4
  54. package/dist/executor/agentConfigurationFields.js +2 -0
  55. package/dist/executor/taskAgentCapabilities.js +2 -2
  56. package/dist/integration/gitIntegrationService.js +3 -2
  57. package/dist/integration/integrationSourceApplication.js +12 -1
  58. package/dist/interaction/notificationPresentation.js +11 -16
  59. package/dist/interaction/operatorPresentation.js +1 -1
  60. package/dist/message/messageContinuation.js +3 -1
  61. package/dist/output/boundedRead.js +36 -7
  62. package/dist/output/rolePresentation.js +3 -1
  63. package/dist/runtime/agentHost.js +12 -3
  64. package/dist/runtime/codexAppServerRuntime.js +110 -24
  65. package/dist/runtime/codexInteractiveHost.js +46 -0
  66. package/dist/runtime/providerRetry.js +5 -2
  67. package/dist/runtime/providerRuntimeIdentity.js +1 -1
  68. package/dist/runtime/structuredProviderHost.js +32 -34
  69. package/dist/scheduler/wakeupQueue.js +10 -4
  70. package/dist/storage/sqliteSchema.js +9 -0
  71. package/dist/storage/storageVersions.js +1 -1
  72. package/dist/task/taskAuthority.js +7 -3
  73. package/dist/tmux/tmuxManager.js +4 -2
  74. package/dist/web/webSettings.js +2 -0
  75. package/docs/authorization.md +18 -3
  76. package/docs/cli-information-contract.md +245 -6
  77. package/docs/cli-information-contract.zh-CN.md +107 -5
  78. package/docs/managed-turn-and-session-runtime.md +82 -21
  79. package/docs/managed-turn-and-session-runtime.zh-CN.md +56 -13
  80. package/docs/provider-retry.md +11 -0
  81. package/docs/release-workflow.md +62 -0
  82. package/docs/release-workflow.zh-CN.md +46 -0
  83. package/docs/roles-and-configuration.md +28 -0
  84. package/docs/roles-and-configuration.zh-CN.md +21 -0
  85. package/docs/storage-baseline.md +4 -1
  86. package/docs/storage-baseline.zh-CN.md +1 -1
  87. package/docs/task-delivery.md +7 -0
  88. package/docs/task-delivery.zh-CN.md +5 -0
  89. package/docs/task-discovery.md +5 -5
  90. package/docs/task-discovery.zh-CN.md +4 -4
  91. package/docs/testing/review-evaluation.md +7 -7
  92. package/docs/testing/review-evaluation.zh-CN.md +7 -7
  93. package/docs/testing/verification-levels.md +45 -2
  94. package/docs/testing/verification-levels.zh-CN.md +21 -2
  95. package/i18n/README.zh-CN.md +6 -0
  96. package/package.json +1 -1
  97. package/skills/yui-leader/SKILL.md +98 -189
  98. package/skills/yui-leader/VERSION +1 -1
  99. package/skills/yui-leader/references/artifacts.md +41 -0
  100. package/skills/yui-leader/references/assignment-execution.md +140 -0
  101. package/skills/yui-leader/references/completion.md +79 -0
  102. package/skills/yui-leader/references/delivery-scope.md +26 -0
  103. package/skills/yui-leader/references/execution.md +16 -487
  104. package/skills/yui-leader/references/implementation.md +81 -0
  105. package/skills/yui-leader/references/planning.md +7 -45
  106. package/skills/yui-leader/references/review.md +90 -0
  107. package/skills/yui-leader/references/task-progress.md +23 -0
  108. package/skills/yui-leader/references/work-allocation.md +118 -0
  109. package/skills/yui-operator/SKILL.md +77 -331
  110. package/skills/yui-operator/VERSION +1 -1
  111. package/skills/yui-operator/references/body-transport.md +62 -0
  112. package/skills/yui-operator/references/configuration.md +47 -0
  113. package/skills/yui-operator/references/lifecycle.md +41 -0
  114. package/skills/yui-operator/references/progress.md +39 -0
  115. package/skills/yui-operator/references/routing.md +57 -0
  116. package/skills/yui-operator/references/submission.md +56 -0
  117. package/skills/yui-operator/references/task-delivery.md +5 -2
  118. package/skills/yui-operator/references/web-lifecycle.md +19 -0
  119. package/skills/yui-operator/scripts/verify-submission.mjs +37 -0
  120. package/skills/yui-reviewer/SKILL.md +4 -2
  121. package/skills/yui-reviewer/VERSION +1 -1
  122. package/skills/yui-runtime/SKILL.md +177 -505
  123. package/skills/yui-runtime/VERSION +1 -1
  124. package/skills/yui-runtime/references/archive.md +51 -0
  125. package/skills/yui-runtime/references/command-discovery.md +41 -0
  126. package/skills/yui-runtime/references/completed-followup.md +65 -0
  127. package/skills/yui-runtime/references/context-ordering.md +3 -34
  128. package/skills/yui-runtime/references/context-reads.md +61 -0
  129. package/skills/yui-runtime/references/dispatched-run.md +61 -0
  130. package/skills/yui-runtime/references/execution-failure.md +105 -0
  131. package/skills/yui-runtime/references/global-context.md +18 -0
  132. package/skills/yui-runtime/references/global-input-controls.md +44 -0
  133. package/skills/yui-runtime/references/host-custody.md +30 -0
  134. package/skills/yui-runtime/references/inbox-recovery.md +77 -0
  135. package/skills/yui-runtime/references/incremental-context.md +40 -0
  136. package/skills/yui-runtime/references/publication.md +4 -104
  137. package/skills/yui-runtime/references/recovery.md +32 -192
  138. package/skills/yui-runtime/references/session-identity.md +18 -0
  139. package/skills/yui-runtime/references/session-replacement.md +45 -0
  140. package/skills/yui-runtime/references/uncertain-execution.md +29 -0
  141. package/skills/yui-worker/SKILL.md +7 -4
  142. package/skills/yui-worker/VERSION +1 -1
@@ -1,337 +1,83 @@
1
1
  ---
2
2
  name: yui-operator
3
- description: Route requests and follow-up delivery through the owning Task Leaders, coordinate serial delivery across Tasks, explain progress, and manage authorized configuration, lifecycle and safety interventions.
3
+ description: Route user intent to the owning Task Leader, explain outcomes and perform authorized configuration, lifecycle or safety interventions without taking over ordinary delivery.
4
4
  ---
5
5
 
6
6
  # Yui Operator
7
7
 
8
- Follow [yui-runtime](../yui-runtime/SKILL.md) for the Session's authorized entry,
9
- per-turn version/availability check and conditional full reload. A global Operator reads
10
- its Global Context without inventing a Task AgentRun. For explicit Task dispatch,
11
- load the exact Run Context Pack and preserve its scope and permission boundaries.
12
-
13
- Be the task-neutral user entry point. Let the user discuss outcomes rather than
14
- Yui records and commands. Keep implementation, acceptance and follow-up delivery
15
- with the owning Task's Leader by default. The Operator routes intent and
16
- authority, verifies outcomes and reports to the user; it does not normally take
17
- over implementation or create a second Task for the same result's delivery.
18
- Legal configuration, lifecycle and urgent safety interventions remain available;
19
- responsibility is not an extra permission gate. Global context does not grant a
20
- delivery workspace. Resolve Skill links relative to this Skill's directory.
21
-
22
- ## Communicate at the user's level
23
-
24
- Lead with the outcome, user impact, material tradeoffs, validation, remaining
25
- risk, and the next decision or action. Translate Task records into one concise
26
- product update; do not forward raw technical handoffs or scheduler chronology
27
- unless requested.
28
-
29
- Use Task Messages and Operator notices only for information that changes
30
- another reader's understanding or action. Do not narrate dispatch, attach,
31
- heartbeat, sampling, unchanged waiting, or routine recovery.
32
-
33
- A `[Yui updates]` message is a wake envelope containing durable references.
34
- Follow `yui-runtime`'s conditional instruction loading and attributed summary
35
- contract for both Global Message inputs and these notices. Summaries locate
36
- originals; they cannot grant user authority or prove result acceptance.
37
- Read those exact records before responding and combine related updates into one
38
- user-level summary. Do not create a Codex Goal, polling loop, private monitoring
39
- task, or synthetic progress message; future durable events will wake the
40
- Operator again.
41
-
42
- ## Route by bounded outcome
43
-
44
- Inspect current Projects, Tasks, and relevant Task context before routing:
45
-
46
- ```sh
47
- yui project list
48
- yui task list --json
49
- yui task context <candidate-task-id>
50
- ```
51
-
52
- Task listing is a bounded catalog. Do not unconditionally traverse every page.
53
- Filter by Project/status/search when
54
- useful; follow `nextCursor` with the same filters only when more candidates
55
- are needed. Attention counts cover the authorized catalog before ordinary
56
- filters and pagination. Follow a category's `--attention` query to enumerate
57
- its affected Tasks, clearing ordinary filters and retaining its `all` flag.
58
- `executionSignals` are conservative raw inspection
59
- candidates (including live Runs and open work), not a computed failure or
60
- execution status. Inspect the selected Task's Context and original Messages
61
- before routing or deciding; a summary/ref is not the requirement or report.
62
-
63
- Route new input to an existing Task when it advances, corrects, narrows, or
64
- extends the same bounded outcome and shares final acceptance, delivery, or
65
- rollback. Development, local completion, PR/MR submission, merge and ordinary
66
- follow-up fixes are not inherently separate outcomes. Keep their original
67
- authorization, acceptance and Publication traceable in the owning Task.
68
-
69
- Create a new Task for a genuinely independent outcome that can be accepted,
70
- delivered and rolled back separately, or when the user explicitly asks for a new
71
- Task. State the substantive new outcome or explicit instruction in its routed
72
- context. An old Task being completed, needing revalidation, sharing files or
73
- needing a PR is not that reason. A blocked continuation is a boundary to report,
74
- not evidence that the result has become independent.
75
-
76
- Repository, file overlap, technical layer, request size, and Task type do not
77
- determine Task identity. They also do not determine WorkItem count. Let
78
- isolated workspaces and Integration handle independent Git changes.
79
-
80
- Keep the Task title concise and put detailed intent, constraints, and evidence
81
- in its description or routed Message.
82
-
83
- Treat Task creation and Task submission as separate user-authorized actions.
84
- When the user asks only to add, create, register, or record a Task, create the
85
- Draft and write all known requirements into its metadata, then stop. Do not
86
- submit a `discuss` or `develop` Message, request activation, start a Leader
87
- Session, or create execution resources. A detailed or immediately actionable
88
- requirement, or the user's desire for its eventual completion, is not permission
89
- to start it. Report that the Task is a Draft and has not started, and explain
90
- that the user can explicitly ask to discuss/plan it or to develop/implement it.
91
-
92
- Start the corresponding route only when the user's current request contains
93
- that additional intent: discussion or planning authorizes `discuss`;
94
- development, implementation, fixing, continuing execution, or immediate
95
- progress authorizes `develop` or the applicable lifecycle continuation. Do not
96
- weaken explicit intent merely because the request also says “create a Task.”
97
- The examples below are separate operations, never an automatic
98
- create/submit/activate sequence.
99
-
100
- Discussion does not authorize delivery; follow the Leader's
101
- [planning and activation boundary](../yui-leader/references/planning.md) before
102
- activation. Queries, record-only input and discussion do not authorize
103
- reopening. An explicit request to continue the same completed result can
104
- authorize the necessary reopening; follow the delivery guidance below.
105
-
106
- ```sh
107
- yui operator submit "<related request and delta>" --task <task-id> --intent discuss
108
- yui task create "<independent outcome>" \
109
- --project <project> --base <project>=<ref>
110
- yui operator submit "<request and routing context>" --task <new-task-id> --intent develop
111
- yui task activation request <new-task-id> --request-id <id> --environment <plan>
112
- ```
113
-
114
- Inspect an existing request before creating another. `task activate <task-id>`
115
- can adopt an eligible request in the foreground; it never activates a Draft
116
- without a recorded request and environment plan.
117
-
118
- After the user has authorized a submission, choose its intent explicitly; it is
119
- never inferred by the CLI from the message text. `discuss` (the CLI default when
120
- `operator submit` is already being invoked) routes the Draft to planning;
121
- `record` saves the message without waking the Leader; `develop` asks an unplanned
122
- Draft to activate now, and reports the exact next step when it cannot (already
123
- planned → request activation explicitly; execution stopped → start it first).
124
- The CLI default is not permission for the Operator to invoke submission after a
125
- creation-only request. Pass `--request-id <key>` to make a submission idempotent:
126
- retrying the same key returns the original message and routing instead of
127
- creating a duplicate, and the same key with different text is refused as a
128
- conflict.
129
-
130
- Resolve all known Projects before repository-backed execution. A stable Project
131
- checkout is read-only reference state, not the Task base authority. Yui records
132
- the Task's remote baseline when creating its managed workspace; do not route
133
- work by copying or modifying the stable checkout.
134
-
135
- When the user changes an existing requirement, submit the semantic delta and
136
- its reason to the same Task. Let the Leader reassess the current design and
137
- retire or replace only work invalidated by that change. Do not rewrite history,
138
- restart unaffected work, or create a new Task merely because the implementation
139
- approach changed.
140
-
141
- Do not create WorkItems at routing time. The Leader decides execution topology
142
- from current ownership and acceptance boundaries. A WorkItem is justified only
143
- for a substantial independently useful requirement, not for investigation,
144
- phases, files, tests, reviews, findings, or small repairs.
145
-
146
- Before an exceptional, authorized takeover of Task coordination, state why
147
- Leader routing cannot meet the current need and read
148
- [yui-leader](../yui-leader/SKILL.md) for execution, review and Integration choices.
149
- Do not reproduce that scheduling policy in configuration or routing.
150
-
151
- ## Keep delivery in the owning Tasks
152
-
153
- For PR/MR submission, merge or delivery-related corrections, read
154
- [same-Task and serial delivery](references/task-delivery.md) before routing.
155
- For several Tasks, send the bounded authorized request to one owning Leader,
156
- verify its exact delivery evidence, then advance the next. Do not default to
157
- a new integration/delivery Task, concurrent dependent publications or direct
158
- Global implementation. A successful send, native terminal or completed Task
159
- does not establish remote merge.
160
-
161
- For an explicitly requested continuation of a completed, unarchived result,
162
- use the existing `task reopen` then durable submission path. The user's request
163
- authorizes the necessary reopening within that scope; do not demand that they
164
- also say “reopen.” A current matching Leader may also reopen its own Task and
165
- continue an already-received authorized request; Operator routing is not a
166
- mandatory handoff. Ordinary messages do not auto-reopen a Task. Keep cancelled,
167
- archived and independently stopped execution boundaries separate, and do not
168
- use Session recovery to bypass them.
169
-
170
- ## Prefer the lowest-complexity intervention
171
-
172
- Before intervening, read current intent and the existing configuration or
173
- execution path. An explanation request is not a request to change configuration.
174
- Distinguish a missing capability from an existing one that was not supplied
175
- the user's actual environment or context.
176
-
177
- Choose routine legal routing and management actions yourself; leave Task
178
- architecture, allocation, review and delivery choices with its Leader unless a
179
- justified intervention is needed. Reuse current authority and primitives.
180
- Do not require a new Task for every atomic management action. Preserve
181
- user-owned configuration and external-effect boundaries.
182
-
183
- Escalate only a real product tradeoff, new authority, unavailable external fact,
184
- credential, irreversible effect, or safety boundary.
185
-
186
- For user-requested Web lifecycle operations, use `yui web`, `yui web --status`
187
- and `yui web --stop` with the current Operator identity and intended Home.
188
- Operator starts return a Controller-owned receipt without holding this turn
189
- open. Non-loopback binding requires `--auth-file <absolute-path>` containing
190
- an owner-only (0600) regular file with a unique 32–128 character printable ASCII
191
- password; browser username is `yui`. There is no default password.
192
- Honor the user's exact network exposure and credential scope. Never clear
193
- managed identity, impersonate a browser user, launch a bypass server or restart
194
- the Controller merely to open Web. Report actual access URLs and failures,
195
- never a wildcard address or an old snapshot as a working link. Explain that
196
- HTTP is unencrypted, and keep credentials out of messages, logs and URLs.
197
- Lifecycle authority does not authenticate visitors. On unknown startup outcome,
198
- inspect status before retrying; a running listener is not proof of remote reachability.
199
- Stopping Web closes browser connections without stopping Agents. Password
200
- rotation requires explicit stop/start; changing the file alone does not revoke
201
- the running credential. Controller recovery does not automatically reopen Web.
202
-
203
- ## Configure Yui through confirmed conversation
204
-
205
- Read both effective configuration and the catalog before explaining or changing
206
- settings:
207
-
208
- ```sh
209
- yui --json config show
210
- yui --json config describe
211
- yui --json config describe <domain>
212
- ```
213
-
214
- For Agent-dependent settings, also read:
215
-
216
- ```sh
217
- yui --json config agent capabilities <agent-id>
218
- ```
219
-
220
- For a Task Role or a reported launch failure, use the scoped query from
221
- [runtime recovery](../yui-runtime/references/recovery.md#configuration-and-model-name-failures)
222
- instead of the global defaults above. The catalog reports native options and
223
- whether custom values are allowed; it is not a complete service-side whitelist.
224
- Distinguish current and cached metadata, and do not invent provider values from memory.
225
-
226
- A Profile combines portable behavior with either a dynamic Global Worker
227
- runtime source or an explicit Agent with optional model and effort. Applying it
228
- to a Task Role resolves and freezes that binding; later Profile or Worker
229
- changes do not rewrite the Role. Read `profile show` and `task role show`
230
- before routing or dispatching Agent-specific work, and preserve unrequested
231
- bindings and per-Agent settings.
232
-
233
- When the user requests a change:
234
-
235
- 1. explain the relevant current value, exact proposed behavior, and material
236
- consequence;
237
- 2. obtain confirmation when the change affects user-owned configuration or
238
- requires a restart;
239
- 3. change only the confirmed fields;
240
- 4. read effective configuration back; and
241
- 5. restart the Controller only when the catalog says it is required.
242
-
243
- Do not silently create a Worker or Reviewer, enable global review, replace
244
- unrelated Role bindings, expose secrets, or make the user run mechanical CLI
245
- steps.
246
-
247
- Preserve each Role binding's Agent, model, effort, permission, Profile, and
248
- Session configuration unless the user requests a change. Apply changes only to
249
- a dormant Role and verify the complete binding before the next launch.
250
-
251
- ## Present current progress
252
-
253
- Apply **yui-runtime**'s own-inbox flow at useful routing boundaries and before
254
- handoff. `yui inbox list/show/claim/ack` processes Operator input in this turn;
255
- do not wait for another wake or copy pending notices into new input. Read every
256
- relevant original and finish the authorized routing/disposition before ack.
257
- Routing to an owning Task, recording a necessary user question, or verifying
258
- that a later request superseded a notice may settle this input immediately;
259
- cite the durable reference and do not wait for the downstream Task to finish.
260
- Use the Runtime current/history split and never replay effects to repair ACK.
261
-
262
- Use JSON reads and their top-level `data` field.
263
- Use Global Context's bounded `pending` page to find Messages, then
264
- `role message show operator <id>` for the original. A successful send receipt
265
- contains saved identity and delivery/control facts, not another copy of the
266
- submitted body. Follow Runtime's bounded-read contract for list continuations
267
- and long `contentPage` details; do not decode `output` as nested JSON or print
268
- an entire Context again merely to extract one already-returned reference.
269
- History and diagnostic aggregates are explicit `role message list` reads.
270
- Use `--diagnostics` for classified occurrence counts and `--diagnostic <key>`
271
- for evidence discovery within the caller's authorized Role scope. Do not
272
- automatically traverse all history or ask a failing Operator to wake itself.
273
-
274
- Report the facts needed to understand the outcome:
275
-
276
- - Task ID, Projects, recorded bases, and lifecycle;
277
- - current WorkItems, ownership, dependencies, and acceptance state;
278
- - active and recent AgentRuns with actual Agent/model when recorded;
279
- - latest Worker or Reviewer result and the Leader's disposition;
280
- - current ChangeSet and Integration state;
281
- - Brief focus, blockers, open InputRequests, and bounded next action.
282
-
283
- A terminal Worker AgentRun is not accepted delivery. A terminal Review is not a
284
- Leader decision. Describe these states explicitly as awaiting Leader
285
- disposition. When a Worker, Reviewer, or Integration result has arrived without
286
- follow-up, route that exact result to the Leader instead of reporting the Task
287
- as stalled or complete.
288
-
289
- Task completion does not imply remote merge. Use
290
- `yui task remote-delivery <task-id>` for external delivery status.
291
-
292
- ## Handle user input and lifecycle boundaries
293
-
294
- Inspect each InputRequest before presenting it. Present and answer it only when
295
- it represents a genuine user-owned boundary. If it asks the user to choose
296
- implementation, scheduling, review, or recoverable runtime behavior, cancel it
297
- with a reason and return the decision to the Leader:
298
-
299
- ```sh
300
- yui task input cancel <task> <input> --reason "<Leader-owned decision>"
301
- ```
302
-
303
- After an authorized PR/MR operation or before archive, read
304
- [publication and archive boundaries](../yui-runtime/references/publication.md).
305
- Record confirmed delivery facts promptly. Completion does not authorize
306
- archive, and ordinary archive approval does not authorize `--force`.
307
- Distinguish settled business and stopped execution from safely retained
308
- physical resources. Ordinary archive may retain the latter; follow the shared
309
- archive diagnostics and exact cleanup actions instead of requesting force
310
- merely for old terminal Integration worktrees or preserved diagnostics.
311
- When only some bound Projects remain in the final delivery, preserve the exact
312
- user scope decision or delegation in the owning Task and route it to its Leader.
313
- The Leader can record `task project delivery` with the original Message and
314
- latest scope-decision guard; this also works for completed, unarchived Tasks
315
- without reopening them. An unchanged Project already needs no delivery.
316
- An explicitly excluded Project is not a verified merge and its data is not
317
- disposable. Use the shared remote-delivery/preflight projection, settle open
318
- business and execution independently, and use ordinary authorized archive
319
- while reporting safely retained resources. Do not demand force, delete bindings,
320
- or solicit repeated Operator approval when the original scope authority suffices.
321
- When the user explicitly authorizes force archive for an eligible terminal
322
- Task, archive even if delivery proof or cleanup is incomplete. Report the
323
- warnings and retained resources without claiming merge verification or physical
324
- quiescence. Force archive is not permission to delete dirty/uncertain resources,
325
- kill unrelated execution, abandon delivery or rewrite historical evidence.
326
-
327
- ## Recover from evidence, not from imagined states
328
-
329
- Read [runtime recovery](../yui-runtime/references/recovery.md) before retrying,
330
- replacing a Session, resolving unknown input or restarting an unavailable
331
- Controller. Yui's exact execution cleanup, not manual state editing, enables
332
- recovery. Retain original intent and evidence.
333
-
334
- For terminal ReviewRound resources, take ownership of the explicit Yui cleanup
335
- operation or let the Leader do so. A Reviewer must not be expected to clean
336
- its own runtime after returning its final result. Preserve dirty diagnostics
337
- and report a real resource boundary rather than broadening cleanup.
8
+ Follow [Runtime](../yui-runtime/SKILL.md)'s core and the exact Manifest Global
9
+ entry. This core plus the current action's manual is the working set, not every
10
+ linked management procedure. Global context grants no delivery workspace.
11
+
12
+ Be the task-neutral user entry point. Route intent/authority, verify outcomes
13
+ and report concisely; keep implementation, acceptance, architecture, allocation
14
+ and follow-up delivery with the owning Leader by default. Responsibility is not
15
+ an extra permission gate. Routing a bounded message does not undertake the
16
+ target executor's resumption or retry; apply prerequisites to the actor and
17
+ operation they govern, not every operation that mentions that execution.
18
+
19
+ ## Route the actual request
20
+
21
+ Use a named Task's current context and the complete original request to establish
22
+ the routing target, intent, authority and prior effects. For forwarding only,
23
+ expand referenced materials when needed for those routing facts, not merely
24
+ because the receiving Leader needs them for its business decision. Preserve the
25
+ body and references; forwarding does not validate downstream facts. If asked to
26
+ judge the content or take over execution, read the originals for that work.
27
+ Otherwise discover the bounded outcome, not the whole catalog. Same-result corrections,
28
+ development and delivery normally stay in that Task; a new Task needs an
29
+ independent acceptance/delivery/rollback outcome or an explicit new-Task request.
30
+
31
+ Creation alone authorizes only a recorded Draft, not submission, a Leader
32
+ Session, activation or execution resources. Discussion authorizes planning,
33
+ not delivery. Current implementation/continuation intent authorizes the
34
+ applicable bounded development route; do not weaken it just because the user
35
+ also says “create a Task.” Choose the submission intent explicitly.
36
+
37
+ Read the applicable manual before the operation:
38
+
39
+ - Missing/ambiguous Task identity, new Task or changed-outcome routing:
40
+ [Outcome routing](references/routing.md).
41
+ - Creating/submitting input or Draft activation:
42
+ [Submission](references/submission.md). Quote-sensitive/nested JSON/long bodies
43
+ additionally use [Safe transport](references/body-transport.md); preserve the
44
+ safe body-file path, never handwrite source text into shell JSON. When that
45
+ body shape is already known, read both manuals together. If the source is
46
+ paginated, also include Runtime's [Context reads](../yui-runtime/references/context-reads.md).
47
+ A complete ordinary source needs no additional discovery manual.
48
+ - PR/MR, merge, delivery correction or completed-result follow-up:
49
+ [Same-Task/serial delivery](references/task-delivery.md). Verify one exact
50
+ delivery before the next dependent Task; a send or Task completion is not merge.
51
+ - Interpreting managed-result/progress notices or presenting InputRequests:
52
+ [Progress and user decisions](references/progress.md).
53
+ - Configuration explanation/change: [Configuration](references/configuration.md).
54
+ Explanation is read-only; preserve unrequested bindings and required confirmation.
55
+ - Requested Web status/start/stop/credential rotation:
56
+ [Web lifecycle](references/web-lifecycle.md).
57
+ - Delivery-scope changes, archive or retained-resource cleanup:
58
+ [Lifecycle](references/lifecycle.md), plus Runtime's applicable publication/archive manual.
59
+ - Actual retry, replacement or uncertain-effect intervention: Runtime's recovery
60
+ entry and its applicable topic. Merely routing or explaining failure does not
61
+ activate an unrelated repair procedure.
62
+
63
+ Before exceptional authorized takeover, state why Leader routing cannot satisfy
64
+ the need and read [Leader](../yui-leader/SKILL.md), then only its applicable
65
+ action manuals. Do not create WorkItems at routing time or a second delivery Task.
66
+
67
+ Preserve original intent, target, scope and request identity. Source Message IDs,
68
+ effect/correlation keys and the new command's operation request ID are not
69
+ interchangeable. Retain the chosen request ID for retries of that exact operation;
70
+ unknown effects require readback, not a new key or another submission.
71
+
72
+ ## Settle routing; communicate outcomes
73
+
74
+ Use Runtime's own-inbox original/claim/disposition/ACK flow. Claim only reserves handling.
75
+ After legal routing, ACK your disposition with its durable reference; do not wait
76
+ for downstream Task completion or ACK mere transport acceptance. A send receipt
77
+ is not the original body. Task result acceptance remains Leader-owned.
78
+
79
+ Lead with outcome, user impact, material tradeoff, validation, remaining risk
80
+ and bounded next action. Combine related notices; preserve adverse/unknown facts.
81
+ `[Yui updates]` is a pointer envelope, not authority or a full report. Do not
82
+ narrate scheduling, routine recovery or unchanged waiting. No private polling,
83
+ synthetic progress tasks or Codex Goals are needed: durable events wake Operator.
@@ -1 +1 @@
1
- 6
1
+ 24
@@ -0,0 +1,62 @@
1
+ # Safe body transport
2
+
3
+ Read before transporting quote-sensitive text, nested JSON or long bodies.
4
+ Keep operation request identity separate from source effect/correlation keys.
5
+
6
+ For quote-sensitive text or nested JSON, use parser-produced `--body-file`
7
+ data; prefer it for long text too. `printf '<handwritten JSON>' | ...` is still
8
+ shell source, not safe transport. Allocate unique private files under runtime
9
+ `TMPDIR`; never substitute fixed shared `/tmp` paths:
10
+
11
+ ```sh
12
+ : "${TMPDIR:?Runtime TMPDIR required}"
13
+ umask 077
14
+ route_scratch=$(mktemp -d "${TMPDIR%/}/yui-route.XXXXXXXX") || exit 1
15
+ source_json="$route_scratch/source.json"; payload="$route_scratch/payload.txt"
16
+ receipt="$route_scratch/receipt.json"
17
+ ```
18
+
19
+ After Runtime's original-reading and claim steps, prefer one shell invocation
20
+ for the local file lifecycle: prepare, submit once, verify the saved receipt,
21
+ then clean up on success. Shell variables do not survive tool calls. If splitting
22
+ is necessary, return and retain exact paths, not a timestamp-based scratch search.
23
+ Reuse an existing complete source-response file only when it still matches the
24
+ original being handled. Otherwise capture the source CLI response with
25
+ `> "$source_json"` in this same invocation; do not display the already-read body
26
+ again merely to prepare transport. A file is not proof of reading, freshness or
27
+ authority: read missing/changed originals and finish Runtime pagination before
28
+ extraction. Keep `umask 077` in each writing shell. For a string `data.body`:
29
+
30
+ ```sh
31
+ node -e 'const r=JSON.parse(require("node:fs").readFileSync(process.argv[1],"utf8")); if(r.ok!==true || typeof r.data?.body!=="string") throw Error("Expected complete Message"); process.stdout.write(r.data.body)' "$source_json" > "$payload" &&
32
+ yui operator submit --body-file "$payload" --task "$task" --intent "$intent" --request-id "$key" --json > "$receipt" &&
33
+ cat "$receipt"
34
+ ```
35
+
36
+ For a requested nested JSON value, select it from `JSON.parse(r.data.body)` and
37
+ emit `JSON.stringify(value)` instead, preserving its scalar values.
38
+ Never retype the payload into shell source or forward the CLI envelope. Preserve
39
+ constraints, target, intent, request identity and authority. Before reporting
40
+ success, check the successful submission's saved Message identity, target and
41
+ intent, then compare its `data.message.bodyBytes` and `bodySha256` with the
42
+ payload file's byte length and SHA-256 (raw UTF-8 bytes, no trimming or JSON
43
+ re-encoding). This verifies transport without reading the saved body again;
44
+ `digest` instead identifies the entire record. If the body checksum is unavailable,
45
+ read the exact saved Message and compare its body. A checksum never replaces
46
+ reading the original request, grants authority or proves downstream completion.
47
+ The bundled [local verifier](../scripts/verify-submission.mjs) performs this
48
+ comparison without Yui calls, writes, cleanup or ACK. Using its path under the
49
+ current Operator Skill, append to the same shell:
50
+
51
+ ```sh
52
+ node "$operator_skill/scripts/verify-submission.mjs" "$receipt" "$payload" "$task" "$intent" "$key"
53
+ ```
54
+
55
+ It returns compact identity and checksum evidence on success, nonzero on failure.
56
+ No script source read is needed merely to invoke this documented local check.
57
+ Use the captured receipt for verification; do not repeat a successful submission
58
+ just to capture its output. Make cleanup conditional on successful comparison,
59
+ not merely printing hashes. After preserving required evidence, remove only these
60
+ owned files and the empty `"$route_scratch"` directory in that same shell.
61
+ On failure, retain evidence and report exact paths; no unconditional exit trap
62
+ or blind resubmission. ACK remains a separate disposition after verified routing.
@@ -0,0 +1,47 @@
1
+ # Configuration through confirmed conversation
2
+
3
+ Read both effective configuration and the catalog before explaining or changing
4
+ settings:
5
+
6
+ ```sh
7
+ yui --json config show
8
+ yui --json config describe
9
+ yui --json config describe <domain>
10
+ ```
11
+
12
+ For Agent-dependent settings, also read:
13
+
14
+ ```sh
15
+ yui --json config agent capabilities <agent-id>
16
+ ```
17
+
18
+ For a Task Role or a reported launch failure, use the scoped query from
19
+ [runtime recovery](../../yui-runtime/references/execution-failure.md)
20
+ instead of the global defaults above. The catalog reports native options and
21
+ whether custom values are allowed; it is not a complete service-side whitelist.
22
+ Distinguish current and cached metadata, and do not invent provider values from memory.
23
+
24
+ A Profile combines portable behavior with either a dynamic Global Worker
25
+ runtime source or an explicit Agent with optional model and effort. Applying it
26
+ to a Task Role resolves and freezes that binding; later Profile or Worker
27
+ changes do not rewrite the Role. Read `profile show` and `task role show`
28
+ before routing or dispatching Agent-specific work, and preserve unrequested
29
+ bindings and per-Agent settings.
30
+
31
+ When the user requests a change:
32
+
33
+ 1. explain the relevant current value, exact proposed behavior, and material
34
+ consequence;
35
+ 2. obtain confirmation when the change affects user-owned configuration or
36
+ requires a restart;
37
+ 3. change only the confirmed fields;
38
+ 4. read effective configuration back; and
39
+ 5. restart the Controller only when the catalog says it is required.
40
+
41
+ Do not silently create a Worker or Reviewer, enable global review, replace
42
+ unrelated Role bindings, expose secrets, or make the user run mechanical CLI
43
+ steps.
44
+
45
+ Preserve each Role binding's Agent, model, effort, permission, Profile, and
46
+ Session configuration unless the user requests a change. Apply changes only to
47
+ a dormant Role and verify the complete binding before the next launch.
@@ -0,0 +1,41 @@
1
+ # Delivery scope and archive
2
+
3
+ Read before archive, retained-resource cleanup or changing delivery scope.
4
+ These procedures do not apply merely because a Task notice mentions a failure.
5
+
6
+ Before intervening, inspect current intent and the existing execution/resource
7
+ path. Choose routine legal management actions without asking the user to operate
8
+ Yui mechanically; escalate only a genuine product choice, new authority,
9
+ unavailable external fact, credential, irreversible effect or safety boundary.
10
+ Preserve user-owned configuration; an explanation request is not a change request.
11
+
12
+ After an authorized PR/MR operation read
13
+ [publication](../../yui-runtime/references/publication.md).
14
+ Before archive or retained-resource cleanup, read
15
+ [archive boundaries](../../yui-runtime/references/archive.md).
16
+ Record confirmed delivery facts promptly. Completion does not authorize
17
+ archive, and ordinary archive approval does not authorize `--force`.
18
+ Distinguish settled business and stopped execution from safely retained
19
+ physical resources. Ordinary archive may retain the latter; follow the shared
20
+ archive diagnostics and exact cleanup actions instead of requesting force
21
+ merely for old terminal Integration worktrees or preserved diagnostics.
22
+ When only some bound Projects remain in the final delivery, preserve the exact
23
+ user scope decision or delegation in the owning Task and route it to its Leader.
24
+ The Leader can record `task project delivery` with the original Message and
25
+ latest scope-decision guard; this also works for completed, unarchived Tasks
26
+ without reopening them. An unchanged Project already needs no delivery.
27
+ An explicitly excluded Project is not a verified merge and its data is not
28
+ disposable. Use the shared remote-delivery/preflight projection, settle open
29
+ business and execution independently, and use ordinary authorized archive
30
+ while reporting safely retained resources. Do not demand force, delete bindings,
31
+ or solicit repeated Operator approval when the original scope authority suffices.
32
+ When the user explicitly authorizes force archive for an eligible terminal
33
+ Task, archive even if delivery proof or cleanup is incomplete. Report the
34
+ warnings and retained resources without claiming merge verification or physical
35
+ quiescence. Force archive is not permission to delete dirty/uncertain resources,
36
+ kill unrelated execution, abandon delivery or rewrite historical evidence.
37
+
38
+ For terminal ReviewRound resources, take ownership of the explicit Yui cleanup
39
+ operation or let the Leader do so. A Reviewer must not be expected to clean
40
+ its own runtime after returning its final result. Preserve dirty diagnostics
41
+ and report a real resource boundary rather than broadening cleanup.
@@ -0,0 +1,39 @@
1
+ # Progress and user-owned decisions
2
+
3
+ Read when interpreting a managed result/progress notice or presenting an
4
+ InputRequest. Routine submission ACK belongs to Operator routing, not downstream
5
+ delivery; no Leader resumption prerequisite applies merely to routing.
6
+
7
+ ## Present current progress
8
+
9
+ Apply **yui-runtime**'s current-inbox, complete-original and ACK flow at routing
10
+ boundaries and before handoff. Handle current input now; ACK its routing or
11
+ disposition with the durable reference, not downstream completion. Retain
12
+ returned refs for exact detail reads rather than reprinting Context for an ID.
13
+ A send receipt is identity/delivery evidence, not the submitted body.
14
+
15
+ Select progress facts for the question or disposition, not a routine full
16
+ inventory: Task/Project identity and bases, lifecycle, WorkItem ownership and
17
+ acceptance, exact Run/model/result, Integration, or Brief/blocker/InputRequest.
18
+ Retain unknowns and adverse evidence; combine related notices into one outcome
19
+ and bounded next action.
20
+
21
+ A terminal Worker AgentRun is not accepted delivery. A terminal Review is not a
22
+ Leader decision. Describe these states explicitly as awaiting Leader
23
+ disposition. When a Worker, Reviewer, or Integration result has arrived without
24
+ follow-up, route that exact result to the Leader instead of reporting the Task
25
+ as stalled or complete.
26
+
27
+ Task completion does not imply remote merge. Use
28
+ `yui task remote-delivery <task-id>` for external delivery status.
29
+
30
+ ## Handle user input and lifecycle boundaries
31
+
32
+ Inspect each InputRequest before presenting it. Present and answer it only when
33
+ it represents a genuine user-owned boundary. If it asks the user to choose
34
+ implementation, scheduling, review, or recoverable runtime behavior, cancel it
35
+ with a reason and return the decision to the Leader:
36
+
37
+ ```sh
38
+ yui task input cancel <task> <input> --reason "<Leader-owned decision>"
39
+ ```