@zq-silk/yui 0.15.8 → 0.15.9

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 (74) hide show
  1. package/ARCHITECTURE.md +2 -0
  2. package/ARCHITECTURE.zh-CN.md +151 -0
  3. package/README.md +211 -14
  4. package/dist/artifacts/artifactCapability.js +74 -0
  5. package/dist/artifacts/artifactCommitLock.js +249 -0
  6. package/dist/artifacts/artifactPaths.js +151 -0
  7. package/dist/artifacts/gitArtifactRef.js +146 -0
  8. package/dist/artifacts/managedGit.js +332 -0
  9. package/dist/artifacts/taskArtifactRepository.js +277 -0
  10. package/dist/cli/commandCatalog.js +14 -10
  11. package/dist/cli.js +67 -0
  12. package/dist/commands/operatorCommands.js +33 -2
  13. package/dist/commands/taskActivationCommands.js +22 -0
  14. package/dist/commands/taskCommands.js +342 -79
  15. package/dist/context/runContextPack.js +28 -16
  16. package/dist/context/taskContext.js +26 -3
  17. package/dist/controller/controller.js +8 -2
  18. package/dist/kernel/builtinCapabilities.js +32 -24
  19. package/dist/message/message.js +56 -0
  20. package/dist/plugins/pluginService.js +11 -3
  21. package/dist/resources/projectResource.js +0 -48
  22. package/dist/resources/projectResourceService.js +3 -81
  23. package/dist/setup/setupCommand.js +3 -8
  24. package/dist/storage/migrations/artifactsToGit.js +338 -0
  25. package/dist/storage/migrations/submitIntent.js +126 -0
  26. package/dist/storage/sqliteSchema.js +37 -3
  27. package/dist/storage/sqliteStore.js +1 -21
  28. package/dist/storage/storageVersions.js +1 -1
  29. package/dist/storage/storeRpc.js +1 -1
  30. package/dist/task/taskActivation.js +26 -0
  31. package/dist/task/taskActivationService.js +85 -69
  32. package/dist/task/taskSubmission.js +236 -0
  33. package/dist/web/assets/client/app.js +3 -2
  34. package/dist/web/assets/client/taskSurface.js +96 -7
  35. package/dist/web/webServer.js +18 -3
  36. package/dist/web/webTaskSurface.js +6 -6
  37. package/dist/workItem/workItem.js +14 -10
  38. package/docs/agent-result-consumption.md +2 -0
  39. package/docs/agent-result-consumption.zh-CN.md +81 -0
  40. package/docs/agent-runtime-drivers.md +2 -0
  41. package/docs/agent-runtime-drivers.zh-CN.md +77 -0
  42. package/docs/architecture/README.md +44 -32
  43. package/docs/architecture/README.zh-CN.md +43 -0
  44. package/docs/architecture/capabilities-and-resources.md +118 -79
  45. package/docs/architecture/capabilities-and-resources.zh-CN.md +83 -0
  46. package/docs/managed-turn-and-session-runtime.md +2 -0
  47. package/docs/managed-turn-and-session-runtime.zh-CN.md +180 -0
  48. package/docs/observability/README.md +2 -0
  49. package/docs/observability/README.zh-CN.md +71 -0
  50. package/docs/plugin-sdk.md +320 -217
  51. package/docs/plugin-sdk.zh-CN.md +293 -0
  52. package/docs/provider-runtime.md +2 -0
  53. package/docs/provider-runtime.zh-CN.md +132 -0
  54. package/docs/release-workflow.md +2 -0
  55. package/docs/release-workflow.zh-CN.md +237 -0
  56. package/docs/roles-and-configuration.md +2 -0
  57. package/docs/roles-and-configuration.zh-CN.md +96 -0
  58. package/docs/sqlite-control-plane-design.md +2 -0
  59. package/docs/sqlite-control-plane-design.zh-CN.md +62 -0
  60. package/docs/task-dag-semantics.md +80 -57
  61. package/docs/task-dag-semantics.zh-CN.md +59 -0
  62. package/docs/task-delivery.md +2 -0
  63. package/docs/task-delivery.zh-CN.md +82 -0
  64. package/docs/task-local-identity.md +2 -0
  65. package/docs/task-local-identity.zh-CN.md +58 -0
  66. package/docs/testing/verification-levels.md +2 -0
  67. package/docs/testing/verification-levels.zh-CN.md +69 -0
  68. package/i18n/README.zh-CN.md +199 -10
  69. package/package.json +2 -1
  70. package/skills/yui-leader/SKILL.md +88 -331
  71. package/skills/yui-leader/references/execution.md +303 -0
  72. package/skills/yui-leader/references/planning.md +109 -0
  73. package/skills/yui-leader/references/task-plugins.md +8 -4
  74. package/skills/yui-operator/SKILL.md +16 -3
