@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.
- package/ARCHITECTURE.md +69 -428
- package/README.md +108 -298
- package/dist/agent/managedRuntimeEnvironment.js +2 -2
- package/dist/cli/commandCatalog.js +39 -77
- package/dist/cli/interactionCandidates.js +4 -4
- package/dist/cli/interactionPolicy.js +7 -10
- package/dist/cli/invocationRouter.js +1 -1
- package/dist/cli/updateCommand.js +6 -27
- package/dist/cli/updateOrchestrator.js +63 -484
- package/dist/cli/updatePorts.js +15 -333
- package/dist/cli/upgradeCommand.js +8 -65
- package/dist/cli.js +57 -242
- package/dist/commands/configCommands.js +11 -62
- package/dist/commands/executionAuditCommands.js +23 -23
- package/dist/commands/globalRoleCommands.js +2 -7
- package/dist/commands/jobCommands.js +1 -4
- package/dist/commands/projectCommands.js +5 -5
- package/dist/commands/releaseCommands.js +3 -10
- package/dist/commands/resourcesCommands.js +2 -2
- package/dist/commands/sessionCommands.js +2 -2
- package/dist/commands/taskActor.js +31 -39
- package/dist/commands/taskChangeSetCommands.js +5 -12
- package/dist/commands/taskCommands.js +464 -1249
- package/dist/commands/taskContextCommand.js +35 -36
- package/dist/commands/taskExecutionCommands.js +33 -46
- package/dist/commands/taskInputCommands.js +20 -42
- package/dist/commands/taskNextActionCommand.js +9 -9
- package/dist/commands/taskOverviewCommand.js +56 -95
- package/dist/commands/taskRoleRuntimeStatus.js +77 -107
- package/dist/commands/taskUpstreamCommands.js +3 -3
- package/dist/commands/taskWorkspaceCommands.js +7 -79
- package/dist/commands/telemetryCommands.js +32 -124
- package/dist/commands/workflowCommands.js +3 -3
- package/dist/completion/fileCompletionManager.js +1 -1
- package/dist/config/configCatalog.js +4 -6
- package/dist/config/yuiConfig.js +6 -43
- package/dist/context/dispatchContext.js +14 -30
- package/dist/context/roleSessionContext.js +2 -2
- package/dist/context/sessionBootstrapManifest.js +2 -2
- package/dist/context/{runContextPack.js → turnContextPack.js} +58 -73
- package/dist/context/turnInputContract.js +204 -0
- package/dist/context/wakeNotification.js +2 -2
- package/dist/controller/agentRuntimeObserver.js +18 -18
- package/dist/controller/clientRuntime.js +13 -20
- package/dist/controller/controller.js +89 -116
- package/dist/controller/fileSchedulerStoreAdapter.js +511 -742
- package/dist/controller/jobControl.js +17 -17
- package/dist/controller/resourceInventory.js +6 -6
- package/dist/controller/resourceInventoryLinux.js +38 -59
- package/dist/controller/resourceInventoryRpc.js +3 -3
- package/dist/controller/resourceInventoryWorker.js +1 -1
- package/dist/controller/runtime.js +46 -53
- package/dist/controller/runtimeEventInbox.js +23 -31
- package/dist/controller/runtimeEventProcessor.js +15 -15
- package/dist/controller/{runtimeHookRunFence.js → runtimeHookTurnFence.js} +87 -81
- package/dist/controller/runtimeLaunchCoordinator.js +3 -3
- package/dist/controller/runtimeObservationHook.js +11 -8
- package/dist/controller/sessionNotify.js +11 -11
- package/dist/controller/structuredProviderObservation.js +89 -16
- package/dist/coordination/workMailbox.js +309 -579
- package/dist/coordination/workMailboxQueue.js +5 -6
- package/dist/core/controllerClient.js +1 -91
- package/dist/core/controllerServer.js +3 -6
- package/dist/doctor/doctor.js +51 -314
- package/dist/execution/candidateConvergence.js +3 -3
- package/dist/execution/executionGroup.js +32 -33
- package/dist/execution/executionHealth.js +36 -38
- package/dist/execution/resourceBroker.js +12 -12
- package/dist/executor/agentExecutor.js +30 -265
- package/dist/executor/effectiveLaunch.js +9 -19
- package/dist/executor/executorRegistry.js +43 -17
- package/dist/executor/fileRoleLaunchPlanner.js +56 -56
- package/dist/executor/launchPlan.js +3 -3
- package/dist/executor/workspacePreflightClassification.js +16 -16
- package/dist/grant/capabilityGrant.js +20 -25
- package/dist/input/inputRequest.js +12 -12
- package/dist/integration/changeSet.js +9 -13
- package/dist/integration/changeSetManifest.js +1 -1
- package/dist/integration/gitIntegrationService.js +2 -2
- package/dist/integration/integrationQueueService.js +5 -21
- package/dist/integration/overlapDiagnostics.js +2 -2
- package/dist/interaction/operatorPresentation.js +1 -1
- package/dist/job/jobRunner.js +1 -1
- package/dist/lifecycle/canonicalLifecycleEvent.js +25 -25
- package/dist/lifecycle/{exactRunTerminalization.js → exactTurnTerminalization.js} +116 -232
- package/dist/message/message.js +6 -6
- package/dist/observability/executionAudit.js +74 -86
- package/dist/observability/faultClassification.js +7 -24
- package/dist/observability/orchestrationMetrics.js +5 -5
- package/dist/observability/runtimeIdentity.js +34 -101
- package/dist/profile/agentProfile.js +1 -1
- package/dist/release/cliHomeReleaseFence.js +3 -3
- package/dist/release/releaseWorkflowEngine.js +6 -10
- package/dist/release/releaseWorkflowPorts.js +2 -2
- package/dist/release/workflowFileLock.js +1 -1
- package/dist/repository/checkoutSwap.js +1 -1
- package/dist/repository/gitWorkspace.js +0 -13
- package/dist/repository/project.js +1 -1
- package/dist/repository/projectMaintenanceLock.js +1 -2
- package/dist/repository/taskBaseFreshness.js +13 -13
- package/dist/repository/taskWorkspaceCoordinator.js +21 -25
- package/dist/repository/taskWorkspaceIdentity.js +8 -21
- package/dist/repository/taskWorkspacePreparer.js +63 -620
- package/dist/resources/autoResourceGc.js +3 -3
- package/dist/resources/liveReferences.js +1 -1
- package/dist/resources/resourceGc.js +1 -1
- package/dist/resources/sqliteResourceRegistry.js +1 -1
- package/dist/review/reviewDecision.js +7 -7
- package/dist/review/reviewFindingLedger.js +1 -1
- package/dist/review/reviewOutcomeClassifier.js +35 -50
- package/dist/review/reviewRound.js +14 -25
- package/dist/review/reviewerAvailability.js +4 -4
- package/dist/review/taskFinalReviewContractResolution.js +41 -0
- package/dist/role/role.js +6 -3
- package/dist/runtime/agentDriver.js +4 -0
- package/dist/runtime/agentHost.js +151 -36
- package/dist/runtime/builtinAgentDrivers.js +79 -2
- package/dist/runtime/codexAppServerRuntime.js +122 -0
- package/dist/runtime/continuationManager.js +3 -5
- package/dist/runtime/exactControlPlane.js +17 -42
- package/dist/runtime/firstProgressAdvisory.js +1 -1
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/launchDiagnostics.js +2 -2
- package/dist/runtime/lifecycleReservation.js +4 -4
- package/dist/runtime/processExitObservation.js +1 -1
- package/dist/runtime/processExitOutbox.js +0 -32
- package/dist/runtime/promptEnvelope.js +9 -9
- package/dist/runtime/providerContinuation.js +2 -2
- package/dist/runtime/providerContinuationReconciliationService.js +2 -2
- package/dist/runtime/providerRuntimeIdentity.js +76 -24
- package/dist/runtime/recentTurnIds.js +38 -0
- package/dist/runtime/runtimeContinuationProjection.js +2 -2
- package/dist/runtime/runtimeHealthPolicy.js +1 -1
- package/dist/runtime/runtimeObservation.js +58 -21
- package/dist/runtime/runtimeProjection.js +19 -27
- package/dist/runtime/sessionLaunchRequest.js +2 -2
- package/dist/runtime/structuredProviderHost.js +177 -12
- package/dist/runtime/tmuxAdapters.js +46 -11
- package/dist/scheduler/activeRoleTurnDelivery.js +245 -0
- package/dist/scheduler/leaderWakeupProcessor.js +147 -445
- package/dist/scheduler/operatorEvent.js +4 -6
- package/dist/scheduler/resourceQueueProjection.js +71 -0
- package/dist/scheduler/{roleRunLiveness.js → roleTurnLiveness.js} +24 -28
- package/dist/scheduler/{roleRunStall.js → roleTurnStall.js} +162 -247
- package/dist/scheduler/taskExecutionProjection.js +99 -99
- package/dist/scheduler/taskObservabilityProjection.js +10 -10
- package/dist/scheduler/taskWake.js +4 -4
- package/dist/scheduler/wakeReason.js +6 -10
- package/dist/scheduler/wakeupQueue.js +0 -9
- package/dist/setup/setupCommand.js +2 -2
- package/dist/storage/currentTaskStore.js +46 -0
- package/dist/storage/persistenceWorker.js +1 -1
- package/dist/storage/sqliteSchema.js +81 -485
- package/dist/storage/sqliteStore.js +206 -365
- package/dist/storage/storageSchema.js +1 -15
- package/dist/storage/storageVersions.js +8 -9
- package/dist/storage/storeRpc.js +10 -34
- package/dist/storage/taskStore.js +63 -3415
- package/dist/storage/upgrade/recordVersions.js +55 -149
- package/dist/storage/upgrade/upgradeOrchestrator.js +89 -1752
- package/dist/task/completionReadiness.js +5 -5
- package/dist/task/deliveryGuard.js +10 -10
- package/dist/task/nextAction.js +74 -77
- package/dist/task/task.js +2 -4
- package/dist/task/taskRecordReference.js +3 -3
- package/dist/task/taskRecordRetirement.js +1 -1
- package/dist/telemetry/sqliteTelemetryStore.js +53 -53
- package/dist/telemetry/telemetryConfig.js +14 -14
- package/dist/telemetry/telemetryWiring.js +8 -14
- package/dist/turn/turn.js +356 -0
- package/dist/{run/runIdentity.js → turn/turnIdentity.js} +4 -4
- package/dist/verification/gateArtifactStore.js +2 -2
- package/dist/web/assets/client/app.js +1 -1
- package/dist/web/assets/client/components.js +29 -54
- package/dist/web/assets/client/i18n.js +17 -37
- package/dist/web/assets/client/view.js +37 -37
- package/dist/web/assets/shell.js +1 -1
- package/dist/web/assets/styles/cards.js +5 -5
- package/dist/web/assets/styles/widgets.js +1 -2
- package/dist/web/webSnapshot.js +65 -60
- package/dist/workItem/workItem.js +11 -11
- package/dist/workspace/workItemChangeSetManager.js +1 -1
- package/docs/task-local-identity.md +5 -5
- package/i18n/README.zh-CN.md +41 -54
- package/package.json +1 -1
- package/skills/yui-leader/SKILL.md +85 -83
- package/skills/yui-operator/SKILL.md +16 -16
- package/skills/yui-reviewer/SKILL.md +10 -10
- package/skills/yui-runtime/SKILL.md +17 -18
- package/skills/yui-worker/SKILL.md +16 -18
- package/dist/context/runContextContract.js +0 -162
- package/dist/executor/turnCompletion.js +0 -126
- package/dist/review/taskFinalReviewContractEvent.js +0 -1
- package/dist/review/taskFinalReviewContractRebind.js +0 -367
- package/dist/run/agentRun.js +0 -356
- package/dist/run/rejectedYieldAttempt.js +0 -221
- package/dist/run/runControlRequest.js +0 -50
- package/dist/run/yieldReceipt.js +0 -65
- package/dist/runtime/turnCompletion.js +0 -3
- package/dist/scheduler/actionability.js +0 -323
- package/dist/scheduler/activeRoleRunDelivery.js +0 -868
- package/dist/scheduler/activeTaskProgress.js +0 -126
- package/dist/storage/compatibleTaskStore.js +0 -248
- package/dist/storage/migration/baseline.js +0 -78
- package/dist/storage/migration/classifier.js +0 -51
- package/dist/storage/migration/compatibleCodec.js +0 -53
- package/dist/storage/migration/engine.js +0 -147
- package/dist/storage/migration/index.js +0 -33
- package/dist/storage/migration/planner.js +0 -154
- package/dist/storage/migration/productionRegistry.js +0 -3931
- package/dist/storage/migration/registry.js +0 -169
- package/dist/storage/migration/report.js +0 -54
- package/dist/storage/migration/types.js +0 -31
- package/dist/storage/upgrade/homeClassification.js +0 -353
- package/dist/storage/upgrade/homeMigrationTarget.js +0 -595
- package/dist/storage/upgrade/migrationReceipt.js +0 -67
- package/dist/storage/upgrade/offlineUpgradeInventory.js +0 -453
- package/dist/storage/upgrade/productionMigrationRegistry.js +0 -6
- package/dist/storage/upgrade/pseudoLayoutRepair.js +0 -241
- package/dist/storage/upgrade/recordVersionScan.js +0 -176
- package/dist/storage/upgrade/sqliteFileSet.js +0 -50
- package/dist/storage/upgrade/sqliteMigrationTarget.js +0 -375
- package/dist/storage/upgrade/sqliteRecordMigrationTarget.js +0 -305
- package/dist/storage/upgrade/sqliteStateMigration.js +0 -918
- package/dist/storage/upgrade/switchProgress.js +0 -80
- package/dist/storage/upgrade/upgradeReceipt.js +0 -161
- package/dist/storage/upgradeCoordination.js +0 -187
- package/dist/storage/upgradeFence.js +0 -366
- 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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
65
|
-
Leader
|
|
66
|
-
|
|
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
|
|
72
|
-
Leader in later
|
|
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
|
|
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
|
|
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
|
|
146
|
+
owns an independent Turn, receipt, and workspace.
|
|
143
147
|
|
|
144
|
-
For a managed Task Role or Reviewer
|
|
145
|
-
|
|
146
|
-
|
|
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
|
|
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-
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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-
|
|
265
|
-
|
|
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
|
|
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
|
|
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
|
|
344
|
-
|
|
345
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
525
|
-
|
|
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,
|
|
530
|
-
ReviewRounds, checks, and workspace through the exact
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
731
|
+
yui task turn retry <task>/<failed-turn>
|
|
727
732
|
```
|
|
728
733
|
|
|
729
|
-
The new
|
|
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
|
|
751
|
-
|
|
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
|
|
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
|
|
762
|
-
When applicable, record exact
|
|
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
|
|
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.
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
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
|
|
815
|
-
`yui task role session stop`; the next explicit
|
|
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
|
|
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/
|
|
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
|
-
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
357
|
-
that failed
|
|
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
|
|
360
|
-
session stop <task> <role> --reason "..."`, then retry the failed
|
|
361
|
-
replacement
|
|
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,
|
|
392
|
-
Session history. Dirty worktrees, active
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
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
|
|
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-
|
|
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
|
|
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
|
|
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
|