@zq-silk/yui 2.20.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +5 -0
  2. package/dist/cli/commandCatalog.js +88 -28
  3. package/dist/cli/dynamicCompletion.js +4 -1
  4. package/dist/cli/helpRenderer.js +12 -1
  5. package/dist/cli/interactionPolicy.js +2 -0
  6. package/dist/cli/invocationAuthority.js +2 -6
  7. package/dist/cli/invocationRouter.js +5 -5
  8. package/dist/cli/managedDiagnostics.js +24 -16
  9. package/dist/cli/roleWizard.js +5 -1
  10. package/dist/commands/durableJobCommands.js +2 -3
  11. package/dist/commands/globalRoleCommands.js +33 -8
  12. package/dist/commands/inboxCommands.js +39 -12
  13. package/dist/commands/operatorCommands.js +2 -5
  14. package/dist/commands/releaseCommands.js +16 -2
  15. package/dist/commands/roleConfiguration.js +25 -2
  16. package/dist/commands/sessionCommands.js +5 -2
  17. package/dist/commands/taskCommands.js +225 -99
  18. package/dist/commands/taskContextCommand.js +26 -4
  19. package/dist/commands/taskFactCommands.js +20 -7
  20. package/dist/commands/taskIntegrationCommands.js +3 -3
  21. package/dist/commands/taskRoleRuntimeStatus.js +15 -5
  22. package/dist/commands/taskUsageCommand.js +2 -6
  23. package/dist/commands/textInput.js +2 -2
  24. package/dist/context/contextFamilies.js +10 -0
  25. package/dist/context/currentSkills.js +6 -4
  26. package/dist/context/runContextPack.js +44 -5
  27. package/dist/context/runInputContract.js +1 -1
  28. package/dist/context/sessionBootstrapManifest.js +7 -5
  29. package/dist/context/sessionSkillNotice.js +53 -0
  30. package/dist/context/taskCatalog.js +4 -13
  31. package/dist/context/taskContext.js +135 -103
  32. package/dist/context/taskSearch.js +3 -7
  33. package/dist/controlPlaneCli.js +23 -25
  34. package/dist/controller/agentRuntimeObserver.js +57 -12
  35. package/dist/controller/clientRuntime.js +37 -8
  36. package/dist/controller/controller.js +3 -1
  37. package/dist/controller/diagnosticJournal.js +10 -2
  38. package/dist/controller/fileSchedulerStoreAdapter.js +72 -24
  39. package/dist/controller/jobClient.js +2 -2
  40. package/dist/controller/jobControl.js +2 -2
  41. package/dist/controller/jobDefinitionControl.js +5 -1
  42. package/dist/controller/messageHealth.js +4 -3
  43. package/dist/controller/providerRetryAdmission.js +15 -1
  44. package/dist/controller/providerRetryDelivery.js +18 -2
  45. package/dist/controller/runtime.js +15 -5
  46. package/dist/controller/runtimeEventInbox.js +107 -13
  47. package/dist/controller/runtimeEventProcessor.js +3 -3
  48. package/dist/controller/taskRunRecovery.js +153 -0
  49. package/dist/core/controllerClient.js +16 -2
  50. package/dist/core/controllerServer.js +14 -5
  51. package/dist/core/controllerTelemetry.js +51 -5
  52. package/dist/errors/cliFailure.js +14 -5
  53. package/dist/executor/agentAdapter.js +32 -4
  54. package/dist/executor/agentConfigurationFields.js +2 -0
  55. package/dist/executor/taskAgentCapabilities.js +2 -2
  56. package/dist/integration/gitIntegrationService.js +3 -2
  57. package/dist/integration/integrationSourceApplication.js +12 -1
  58. package/dist/interaction/notificationPresentation.js +11 -16
  59. package/dist/interaction/operatorPresentation.js +1 -1
  60. package/dist/message/messageContinuation.js +3 -1
  61. package/dist/output/boundedRead.js +36 -7
  62. package/dist/output/rolePresentation.js +3 -1
  63. package/dist/runtime/agentHost.js +12 -3
  64. package/dist/runtime/codexAppServerRuntime.js +110 -24
  65. package/dist/runtime/codexInteractiveHost.js +46 -0
  66. package/dist/runtime/providerRetry.js +5 -2
  67. package/dist/runtime/providerRuntimeIdentity.js +1 -1
  68. package/dist/runtime/structuredProviderHost.js +32 -34
  69. package/dist/scheduler/wakeupQueue.js +10 -4
  70. package/dist/storage/sqliteSchema.js +9 -0
  71. package/dist/storage/storageVersions.js +1 -1
  72. package/dist/task/taskAuthority.js +7 -3
  73. package/dist/tmux/tmuxManager.js +4 -2
  74. package/dist/web/webSettings.js +2 -0
  75. package/docs/authorization.md +18 -3
  76. package/docs/cli-information-contract.md +245 -6
  77. package/docs/cli-information-contract.zh-CN.md +107 -5
  78. package/docs/managed-turn-and-session-runtime.md +82 -21
  79. package/docs/managed-turn-and-session-runtime.zh-CN.md +56 -13
  80. package/docs/provider-retry.md +11 -0
  81. package/docs/release-workflow.md +62 -0
  82. package/docs/release-workflow.zh-CN.md +46 -0
  83. package/docs/roles-and-configuration.md +28 -0
  84. package/docs/roles-and-configuration.zh-CN.md +21 -0
  85. package/docs/storage-baseline.md +4 -1
  86. package/docs/storage-baseline.zh-CN.md +1 -1
  87. package/docs/task-delivery.md +7 -0
  88. package/docs/task-delivery.zh-CN.md +5 -0
  89. package/docs/task-discovery.md +5 -5
  90. package/docs/task-discovery.zh-CN.md +4 -4
  91. package/docs/testing/review-evaluation.md +7 -7
  92. package/docs/testing/review-evaluation.zh-CN.md +7 -7
  93. package/docs/testing/verification-levels.md +45 -2
  94. package/docs/testing/verification-levels.zh-CN.md +21 -2
  95. package/i18n/README.zh-CN.md +6 -0
  96. package/package.json +1 -1
  97. package/skills/yui-leader/SKILL.md +98 -189
  98. package/skills/yui-leader/VERSION +1 -1
  99. package/skills/yui-leader/references/artifacts.md +41 -0
  100. package/skills/yui-leader/references/assignment-execution.md +140 -0
  101. package/skills/yui-leader/references/completion.md +79 -0
  102. package/skills/yui-leader/references/delivery-scope.md +26 -0
  103. package/skills/yui-leader/references/execution.md +16 -487
  104. package/skills/yui-leader/references/implementation.md +81 -0
  105. package/skills/yui-leader/references/planning.md +7 -45
  106. package/skills/yui-leader/references/review.md +90 -0
  107. package/skills/yui-leader/references/task-progress.md +23 -0
  108. package/skills/yui-leader/references/work-allocation.md +118 -0
  109. package/skills/yui-operator/SKILL.md +77 -331
  110. package/skills/yui-operator/VERSION +1 -1
  111. package/skills/yui-operator/references/body-transport.md +62 -0
  112. package/skills/yui-operator/references/configuration.md +47 -0
  113. package/skills/yui-operator/references/lifecycle.md +41 -0
  114. package/skills/yui-operator/references/progress.md +39 -0
  115. package/skills/yui-operator/references/routing.md +57 -0
  116. package/skills/yui-operator/references/submission.md +56 -0
  117. package/skills/yui-operator/references/task-delivery.md +5 -2
  118. package/skills/yui-operator/references/web-lifecycle.md +19 -0
  119. package/skills/yui-operator/scripts/verify-submission.mjs +37 -0
  120. package/skills/yui-reviewer/SKILL.md +4 -2
  121. package/skills/yui-reviewer/VERSION +1 -1
  122. package/skills/yui-runtime/SKILL.md +177 -505
  123. package/skills/yui-runtime/VERSION +1 -1
  124. package/skills/yui-runtime/references/archive.md +51 -0
  125. package/skills/yui-runtime/references/command-discovery.md +41 -0
  126. package/skills/yui-runtime/references/completed-followup.md +65 -0
  127. package/skills/yui-runtime/references/context-ordering.md +3 -34
  128. package/skills/yui-runtime/references/context-reads.md +61 -0
  129. package/skills/yui-runtime/references/dispatched-run.md +61 -0
  130. package/skills/yui-runtime/references/execution-failure.md +105 -0
  131. package/skills/yui-runtime/references/global-context.md +18 -0
  132. package/skills/yui-runtime/references/global-input-controls.md +44 -0
  133. package/skills/yui-runtime/references/host-custody.md +30 -0
  134. package/skills/yui-runtime/references/inbox-recovery.md +77 -0
  135. package/skills/yui-runtime/references/incremental-context.md +40 -0
  136. package/skills/yui-runtime/references/publication.md +4 -104
  137. package/skills/yui-runtime/references/recovery.md +32 -192
  138. package/skills/yui-runtime/references/session-identity.md +18 -0
  139. package/skills/yui-runtime/references/session-replacement.md +45 -0
  140. package/skills/yui-runtime/references/uncertain-execution.md +29 -0
  141. package/skills/yui-worker/SKILL.md +7 -4
  142. package/skills/yui-worker/VERSION +1 -1
