@zq-silk/yui 0.15.8 → 0.15.11
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 +2 -0
- package/ARCHITECTURE.zh-CN.md +151 -0
- package/README.md +211 -14
- package/dist/agent/launchEnvironment.js +7 -0
- package/dist/artifacts/artifactCapability.js +74 -0
- package/dist/artifacts/artifactCommitLock.js +249 -0
- package/dist/artifacts/artifactPaths.js +151 -0
- package/dist/artifacts/gitArtifactRef.js +146 -0
- package/dist/artifacts/managedGit.js +332 -0
- package/dist/artifacts/taskArtifactRepository.js +277 -0
- package/dist/cli/commandCatalog.js +40 -16
- package/dist/cli/interactionPolicy.js +3 -3
- package/dist/cli/updateOrchestrator.js +24 -1
- package/dist/cli/updatePorts.js +7 -3
- package/dist/cli/upgradeCommand.js +42 -2
- package/dist/cli.js +403 -93
- package/dist/commands/globalRoleCommands.js +314 -4
- package/dist/commands/operatorCommands.js +33 -2
- package/dist/commands/projectCommands.js +6 -7
- package/dist/commands/releaseCommands.js +18 -0
- package/dist/commands/taskActivationCommands.js +22 -0
- package/dist/commands/taskActor.js +25 -0
- package/dist/commands/taskCommands.js +846 -155
- package/dist/commands/taskIntegrationCommands.js +16 -38
- package/dist/commands/taskIntegrationQueueCommands.js +1 -1
- package/dist/commands/taskRemoteDeliveryCommand.js +6 -6
- package/dist/commands/taskRoleRuntimeStatus.js +35 -0
- package/dist/context/runContextPack.js +28 -16
- package/dist/context/taskContext.js +64 -5
- package/dist/controller/agentHostObservation.js +155 -0
- package/dist/controller/clientRuntime.js +17 -2
- package/dist/controller/controller.js +11 -2
- package/dist/controller/fileSchedulerStoreAdapter.js +446 -13
- package/dist/controller/globalInputDelivery.js +119 -0
- package/dist/controller/jobControl.js +6 -2
- package/dist/controller/resourceInventory.js +14 -4
- package/dist/controller/resourceInventoryLinux.js +2 -6
- package/dist/controller/runtime.js +81 -6
- package/dist/controller/runtimeEventInbox.js +32 -3
- package/dist/controller/runtimeEventProcessor.js +26 -6
- package/dist/controller/runtimeHookRunFence.js +75 -19
- package/dist/controller/structuredProviderObservation.js +133 -70
- package/dist/coordination/workMailboxQueue.js +5 -0
- package/dist/execution/workItemExecutionProjection.js +1 -1
- package/dist/executor/agentExecutor.js +64 -4
- package/dist/executor/executorRegistry.js +3 -0
- package/dist/executor/fileRoleLaunchPlanner.js +78 -118
- package/dist/integration/deliveryObligation.js +2 -1
- package/dist/integration/gitIntegrationService.js +312 -382
- package/dist/integration/integrationAttempt.js +30 -4
- package/dist/integration/integrationQueueService.js +7 -7
- package/dist/integration/integrationSourceApplication.js +323 -0
- package/dist/kernel/builtinCapabilities.js +32 -24
- package/dist/message/globalInterrupt.js +33 -0
- package/dist/message/inputControlResolution.js +106 -0
- package/dist/message/message.js +423 -0
- package/dist/message/messageContinuation.js +126 -3
- package/dist/message/taskInterrupt.js +34 -0
- package/dist/observability/orchestrationMetrics.js +1 -1
- package/dist/plugins/pluginService.js +11 -3
- package/dist/release/releaseHandover.js +22 -0
- package/dist/release/releaseWorkflowPorts.js +15 -7
- package/dist/repository/gitWorkspace.js +72 -15
- package/dist/repository/taskWorkspaceCoordinator.js +134 -0
- package/dist/repository/taskWorkspacePreparer.js +120 -49
- package/dist/repository/workItemCandidateSnapshot.js +34 -0
- package/dist/resources/projectResource.js +0 -48
- package/dist/resources/projectResourceService.js +3 -81
- package/dist/resources/resourceDiscovery.js +3 -2
- package/dist/runtime/agentHost.js +152 -72
- package/dist/runtime/agentHostCompatibility.js +127 -0
- package/dist/runtime/agentHostProtocol.js +53 -0
- package/dist/runtime/executionEnvironment.js +0 -19
- package/dist/runtime/launchBroker.js +6 -0
- package/dist/runtime/sessionReconciliation.js +4 -4
- package/dist/runtime/taskRuntimeIsolation.js +30 -6
- package/dist/runtime/tmuxAdapters.js +5 -3
- package/dist/scheduler/operatorEvent.js +4 -0
- package/dist/scheduler/taskExecutionProjection.js +12 -1
- package/dist/scheduler/wakeReason.js +7 -1
- package/dist/scheduler/wakeupQueue.js +2 -0
- package/dist/setup/setupCommand.js +29 -16
- package/dist/storage/homeLayout.js +130 -0
- package/dist/storage/migrations/artifactsToGit.js +338 -0
- package/dist/storage/migrations/collapseWorktreeLayout.js +963 -0
- package/dist/storage/migrations/integrationContinuation.js +104 -0
- package/dist/storage/migrations/submitIntent.js +126 -0
- package/dist/storage/migrations/unifyHomeLayout.js +925 -0
- package/dist/storage/sqliteSchema.js +173 -7
- package/dist/storage/sqliteStore.js +41 -22
- package/dist/storage/storageVersions.js +1 -1
- package/dist/storage/storeRpc.js +2 -1
- package/dist/storage/upgrade/upgradeOrchestrator.js +95 -2
- package/dist/task/archiveDiagnostics.js +128 -0
- package/dist/task/nextAction.js +44 -11
- package/dist/task/taskActivation.js +26 -0
- package/dist/task/taskActivationService.js +85 -69
- package/dist/task/taskSubmission.js +236 -0
- package/dist/web/assets/client/app.js +58 -2
- package/dist/web/assets/client/components.js +1 -0
- package/dist/web/assets/client/i18n.js +6 -0
- package/dist/web/assets/client/taskSurface.js +202 -7
- package/dist/web/assets/client/view.js +7 -4
- package/dist/web/assets/shell.js +23 -0
- package/dist/web/assets/styles/layout.js +1 -1
- package/dist/web/assets/styles/widgets.js +12 -0
- package/dist/web/webServer.js +135 -4
- package/dist/web/webSnapshot.js +4 -3
- package/dist/web/webTaskSurface.js +225 -8
- package/dist/workItem/workItem.js +14 -10
- package/dist/workspace/workItemChangeSetManager.js +18 -2
- package/docs/agent-result-consumption.md +2 -0
- package/docs/agent-result-consumption.zh-CN.md +81 -0
- package/docs/agent-runtime-drivers.md +2 -0
- package/docs/agent-runtime-drivers.zh-CN.md +77 -0
- package/docs/architecture/README.md +44 -32
- package/docs/architecture/README.zh-CN.md +43 -0
- package/docs/architecture/capabilities-and-resources.md +118 -79
- package/docs/architecture/capabilities-and-resources.zh-CN.md +83 -0
- package/docs/managed-turn-and-session-runtime.md +2 -0
- package/docs/managed-turn-and-session-runtime.zh-CN.md +180 -0
- package/docs/observability/README.md +2 -0
- package/docs/observability/README.zh-CN.md +71 -0
- package/docs/plugin-sdk.md +320 -217
- package/docs/plugin-sdk.zh-CN.md +293 -0
- package/docs/provider-runtime.md +2 -0
- package/docs/provider-runtime.zh-CN.md +132 -0
- package/docs/release-workflow.md +41 -0
- package/docs/release-workflow.zh-CN.md +266 -0
- package/docs/roles-and-configuration.md +2 -0
- package/docs/roles-and-configuration.zh-CN.md +96 -0
- package/docs/sqlite-control-plane-design.md +225 -1
- package/docs/sqlite-control-plane-design.zh-CN.md +62 -0
- package/docs/task-dag-semantics.md +80 -57
- package/docs/task-dag-semantics.zh-CN.md +59 -0
- package/docs/task-delivery.md +2 -0
- package/docs/task-delivery.zh-CN.md +82 -0
- package/docs/task-local-identity.md +2 -0
- package/docs/task-local-identity.zh-CN.md +58 -0
- package/docs/testing/verification-levels.md +26 -0
- package/docs/testing/verification-levels.zh-CN.md +80 -0
- package/i18n/README.zh-CN.md +199 -10
- package/package.json +2 -1
- package/skills/yui-leader/SKILL.md +88 -331
- package/skills/yui-leader/references/execution.md +405 -0
- package/skills/yui-leader/references/integration.md +52 -2
- package/skills/yui-leader/references/planning.md +109 -0
- package/skills/yui-leader/references/task-plugins.md +8 -4
- package/skills/yui-operator/SKILL.md +22 -4
- package/skills/yui-runtime/SKILL.md +27 -0
- package/skills/yui-runtime/references/publication.md +20 -0
|
@@ -1,337 +1,94 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yui-leader
|
|
3
|
-
description: Lead one Yui Task
|
|
3
|
+
description: Lead one Yui Task through authorized planning, activation handoff, execution and acceptance, choosing responsibilities and a useful stopping point from its current stage and user intent.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Yui Leader
|
|
7
7
|
|
|
8
|
-
Follow [yui-runtime](../yui-runtime/SKILL.md) first.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
alternatives; they do not replace Leader judgment.
|
|
96
|
-
An empty WorkItem list does not mean the user requested direct execution.
|
|
97
|
-
Honor explicit delegation and independent Review requirements in the user's
|
|
98
|
-
messages and Task Brief. Neither `next-action` nor a disabled default review
|
|
99
|
-
policy authorizes dropping them to make completion easier.
|
|
100
|
-
|
|
101
|
-
An Integration Job's success is not the final target update. For that
|
|
102
|
-
notification, read [Integration](references/integration.md) and finish the same
|
|
103
|
-
attempt; do not start a duplicate operation.
|
|
104
|
-
|
|
105
|
-
Before dispatch, Review, Integration, or completion, inspect
|
|
106
|
-
`liveTaskState.activeRuns` and `liveTaskState.activeTaskReviews` in the current
|
|
107
|
-
Context Pack. They report work in flight but gate nothing by themselves; reason
|
|
108
|
-
from each exact binding and frozen candidate instead of treating activity as a
|
|
109
|
-
global Task lock.
|
|
110
|
-
|
|
111
|
-
Maintain only context that changes future decisions:
|
|
112
|
-
|
|
113
|
-
- Keep the Brief current after material semantic progress. Use
|
|
114
|
-
`task brief update` with only intended fields; same-field edits use the last
|
|
115
|
-
explicit write. Read `task event list` before deliberately restoring a value.
|
|
116
|
-
- Record a Decision when a material product or technical choice changes future
|
|
117
|
-
work.
|
|
118
|
-
- Add a Milestone for an independently meaningful phase result.
|
|
119
|
-
- Send one Task Message only when another reader needs a new conclusion,
|
|
120
|
-
impact, risk, acceptance decision, or changed plan.
|
|
121
|
-
- Propose Project Knowledge only for a stable conclusion useful across Tasks.
|
|
122
|
-
|
|
123
|
-
Do not run Messages, WorkItems, Decisions, or Milestones into a scheduler log
|
|
124
|
-
or transcript. Unchanged waits, dispatches, heartbeats, and routine tool use do
|
|
125
|
-
not need narrative records.
|
|
126
|
-
|
|
127
|
-
## Execute the chosen path
|
|
128
|
-
|
|
129
|
-
Dispatch establishes the first owner and frozen Assignment. For ordinary
|
|
130
|
-
clarification, feedback or a continuation of that same work, send a Message:
|
|
131
|
-
|
|
132
|
-
```sh
|
|
133
|
-
yui task message send <task> "<clarification or continuation>" --to <role> --work-item <work-id>
|
|
134
|
-
yui task message send <task> "<review clarification>" --to <role> --review-round <round-id>
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Busy execution queues the Message. Its terminal triggers continuation in the
|
|
138
|
-
same compatible Session and workspace; do not fabricate a failure, submit an
|
|
139
|
-
unfinished Candidate, or change WorkItem status merely to answer a question.
|
|
140
|
-
Read Message delivery and the exact resulting AgentRun separately from business
|
|
141
|
-
acceptance. A Message never expands scope, applies desired configuration, or
|
|
142
|
-
changes a Review's frozen candidate. An ownership change preserves the original
|
|
143
|
-
recipient; transfer still-pending input only with explicit `task message handoff`.
|
|
144
|
-
Late input to terminal work or an obsolete Review remains visible with a bounded
|
|
145
|
-
nondelivery reason. Use the existing formal operation for new scope or Review.
|
|
146
|
-
|
|
147
|
-
For unknown delivery or Session replacement, read
|
|
148
|
-
[runtime recovery](../yui-runtime/references/recovery.md). Preserve the original
|
|
149
|
-
input; do not replay uncertainty or treat it as a global Task lock.
|
|
150
|
-
|
|
151
|
-
For direct work, change only Task main, keep it on its managed branch, commit
|
|
152
|
-
the result, and leave it clean. Run the smallest check that can catch the
|
|
153
|
-
changed behavior while implementing.
|
|
154
|
-
|
|
155
|
-
For a substantial delegated requirement:
|
|
156
|
-
|
|
157
|
-
```sh
|
|
158
|
-
yui task work create <task-id> "<title>" \
|
|
159
|
-
--project <project-to-modify> \
|
|
160
|
-
--objective "<bounded outcome>" \
|
|
161
|
-
--accept "<observable criterion>"
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
Add `--after` only for a real dependency. Likely file overlap is not by itself
|
|
165
|
-
a dependency. A Worker may read the complete authorized Task context but may
|
|
166
|
-
write only its WorkItem Projects and workspace.
|
|
167
|
-
|
|
168
|
-
For a Leader-owned WorkItem, mark it running, complete it directly, then record
|
|
169
|
-
its actual result:
|
|
170
|
-
|
|
171
|
-
```sh
|
|
172
|
-
yui task work update <work-id> running
|
|
173
|
-
yui task work update <work-id> done --summary "<result and evidence>"
|
|
174
|
-
yui task work accept <work-id> --summary "<explicit acceptance and evidence>"
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
For a native child, pass a bounded brief and applicable Profile constraints
|
|
178
|
-
through the provider's child tools. A small investigation needs no synthetic
|
|
179
|
-
WorkItem. If the child implements an existing Leader-owned WorkItem, keep that
|
|
180
|
-
WorkItem roleless and mark it running. Native children inherit only current
|
|
181
|
-
parent authority and gain no Yui Role, AgentRun, Session or broader workspace. Their
|
|
182
|
-
results are best-effort until Yui externalizes them; use a managed Task Role
|
|
183
|
-
when independent durability matters. Inspect the returned result before
|
|
184
|
-
submitting `done` or recording failure progress. `done` creates a Candidate;
|
|
185
|
-
`work accept` records the separate acceptance. WorkItem responsibility remains
|
|
186
|
-
open through execution failure and becomes accepted only on that decision.
|
|
187
|
-
A Profile's runtime source applies when
|
|
188
|
-
materializing a Task Role, not when launching a native child. The child
|
|
189
|
-
inherits the Leader Agent; apply a Profile model or effort only when the native
|
|
190
|
-
tool actually supports and confirms that override.
|
|
191
|
-
|
|
192
|
-
For a managed Task Role:
|
|
193
|
-
|
|
194
|
-
```sh
|
|
195
|
-
yui task role add <task-id> <role> --profile <profile>
|
|
196
|
-
yui task role show <task-id> <role>
|
|
197
|
-
yui task work create <task-id> "<outcome>" --role <role>
|
|
198
|
-
yui task work dispatch <work-id> --input "<decision-complete brief>"
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
Profiles carry portable behavior plus either a dynamic Global Worker runtime
|
|
202
|
-
source or an explicit Agent with optional model and effort. Applying a Profile
|
|
203
|
-
to a Task Role resolves and freezes the complete binding; later Profile or
|
|
204
|
-
Global Worker changes do not rewrite that Role. Before dispatch, use
|
|
205
|
-
`profile show` and `task role show` to read the exact behavior, Agent, model,
|
|
206
|
-
effort, Profile, and workspace. Do not reconstruct or guess launch
|
|
207
|
-
configuration. Use the WorkItem assignee directly unless replicated execution
|
|
208
|
-
was deliberately selected.
|
|
209
|
-
|
|
210
|
-
Managed Task main, WorkItem, ReviewRound, and Integration workspaces have
|
|
211
|
-
different owners. Never edit stable Project checkouts, managed refs, Yui state
|
|
212
|
-
files, or another owner's workspace. A Task's recorded base is durable; do not
|
|
213
|
-
silently replace it merely because its remote branch later moves.
|
|
214
|
-
|
|
215
|
-
## Extend capabilities within this Task's authority
|
|
216
|
-
|
|
217
|
-
Use `capability search`, `describe`, and `call` to inspect current tools.
|
|
218
|
-
Prefer existing tools, composition or a one-off script when sufficient.
|
|
219
|
-
For reusable Task-local capabilities, read [Task plugins](references/task-plugins.md)
|
|
220
|
-
before creation, validation or activation. Plugin management permission does
|
|
221
|
-
not grant code execution or broader external effects. Never issue your own
|
|
222
|
-
grants, impersonate Operator, or modify the core installation to obtain a tool.
|
|
223
|
-
|
|
224
|
-
## Validate and make the review judgment
|
|
225
|
-
|
|
226
|
-
Use the smallest evidence that establishes the accepted behavior and material
|
|
227
|
-
boundaries. Do not repeat a successful unchanged check. Run the Project's
|
|
228
|
-
complete local delivery validation once on the final candidate when its Policy
|
|
229
|
-
requires it.
|
|
230
|
-
|
|
231
|
-
As part of accepting a WorkItem or completing a Task, decide whether additional
|
|
232
|
-
review would add useful evidence:
|
|
233
|
-
|
|
234
|
-
- inspect directly when the change is clear and existing evidence is enough;
|
|
235
|
-
- use one independent Worker, native child, or Reviewer when independent
|
|
236
|
-
inspection materially reduces a reachable risk; or
|
|
237
|
-
- rely on an already completed applicable Review.
|
|
238
|
-
|
|
239
|
-
This is Leader judgment inside the acceptance decision, not a separate record,
|
|
240
|
-
checklist, or workflow phase. A managed Reviewer is optional unless the user,
|
|
241
|
-
Project or Task Contract requires it. Do not create a
|
|
242
|
-
Reviewer Role or ReviewRound for ceremony. Honor an existing Candidate's
|
|
243
|
-
snapshotted `always` policy and any immutable Task-final Review contract.
|
|
244
|
-
Otherwise choose whether another review adds enough evidence to justify its
|
|
245
|
-
cost.
|
|
246
|
-
|
|
247
|
-
Use one direct main Reviewer by default. If independent replicas materially
|
|
248
|
-
improve evidence, read [replicated execution](references/replicated-execution.md)
|
|
249
|
-
before dispatch or synthesis. Honor required review contracts even when a
|
|
250
|
-
cheaper execution path is otherwise available.
|
|
251
|
-
|
|
252
|
-
When several WorkItems contribute to one outcome, prefer one independent
|
|
253
|
-
Task-final Review after their accepted results are integrated over repeating a
|
|
254
|
-
complete Review for every WorkItem. Request an earlier WorkItem Review only
|
|
255
|
-
when that frozen Candidate has a specific risk that should be resolved before
|
|
256
|
-
Integration.
|
|
257
|
-
|
|
258
|
-
When a Worker or Reviewer result arrives, resolve its exact AgentRun and read the
|
|
259
|
-
complete original `AgentRunResult.output` before starting new work or waiting
|
|
260
|
-
again. Treat headings or JSON fields only as communication aids; never infer
|
|
261
|
-
that Core parsed or accepted them. Decide whether to accept, repair, review
|
|
262
|
-
again, retry execution, or ask for a genuinely user-owned decision. Route
|
|
263
|
-
reachable issues to the original execution owner. Fix a small Task-main issue
|
|
264
|
-
directly; create a Repair WorkItem only when the repair is itself a substantial
|
|
265
|
-
independently owned requirement.
|
|
266
|
-
|
|
267
|
-
A failed ReviewRound is an execution failure, not an automatic retry or repair
|
|
268
|
-
wave. Inspect its exact Round, AgentRun, candidate, Core failure, and
|
|
269
|
-
`task next-action` facts, then choose the smallest recovery that preserves the
|
|
270
|
-
frozen boundary. Do not invent a retry loop or silently replace the Reviewer
|
|
271
|
-
Session. For replicated execution, choose whether to retry a failed Producer,
|
|
272
|
-
settle that Lane, or synthesize selected available results. Retry a failed
|
|
273
|
-
main synthesis through its exact AgentRun, preserving its selected source snapshot.
|
|
274
|
-
|
|
275
|
-
## Accept, integrate, and complete
|
|
276
|
-
|
|
277
|
-
A Worker or Reviewer AgentRun result is evidence, not acceptance. Inspect the
|
|
278
|
-
result, diff, checks, and current Candidate before deciding.
|
|
279
|
-
|
|
280
|
-
If a result is insufficient, reject it with bounded feedback and redispatch
|
|
281
|
-
the same WorkItem and Role while scope remains valid. Before accepting isolated
|
|
282
|
-
Git changes, read [Integration](references/integration.md) to capture and
|
|
283
|
-
integrate the latest Candidate. Do not edit managed refs or bypass Yui's
|
|
284
|
-
compare-and-swap boundary.
|
|
285
|
-
|
|
286
|
-
After an authorized PR/MR operation, follow
|
|
287
|
-
[publication recording](../yui-runtime/references/publication.md).
|
|
288
|
-
External delivery and Task completion remain separate facts.
|
|
289
|
-
|
|
290
|
-
After a ReviewRound is terminal, the Leader or authorized Operator owns
|
|
291
|
-
`task work review cleanup <task>/<round>`. Preserve dirty diagnostic evidence
|
|
292
|
-
and resolve it explicitly; do not ask a Reviewer to clean its own runtime
|
|
293
|
-
after its final report. Cleanup can remain advisory at completion, but all
|
|
294
|
-
required resources must be settled before user-authorized archive.
|
|
295
|
-
|
|
296
|
-
Complete only when the Task outcome is satisfied, required checks and review
|
|
297
|
-
contracts are settled, WorkItems are accepted or deliberately retired, latest
|
|
298
|
-
isolated results are integrated, and user inputs are resolved:
|
|
299
|
-
|
|
300
|
-
```sh
|
|
301
|
-
yui task complete <task-id> \
|
|
302
|
-
--summary "<outcome, validation, and remaining risk>"
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
Completion records the exact Project heads. Archive is a separate,
|
|
306
|
-
user-authorized Operator action.
|
|
307
|
-
|
|
308
|
-
If completion reports `pending-user-input`, new user intent has not yet reached
|
|
309
|
-
the current notification window. End this native turn so the next notification
|
|
310
|
-
can be delivered, then read the original messages and reassess the outcome.
|
|
311
|
-
Do not spin on completion, drop messages, or manufacture another Run to proceed.
|
|
312
|
-
A current Leader Session can create a formal InputRequest during an ordinary
|
|
313
|
-
notification; no active AgentRun is required.
|
|
314
|
-
|
|
315
|
-
## Finish every Leader AgentRun
|
|
316
|
-
|
|
317
|
-
Before ending the AgentRun:
|
|
318
|
-
|
|
319
|
-
1. Inspect the wake delta, resolve every referenced Worker or Reviewer AgentRun
|
|
320
|
-
with `yui task run show`, read each original result in full, and make the
|
|
321
|
-
next decision.
|
|
322
|
-
2. Persist actual WorkItem lifecycle and material Brief, Decision, Milestone,
|
|
323
|
-
Message, or Knowledge changes.
|
|
324
|
-
3. Choose one truthful outcome: continue through an owned native child, complete
|
|
325
|
-
the Task, create a justified InputRequest, or leave the active Task waiting
|
|
326
|
-
for a real durable event.
|
|
327
|
-
4. Return one concise final report with outcome, checks, remaining risk, and
|
|
328
|
-
bounded next action.
|
|
329
|
-
|
|
330
|
-
Do not claim completion only in prose when durable Task or WorkItem state still
|
|
331
|
-
needs updating. Do not poll managed Roles or emit waiting Messages. Managed
|
|
332
|
-
results enter a later Leader notification; that notification is not an implicit
|
|
333
|
-
AgentRun and requires no separate execution report. An unchanged active Task remains quiet.
|
|
334
|
-
|
|
335
|
-
Use the shared [runtime recovery](../yui-runtime/references/recovery.md) contract
|
|
336
|
-
for failed execution. Persist successor context before replacing yourself,
|
|
337
|
-
then end this turn; engineering cleanup is not discarded Task intent.
|
|
8
|
+
Follow [yui-runtime](../yui-runtime/SKILL.md) first. Load the exact Context Pack
|
|
9
|
+
for an explicitly dispatched AgentRun; for direct conversation or a Task
|
|
10
|
+
notification, read current Task context through the Manifest's Session CLI.
|
|
11
|
+
No self-dispatch or old completed Run is needed. Read the actual Task
|
|
12
|
+
requirements, current Brief and relevant user/Operator Messages, not just
|
|
13
|
+
their summaries. Resolve links relative to the file containing them.
|
|
14
|
+
|
|
15
|
+
## Select the applicable stage
|
|
16
|
+
|
|
17
|
+
Use current lifecycle, latest intent and the Session's actual planning/delivery
|
|
18
|
+
authority together. Draft existence, accepted planning history, Session
|
|
19
|
+
authority and AgentRun status are different facts. A completed planning Run
|
|
20
|
+
does not complete or activate a Task; an active Task does not upgrade an old
|
|
21
|
+
planning Session. Never infer authority from a directory, launch text,
|
|
22
|
+
transcript or process.
|
|
23
|
+
|
|
24
|
+
Apply terminal/gate and read-only intent boundaries before selecting delivery
|
|
25
|
+
or planning work; the routes below do not override those restrictions.
|
|
26
|
+
|
|
27
|
+
- **Draft or planning-only authority:** read [Planning and activation handoff](references/planning.md).
|
|
28
|
+
Use the recorded submission intent (`record`, `discuss`, `develop`) and
|
|
29
|
+
routing result, not keywords in the message. Discuss and preserve the
|
|
30
|
+
requested outcome; do not load execution procedures merely to finish a
|
|
31
|
+
discussion.
|
|
32
|
+
- **Active, execution enabled, delivery authority and implementation intent:**
|
|
33
|
+
read [Active execution](references/execution.md). Advance existing authorized
|
|
34
|
+
work, including disposition of new results, without asking for another
|
|
35
|
+
“continue” after a valid activation handoff.
|
|
36
|
+
- **Query, analysis or discussion only:** answer within the requested scope,
|
|
37
|
+
even on an active Task. Do not turn it into edits or dispatch. A result
|
|
38
|
+
notification is different: read its original results and advance the
|
|
39
|
+
outstanding authorized requirement.
|
|
40
|
+
- **Completed, cancelled, retired or archived, or execution gate disabled:**
|
|
41
|
+
explain/query authorized facts only unless a specific further action has
|
|
42
|
+
been authorized and is legal. A conversation does not reopen, reactivate or
|
|
43
|
+
resume execution. If new implementation is requested, identify the needed
|
|
44
|
+
lifecycle/authority action for the Operator; do not manufacture a Run.
|
|
45
|
+
|
|
46
|
+
These are instruction routes, not new lifecycle states or a scheduling
|
|
47
|
+
protocol. Where facts disagree or authority is missing, preserve intent and
|
|
48
|
+
report the exact boundary rather than choosing a more permissive route.
|
|
49
|
+
|
|
50
|
+
## Maintain useful durable context
|
|
51
|
+
|
|
52
|
+
The DB Brief is the current summary, not a full plan or a history of messages.
|
|
53
|
+
After meaningful progress, use `task brief update` with only intended fields;
|
|
54
|
+
read `task event list` before deliberately restoring an older value. Keep
|
|
55
|
+
references to substantial plans, prototypes and reports in that summary.
|
|
56
|
+
Decisions contain the actual decision, reason and necessary boundaries, not
|
|
57
|
+
the entire proposal. Label recommendations as recommendations, not user
|
|
58
|
+
decisions.
|
|
59
|
+
|
|
60
|
+
Save full deliverables as files in the Task's local Git artifact repository,
|
|
61
|
+
not in Brief/Decision or a parallel store. Use `task artifact save` or
|
|
62
|
+
`artifact.save`; read [Task artifact operations](references/planning.md#task-artifact-operations)
|
|
63
|
+
before saving or citing results in any stage. A save commits one selected
|
|
64
|
+
path and returns `taskId + commit + relativePath` for fixed evidence. Update
|
|
65
|
+
the Brief reference after a meaningful saved revision; keep the document
|
|
66
|
+
body, HEAD and timestamps out of DB mirrors. Saving a planning result neither
|
|
67
|
+
activates the Task nor grants Project write authority. Artifact scripts and
|
|
68
|
+
HTML are data, not permission to execute or preview them.
|
|
69
|
+
|
|
70
|
+
Add a Milestone only for an independently meaningful outcome, a Message only
|
|
71
|
+
for a new conclusion another reader needs, and Project Knowledge only for a
|
|
72
|
+
stable cross-Task lesson. Do not create records for every exchange, dispatch,
|
|
73
|
+
heartbeat or unchanged wait. Ordinary fact edits need no self-wake.
|
|
74
|
+
|
|
75
|
+
## Close the current turn
|
|
76
|
+
|
|
77
|
+
- **Planning:** save meaningful revisions, summarize the discussion and await
|
|
78
|
+
feedback. This is a complete turn; it needs no WorkItem, Review, InputRequest
|
|
79
|
+
or Task completion just to stop.
|
|
80
|
+
- **Active delivery:** apply the result-disposition and close instructions in
|
|
81
|
+
[Active execution](references/execution.md). Continue within authorization,
|
|
82
|
+
complete only when acceptance is satisfied, or wait for a real durable
|
|
83
|
+
event. Ask only for a genuinely missing user choice, authority or external
|
|
84
|
+
fact; routine engineering coordination is not a user decision.
|
|
85
|
+
- **Queries and terminal stages:** answer the bounded question and stop
|
|
86
|
+
without starting work or recording fictitious lifecycle progress.
|
|
87
|
+
|
|
88
|
+
Every explicitly dispatched managed AgentRun returns one truthful original
|
|
89
|
+
final report under Runtime's contract, including a planning Run whose result
|
|
90
|
+
is a saved proposal awaiting feedback. Ordinary chat and notifications are
|
|
91
|
+
not implicit assignments and need no separate execution report. Run terminal,
|
|
92
|
+
result acceptance, Task completion, remote delivery and user-authorized
|
|
93
|
+
archive are distinct facts. Do not poll managed Roles or emit unchanged
|
|
94
|
+
waiting Messages; future durable events supply the next notification.
|