@zq-silk/yui 0.13.9 → 0.14.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 (229) hide show
  1. package/ARCHITECTURE.md +69 -428
  2. package/README.md +108 -298
  3. package/dist/agent/managedRuntimeEnvironment.js +2 -2
  4. package/dist/cli/commandCatalog.js +39 -77
  5. package/dist/cli/interactionCandidates.js +4 -4
  6. package/dist/cli/interactionPolicy.js +7 -10
  7. package/dist/cli/invocationRouter.js +1 -1
  8. package/dist/cli/updateCommand.js +6 -27
  9. package/dist/cli/updateOrchestrator.js +63 -484
  10. package/dist/cli/updatePorts.js +15 -333
  11. package/dist/cli/upgradeCommand.js +8 -65
  12. package/dist/cli.js +57 -242
  13. package/dist/commands/configCommands.js +11 -62
  14. package/dist/commands/executionAuditCommands.js +23 -23
  15. package/dist/commands/globalRoleCommands.js +2 -7
  16. package/dist/commands/jobCommands.js +1 -4
  17. package/dist/commands/projectCommands.js +5 -5
  18. package/dist/commands/releaseCommands.js +3 -10
  19. package/dist/commands/resourcesCommands.js +2 -2
  20. package/dist/commands/sessionCommands.js +2 -2
  21. package/dist/commands/taskActor.js +31 -39
  22. package/dist/commands/taskChangeSetCommands.js +5 -12
  23. package/dist/commands/taskCommands.js +464 -1249
  24. package/dist/commands/taskContextCommand.js +35 -36
  25. package/dist/commands/taskExecutionCommands.js +33 -46
  26. package/dist/commands/taskInputCommands.js +20 -42
  27. package/dist/commands/taskNextActionCommand.js +9 -9
  28. package/dist/commands/taskOverviewCommand.js +56 -95
  29. package/dist/commands/taskRoleRuntimeStatus.js +77 -107
  30. package/dist/commands/taskUpstreamCommands.js +3 -3
  31. package/dist/commands/taskWorkspaceCommands.js +7 -79
  32. package/dist/commands/telemetryCommands.js +32 -124
  33. package/dist/commands/workflowCommands.js +3 -3
  34. package/dist/completion/fileCompletionManager.js +1 -1
  35. package/dist/config/configCatalog.js +4 -6
  36. package/dist/config/yuiConfig.js +6 -43
  37. package/dist/context/dispatchContext.js +14 -30
  38. package/dist/context/roleSessionContext.js +2 -2
  39. package/dist/context/sessionBootstrapManifest.js +2 -2
  40. package/dist/context/{runContextPack.js → turnContextPack.js} +58 -73
  41. package/dist/context/turnInputContract.js +204 -0
  42. package/dist/context/wakeNotification.js +2 -2
  43. package/dist/controller/agentRuntimeObserver.js +18 -18
  44. package/dist/controller/clientRuntime.js +13 -20
  45. package/dist/controller/controller.js +89 -116
  46. package/dist/controller/fileSchedulerStoreAdapter.js +511 -742
  47. package/dist/controller/jobControl.js +17 -17
  48. package/dist/controller/resourceInventory.js +6 -6
  49. package/dist/controller/resourceInventoryLinux.js +38 -59
  50. package/dist/controller/resourceInventoryRpc.js +3 -3
  51. package/dist/controller/resourceInventoryWorker.js +1 -1
  52. package/dist/controller/runtime.js +46 -53
  53. package/dist/controller/runtimeEventInbox.js +23 -31
  54. package/dist/controller/runtimeEventProcessor.js +15 -15
  55. package/dist/controller/{runtimeHookRunFence.js → runtimeHookTurnFence.js} +87 -81
  56. package/dist/controller/runtimeLaunchCoordinator.js +3 -3
  57. package/dist/controller/runtimeObservationHook.js +11 -8
  58. package/dist/controller/sessionNotify.js +11 -11
  59. package/dist/controller/structuredProviderObservation.js +89 -16
  60. package/dist/coordination/workMailbox.js +309 -579
  61. package/dist/coordination/workMailboxQueue.js +5 -6
  62. package/dist/core/controllerClient.js +1 -91
  63. package/dist/core/controllerServer.js +3 -6
  64. package/dist/doctor/doctor.js +51 -314
  65. package/dist/execution/candidateConvergence.js +3 -3
  66. package/dist/execution/executionGroup.js +32 -33
  67. package/dist/execution/executionHealth.js +36 -38
  68. package/dist/execution/resourceBroker.js +12 -12
  69. package/dist/executor/agentExecutor.js +30 -265
  70. package/dist/executor/effectiveLaunch.js +9 -19
  71. package/dist/executor/executorRegistry.js +43 -17
  72. package/dist/executor/fileRoleLaunchPlanner.js +56 -56
  73. package/dist/executor/launchPlan.js +3 -3
  74. package/dist/executor/workspacePreflightClassification.js +16 -16
  75. package/dist/grant/capabilityGrant.js +20 -25
  76. package/dist/input/inputRequest.js +12 -12
  77. package/dist/integration/changeSet.js +9 -13
  78. package/dist/integration/changeSetManifest.js +1 -1
  79. package/dist/integration/gitIntegrationService.js +2 -2
  80. package/dist/integration/integrationQueueService.js +5 -21
  81. package/dist/integration/overlapDiagnostics.js +2 -2
  82. package/dist/interaction/operatorPresentation.js +1 -1
  83. package/dist/job/jobRunner.js +1 -1
  84. package/dist/lifecycle/canonicalLifecycleEvent.js +25 -25
  85. package/dist/lifecycle/{exactRunTerminalization.js → exactTurnTerminalization.js} +116 -232
  86. package/dist/message/message.js +6 -6
  87. package/dist/observability/executionAudit.js +74 -86
  88. package/dist/observability/faultClassification.js +7 -24
  89. package/dist/observability/orchestrationMetrics.js +5 -5
  90. package/dist/observability/runtimeIdentity.js +34 -101
  91. package/dist/profile/agentProfile.js +1 -1
  92. package/dist/release/cliHomeReleaseFence.js +3 -3
  93. package/dist/release/releaseWorkflowEngine.js +6 -10
  94. package/dist/release/releaseWorkflowPorts.js +2 -2
  95. package/dist/release/workflowFileLock.js +1 -1
  96. package/dist/repository/checkoutSwap.js +1 -1
  97. package/dist/repository/gitWorkspace.js +0 -13
  98. package/dist/repository/project.js +1 -1
  99. package/dist/repository/projectMaintenanceLock.js +1 -2
  100. package/dist/repository/taskBaseFreshness.js +13 -13
  101. package/dist/repository/taskWorkspaceCoordinator.js +21 -25
  102. package/dist/repository/taskWorkspaceIdentity.js +8 -21
  103. package/dist/repository/taskWorkspacePreparer.js +63 -620
  104. package/dist/resources/autoResourceGc.js +3 -3
  105. package/dist/resources/liveReferences.js +1 -1
  106. package/dist/resources/resourceGc.js +1 -1
  107. package/dist/resources/sqliteResourceRegistry.js +1 -1
  108. package/dist/review/reviewDecision.js +7 -7
  109. package/dist/review/reviewFindingLedger.js +1 -1
  110. package/dist/review/reviewOutcomeClassifier.js +35 -50
  111. package/dist/review/reviewRound.js +14 -25
  112. package/dist/review/reviewerAvailability.js +4 -4
  113. package/dist/review/taskFinalReviewContractResolution.js +41 -0
  114. package/dist/role/role.js +6 -3
  115. package/dist/runtime/agentDriver.js +4 -0
  116. package/dist/runtime/agentHost.js +151 -36
  117. package/dist/runtime/builtinAgentDrivers.js +79 -2
  118. package/dist/runtime/codexAppServerRuntime.js +122 -0
  119. package/dist/runtime/continuationManager.js +3 -5
  120. package/dist/runtime/exactControlPlane.js +17 -42
  121. package/dist/runtime/firstProgressAdvisory.js +1 -1
  122. package/dist/runtime/index.js +2 -2
  123. package/dist/runtime/launchDiagnostics.js +2 -2
  124. package/dist/runtime/lifecycleReservation.js +4 -4
  125. package/dist/runtime/processExitObservation.js +1 -1
  126. package/dist/runtime/processExitOutbox.js +0 -32
  127. package/dist/runtime/promptEnvelope.js +9 -9
  128. package/dist/runtime/providerContinuation.js +2 -2
  129. package/dist/runtime/providerContinuationReconciliationService.js +2 -2
  130. package/dist/runtime/providerRuntimeIdentity.js +76 -24
  131. package/dist/runtime/recentTurnIds.js +38 -0
  132. package/dist/runtime/runtimeContinuationProjection.js +2 -2
  133. package/dist/runtime/runtimeHealthPolicy.js +1 -1
  134. package/dist/runtime/runtimeObservation.js +58 -21
  135. package/dist/runtime/runtimeProjection.js +19 -27
  136. package/dist/runtime/sessionLaunchRequest.js +2 -2
  137. package/dist/runtime/structuredProviderHost.js +177 -12
  138. package/dist/runtime/tmuxAdapters.js +46 -11
  139. package/dist/scheduler/activeRoleTurnDelivery.js +245 -0
  140. package/dist/scheduler/leaderWakeupProcessor.js +147 -445
  141. package/dist/scheduler/operatorEvent.js +4 -6
  142. package/dist/scheduler/resourceQueueProjection.js +71 -0
  143. package/dist/scheduler/{roleRunLiveness.js → roleTurnLiveness.js} +24 -28
  144. package/dist/scheduler/{roleRunStall.js → roleTurnStall.js} +162 -247
  145. package/dist/scheduler/taskExecutionProjection.js +99 -99
  146. package/dist/scheduler/taskObservabilityProjection.js +10 -10
  147. package/dist/scheduler/taskWake.js +4 -4
  148. package/dist/scheduler/wakeReason.js +6 -10
  149. package/dist/scheduler/wakeupQueue.js +0 -9
  150. package/dist/setup/setupCommand.js +2 -2
  151. package/dist/storage/currentTaskStore.js +46 -0
  152. package/dist/storage/persistenceWorker.js +1 -1
  153. package/dist/storage/sqliteSchema.js +81 -485
  154. package/dist/storage/sqliteStore.js +206 -365
  155. package/dist/storage/storageSchema.js +1 -15
  156. package/dist/storage/storageVersions.js +8 -9
  157. package/dist/storage/storeRpc.js +10 -34
  158. package/dist/storage/taskStore.js +63 -3415
  159. package/dist/storage/upgrade/recordVersions.js +55 -149
  160. package/dist/storage/upgrade/upgradeOrchestrator.js +89 -1752
  161. package/dist/task/completionReadiness.js +5 -5
  162. package/dist/task/deliveryGuard.js +10 -10
  163. package/dist/task/nextAction.js +74 -77
  164. package/dist/task/task.js +2 -4
  165. package/dist/task/taskRecordReference.js +3 -3
  166. package/dist/task/taskRecordRetirement.js +1 -1
  167. package/dist/telemetry/sqliteTelemetryStore.js +53 -53
  168. package/dist/telemetry/telemetryConfig.js +14 -14
  169. package/dist/telemetry/telemetryWiring.js +8 -14
  170. package/dist/turn/turn.js +356 -0
  171. package/dist/{run/runIdentity.js → turn/turnIdentity.js} +4 -4
  172. package/dist/verification/gateArtifactStore.js +2 -2
  173. package/dist/web/assets/client/app.js +1 -1
  174. package/dist/web/assets/client/components.js +29 -54
  175. package/dist/web/assets/client/i18n.js +17 -37
  176. package/dist/web/assets/client/view.js +37 -37
  177. package/dist/web/assets/shell.js +1 -1
  178. package/dist/web/assets/styles/cards.js +5 -5
  179. package/dist/web/assets/styles/widgets.js +1 -2
  180. package/dist/web/webSnapshot.js +65 -60
  181. package/dist/workItem/workItem.js +11 -11
  182. package/dist/workspace/workItemChangeSetManager.js +1 -1
  183. package/docs/task-local-identity.md +5 -5
  184. package/i18n/README.zh-CN.md +41 -54
  185. package/package.json +1 -1
  186. package/skills/yui-leader/SKILL.md +85 -83
  187. package/skills/yui-operator/SKILL.md +16 -16
  188. package/skills/yui-reviewer/SKILL.md +10 -10
  189. package/skills/yui-runtime/SKILL.md +17 -18
  190. package/skills/yui-worker/SKILL.md +16 -18
  191. package/dist/context/runContextContract.js +0 -162
  192. package/dist/executor/turnCompletion.js +0 -126
  193. package/dist/review/taskFinalReviewContractEvent.js +0 -1
  194. package/dist/review/taskFinalReviewContractRebind.js +0 -367
  195. package/dist/run/agentRun.js +0 -356
  196. package/dist/run/rejectedYieldAttempt.js +0 -221
  197. package/dist/run/runControlRequest.js +0 -50
  198. package/dist/run/yieldReceipt.js +0 -65
  199. package/dist/runtime/turnCompletion.js +0 -3
  200. package/dist/scheduler/actionability.js +0 -323
  201. package/dist/scheduler/activeRoleRunDelivery.js +0 -868
  202. package/dist/scheduler/activeTaskProgress.js +0 -126
  203. package/dist/storage/compatibleTaskStore.js +0 -248
  204. package/dist/storage/migration/baseline.js +0 -78
  205. package/dist/storage/migration/classifier.js +0 -51
  206. package/dist/storage/migration/compatibleCodec.js +0 -53
  207. package/dist/storage/migration/engine.js +0 -147
  208. package/dist/storage/migration/index.js +0 -33
  209. package/dist/storage/migration/planner.js +0 -154
  210. package/dist/storage/migration/productionRegistry.js +0 -3931
  211. package/dist/storage/migration/registry.js +0 -169
  212. package/dist/storage/migration/report.js +0 -54
  213. package/dist/storage/migration/types.js +0 -31
  214. package/dist/storage/upgrade/homeClassification.js +0 -353
  215. package/dist/storage/upgrade/homeMigrationTarget.js +0 -595
  216. package/dist/storage/upgrade/migrationReceipt.js +0 -67
  217. package/dist/storage/upgrade/offlineUpgradeInventory.js +0 -453
  218. package/dist/storage/upgrade/productionMigrationRegistry.js +0 -6
  219. package/dist/storage/upgrade/pseudoLayoutRepair.js +0 -241
  220. package/dist/storage/upgrade/recordVersionScan.js +0 -176
  221. package/dist/storage/upgrade/sqliteFileSet.js +0 -50
  222. package/dist/storage/upgrade/sqliteMigrationTarget.js +0 -375
  223. package/dist/storage/upgrade/sqliteRecordMigrationTarget.js +0 -305
  224. package/dist/storage/upgrade/sqliteStateMigration.js +0 -918
  225. package/dist/storage/upgrade/switchProgress.js +0 -80
  226. package/dist/storage/upgrade/upgradeReceipt.js +0 -161
  227. package/dist/storage/upgradeCoordination.js +0 -187
  228. package/dist/storage/upgradeFence.js +0 -366
  229. package/dist/telemetry/telemetryCompaction.js +0 -252