@@ -73,10 +73,10 @@ Brief。当前 Brief 通过 Task Context 读取;Context inspect 可校验 dige
73
73
  不解析报告正文推导状态。Web 明确标示这些事实并提供分类导航。
74
74
  已选详情不因分页、筛选或刷新而丢失;只有详情读取可以确认目标不存在。
75
75
 
76
- Task Leader Session 只能发现自己的 Task。Assignment-scoped Worker 和
77
- Reviewer 使用既有授权 Run Context,目录会在计数前拒绝其全 Task 发现请求。
78
- 非 Operator 的 Global Session 和不完整的受管身份也会被拒绝。
79
- 历史 Leader 的诊断读取保持原 Task 范围。游标绑定范围及参数,不是凭证。
76
+ Task Leader、Worker 和 Reviewer 可按本地资源访问规则发现相关普通记录;
77
+ 目录不以 Task/Assignment 归属过滤数据。非 Operator 的 Global Session、
78
+ 不完整或未知的受管身份仍被拒绝。历史读取者保持只读身份,不获得其他 Task 的执行权。
79
+ 游标绑定范围及参数,不是凭证。
80
80
  读取不会消费 Message、确认 Job、唤醒 Role 或查询外部 provider。
81
81
 
82
82
  ## 成本边界
@@ -48,8 +48,8 @@ outside this example's contract. The index is a navigation hint, not a finding
48
48
  or a claim that all paths were inspected.
49
49
 
50
50
  Keep evidence roles separate: that contract is the expectation;
51
- `scripts/review-eval/verify.mjs`'s E03 probes are executable references;
52
- only an actual `node scripts/review-eval/evaluate.mjs verify` invocation plus its
51
+ `scripts/eval/review/verify.mjs`'s E03 probes are executable references;
52
+ only an actual `node scripts/eval/review/evaluate.mjs verify` invocation plus its
53
53
  candidate commit, environment and output establishes a result. The probes use