@@ -0,0 +1,303 @@
1
+ # Active execution
2
+
3
+ Read this after the [Leader stage entry](../SKILL.md) selects authorized
4
+ delivery. These implementation, dispatch, review and acceptance instructions
5
+ are not requirements for ending a planning discussion or answering a query.
6
+
7
+ ## Choose the simplest coherent result
8
+
9
+ Start from the current Task Contract and trace the existing implementation,
10
+ ownership and supported operating path before choosing a change. Establish
11
+ whether a failure is reachable with the user's actual inputs and configuration;
12
+ do not make a test fixture's accidental differences into new product policy.
13
+
14
+ Choose the lowest total implementation, verification, coordination and
15
+ maintenance cost that satisfies the contract. Reuse a coherent responsibility;
16
+ redesign a misplaced boundary when that lowers the complete cost. Add a
17
+ mechanism only for a demonstrated requirement or hard boundary that existing
18
+ primitives cannot satisfy. Derived views must not become competing truth.
19
+
20
+ Make routine legal choices yourself. Do not ask the user to choose among
21
+ implementation patterns, scheduling options, review routing, or recoverable
22
+ runtime actions. Create an InputRequest only for a real product choice, new
23
+ authority, irreversible external effect, or unavailable external fact.
24
+
25
+ ## Choose execution topology from ownership
26
+
27
+ A WorkItem is one substantial requirement with an independent owner and useful
28
+ acceptance boundary. It is not a container for every phase, file, test,
29
+ finding, repair, or progress update. Task type, risk labels, file count, and
30
+ subsystem names do not determine topology.
31
+
32
+ Choose the smallest useful executor:
33
+
34
+ 1. **Leader directly** when current context, authority, and tools are enough.
35
+ 2. **Native subagent** for bounded specialist attention or parallel
36
+ investigation inside the current Agent Session when a best-effort child
37
+ result is sufficient.
38
+ 3. **Task Role AgentRun** when work needs independent durable ownership, a distinct
39
+ Agent/provider or credential set, a managed workspace, or a separately
40
+ recoverable Session and AgentRun lifecycle.
41
+
42
+ Create multiple WorkItems only when their requirements can make useful
43
+ independent progress, normally in parallel, and the coordination and
44
+ Integration cost is lower than keeping one coherent owner. Keep coupled
45
+ changes together.
46
+
47
+ An ordinary WorkItem uses its assignee directly; dispatch without `--lane-role`.
48
+ Use [replicated execution](replicated-execution.md) only when
49
+ independent attempts over the same frozen Assignment repay their coordination
50
+ cost. Direct managed execution already provides durable ownership.
51
+
52
+ ## Give Agents outcomes, not premature implementations
53
+
54
+ Make delegated work decision-complete:
55
+
56
+ - objective and observable acceptance criteria;
57
+ - relevant Task and Project context;
58
+ - hard scope, authority, and workspace boundaries;
59
+ - known constraints, risks, dependencies, and existing decisions; and
60
+ - expected checks and evidence.
61
+
62
+ Let the receiving Agent choose its implementation plan, internal structure, and
63
+ tools unless a particular ordering or mechanism is itself part of the accepted
64
+ contract. Do not encode the Leader's speculative design as mandatory Worker
65
+ steps.
66
+
67
+ For Project-backed work, use the Project Skills, Policy, and Knowledge exposed
68
+ through current context. Keep repository-specific build, migration, release,
69
+ and test rules in that Project-owned layer.
70
+
71
+ ## Inspect execution facts
72
+
73
+ Use `yui task context <task-id>` and `yui task next-action <task-id>` as
74
+ decision support. They expose current facts, exact refs, and legal
75
+ alternatives; they do not replace Leader judgment.
76
+ An empty WorkItem list does not mean the user requested direct execution.
77
+ Honor explicit delegation and independent Review requirements in the user's
78
+ messages and Task Brief. Neither `next-action` nor a disabled default review
79
+ policy authorizes dropping them to make completion easier.
80
+
81
+ An Integration Job's success is not the final target update. For that
82
+ notification, read [Integration](integration.md) and finish the same
83
+ attempt; do not start a duplicate operation.
84
+
85
+ Before dispatch, Review, Integration, or completion, inspect
86
+ `liveTaskState.activeRuns` and `liveTaskState.activeTaskReviews` in the current
87
+ Context Pack. They report work in flight but gate nothing by themselves; reason
88
+ from each exact binding and frozen candidate instead of treating activity as a
89
+ global Task lock.
90
+
91
+ ## Execute the chosen path
92
+
93
+ Dispatch establishes the first owner and frozen Assignment. For ordinary
94
+ clarification, feedback or a continuation of that same work, send a Message:
95
+
96
+ ```sh
97
+ yui task message send <task> "<clarification or continuation>" --to <role> --work-item <work-id>
98
+ yui task message send <task> "<review clarification>" --to <role> --review-round <round-id>
99
+ ```
100
+
101
+ Busy execution queues the Message. Its terminal triggers continuation in the
102
+ same compatible Session and workspace; do not fabricate a failure, submit an
103
+ unfinished Candidate, or change WorkItem status merely to answer a question.
104
+ Read Message delivery and the exact resulting AgentRun separately from business
105
+ acceptance. A Message never expands scope, applies desired configuration, or
106
+ changes a Review's frozen candidate. An ownership change preserves the original
107
+ recipient; transfer still-pending input only with explicit `task message handoff`.
108
+ Late input to terminal work or an obsolete Review remains visible with a bounded
109
+ nondelivery reason. Use the existing formal operation for new scope or Review.
110
+
111
+ For unknown delivery or Session replacement, read
112
+ [runtime recovery](../../yui-runtime/references/recovery.md). Preserve the original
113
+ input; do not replay uncertainty or treat it as a global Task lock.
114
+
115
+ For direct work, change only Task main, keep it on its managed branch, commit
116
+ the result, and leave it clean. Run the smallest check that can catch the
117
+ changed behavior while implementing.
118
+
119
+ For a substantial delegated requirement:
120
+
121
+ ```sh
122
+ yui task work create <task-id> "<title>" \
123
+ --project <project-to-modify> \
124
+ --objective "<bounded outcome>" \
125
+ --accept "<observable criterion>"
126
+ ```
127
+
128
+ Add `--after` only for a real dependency. Likely file overlap is not by itself
129
+ a dependency. A Worker may read the complete authorized Task context but may
130
+ write only its WorkItem Projects and workspace.
131
+
132
+ For a Leader-owned WorkItem, mark it running, complete it directly, then record
133
+ its actual result:
134
+
135
+ ```sh
136
+ yui task work update <work-id> running
137
+ yui task work update <work-id> done --summary "<result and evidence>"
138
+ yui task work accept <work-id> --summary "<explicit acceptance and evidence>"
139
+ ```
140
+
141
+ For a native child, pass a bounded brief and applicable Profile constraints
142
+ through the provider's child tools. A small investigation needs no synthetic
143
+ WorkItem. If the child implements an existing Leader-owned WorkItem, keep that
144
+ WorkItem roleless and mark it running. Native children inherit only current
145
+ parent authority and gain no Yui Role, AgentRun, Session or broader workspace. Their
146
+ results are best-effort until Yui externalizes them; use a managed Task Role
147
+ when independent durability matters. Inspect the returned result before
148
+ submitting `done` or recording failure progress. `done` creates a Candidate;
149
+ `work accept` records the separate acceptance. WorkItem responsibility remains
150
+ open through execution failure and becomes accepted only on that decision.
151
+ A Profile's runtime source applies when
152
+ materializing a Task Role, not when launching a native child. The child
153
+ inherits the Leader Agent; apply a Profile model or effort only when the native
154
+ tool actually supports and confirms that override.
155
+
156
+ For a managed Task Role:
157
+
158
+ ```sh
159
+ yui task role add <task-id> <role> --profile <profile>
160
+ yui task role show <task-id> <role>
161
+ yui task work create <task-id> "<outcome>" --role <role>
162
+ yui task work dispatch <work-id> --input "<decision-complete brief>"
163
+ ```
164
+
165
+ Profiles carry portable behavior plus either a dynamic Global Worker runtime
166
+ source or an explicit Agent with optional model and effort. Applying a Profile
167
+ to a Task Role resolves and freezes the complete binding; later Profile or
168
+ Global Worker changes do not rewrite that Role. Before dispatch, use
169
+ `profile show` and `task role show` to read the exact behavior, Agent, model,
170
+ effort, Profile, and workspace. Do not reconstruct or guess launch
171
+ configuration. Use the WorkItem assignee directly unless replicated execution
172
+ was deliberately selected.
173
+
174
+ Managed Task main, WorkItem, ReviewRound, and Integration workspaces have
175
+ different owners. Never edit stable Project checkouts, managed refs, Yui state
176
+ files, or another owner's workspace. A Task's recorded base is durable; do not
177
+ silently replace it merely because its remote branch later moves.
178
+
179
+ ## Extend capabilities within this Task's authority
180
+
181
+ Use `capability search`, `describe`, and `call` to inspect current tools.
182
+ Prefer existing tools, composition or a one-off script when sufficient.
183
+ For reusable Task-local capabilities, read [Task plugins](task-plugins.md)
184
+ before creation, validation or activation. Plugin management permission does
185
+ not grant code execution or broader external effects. Never issue your own
186
+ grants, impersonate Operator, or modify the core installation to obtain a tool.
187
+
188
+ ## Validate and make the review judgment
189
+
190
+ Use the smallest evidence that establishes the accepted behavior and material
191
+ boundaries. Do not repeat a successful unchanged check. Run the Project's
192
+ complete local delivery validation once on the final candidate when its Policy
193
+ requires it.
194
+
195
+ As part of accepting a WorkItem or completing a Task, decide whether additional
196
+ review would add useful evidence:
197
+
198
+ - inspect directly when the change is clear and existing evidence is enough;
199
+ - use one independent Worker, native child, or Reviewer when independent
200
+ inspection materially reduces a reachable risk; or
201
+ - rely on an already completed applicable Review.
202
+
203
+ This is Leader judgment inside the acceptance decision, not a separate record,
204
+ checklist, or workflow phase. A managed Reviewer is optional unless the user,
205
+ Project or Task Contract requires it. Do not create a
206
+ Reviewer Role or ReviewRound for ceremony. Honor an existing Candidate's
207
+ snapshotted `always` policy and any immutable Task-final Review contract.
208
+ Otherwise choose whether another review adds enough evidence to justify its
209
+ cost.
210
+
211
+ Use one direct main Reviewer by default. If independent replicas materially
212
+ improve evidence, read [replicated execution](replicated-execution.md)
213
+ before dispatch or synthesis. Honor required review contracts even when a
214
+ cheaper execution path is otherwise available.
215
+
216
+ When several WorkItems contribute to one outcome, prefer one independent
217
+ Task-final Review after their accepted results are integrated over repeating a
218
+ complete Review for every WorkItem. Request an earlier WorkItem Review only
219
+ when that frozen Candidate has a specific risk that should be resolved before
220
+ Integration.
221
+
222
+ When a Worker or Reviewer result arrives, resolve its exact AgentRun and read the
223
+ complete original `AgentRunResult.output` before starting new work or waiting
224
+ again. Treat headings or JSON fields only as communication aids; never infer
225
+ that Core parsed or accepted them. Decide whether to accept, repair, review
226
+ again, retry execution, or ask for a genuinely user-owned decision. Route
227
+ reachable issues to the original execution owner. Fix a small Task-main issue
228
+ directly; create a Repair WorkItem only when the repair is itself a substantial
229
+ independently owned requirement.
230
+
231
+ A failed ReviewRound is an execution failure, not an automatic retry or repair
232
+ wave. Inspect its exact Round, AgentRun, candidate, Core failure, and
233
+ `task next-action` facts, then choose the smallest recovery that preserves the
234
+ frozen boundary. Do not invent a retry loop or silently replace the Reviewer
235
+ Session. For replicated execution, choose whether to retry a failed Producer,
236
+ settle that Lane, or synthesize selected available results. Retry a failed
237
+ main synthesis through its exact AgentRun, preserving its selected source snapshot.
238
+
239
+ ## Accept, integrate, and complete
240
+
241
+ A Worker or Reviewer AgentRun result is evidence, not acceptance. Inspect the
242
+ result, diff, checks, and current Candidate before deciding.
243
+
244
+ If a result is insufficient, reject it with bounded feedback and redispatch
245
+ the same WorkItem and Role while scope remains valid. Before accepting isolated
246
+ Git changes, read [Integration](integration.md) to capture and
247
+ integrate the latest Candidate. Do not edit managed refs or bypass Yui's
248
+ compare-and-swap boundary.
249
+
250
+ After an authorized PR/MR operation, follow
251
+ [publication recording](../../yui-runtime/references/publication.md).
252
+ External delivery and Task completion remain separate facts.
253
+
254
+ After a ReviewRound is terminal, the Leader or authorized Operator owns
255
+ `task work review cleanup <task>/<round>`. Preserve dirty diagnostic evidence
256
+ and resolve it explicitly; do not ask a Reviewer to clean its own runtime
257
+ after its final report. Cleanup can remain advisory at completion, but all
258
+ required resources must be settled before user-authorized archive.
259
+
260
+ Complete only when the Task outcome is satisfied, required checks and review
261
+ contracts are settled, WorkItems are accepted or deliberately retired, latest
262
+ isolated results are integrated, and user inputs are resolved:
263
+
264
+ ```sh
265
+ yui task complete <task-id> \
266
+ --summary "<outcome, validation, and remaining risk>"
267
+ ```
268
+
269
+ Completion records the exact Project heads. Archive is a separate,
270
+ user-authorized Operator action.
271
+
272
+ If completion reports `pending-user-input`, new user intent has not yet reached
273
+ the current notification window. End this native turn so the next notification
274
+ can be delivered, then read the original messages and reassess the outcome.
275
+ Do not spin on completion, drop messages, or manufacture another Run to proceed.
276
+ A current Leader Session can create a formal InputRequest during an ordinary
277
+ notification; no active AgentRun is required.
278
+
279
+ ## Finish an active execution turn
280
+
281
+ Before ending authorized execution:
282
+
283
+ 1. Inspect the wake delta, resolve every referenced Worker or Reviewer AgentRun
284
+ with `yui task run show`, read each original result in full, and make the
285
+ next decision.
286
+ 2. Persist actual WorkItem lifecycle and material Brief, Decision, Milestone,
287
+ Message, or Knowledge changes.
288
+ 3. Choose one truthful outcome: continue through an owned native child, complete
289
+ the Task, create a justified InputRequest, or leave the active Task waiting
290
+ for a real durable event.
291
+ 4. For an explicitly dispatched AgentRun, return its truthful original final
292
+ report with outcome, checks, remaining risk and bounded next action.
293
+ Direct conversation and notifications do not require a separate execution
294
+ report; use the [stage-specific close](../SKILL.md#close-the-current-turn).
295
+
296
+ Do not claim completion only in prose when durable Task or WorkItem state still
297
+ needs updating. Do not poll managed Roles or emit waiting Messages. Managed
298
+ results enter a later Leader notification; that notification is not an implicit
299
+ AgentRun and requires no separate execution report. An unchanged active Task remains quiet.
300
+
301
+ Use the shared [runtime recovery](../../yui-runtime/references/recovery.md) contract
302
+ for failed execution. Persist successor context before replacing yourself,
303
+ then end this turn; engineering cleanup is not discarded Task intent.
@@ -0,0 +1,109 @@
1
+ # Planning and activation handoff
2
+
3
+ Use this for Draft discussion, planning-only Sessions and the boundary into
4
+ delivery. The [Leader entry](../SKILL.md) owns shared context maintenance and
5
+ turn reporting; [Runtime](../../yui-runtime/SKILL.md) owns authority.
6
+
7
+ ## Discuss and preserve the outcome
8
+
9
+ If the user asked only to create/store a Task, preserve the requirements and
10
+ stop: do not start a planning Session. Once discussion is authorized, clarify
11
+ requirements, inspect authorized current facts, compare options and revise the
12
+ technical approach as the conversation develops. Distinguish unresolved
13
+ questions, recommendations and accepted decisions.
14
+
15
+ Planning can include research explicitly authorized by the user and permitted
16
+ by the Session, Project and resource boundaries. Discussion is not delivery
17
+ authorization: do not modify Project code or run implementation tests merely
18
+ to support a proposal. Keep full planning results in supported Task result
19
+ storage and maintain the Brief's current summary and references. Planning
20
+ storage and Project delivery workspaces have different purposes and authority.
21
+
22
+ Saving a useful revision, reporting what changed and waiting for feedback is
23
+ the normal end of a discussion. Do not create implementation WorkItems,
24
+ dispatch, Review, acceptance or Task completion to make a planning turn look
25
+ finished. An InputRequest is not required for ordinary continued discussion.
26
+
27
+ ## Hand off only through authorized activation
28
+
29
+ User/Operator submissions use `--intent record|discuss|develop` on
30
+ `operator submit` or an unaddressed `task message send`. The default is
31
+ `discuss`; Core does not infer intent from message text.
32
+
33
+ - `record` saves the message without waking the Leader.
34
+ - `discuss` on an unplanned Draft records the planning route and wakes planning.
35
+ - `develop` on an unplanned Draft saves the requirement and activation intent,
36
+ then enters delivery through formal activation, without first starting planning.
37
+ - `develop` after planning has been entered saves the input but does not wake
38
+ or activate; the routing result is `planned-needs-manual-activation`.
39
+
40
+ Read the returned routing/feedback and current context before taking the next
41
+ action. Active submissions do not downgrade or reactivate the Task; terminal
42
+ submissions do not reopen it. A stopped execution gate is not permission to
43
+ resume. `--request-id <key>` on submissions preserves the original result on a
44
+ matching retry, not permission to replay uncertain work or change its content.
45
+
46
+ Once planning has been entered, starting delivery requires a distinct,
47
+ explicit activation authorization. A development remark during discussion,
48
+ the end or failure of a planning Run, or Session replacement is not that
49
+ action and does not restore “blank Draft” status. Accepted planning routing
50
+ and historical Runs/Sessions count even when no Session is currently busy.
51
+ “Manual activation” means an explicit user action, not that the user must type
52
+ CLI commands: an authorized Operator can perform the mechanical operation.
53
+
54
+ With that authorization, use the formal supported activation operation
55
+ (`task activate <task-id>`) within the caller's authority, or have the Operator
56
+ perform it. Inspect the observable result. Preserve a busy or unknown
57
+ operation's exact request and follow
58
+ [Runtime recovery](../../yui-runtime/references/recovery.md); do not
59
+ self-dispatch, interrupt, kill or replace a Session to bypass the handoff.
60
+ New discussion during a pending handoff does not authorize a competing
61
+ planning Session. A failure calls for an explicit diagnosis and authorized
62
+ recovery, not automatic downgrade or replay.
63
+
64
+ Continue the durable requirements once the Task is formally active and a
65
+ delivery-authorized Session/workspace is ready. Do not demand another
66
+ “continue.” An old planning Session remains planning-scoped: preserve its
67
+ successor context and end its turn rather than promoting itself.
68
+
69
+ ## Task artifact operations
70
+
71
+ These operations apply to planning and delivery results. The current Leader
72
+ adopts contributions from other Agents' authorized workspaces; do not share
73
+ an uncoordinated Git index or edit Yui storage directly.
74
+
75
+ ```sh
76
+ yui task artifact list <task-id>
77
+ yui task artifact save <task-id> plans/design.md "<UTF-8 content>" --message "Revise design"
78
+ yui task artifact read <task-id> plans/design.md
79
+ yui task artifact read <task-id> plans/design.md <full-commit>
80
+ ```
81
+
82
+ `save` writes and locally commits exactly one relative path, creating the
83
+ repository on first save. The `artifact.save` capability takes `taskId`,
84
+ `relativePath`, `content`, optional `message` and optional `expectedHead`;
85
+ the CLI equivalent is `--expected-head <commit>`. A head conflict leaves
86
+ the save unapplied: re-read and reconcile the intended update, not overwrite
87
+ blindly. The text interface accepts UTF-8 files up to 8 MiB, not arbitrary
88
+ binary payloads or an invented directory-upload command.
89
+
90
+ Current reads use Task and relative path at HEAD. Frozen Candidate, Review,
91
+ Context and completion evidence use the returned `taskId + commit +
92
+ relativePath`; do not replace a pinned read with a current read. For same-Task
93
+ string reference lists, use `git:<full-commit>:<relativePath>`, including
94
+ `task complete ... --artifact-ref "git:<full-commit>:plans/design.md"`.
95
+ The commit must be the artifact repository's returned commit, not the Project
96
+ code head. Preserve fixed old references when updating the current document.
97
+
98
+ After a meaningful save, update the Brief's summary/reference; keep Decisions
99
+ to the choice, reason and boundary. No document-body, HEAD or timestamp mirror
100
+ is needed. The artifact repository has no remote or transport; this does not
101
+ prohibit a Project code repository's legitimate remote. Saving in Draft grants
102
+ no delivery authority; Session handoff and archive preserve the artifacts.
103
+ Stored scripts/HTML remain data and are never implicitly executed or previewed.
104
+
105
+ These commands describe this source version's interface. A managed Session
106
+ still uses its authorized CLI and actual available capabilities. If an older
107
+ installation lacks them, report that version boundary; do not switch it to
108
+ an unapproved checkout CLI, migrate a shared Home, or upgrade the installation
109
+ merely to save a result.
@@ -27,7 +27,11 @@ external effect does not authorize rerunning the action chain. After activation,
27
27
  query the directory again and use the new capability through the same bridge
28
28
  and native Session; no native tool-schema change or Controller restart is needed.
29
29
 
30
- Save the actual business result through `artifact.save` and retain the reference
31
- in Task results. Plugin source or successful loading alone is not delivery.
32
- Historical Artifacts remain readable after disable or restart; saved enable
33
- intent does not automatically execute code on restart.
30
+ Save the actual business result as a file artifact with `artifact.save`
31
+ (`relativePath` plus `content`): it commits exactly that path into the Task's
32
+ local Git repository and returns a self-certifying `commit + relativePath`
33
+ reference to retain in Task results. Plugin source or successful loading alone
34
+ is not delivery. Committed artifacts remain readable after disable or restart
35
+ through `artifact.read` at HEAD or a pinned commit; saved enable intent does not
36
+ automatically execute code on restart, and an artifact's script or HTML is data,
37
+ not a program to run under Yui authority.
@@ -53,16 +53,29 @@ determine Task identity. They also do not determine WorkItem count. Let
53
53
  isolated workspaces and Integration handle independent Git changes.
54
54
 
55
55
  Keep the Task title concise and put detailed intent, constraints, and evidence
56
- in its description or routed Message:
56
+ in its description or routed Message. The examples below are separate
57
+ operations, not an automatic create/submit/activate sequence. For creation-only
58
+ intent, save the Task without starting planning. Discussion does not authorize
59
+ delivery; follow the Leader's [planning and activation boundary](../yui-leader/references/planning.md)
60
+ before activation. Do not reopen terminal Tasks merely because new input arrives.
57
61
 
58
62
  ```sh
59
- yui operator submit "<related request and delta>" --task <task-id>
63
+ yui operator submit "<related request and delta>" --task <task-id> --intent discuss
60
64
  yui task create "<independent outcome>" \
61
65
  --project <project> --base <project>=<ref>
62
- yui operator submit "<request and routing context>" --task <new-task-id>
66
+ yui operator submit "<request and routing context>" --task <new-task-id> --intent develop
63
67
  yui task activate <new-task-id>
64
68
  ```
65
69
 
70
+ Choose the submission intent explicitly; it is never inferred from the message
71
+ text. `discuss` (the default, and what an old client sends) routes the Draft to
72
+ planning; `record` saves the message without waking the Leader; `develop` asks an
73
+ unplanned Draft to activate now, and reports the exact next step when it cannot
74
+ (already planned → activate manually; execution stopped → start it first). Pass
75
+ `--request-id <key>` to make a submission idempotent: retrying the same key
76
+ returns the original message and routing instead of creating a duplicate, and the
77
+ same key with different text is refused as a conflict.
78
+
66
79
  Resolve all known Projects before repository-backed execution. A stable Project
67
80
  checkout is read-only reference state, not the Task base authority. Yui records
68
81
  the Task's remote baseline when creating its managed workspace; do not route