@@ -5,7 +5,7 @@ description: Lead one Yui Task from the user's core outcome by reasoning from fi
5
5
 
6
6
  # Yui Leader
7
7
 
8
- Follow `yui-runtime` first and load the exact current Run Context Pack before
8
+ Follow `yui-runtime` first and load the exact current Turn Context Pack before
9
9
  making Task decisions. Recover authority from its Snapshot and deltas, never
10
10
  from launch text or transcript memory.
11
11
 
@@ -25,7 +25,7 @@ Do not invent another execution entity or a `yui ... subagent` command.
25
25
  Treat single- and multi-Lane work as the same ExecutionGroup contract. A
26
26
  fixed one-Lane dispatch may use the WorkItem/ReviewRound owner directly; every
27
27
  panel or adaptive Lane gets its own durable execution-Lane workspace and exact
28
- Run snapshot. Accept defaults to all usable terminal Lane outputs (or the
28
+ Turn snapshot. Accept defaults to all usable terminal Lane outputs (or the
29
29
  explicit selection), and the Candidate/Review result aggregates each selected
30
30
  Lane's summary, checks, findings, evidence, and Git snapshot. Rejecting an
31
31
  already-resolved Group always creates a fresh Group on redispatch; retry an
@@ -54,22 +54,22 @@ Choose the executor in this order:
54
54
  2. **Native subagents** when bounded implementation or research benefits from
55
55
  specialist attention or parallel fan-out inside the current Agent Session.
56
56
  Give each child an explicit Profile, workspace access, and result contract.
57
- 3. **Task Role AgentRun** when the work genuinely needs independent durable
57
+ 3. **Task Role Turn** when the work genuinely needs independent durable
58
58
  ownership, different credentials or authority, a provider/model capability
59
59
  unavailable to the current Agent, or an independently managed Session and
60
- Run lifecycle.
60
+ Turn lifecycle.
61
61
 
62
62
  Do not create or dispatch a WorkItem merely to obtain a fresh context, run a command,
63
63
  perform a routine small edit, or add an intermediate review. Direct and native
64
- execution add no Worker Role, Worker Yui Session, or Worker AgentRun. The exact
65
- Leader Run remains active until an explicit Yui yield, completion, or exact
66
- failure; native child lifecycle never decides that Run outcome. Task main is
64
+ execution add no Worker Role, Worker Yui Session, or Worker Turn. The exact
65
+ Leader Turn corresponds to the current Provider Turn and ends at its native
66
+ terminal; native child lifecycle never decides Task or WorkItem completion. Task main is
67
67
  the Leader-owned durable delivery boundary; the WorkItem and its workspace are
68
68
  an independently owned requirement's boundary.
69
69
 
70
70
  Provider-native foreground and background child lifecycle stays owned by the
71
- current Agent Session. Structured child completion notifications may resume the
72
- Leader in later provider Turns while the same Yui AgentRun remains active.
71
+ current Agent Session. Structured child completion notifications may wake the
72
+ Leader in a later Provider Turn and therefore a new Turn.
73
73
 
74
74
  A Leader-owned Project result uses a clean committed Task main and exact
75
75
  completion-head proof. A WorkItem result uses its own Develop workspace and a
@@ -78,6 +78,10 @@ acceptance, Task-final Review when required, and Task completion remain
78
78
  distinct judgments and records. Integrate every accepted WorkItem result into
79
79
  the single Task main before reviewing or completing the whole Task.
80
80
 
81
+ When the Leader executes work itself, update the affected WorkItem or Task
82
+ facts before ending the Provider Turn. Yui records the Turn result but does not
83
+ self-wake the Leader or infer semantic completion from that terminal event.
84
+
81
85
  Use this validation and review cadence unless Project Policy requires more:
82
86
 
83
87
  1. During implementation, run the smallest target check that can catch the
@@ -114,10 +118,10 @@ retain the original Candidate, Review, and Integration evidence.
114
118
  Native and managed waits use different fences. For native children, let the
115
119
  provider deliver structured completion notifications while the parent
116
120
  Conversation is live. A parent Turn or Activation may end first; Yui preserves
117
- the active Run and known continuation identities, reconciles only known
121
+ the active Turn and known continuation identities, reconciles only known
118
122
  children through adapter metadata, and routes a later result reference through
119
123
  the durable inbox. Do not poll, send a waiting Message, rewrite a checkpoint,
120
- or yield merely to preserve that native wait.
124
+ or end the Turn merely to preserve that native wait.
121
125
 
122
126
  Before the first durable Leader action, Yui observes fresh native generations
123
127
  that produce no WorkItem, Review, Integration, or Leader-attributed durable
@@ -139,11 +143,12 @@ children by their event reference instead of rerunning them; rerun only
139
143
  best-effort children whose result was never externalized. Critical,
140
144
  non-repeatable, or independently verifiable work must use a Yui
141
145
  WorkItem/ExecutionGroup, not a native subagent, because only a managed Lane
142
- owns an independent Run, receipt, and workspace.
146
+ owns an independent Turn, receipt, and workspace.
143
147
 
144
- For a managed Task Role or Reviewer Run, persist a necessary changed checkpoint,
145
- yield the active Leader Run, and stop the turn. Its durable mailbox result or an
146
- attention event wakes a later Leader Run. An unchanged healthy managed wait is
148
+ For a managed Task Role or Reviewer Turn, persist any changed semantic checkpoint,
149
+ then end the active Leader Turn with a truthful final report. Yui stores its Turn
150
+ result automatically. A durable mailbox result or attention event wakes a later
151
+ Leader Turn; an active Task alone never does. An unchanged healthy managed wait is
147
152
  silent. The ordinary fast path emits no Task Message and no InputRequest: write
148
153
  a Message only for a new semantic conclusion with value to another reader, and
149
154
  create an InputRequest only for a real user choice, authorization, or
@@ -155,12 +160,12 @@ unavailable external fact that blocks progress.
155
160
  reads durable Task records and returns one recommended command, exact refs,
156
161
  legitimate alternatives, and any `judgmentRequired` explanation. The Leader
157
162
  still owns product priority, acceptance, risk, and the choice among legal
158
- alternatives. Treat protocol inconsistencies, active Run ownership, open
163
+ alternatives. Treat protocol inconsistencies, active Turn ownership, open
159
164
  InputRequests, Draft activation, exact duplicates, and durable final-review
160
165
  contracts as hard boundaries; treat semantic-budget and suspected-duplicate
161
166
  warnings as evidence rather than commands.
162
167
  - Keep the context layers distinct in every handoff: Yui Core supplies durable
163
- identity, lifecycle, access, workspace, and exact-yield safety; this generic
168
+ identity, lifecycle, access, workspace, and exact Turn-result correlation; this generic
164
169
  role Skill supplies portable collaboration behavior; the bound Project's
165
170
  Agent-native Skills and its Policy and Knowledge supply project-specific
166
171
  behavior; and the Task Contract supplies the current objective, scope,
@@ -214,10 +219,10 @@ unavailable external fact that blocks progress.
214
219
  Task Messages are the Task's collaboration narrative, not a scheduler log.
215
220
  Before writing one, ask what the next reader must understand, decide, or do.
216
221
  When that bar is met, write exactly one explicit Message with
217
- `yui task message send <task-id> --body-file -`; never duplicate a Run yield.
222
+ `yui task message send <task-id> --body-file -`; never duplicate a Turn result.
218
223
  Record a new conclusion, material architecture or behavior change, meaningful
219
224
  acceptance/rejection, user impact, risk, or recovery decision; point to the
220
- relevant Task, WorkItem, Run, Review, Input, Decision, or Milestone for detail.
225
+ relevant Task, WorkItem, Turn, Review, Input, Decision, or Milestone for detail.
221
226
  Do not repeat a Worker, Reviewer, or Tester conclusion merely because the
222
227
  Leader saw it. Add a new summary only when the Leader adds acceptance,
223
228
  interpretation, impact, a changed plan, or a decision. Keep dispatch, attach,
@@ -245,7 +250,7 @@ yui task wake show <task-id> <wake-id>
245
250
  ```
246
251
 
247
252
  For a fresh generation (no native history), or when the envelope indicates a
248
- major change, start with the exact Run Context Pack loaded through
253
+ major change, start with the exact Turn Context Pack loaded through
249
254
  `yui-runtime`, expand only its authorized Task and Project Policy refs, then
250
255
  inspect Project-owned records as needed:
251
256
 
@@ -254,15 +259,15 @@ yui project show <project>
254
259
  yui project knowledge list <project>
255
260
  ```
256
261
 
257
- The `wake show` delta lists the exact events, messages, and Runs that arrived
262
+ The `wake show` delta lists the exact events, messages, and Turns that arrived
258
263
  in the window. Inspect `task work`, `task role`, `task integration`, `task
259
264
  input`, and other narrower records only when the projection or delta
260
265
  identifies a specific record that needs closer evidence. Use exact IDs
261
266
  returned by Yui. Never edit `state.json`, managed refs, worktrees, Sessions,
262
267
  or provider IDs directly.
263
268
 
264
- For a `role-run-stalled` or runtime-health wake, diagnose from the exact
265
- Run/Event/Session and related WorkItem/Review/Integration records. Preserve
269
+ For a `role-turn-stalled` or runtime-health wake, diagnose from the exact
270
+ Turn/Event/Session and related WorkItem/Review/Integration records. Preserve
266
271
  the current fence and write a Task Message only for a new root cause, impact,
267
272
  recovery action, acceptance decision, or user-relevant conclusion; an
268
273
  unchanged healthy wait is zero Message.
@@ -274,7 +279,7 @@ Maintain durable context throughout a long-running Task:
274
279
  - Keep the technical approach stable enough to explain the coordinated change
275
280
  across Projects. Put executable per-Project changes and checks in WorkItems,
276
281
  not in Project Knowledge.
277
- - Before a Leader yield after material progress, update `focus` and
282
+ - Before ending a Leader Turn after material progress, update `focus` and
278
283
  `leader-summary` so the next wake can resume without relying on the native
279
284
  conversation transcript. An unchanged healthy wait needs no duplicate
280
285
  checkpoint write.
@@ -320,7 +325,7 @@ Choose before creating the WorkItem:
320
325
  does not need a separately managed lifecycle.
321
326
  - **Native subagent**: bounded parallel or specialist work that can inherit the
322
327
  Leader's current Agent, credentials, context, and native child mechanism.
323
- - **Task Role AgentRun**: work requiring a different Agent/provider,
328
+ - **Task Role Turn**: work requiring a different Agent/provider,
324
329
  credentials, user-owned independent Session, durable lifecycle, or repeated
325
330
  dispatches to a Task-bound Worker instance.
326
331
 
@@ -340,9 +345,9 @@ push, Integration, Task mutation, other workspaces, stable checkouts, and the
340
345
  real Yui control-plane home. When
341
346
  creating an explicit Task Role binding, also set and read back the required
342
347
  model and effort instead of relying on CLI defaults.
343
- Every managed reviewer must deliver through the current Run's exact
344
- `--summary-file -` yield command; a final response alone is not a durable
345
- handoff. Read the completed result as one review batch and route all reported
348
+ Every managed reviewer must end its Provider Turn with one complete report;
349
+ Yui stores that final response as the current Turn result. Read the completed
350
+ result as one review batch and route all reported
346
351
  findings together; do not manufacture another ReviewRound merely because one
347
352
  finding was handled before the rest of the batch.
348
353
 
@@ -400,7 +405,7 @@ yui task work update <work-id> done \
400
405
  Use `failed` with recovery context when it cannot be completed. Do not mark
401
406
  work done before checking its acceptance criteria. When global review is
402
407
  enabled, `done` submits a Candidate instead of completing the WorkItem. Read
403
- the exact Run Context Pack and follow that Candidate's snapshotted policy.
408
+ the exact Turn Context Pack and follow that Candidate's snapshotted policy.
404
409
 
405
410
  ## Create a native subagent
406
411
 
@@ -430,7 +435,7 @@ confirmed.
430
435
 
431
436
  Create and communicate with children through the native Agent tools. Yui does
432
437
  not create, address, resume, or terminate those children; it observes their
433
- structured lifecycle so the parent AgentRun can span the provider Turns needed
438
+ structured lifecycle so the parent Turn can span the provider Turns needed
434
439
  to receive their results, including a later provider Activation. Children must
435
440
  not mutate Yui lifecycle state. If the provider cannot automatically return a
436
441
  detached result to the parent, the adapter records a bounded Provider result
@@ -457,7 +462,7 @@ yui task work update <work-id> failed --summary "<round history and recovery con
457
462
  When a different provider, credentials, interactive Session, or durable
458
463
  lifecycle is required, use a Task Role instead.
459
464
 
460
- ## Dispatch a Task Role AgentRun
465
+ ## Dispatch a Task Role Turn
461
466
 
462
467
  A Task Role is a mutable Task-bound Worker instance. Apply a provider-neutral
463
468
  Profile snapshot, then bind one or more Agents with independent runtime
@@ -499,10 +504,10 @@ yui task work isolate <work-id>
499
504
 
500
505
  WorkItem write scope is monotonic: it may expand but never shrink. If a Worker
501
506
  reports that another Project must be modified, decide whether it belongs to the
502
- same bounded result. The Worker yields without touching that Project. If
507
+ same bounded result. The Worker ends its Turn without touching that Project. If
503
508
  approved, add an unbound Project to the Task when necessary, update the
504
509
  awaiting WorkItem scope with the complete old-plus-new Project set, isolate it
505
- again, reject the yielded round with the scope-expansion reason, then
510
+ again, reject the completed round with the scope-expansion reason, then
506
511
  redispatch:
507
512
 
508
513
  ```sh
@@ -521,13 +526,13 @@ Project or write through a Task-main context directory. Split a new WorkItem or
521
526
  Task when the result or lifecycle is independent.
522
527
 
523
528
  Do not dispatch until dependencies are complete. Do not create a second active
524
- Run for the same Role or WorkItem. A Worker must yield its AgentRun. Yield
525
- delivers evidence and moves the WorkItem to Leader review; it is not acceptance.
529
+ Turn for the same Role or WorkItem. A Worker's final Provider response is stored
530
+ as Turn evidence and moves the WorkItem to Leader review; it is not acceptance.
526
531
 
527
532
  ## Review, retry, capture, and integrate
528
533
 
529
- After any Candidate is submitted, inspect its exact policy, Run result,
530
- ReviewRounds, checks, and workspace through the exact Run Context Pack and its
534
+ After any Candidate is submitted, inspect its exact policy, Turn result,
535
+ ReviewRounds, checks, and workspace through the exact Turn Context Pack and its
531
536
  authorized expansions.
532
537
 
533
538
  - No configured review policy: review the Candidate directly, or delegate a
@@ -544,15 +549,15 @@ authorized expansions.
544
549
  require it. The final Reviewer evaluates the complete result across bound
545
550
  Projects; it is not a second per-WorkItem approval protocol.
546
551
  - Before choosing a Task-final Review action, read `task context` or
547
- `task next-action` and inspect every active AgentRun's purpose and exact
552
+ `task next-action` and inspect every active Turn's purpose and exact
548
553
  WorkItem/ReviewRound binding, the current durable heads, active Reviews,
549
554
  each Reviewer's availability, the latest accepted baseline, candidate
550
555
  relation, and Delta facts. These are decision support, not an autopilot;
551
- a Review Run is evidence in progress, not a global Task lock.
556
+ a Review Turn is evidence in progress, not a global Task lock.
552
557
  - A changed Task head may justify a new semantic Task-final Round. Reuse the
553
558
  same Reviewer Role Session and stable workspace; Round id, full versus Delta
554
559
  mode, desired revision, and frozen commit do not require a replacement
555
- Session. Round identity still binds each Run to the exact frozen head.
560
+ Session. Round identity still binds each Turn to the exact frozen head.
556
561
  - An active Task-final Review freezes candidate A only. Continue handling new
557
562
  user input and, when appropriate, advance candidate B. Always consume A's
558
563
  result, then route it as exact evidence for A, a baseline for descendant B,
@@ -560,7 +565,7 @@ authorized expansions.
560
565
  merely because Task main moved.
561
566
  - Read active Review facts directly from its ReviewRound: frozen Project
562
567
  commits define that Review's evidence boundary; current candidate relation,
563
- active Run, and workspace references describe current execution. Do not infer
568
+ active Turn, and workspace references describe current execution. Do not infer
564
569
  a Task lock or wait for a synthetic freeze lifecycle before advancing Task
565
570
  main.
566
571
  - If Yui reports a Reviewer `busy`, wait for the suggested interval, select a
@@ -590,11 +595,11 @@ authorized expansions.
590
595
  completion; routine retries and routing do not need an InputRequest.
591
596
  - A failed review is terminal evidence, not an automatic retry. Retry a
592
597
  WorkItem review with a new `task work review`, accept with an explicit
593
- rationale, or ask the user. `yui task run retry <run-id>` retries an exact
598
+ rationale, or ask the user. `yui task turn retry <turn-id>` retries an exact
594
599
  failed Task-final Reviewer execution under the same semantic ReviewRound. If
595
600
  that immutable Round is durably proven non-semantic without any review
596
601
  checks, evidence, finding, or ambiguous output—even when a pre-review
597
- context/workspace failure historically terminalized it as completed/yielded—
602
+ context/workspace failure historically terminalized it without a semantic result—
598
603
  the Leader may run
599
604
  `yui task review force-fresh <task>/<review-round>` to create one distinct
600
605
  full Round over the identical frozen heads. It fails closed for every
@@ -622,7 +627,7 @@ authorized expansions.
622
627
 
623
628
  - If semantics or evidence are insufficient, reject with precise feedback and
624
629
  redispatch the same WorkItem. Keep the isolated workspace so the Worker can
625
- repair the existing result. This creates another AgentRun and Candidate but
630
+ repair the existing result. This creates another Turn and Candidate but
626
631
  must resume the original execution Role's native Session; do not create a
627
632
  replacement Session silently.
628
633
  - If the result is acceptable and has no isolated code changes, accept it.
@@ -656,7 +661,7 @@ unintegrated.
656
661
  Workspace ownership is not Role ownership. The WorkItem owns its Develop
657
662
  workspace even when a Task Role executes there; a Task Reviewer Role keeps one
658
663
  stable physical workspace while each ReviewRound owns the exact frozen
659
- workspace evidence for its Run, and each IntegrationAttempt owns its candidate
664
+ workspace evidence for its Turn, and each IntegrationAttempt owns its candidate
660
665
  worktree. Dispatch attaches snapshots only. Review workspace cleanup is
661
666
  explicit, and review edits can never feed WorkItem ChangeSet capture.
662
667
 
@@ -676,9 +681,9 @@ For manual resolution, edit only the candidate worktree and finish the reported
676
681
  Git conflict before continuing. Failed checks, rejected candidates, and target
677
682
  movement must remain explicit; do not bypass them with manual ref updates.
678
683
 
679
- Choose cleanup from the WorkItem's expected next use, not merely from a Run
684
+ Choose cleanup from the WorkItem's expected next use, not merely from a Turn
680
685
  ending. If another iteration is imminent, retain the native process and
681
- worktree. For a longer pause with no active Run or pending delivery, release
686
+ worktree. For a longer pause with no active Turn or pending delivery, release
682
687
  only the runtime; Yui preserves the native Session id and WorkItem worktree so
683
688
  the next dispatch can resume them:
684
689
 
@@ -694,7 +699,7 @@ yui task work cleanup <task>/<work> --integrated
694
699
  ```
695
700
 
696
701
  Terminal child worktrees are completion advisories, not semantic blockers.
697
- Clean them before archive; do not create a new WorkItem, ReviewRound, or Run
702
+ Clean them before archive; do not create a new WorkItem, ReviewRound, or Turn
698
703
  only to make cleanup happen before Task completion.
699
704
 
700
705
  Use `--abandon` only for deliberate discard. Dirty worktrees remain available
@@ -711,22 +716,22 @@ yui task role session inspect <task> <role>
711
716
  ```
712
717
 
713
718
  When a Provider-accepted Turn fails with availability, `429`, capacity, or a
714
- recoverable transport error and the Session remains usable, retain the Run and
719
+ recoverable transport error and the Session remains usable, retain the Turn and
715
720
  Session; a recovery action adds a new Turn on that same native Session. A
716
721
  Session preparation failure or Driver rejection before input acceptance fails
717
- the exact Run once; inspect its error and explicitly retry that failed Run when
722
+ the exact Turn once; inspect its error and explicitly retry that failed Turn when
718
723
  another attempt is useful. Core will not redispatch it on a scheduler tick.
719
724
 
720
725
  If the Driver proves that the Session cannot continue, settle or retire the
721
- exact active Run, stop only that Role Session, then retry the failed Run so the
726
+ exact active Turn, stop only that Role Session, then retry the failed Turn so the
722
727
  next dispatch starts a new Session:
723
728
 
724
729
  ```sh
725
730
  yui task role session stop <task> <role> --reason "<error decision>"
726
- yui task run retry <task>/<failed-run>
731
+ yui task turn retry <task>/<failed-turn>
727
732
  ```
728
733
 
729
- The new Run context contains the prior Agent, adapter, Run, Host activation,
734
+ The new Turn context contains the prior Agent, adapter, Turn, Host activation,
730
735
  native Session/Turn identities, and complete raw error through the referenced
731
736
  Task event. Inspect recent `runtime.agent-error` events before another fresh
732
737
  Session; after repeated fresh-Session failures, report the evidence and bounded
@@ -747,52 +752,49 @@ yui task input request <task-id> --question "<specific question>" \
747
752
 
748
753
  Omit `--choice` for free text. Use `--recommend` and `--timeout-seconds` only
749
754
  when the exact fallback is safe; never use a timeout to bypass authorization.
750
- A successful request ends the current Leader control Run, so wait for Yui to
751
- resume the fixed Leader Session.
755
+ A successful request records the durable question. End the Provider Turn with
756
+ a truthful blocked checkpoint; Yui stores that response as the current Turn
757
+ result and later wakes the same fixed Leader Session when an answer arrives.
752
758
 
753
759
  ## Finish every Leader turn
754
760
 
755
- Every wake is an active control Run. Before ending:
761
+ Every wake is an active control Turn. Before ending:
756
762
 
763
+ - Inspect the current WorkItems. If this Turn acted on a Leader-assigned
764
+ WorkItem, persist its actual lifecycle and result before the final response:
765
+ move `pending` to `running`, then record `done` or `failed` with the evidence
766
+ you actually established. Saying that the WorkItem is complete in the Turn
767
+ result does not update the WorkItem.
757
768
  - If you cannot finally determine success, failure, completeness, or the
758
769
  correct disposition, do not guess, silently stop, or hide uncertainty behind
759
770
  a success summary. Clearly label the checkpoint uncertain, incomplete,
760
771
  blocked, or requiring Leader judgment.
761
- - Preserve the same complete checkpoint before either yield or an InputRequest.
762
- When applicable, record exact Run, WorkItem, and native Session identity;
772
+ - Preserve the same complete checkpoint before ending the Turn or creating an InputRequest.
773
+ When applicable, record exact Turn, WorkItem, and native Session identity;
763
774
  actions actually performed; changed paths and commit/worktree state; checks
764
775
  actually run and their outcomes; provider, runtime, or permission errors;
765
776
  the last confirmed lifecycle boundary; work not performed; unresolved
766
777
  assumptions or decisions; residual risks; confidence; and bounded next
767
778
  options.
768
- - Review Runs report findings, verification gaps, and limits. Use that evidence
779
+ - Review Turns report findings, verification gaps, and limits. Use that evidence
769
780
  to decide disposition as Leader; do not treat the review as acceptance.
770
781
 
771
782
  1. update the Brief checkpoint if semantic state changed;
772
783
  2. record any material Decision, completed Milestone, or stable Project
773
784
  Knowledge;
774
- 3. do exactly one of: complete the Task, create an InputRequest, or yield.
775
-
776
- ```sh
777
- yui task run yield <run-id> --summary-file - <<'YUI_SUMMARY'
778
- <current result or waiting state>
779
- YUI_SUMMARY
780
- ```
781
-
782
- A Leader yield preserves immutable Run evidence only. It never implies Leader
783
- acceptance, WorkItem completion, ChangeSet capture, Integration, or Task
784
- completion. The exact yield command must be the final tool action. After it
785
- succeeds, stop immediately and do not inspect, poll, accept, or perform more
786
- work in the same native turn. If the exact yield is denied, do not retry,
787
- broaden permissions, use a wrapper, mutate Yui state, or invent delivery
788
- evidence; truthfully surface the blocker through the supported provider failure
789
- boundary. Do not add a fallback protocol.
790
-
791
- Yield before waiting only for managed Task Role or Reviewer results whose
792
- durable mailbox can wake the Task. Do not yield merely because native child
793
- results are outstanding: the provider owns their completion notifications, and
794
- Yui keeps this AgentRun active across intermediate provider Turns. After native
795
- work drains, continue to Task completion, InputRequest, or final yield.
785
+ 3. decide whether to complete the Task, create an InputRequest, or leave it
786
+ active for later facts;
787
+ 4. end the Provider Turn with one complete, truthful final report.
788
+
789
+ Yui automatically stores the final Provider response as the current Turn result.
790
+ That result never implies Leader acceptance, WorkItem completion, ChangeSet
791
+ capture, Integration, or Task completion. Do not wait inside a Provider Turn
792
+ for managed Task Role or Reviewer results whose durable mailbox can wake the
793
+ Task; their result creates a later Leader Turn in the same Session. Native child
794
+ work remains part of the current Provider Turn and should drain before it ends.
795
+ When the Turn ends with the Task still active, Yui remains quiet until a real
796
+ durable event arrives; do not rely on periodic re-wakes to revisit unchanged
797
+ state.
796
798
 
797
799
  Complete only after the topology-derived evidence is satisfied, Role work is
798
800
  terminal, latest isolated results are integrated or deliberately abandoned,
@@ -811,8 +813,8 @@ yui task complete <task-id> --summary "<outcome, validation, and remaining risks
811
813
 
812
814
  Retire obsolete WorkItems with `yui task work retire <task>/<work> --summary
813
815
  "..."`, optionally using `--replacement`. If the current Provider Conversation
814
- cannot continue, settle its Run and stop the exact idle Session with
815
- `yui task role session stop`; the next explicit Run dispatch creates the
816
+ cannot continue, settle its Turn and stop the exact idle Session with
817
+ `yui task role session stop`; the next explicit Turn dispatch creates the
816
818
  replacement. Archiving is a
817
819
  separate global Operator lifecycle action. It performs the final Task-owned
818
820
  runtime and clean-worktree teardown, including this Leader.
@@ -5,7 +5,7 @@ description: Route multi-project user requests into Yui Tasks, configure Yui thr
5
5
 
6
6
  # Yui Operator
7
7
 
8
- Follow `yui-runtime` for every routed managed Run. Load only the exact
8
+ Follow `yui-runtime` for every routed managed Turn. Load only the exact
9
9
  authorized Context Pack; do not infer Task authority from a prompt, process, or
10
10
  workspace.
11
11
 
@@ -41,7 +41,7 @@ that resource, effect, and isolation boundary; never broaden the authorization.
41
41
  Task Messages and Operator notices should preserve only information that
42
42
  changes the user's understanding, authorization, or next action. Summarize a
43
43
  stage result, cross-Task consequence, material risk, or explicit decision and
44
- refer to the exact Task/Run/WorkItem/Input/Job record for evidence. Do not
44
+ refer to the exact Task/Turn/WorkItem/Input/Job record for evidence. Do not
45
45
  forward scheduler dispatch, attach, heartbeat, sampling, waiting, or repeated
46
46
  no-change recovery as narrative. Keep the recipient's abstraction level in
47
47
  mind and avoid imposing a fixed heading, field, section, or character
@@ -249,10 +249,10 @@ Task; use current durable state and the command's consistency fences to avoid
249
249
  duplicate or conflicting decisions.
250
250
 
251
251
  The Leader chooses among direct execution, native subagents, and a Task Role
252
- AgentRun. Native subagents are created inside the Leader Session, inherit the
252
+ Turn. Native subagents are created inside the Leader Session, inherit the
253
253
  Leader Agent, ignore Task Role Agent bindings, and have no Yui launch command.
254
254
  Their structured lifecycle and completion notifications may span provider
255
- Turns inside the same Yui AgentRun. A Task Role is required when the user
255
+ Turns inside the same Yui Turn. A Task Role is required when the user
256
256
  requests a different provider, credentials, interactive Session, or durable
257
257
  independent lifecycle.
258
258
 
@@ -290,7 +290,7 @@ affected Session and stop rather than partially updating the configuration or
290
290
  telling the Leader to reconstruct it.
291
291
 
292
292
  Provider transcripts remain native to the Agent. Yui stores durable Task
293
- context, WorkItems, AgentRuns, compact results, and Git integration evidence.
293
+ context, WorkItems, Turns, compact results, and Git integration evidence.
294
294
 
295
295
  ## Present progress
296
296
 
@@ -299,13 +299,13 @@ terminal text. For progress, report:
299
299
 
300
300
  - Task ID, Project bindings and base refs, and lifecycle;
301
301
  - current WorkItems, dependencies, and assigned Task Roles;
302
- - current and recent AgentRuns, actual Agent/model when recorded, and yielded
302
+ - current and recent Turns, actual Agent/model when recorded, and stored
303
303
  result;
304
304
  - Leader acceptance or rejection and requested repair;
305
305
  - latest ChangeSet/integration state;
306
306
  - current Brief focus, latest Milestone, blockers, and open InputRequests.
307
307
 
308
- Worker yield is not completion. Describe a result as awaiting Leader review
308
+ Worker Turn completion is not WorkItem completion. Describe a result as awaiting Leader review
309
309
  until it is accepted. Report code as delivered only when the governing
310
310
  Candidate's current ChangeSet is committed; a superseded disposition settles
311
311
  the workflow without claiming that version was delivered.
@@ -327,7 +327,7 @@ the workflow without claiming that version was delivered.
327
327
  - When a proven incorrect historical record is affecting current projections,
328
328
  preserve it as audit evidence and append a reasoned retirement with
329
329
  `yui task message retire <task>/<message> --reason "..."`,
330
- `yui task run retire <task>/<run> --reason "..."`, or
330
+ `yui task turn retire <task>/<turn> --reason "..."`, or
331
331
  `yui task work retire <task>/<work> --summary "..."`. Inspect the exact
332
332
  record first; retirement is not a substitute for normal failure recovery or
333
333
  for resolving a still-valid result.
@@ -342,7 +342,7 @@ the workflow without claiming that version was delivered.
342
342
  the reason: `yui task input cancel <task> <input> --reason "..."`.
343
343
  - Raise an InputRequest only for a real user choice, authorization, an external
344
344
  fact Yui cannot derive, or a safety boundary. For Yui-observable conditions
345
- such as a Run's terminal state, a committed Integration, or a runtime version,
345
+ such as a Turn's terminal state, a committed Integration, or a runtime version,
346
346
  read the state and report it; never ask the user to confirm "continue" as a
347
347
  scheduler for machine-observable progress.
348
348
  - Prefer the current Leader's coherent plan when it remains valid, but do not
@@ -353,12 +353,12 @@ the workflow without claiming that version was delivered.
353
353
  recovery. When a Provider-accepted Turn fails with availability, `429`,
354
354
  capacity, or a recoverable transport error and the Session remains usable,
355
355
  add a new Turn to that Session. A Session preparation failure or Driver
356
- rejection before input acceptance fails the exact Run once; explicitly retry
357
- that failed Run when another attempt is useful. Core does not redispatch it
356
+ rejection before input acceptance fails the exact Turn once; explicitly retry
357
+ that failed Turn when another attempt is useful. Core does not redispatch it
358
358
  on a scheduler tick. If the Driver proves the Session cannot continue, settle
359
- or retire its exact Run, stop that one idle Session with `yui task role
360
- session stop <task> <role> --reason "..."`, then retry the failed Run. The
361
- replacement Run receives the old Agent, adapter, Run, Host, Session, Turn,
359
+ or retire its exact Turn, stop that one idle Session with `yui task role
360
+ session stop <task> <role> --reason "..."`, then retry the failed Turn. The
361
+ replacement Turn receives the old Agent, adapter, Turn, Host, Session,
362
362
  and complete raw-error facts through Task context.
363
363
  - Inspect recent errors before creating another fresh Session. After repeated
364
364
  fresh-Session failures, summarize the evidence and bounded options to the
@@ -388,8 +388,8 @@ is settled, results are integrated or deliberately abandoned, and managed
388
388
  worktrees are clean and removable, perform it yourself with `yui task archive
389
389
  <task-id> --integrated` or `--abandon`. Archive stops every Task Role runtime,
390
390
  including the Leader, removes clean retained WorkItem, ReviewRound, and Task
391
- worktrees, and retains Task, WorkItem, Run, Candidate, Integration, and native
392
- Session history. Dirty worktrees, active Runs, and unresolved Integration
391
+ worktrees, and retains Task, WorkItem, Turn, Candidate, Integration, and native
392
+ Session history. Dirty worktrees, active Turns, and unresolved Integration
393
393
  evidence are blockers: report the exact command reason and route it to the
394
394
  Leader instead of forcing cleanup or editing Yui state. Integration worktrees
395
395
  use their explicit cleanup command.
@@ -5,7 +5,7 @@ description: Review the exact frozen WorkItem Candidate or unified Task-final sc
5
5
 
6
6
  # Yui Reviewer
7
7
 
8
- Follow `yui-runtime` first and load the exact current Run Context Pack. The
8
+ Follow `yui-runtime` first and load the exact current Turn Context Pack. The
9
9
  ReviewRound, Candidate, workspace, and Snapshot digest returned there are the
10
10
  only review scope; fail closed on any mismatch.
11
11
 
@@ -20,26 +20,26 @@ reinterpret its scope:
20
20
  A Role is an executor, not a workspace owner: each ReviewRound owns an exact
21
21
  workspace record. Consecutive Task-final Rounds for the same Reviewer reuse one
22
22
  clean physical workspace and native Session while Yui updates the checkout and
23
- records the new Round snapshot. Treat the new Run Context Pack and frozen head
23
+ records the new Round snapshot. Treat the new Turn Context Pack and frozen head
24
24
  as the authority even when the conversation continues; never reuse an earlier
25
25
  verdict. Review edits are confined to that workspace, never modify the
26
26
  WorkItem Develop workspace, and never become a ChangeSet source.
27
27
 
28
- For a dispatched Review, the Run Context Pack identifies the ReviewRound,
28
+ For a dispatched Review, the Turn Context Pack identifies the ReviewRound,
29
29
  frozen Project commits, and assigned workspace. Inspect those exact commits.
30
30
  The current mutable Task-main checkout is context only and must never replace,
31
31
  widen, or silently update the assigned Review scope.
32
32
 
33
33
  ## Separate infrastructure failure from review judgment
34
34
 
35
- Verify the exact Run identity, Context Pack, frozen head, and ReviewRound-owned
35
+ Verify the exact Turn identity, Context Pack, frozen head, and ReviewRound-owned
36
36
  workspace before inspecting candidate sources. If context loading or workspace
37
37
  binding fails before review begins:
38
38
 
39
39
  - do not inspect the candidate, run candidate checks, invent findings, accept
40
40
  risk, or claim the frozen result was reviewed;
41
41
  - return only the exact infrastructure diagnosis, with no semantic findings or
42
- checks, through the assigned Review Run;
42
+ checks, through the assigned Review Turn;
43
43
  - do not recommend a Repair WorkItem—the Leader must recover the same frozen
44
44
  review boundary with `task review force-fresh` when Yui proves the outcome
45
45
  non-semantic;
@@ -48,12 +48,12 @@ binding fails before review begins:
48
48
  fail closed, never be relabeled as a clean transport failure.
49
49
 
50
50
  Yui derives `semantic`, `non-semantic`, or `ambiguous` from the immutable
51
- Round, Run receipt, completion Event, and finding evidence. Never write or
51
+ Round, Turn receipt, completion Event, and finding evidence. Never write or
52
52
  simulate a classification field. A non-semantic attempt cannot satisfy
53
53
  acceptance; an ambiguous attempt requires
54
54
  Leader diagnosis before another review or repair decision.
55
55
 
56
- The Review scope remains the current Run's frozen candidate even if the Leader
56
+ The Review scope remains the current Turn's frozen candidate even if the Leader
57
57
  handles new user input or advances Task main while this Review is running. Do
58
58
  not switch to the newer head, cancel the current inspection, or claim the
59
59
  result covers anything beyond the frozen candidate.
@@ -70,7 +70,7 @@ Never create or request a follow-up Round yourself: `requires-full-review`, a
70
70
  finding, and every uncertainty return to the Leader for routing.
71
71
 
72
72
  Keep the context layers distinct. Yui Core owns ReviewRound identity,
73
- lifecycle, access, workspace, and exact-yield safety; this generic Skill owns
73
+ lifecycle, access, workspace, and exact Turn-result correlation; this generic Skill owns
74
74
  portable review behavior; Agent-native Project Skills and Project Policy and
75
75
  Knowledge own project-specific checks and review expectations; and the Task
76
76
  Contract owns the current outcome, scope, acceptance, and required evidence.
@@ -88,9 +88,9 @@ only its named resource, effect, and isolation boundary; never broaden it. A
88
88
  real Agent may develop or review code, but that does not authorize a real
89
89
  provider/model test.
90
90
 
91
- Complete the assigned frozen-scope review before yielding. Accumulate all
91
+ Complete the assigned frozen-scope review before ending the Provider Turn. Accumulate all
92
92
  reachable findings, verification gaps, checks actually run, and bounded next
93
- actions, then submit them together in one Review Run result; do not yield as
93
+ actions, then return them together in one Review Turn result; do not stop as
94
94
  soon as the first finding is discovered. A review result is evidence for Leader
95
95
  judgment; it does not accept the WorkItem or complete the Task. Preserve the
96
96
  ReviewRound record and explicitly clean its workspace after the round is