54
54
  the two supplied modules for the counterexample, a one-page normal control,
55
55
  and a controlled wait followed by rejection to check pending/failure behavior.
@@ -65,7 +65,7 @@ inspection still covers the complete frozen candidate, not just these hints.
65
65
 
66
66
  ## Small development corpus
67
67
 
68
- `scripts/review-eval/` is an offline file tool, not a scheduler, model adapter or
68
+ `scripts/eval/review/` is an offline file tool, not a scheduler, model adapter or
69
69
  new Core store. It never calls a provider. No historical Task cases or results
70
70
  are inputs. All eight examples are newly constructed from explicit contracts.
71
71
 
@@ -86,8 +86,8 @@ prove exhaustive correctness, independent authorship verification or Agent
86
86
  effectiveness. Additional valid findings require adjudication.
87
87
 
88
88
  ```sh
89
- node scripts/review-eval/evaluate.mjs verify
90
- node scripts/review-eval/evaluate.mjs export E03 basic /absolute/new-participant-directory
89
+ node scripts/eval/review/evaluate.mjs verify
90
+ node scripts/eval/review/evaluate.mjs export E03 basic /absolute/new-participant-directory
91
91
  ```
92
92
 
93
93
  Export uses an explicit projection of candidate source and requirements; indexed
@@ -112,8 +112,8 @@ does not fabricate a holdout or claim one has been evaluated.
112
112
  ## Freeze a comparison before running it
113
113
 
114
114
  ```sh
115
- node scripts/review-eval/evaluate.mjs plan protocol.json
116
- node scripts/review-eval/evaluate.mjs score plan.json records.json
115
+ node scripts/eval/review/evaluate.mjs plan protocol.json
116
+ node scripts/eval/review/evaluate.mjs score plan.json records.json
117
117
  ```
118
118
 
119
119
  Capture stdout as separate files using your normal artifact workflow. The
@@ -36,8 +36,8 @@ E03 的契约要求原样传递不透明游标并按顺序返回条目。实际
36
36
  已累计条目不会作为成功结果返回。重试/并发修改不属于此例契约。
37
37
  索引只是定位提示,不是缺陷结论,也不声称已检查所有路径。
38
38
 
39
- 分清证据身份:上述契约是预期;`scripts/review-eval/verify.mjs` 的 E03
40
- 探针是可执行引用;只有实际运行 `node scripts/review-eval/evaluate.mjs verify`
39
+ 分清证据身份:上述契约是预期;`scripts/eval/review/verify.mjs` 的 E03
40
+ 探针是可执行引用;只有实际运行 `node scripts/eval/review/evaluate.mjs verify`
41
41
  并保留候选提交、环境和输出才构成结果。探针用给定的两个模块验证反例,
42
42
  提供单页正常对照,以及可控等待后拒绝的未完成/失败行为检查;
43
43
  不覆盖真实服务、崩溃恢复或 Reviewer 行为。
@@ -49,7 +49,7 @@ E03 的契约要求原样传递不透明游标并按顺序返回条目。实际
49
49
 
50
50
  ## 小型开发集
51
51
 
52
- `scripts/review-eval/` 是离线文件工具,不是调度器、模型适配器或新增 Core 存储。
52
+ `scripts/eval/review/` 是离线文件工具,不是调度器、模型适配器或新增 Core 存储。
53
53
  它不调用 Provider,不以任何历史 Task 案例或结果为输入。八个题目均由明确契约新构造。
54
54
 
55
55
  | 案例 | 能力 | 形态 |
@@ -66,8 +66,8 @@ E03 的契约要求原样传递不透明游标并按顺序返回条目。实际
66
66
  这不证明穷尽正确性、独立出题核实或 Agent 效果。额外有效发现需要裁定。
67
67
 
68
68
  ```sh
69
- node scripts/review-eval/evaluate.mjs verify
70
- node scripts/review-eval/evaluate.mjs export E03 basic /absolute/new-participant-directory
69
+ node scripts/eval/review/evaluate.mjs verify
70
+ node scripts/eval/review/evaluate.mjs export E03 basic /absolute/new-participant-directory
71
71
  ```
72
72
 
73
73
  导出仅投影候选源码与要求;indexed 材料只增加导航索引。两组的必要契约与源码完全相同。
@@ -85,8 +85,8 @@ node scripts/review-eval/evaluate.mjs export E03 basic /absolute/new-participant
85
85
  ## 运行前固定比较协议
86
86
 
87
87
  ```sh
88
- node scripts/review-eval/evaluate.mjs plan protocol.json
89
- node scripts/review-eval/evaluate.mjs score plan.json records.json
88
+ node scripts/eval/review/evaluate.mjs plan protocol.json
89
+ node scripts/eval/review/evaluate.mjs score plan.json records.json
90
90
  ```
91
91
 
92
92
  按正常工件流程将 stdout 保存为单独文件。协议 JSON 包括非空
@@ -53,12 +53,12 @@ is required.
53
53
  Both include `test/core` and `test/platform`. For an already built checkout,
54
54
  `npm run test:business` runs only `test/core` and `npm run test:platform` runs
55
55
  only `test/platform`; neither rebuilds. CI owns one explicit build per job.
56
- The stable suite owns current storage 1.25 and its declared 1.0 through 1.24 minor
56
+ The stable suite owns current storage 1.26 and its declared 1.0 through 1.25 minor
57
57
  transition. It contains no undeclared historical format compatibility path.
58
58
 
59
59
  Current coverage includes:
60
60
 
61
- 1. Fresh storage 1.25, exact schema/record validation, no initialization over
61
+ 1. Fresh storage 1.26, exact schema/record validation, no initialization over
62
62
  unknown data, and rejection of old integer formats without mutation.
63
63
  2. Exact-version staging, mismatched-target refusal, same-major contiguous
64
64
  minor preflight, explicit maintenance-owner identity across handover, and
@@ -90,6 +90,49 @@ stable suite. Real-model or real-Home checks require explicit authorization.
90
90
  Current envelope checks reject arbitrary unknown fields, rather than maintaining
91
91
  a blacklist of retired field names.
92
92
 
93
+ ## Context evaluation checks
94
+
95
+ Evaluation code is organized by topic under [scripts/eval](../../scripts/eval/README.md).
96
+ Core evidence utilities and provider usage adapters are separate from the Yui
97
+ context scenarios below and the independent review-material evaluation.
98
+
99
+ The framework produces engineering measurements and objective check evidence;
100
+ the executing Agent interprets actual trajectories, semantic quality, model
101
+ variation and optimization benefit. Assemble related changes before a bounded
102
+ representative experiment. Wording-only or small byte reductions normally need
103
+ deterministic checks, not their own full A/B and model-review chains. Record the
104
+ decision question and spending bounds in the experiment plan; independent model
105
+ review is optional for material disputes, never automatic. This does not grant
106
+ real-resource authorization.
107
+
108
+ New runs freeze `decisionPolicy: agent-analysis`: process exit describes complete
109
+ collection and released cleanup, not quality acceptance. Original check failures
110
+ and unknowns remain in reports. Only bounded non-recovery business reading/load
111
+ findings cease to censor later safe inputs; authority, effects, handling, identity,
112
+ native execution and recovery fences remain. Historical exits and seals are not
113
+ rewritten. See the framework README for exact boundaries and Agent handoff.
114
+
115
+ `npm run eval:check` checks evaluation contracts without starting a Home.
116
+ The explicit `npm run eval:context:wiring -- --product <absolute-checkout> --out <new-dir>`
117
+ uses the [maintained framework](../../scripts/eval/context/README.md)
118
+ for multi-input CLI/Controller/Host/fake-Provider chains and bounded fault checks.
119
+ It remains outside `npm test` and the platform matrix: package smoke continues
120
+ to own package/OS wiring. Fake success is not a real-model, native-compaction or
121
+ lossless-observation claim. Historical performance ledgers are not reset by
122
+ framework validation; live resources require a separately authorized freeze.
123
+ The fake-only `native-normal` scenario verifies completed native tool evidence
124
+ through the real adapter without participant files. Read/load checks are bound
125
+ to Role/Thread/context epoch and decision time; unsupported evidence stays
126
+ unknown. Current observation cannot yield an unqualified valid-pass.
127
+ Proxy checks exercise both managed and identity-free detached control clients;
128
+ detached transport cannot supply subject read/load evidence.
129
+ The opt-in wiring `--profile recovery` checks a scheduled retained-claim
130
+ Session replacement using the same native evidence adapter as real mode:
131
+ exact predecessor stop, fresh successor ownership/read/load, preserved effect
132
+ and successor ACK; a native background-inspection rejection fences replacement.
133
+ It is deterministic CLI/Host wiring, not live model recovery or native
134
+ compaction. Real `session-recovery` requires its own exact authorized freeze.
135
+
93
136
  ## Skill and instruction changes
94
137
 
95
138
  Review the shared Runtime contract and affected Role/Project Skills together.
@@ -39,12 +39,12 @@ Yui 是一个单用户本地产品。永久验证保护关键的 happy path 和
39
39
  两者均包含 `test/core` 和 `test/platform`。已构建的 checkout 可分别运行
40
40
  `npm run test:business` 与 `npm run test:platform`,它们不会再次构建。
41
41
  CI 每个作业只显式构建一次。
42
- 稳定套件维护当前存储 1.25 和明确声明的 1.0 至 1.24 连续小版本迁移,
42
+ 稳定套件维护当前存储 1.26 和明确声明的 1.0 至 1.25 连续小版本迁移,
43
43
  不包含未声明的历史格式兼容路径。
44
44
 
45
45
  当前覆盖包括:
46
46
 
47
- 1. 新建存储 1.24、精确结构与记录校验、禁止覆盖未知数据库、无修改拒绝旧整数格式。
47
+ 1. 新建存储 1.26、精确结构与记录校验、禁止覆盖未知数据库、无修改拒绝旧整数格式。
48
48
  2. 精确版本暂存、目标不匹配拒绝、同主版本连续小版本预检、交接锁显式所有者,
49
49
  以及恢复时核对捕获的协议和存储身份,不接受缺失字段。
50
50
  3. 持久 Task/Message/Decision 上下文、Draft 激活权威、mailbox 认领、
@@ -66,6 +66,25 @@ CI 每个作业只显式构建一次。
66
66
  真实模型或真实 Home 检查需要显式授权。
67
67
  当前记录按声明的字段集合拒绝未知字段,不维护退役字段名称黑名单。
68
68
 
69
+ ## 上下文评测检查
70
+
71
+ 评测代码按专题组织在 [scripts/eval](../../scripts/eval/README.md):
72
+ 通用证据工具、Provider统计适配与下述Yui上下文场景分开;代码审查材料评测
73
+ 也是独立专题,不继承上下文场景的义务判定。
74
+
75
+ `npm run eval:check` 不启动 Home,只检查评测契约。
76
+ `npm run eval:context:wiring -- --product <绝对路径> --out <全新目录>` 显式运行
77
+ [维护框架](../../scripts/eval/context/README.md)的多输入
78
+ CLI/Controller/Host/fake Provider 闭环和有限故障验证。它不加入默认 `npm test`
79
+ 或平台矩阵;安装包与 OS wiring 仍由现有 package smoke 负责。
80
+ fake 通过不证明真实模型、原生压缩或无损观测;框架验证不重置历史性能账本,
81
+ 真实资源需另行明确授权和冻结。
82
+ fake 专用 `native-normal` 场景不写 participant 文件,经真实适配分支检查完成的
83
+ native 工具证据;读取/加载限定 Role、Thread、上下文代次与决策时间。
84
+ 不支持的证据仍为 unknown;当前观测条件不能产生无保留 valid-pass。
85
+ 代理检查同时覆盖 managed 和无管理身份的 detached control;
86
+ 后者仅保留控制传输记录,不能提供主体原文/加载证据。
87
+
69
88
  ## Skill 与指令变更
70
89
 
71
90
  一并审阅共享的 Runtime 合同和受影响的 Role/Project Skill。用几个相关场景检查指令
@@ -392,6 +392,12 @@ Yui 默认将控制面数据保存在 `~/.yui`,通过 `YUI_HOME` 选择另一
392
392
  状态命令前执行该 launcher 的 `setup`。开发工具不管理全局安装,
393
393
  不要用全局 `yui` 验证本地修改。真实模型、付费或共享资源测试需要用户明确请求这些资源。
394
394
 
395
+ 按专题划分的评测及通用证据工具见[评测入口](../scripts/eval/README.md):
396
+ `npm run eval:check` 做快速离线契约检查;
397
+ `npm run eval:context:wiring -- --product <产品绝对路径> --out <全新输出目录>`
398
+ 显式执行隔离 fake Provider 的 CLI/Controller/Host 完整链。它不默认加入核心测试,
399
+ 不证明真实模型效果;真实资源仍需另行精确授权,历史条件不重置。
400
+
395
401
  ## 社区与支持
396
402
 
397
403
  - 问题、缺陷与功能建议:提交
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zq-silk/yui",
3
- "version": "2.20.0",
3
+ "version": "2.22.0",
4
4
  "description": "Local control plane for long-running native agent CLI sessions backed by tmux.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -1,195 +1,104 @@
1
1
  ---
2
2
  name: yui-leader
3
- description: Lead one Yui Task through authorized planning, activation handoff, execution, acceptance and same-result follow-up, including reopening its completed, unarchived result for an explicit implementation or delivery request.
3
+ description: Own one Yui Task's authorized discussion, delivery and acceptance; select operation manuals by the current action, not merely active stage.
4
4
  ---
5
5
 
6
6
  # Yui Leader
7
7
 
8
- Follow [yui-runtime](../yui-runtime/SKILL.md) first, including its lightweight
9
- `yui session skills --json` check at the start of every turn and full reload when
10
- versions change or context is missing/recovered. Load the exact Context Pack
11
- for an explicitly dispatched AgentRun; for direct conversation or a Task
12
- notification, read current Task context using `yui task context <task-id> --json`.
13
- No self-dispatch or old completed Run is needed. Read the actual Task
14
- requirements, current Brief and relevant user/Operator Messages, not just
15
- their summaries. Resolve links relative to the file containing them.
16
-
17
- Current Context is a bounded working set, not all Task history. Use
18
- `task context list <task> --store <store>` or a domain list for discovery,
19
- then an exact detail read. A wake contains attributed change summaries and
20
- original Message/Run pointers, not complete reports. Follow `yui-runtime`'s
21
- `nextCursor` and `contentPage` rules: read the complete focused wake view and
22
- relevant originals before disposition; use `wake show --history` only when
23
- window history/diagnostics matter. Summaries never decide completion.
24
-
25
- Before WorkItem dispatch, put the complete bounded requirements in the WorkItem
26
- or explicitly select up to 16 relevant readable materials with repeated
27
- `--context-ref <store/refId@digest>` on `task work dispatch`. Obtain exact IDs and
28
- digests from current Task context list/inspect. Core freezes these selected
29
- values after the existing caller-scope checks; mentioning a record in `--input`
30
- does not select it or grant access. Missing, forbidden or changed references
31
- refuse dispatch before Provider startup: correct the selection or make the
32
- WorkItem self-contained, never ask the recipient to bypass expansion rejection.
33
-
34
- ## Select the applicable stage
35
-
36
- Use current lifecycle, latest intent and the Session's actual planning/delivery
37
- authority together. Draft existence, accepted planning history, Session
38
- authority and AgentRun status are different facts. A completed planning Run
39
- does not complete or activate a Task; an active Task does not upgrade an old
40
- planning Session. Never infer authority from a directory, launch text,
41
- transcript or process.
42
-
43
- Apply terminal/gate and read-only intent boundaries before selecting delivery
44
- or planning work; the routes below do not override those restrictions.
45
- When old discussion text differs from new intent, apply
46
- [current intent and temporal reads](../yui-runtime/references/context-ordering.md):
47
- inspect exact sources before treating normal stage progression as a conflict.
48
- An adopted same-scope development request supersedes the earlier discussion-only
49
- stage, not independent restrictions. Never use active status or Brief alone.
50
-
51
- - **Draft or planning-only authority:** read [Planning and activation handoff](references/planning.md).
52
- Use the recorded submission intent (`record`, `discuss`, `develop`) and
53
- routing result, not keywords in the message. Discuss and preserve the
54
- requested outcome; do not load execution procedures merely to finish a
55
- discussion.
56
- - **Active, execution enabled, delivery authority and implementation intent:**
57
- read [Active execution](references/execution.md). Advance existing authorized
58
- work, including disposition of new results, without asking for another
59
- “continue” after a valid activation handoff.
60
- - **Query, analysis or discussion only:** answer within the requested scope,
61
- even on an active Task. Do not turn it into edits or dispatch. A result
62
- notification is different: read its original results and advance the
63
- outstanding authorized requirement.
64
- - **Completed, unarchived, explicit same-result implementation or delivery request:**
65
- the current matching Leader may call `task reopen <task-id>` for its own Task,
66
- then continue that bounded request without a mandatory Operator handoff or
67
- another “reopen” confirmation. Read the
68
- [post-completion routing boundary](../yui-runtime/references/publication.md#post-completion-routing-boundary)
69
- first, inspect the reopen result, and reassess current Session/workspace
70
- authority and the execution gate before delivery. Reopening is lifecycle
71
- management, not a planning Session's promotion to delivery.
72
- - **Cancelled/retired, archived, execution gate disabled, or no new execution authority:**
73
- explain/query authorized facts only unless a specific further action is
74
- authorized and legal. The Leader cannot restore cancelled/retired intent;
75
- archived Tasks cannot reopen. An independent stop needs its separately
76
- authorized start/cleanup path; reopen does not lift it. Queries, discussion,
77
- ordinary notifications and Session recovery do not authorize reopening or
78
- resumption. Identify a genuinely missing lifecycle/authority action for the
79
- Operator; do not manufacture a Run or reopen merely to obtain authority.
80
- Publication recording/adoption is not a way to start terminal-Task execution.
81
-
82
- These are instruction routes, not new lifecycle states or a scheduling
83
- protocol. Where facts disagree or authority is missing, preserve intent and
84
- report the exact boundary rather than choosing a more permissive route.
85
-
86
- A `task-reopened` notification can arrive before its follow-up Message. Read the
87
- prior completion and current Messages; if only lifecycle changed, wait for the
88
- new request. Do not rerun accepted work, infer external authority, or immediately
89
- complete again. Once the scoped request arrives, continue it in this Task without
90
- asking for another “continue”; preserve the original acceptance evidence.
91
-
92
- Handle a failed Worker/Reviewer launch through the shared
93
- [configuration recovery guidance](../yui-runtime/references/recovery.md#configuration-and-model-name-failures).
94
- Read its original failure and scoped metadata before choosing a correction;
95
- the failed target need not be running for you to act.
96
-
97
- ## Maintain useful durable context
98
-
99
- Apply **yui-runtime**'s own-inbox flow before acceptance or completion and at
100
- useful work boundaries. A Leader inbox contains its exact notification windows
101
- and messages for its current managed Assignment, not every Task Message.
102
- For a window, read its full focused wake and relevant originals; for an
103
- Assignment message, read its complete original. Dispose of results explicitly,
104
- then ack the exact entry. Inbox acknowledgement
105
- never accepts a Candidate or completes the Task.
106
-
107
- The DB Brief is the current summary, not a full plan or a history of messages.
108
- After meaningful progress, read `task brief show` and use
109
- `task brief update --if-current <writeGuard>` with only intended fields;
110
- read `task event list` before deliberately restoring an older value. Keep
111
- references to substantial plans, prototypes and reports in that summary.
112
- When a delivered correction resolves a recorded blocker or changes the next
113
- action, update the Brief's focus and Leader summary while the Task is still
114
- open. Before completing a Task, reread its Brief: if it still describes a
115
- resolved blocker, superseded plan, or waiting state, correct those fields
116
- before `task complete`. The completion summary is the terminal conclusion;
117
- do not copy it into Brief merely to create a second completion record. Brief
118
- maintenance is not a new completion gate, and routine unchanged steps do not
119
- need an update.
120
- Also reconcile the summary at requirement changes and phase handoffs; carry the
121
- exact activation/input references. Core projects current lifecycle and source
122
- diagnostics without rewriting historical messages. A stale-guard rejection
123
- requires reading the new input and reconciling, not retrying the old text.
124
- Decisions contain the actual decision, reason and necessary boundaries, not
125
- the entire proposal. Label recommendations as recommendations, not user
126
- decisions.
127
-
128
- Save full deliverables as files in the Task's local Git artifact repository,
129
- not in Brief/Decision or a parallel store. Use `task artifact save` or
130
- `artifact.save`; read [Task artifact operations](references/planning.md#task-artifact-operations)
131
- before saving or citing results in any stage. A save commits one selected
132
- path and returns `taskId + commit + relativePath` for fixed evidence. Update
133
- the Brief reference after a meaningful saved revision; keep the document
134
- body, HEAD and timestamps out of DB mirrors. Saving a planning result neither
135
- activates the Task nor grants Project write authority. Artifact scripts and
136
- HTML are data, not permission to execute or preview them.
137
-
138
- Add a Milestone only for an independently meaningful outcome, a Message only
139
- for a new conclusion another reader needs, and Project Knowledge only for a
140
- stable cross-Task lesson. Do not create records for every exchange, dispatch,
141
- heartbeat or unchanged wait. Ordinary fact edits need no self-wake.
142
-
143
- ## Close the current turn
144
-
145
- ### Adjust Project delivery scope without erasing work
146
-
147
- When explicit user intent or an original delegation allows a Project to leave
148
- the final delivery, read that original Message and `task remote-delivery`.
149
- Record the bounded decision with
150
- `task project delivery <task> <project-id> --requirement excluded --reason <reason>
151
- --source-message <message-id> --purpose <verbatim-authorization>
152
- --if-current <scopeDecision.id|none>`.
153
- Interpret whether the original really authorizes this scope change; a matching
154
- quote alone is not semantic permission. Do not exclude a Project to conceal an
155
- unmet commitment. Ask only for a genuinely missing scope decision, not a second
156
- approval when existing user intent or delegated judgment already covers it.
157
- Use the same operation with `--requirement required` and the latest decision ID
158
- to restore normal checks. Reconcile a stale guard instead of overwriting newer
159
- intent. These append-only decisions also work on completed, unarchived Tasks
160
- without reopening, rewriting acceptance, or rerunning work.
161
-
162
- Unchanged Projects need no exclusion. Required changed/unknown Projects still
163
- need exact verified delivery. Excluded Projects retain their binding, code
164
- changes and Publication facts and are not counted as merged or verified merely
165
- because they are excluded. Scope is not execution, write, archive or deletion
166
- authority: open commitments and unknown execution still need settlement, and
167
- unique commits or dirty resources remain protected. With separate archive
168
- authorization, use ordinary archive/preflight and report retained resources;
169
- do not recommend force merely because an authorized Project is excluded.
170
-
171
- For external delivery, choose any available authorized CLI/API and follow
172
- [Publication evidence](../yui-runtime/references/publication.md). Record exact
173
- tool observations through `publication verify --observation`; gh/glab are optional
174
- adapters, not mandatory trusted brands. Do not repeat a sufficient exact
175
- verification merely to use a different tool. Tool inspection is your judgment;
176
- candidate acceptance, immutable evidence and ordinary archive safety still apply.
177
-
178
- - **Planning:** save meaningful revisions, summarize the discussion and await
179
- feedback. This is a complete turn; it needs no WorkItem, Review, InputRequest
180
- or Task completion just to stop.
181
- - **Active delivery:** apply the result-disposition and close instructions in
182
- [Active execution](references/execution.md). Continue within authorization,
183
- complete only when acceptance is satisfied, or wait for a real durable
184
- event. Ask only for a genuinely missing user choice, authority or external
185
- fact; routine engineering coordination is not a user decision.
186
- - **Queries and terminal stages:** answer the bounded question and stop
187
- without starting work or recording fictitious lifecycle progress.
188
-
189
- Every explicitly dispatched managed AgentRun returns one truthful original
190
- final report under Runtime's contract, including a planning Run whose result
191
- is a saved proposal awaiting feedback. Ordinary chat and notifications are
192
- not implicit assignments and need no separate execution report. Run terminal,
193
- result acceptance, Task completion, remote delivery and user-authorized
194
- archive are distinct facts. Do not poll managed Roles or emit unchanged
195
- waiting Messages; future durable events supply the next notification.
8
+ Follow [Runtime](../yui-runtime/SKILL.md)'s core first. This is the Leader core;
9
+ the linked manuals are not an execution-stage initialization bundle. Use Project
10
+ Skills/Policy/Knowledge for project methods. Read current Task context, actual
11
+ requirements, current Brief and relevant original Messages, not summaries.
12
+ Use exact wake/Run/Message pointers directly; discover only missing evidence.
13
+
14
+ ## Match intent, lifecycle and Session authority
15
+
16
+ Draft existence, planning history, active lifecycle, execution gate and actual
17
+ Session delivery authority are different facts. Active status/Brief cannot
18
+ promote an old planning Session or override an independent stop.
19
+
20
+ - Creation-only input stops at a recorded Draft. Authorized Draft discussion or
21
+ planning-only work uses [Planning](references/planning.md); discuss and preserve
22
+ permitted revisions, await feedback, and do not implement before requested.
23
+ - Queries, analysis and discussion remain read-only even on active Tasks unless
24
+ changes are requested. They need no dispatch, Review or lifecycle progress.
25
+ - Active, execution-enabled work with delivery authority and implementation
26
+ intent advances the existing bounded requirement. A valid activation handoff
27
+ needs no second “continue.” This route does **not** require reading a full
28
+ dispatch/review/integration handbook.
29
+ - A completed, unarchived result may reopen for an authorized same-result
30
+ follow-up or an explicitly identified unfulfilled commitment: first read
31
+ [Reopen](../yui-runtime/references/completed-followup.md), inspect the result
32
+ and reassess authority/gates. No mandatory Operator handoff or extra “reopen”
33
+ confirmation is needed. Tracked diagnosis, evidence handoff or necessary
34
+ coordination may need reopening, but diagnosis remains read-only unless
35
+ changes are requested. A simple factual query needs no reopening; a
36
+ lifecycle-only notice is not the follow-up request.
37
+ - Cancelled/retired, archived, independently stopped or unauthorized execution
38
+ stays stopped. Queries, notifications, publication recording and Session
39
+ recovery do not revive it. Report the exact missing legal action.
40
+
41
+ When intent appears contradictory, read
42
+ [Current intent](../yui-runtime/references/context-ordering.md). Normal authorized
43
+ stage progression supersedes only the old stage, not independent restrictions.
44
+
45
+ ## Advance the coherent result
46
+
47
+ Honor explicit user delegation/review requirements. Otherwise direct Leader
48
+ implementation is viable for one coupled result; no placeholder WorkItem,
49
+ self-dispatch or new coordination phase is needed. Read full requirements and
50
+ Project methods, trace the existing responsibility, implement in the legal Task
51
+ workspace, verify proportionately, inspect the full final diff and commit cleanly.
52
+ Do not copy a Task into a WorkItem merely to report progress.
53
+
54
+ Make routine implementation, allocation and recoverable-runtime choices yourself.
55
+ Use Task InputRequest only for a genuine user-owned choice, new authority or
56
+ unavailable external fact, not progress reporting. Keep implementation and
57
+ follow-up delivery in this Task's authorized workspace; local completion is not
58
+ remote delivery when the requirement includes it.
59
+
60
+ Leader owns coordination, result disposition, acceptance and integration.
61
+ Worker/Reviewer reports are evidence: read exact originals and decide their
62
+ disposition before ACK. Runtime activity is no global lock; use exact bindings.
63
+ Do not borrow Global input controls or impersonate Operator to notify the user.
64
+ Decisions record the actual decision, reason and boundaries, not the proposal;
65
+ recommendations must not be labeled user decisions.
66
+
67
+ ## Read manuals at the action boundary
68
+
69
+ Before dispatch, Review, Integration or completion, inspect current exact
70
+ Run/Review bindings as decision facts, never a global activity lock.
71
+
72
+ - Implementation investigation/material verification design beyond current
73
+ Project methods: [Implementation](references/implementation.md).
74
+ - Choosing/changing work boundaries, executors or concurrency; preparing managed
75
+ dispatch: [Allocation](references/work-allocation.md). Sending continuation or
76
+ controlling an existing Assignment: [Assignment execution](references/assignment-execution.md).
77
+ - Requesting independent Review or disposing of a managed result:
78
+ [Review and disposition](references/review.md).
79
+ For a returned result needing original/context expansion, include Runtime's
80
+ [Context reads](../yui-runtime/references/context-reads.md) in that same read
81
+ group. Add [Working context](references/task-progress.md) when updating the
82
+ Brief; a normal result notice alone does not require recovery manuals.
83
+ - Integrating isolated results, upstream changes, conflicts or an Integration
84
+ notification: [Integration](references/integration.md).
85
+ - Accepting a Candidate or attempting Task completion:
86
+ [Completion](references/completion.md). Inspect current exact Run/Review
87
+ bindings, resolve required checks/contracts and handled input, and correct
88
+ obsolete Brief blockers before completion. Chat alone does not complete a Task.
89
+ - Material Brief/Milestone/Knowledge updates: [Working context](references/task-progress.md).
90
+ Saving/citing substantial Task documents: [Artifacts](references/artifacts.md).
91
+ Unchanged routine continuation needs no record or full manual reload.
92
+ - Replicated attempts: [Replication](references/replicated-execution.md).
93
+ Task-local plugins: [Plugins](references/task-plugins.md).
94
+ Executing existing source-authorized capabilities: [Authorization](references/authorization.md).
95
+ - Changing required delivery Projects: [Delivery scope](references/delivery-scope.md).
96
+ External PR/MR evidence: [Publication](../yui-runtime/references/publication.md).
97
+ Actual failure intervention/retry/replacement: Runtime's action index.
98
+
99
+ At a normal turn boundary, continue useful authorized work, complete only when
100
+ its outcome/obligations are satisfied, ask a genuine missing decision, or wait
101
+ for a real durable event. Persist meaningful changed focus/commitments, not
102
+ unchanged chronology. Do not poll managed Roles or manufacture another Run.
103
+ An explicit dispatched Run returns its truthful final report; ordinary chat
104
+ and notifications need no separate execution report.
@@ -1 +1 @@
1
- 7
1
+ 16
@@ -0,0 +1,41 @@
1
+ # Task artifact operations
2
+
3
+ These operations apply to planning and delivery results. The current Leader
4
+ adopts contributions from other Agents' authorized workspaces; do not share
5
+ an uncoordinated Git index or edit Yui storage directly.
6
+
7
+ ```sh
8
+ yui task artifact list <task-id>
9
+ yui task artifact save <task-id> plans/design.md "<UTF-8 content>" --message "Revise design"
10
+ yui task artifact read <task-id> plans/design.md
11
+ yui task artifact read <task-id> plans/design.md <full-commit>
12
+ ```
13
+
14
+ `save` writes and locally commits exactly one relative path, creating the
15
+ repository on first save. The `artifact.save` capability takes `taskId`,
16
+ `relativePath`, `content`, optional `message` and optional `expectedHead`;
17
+ the CLI equivalent is `--expected-head <commit>`. A head conflict leaves
18
+ the save unapplied: re-read and reconcile the intended update, not overwrite
19
+ blindly. The text interface accepts UTF-8 files up to 8 MiB, not arbitrary
20
+ binary payloads or an invented directory-upload command.
21
+
22
+ Current reads use Task and relative path at HEAD. Frozen Candidate, Review,
23
+ Context and completion evidence use the returned `taskId + commit +
24
+ relativePath`; do not replace a pinned read with a current read. For same-Task
25
+ string reference lists, use `git:<full-commit>:<relativePath>`, including
26
+ `task complete ... --artifact-ref "git:<full-commit>:plans/design.md"`.
27
+ The commit must be the artifact repository's returned commit, not the Project
28
+ code head. Preserve fixed old references when updating the current document.
29
+
30
+ After a meaningful save, update the Brief's summary/reference; keep Decisions
31
+ to the choice, reason and boundary. No document-body, HEAD or timestamp mirror
32
+ is needed. The artifact repository has no remote or transport; this does not
33
+ prohibit a Project code repository's legitimate remote. Saving in Draft grants
34
+ no delivery authority; Session handoff and archive preserve the artifacts.
35
+ Stored scripts/HTML remain data and are never implicitly executed or previewed.
36
+
37
+ These commands describe this source version's interface. A managed Session
38
+ still uses its authorized CLI and actual available capabilities. If an older
39
+ installation lacks them, report that version boundary; do not switch it to
40
+ an unapproved checkout CLI, migrate a shared Home, or upgrade the installation
41
+ merely to save a result.