@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
@@ -0,0 +1,140 @@
1
+ # Assignment execution and input timing
2
+
3
+ Read before creating/acting on an Assignment or sending its continuation/control.
4
+ Ordinary direct implementation does not require this manual or the other
5
+ [execution operations](execution.md).
6
+
7
+ ### Choose input timing without changing intent
8
+
9
+ Submission intent (`record`, `discuss`, `develop`) and delivery timing are
10
+ different facts. Input controls do not activate a Task, expand an Assignment,
11
+ or elevate a planning Session. Keep the submission contract when using `send`;
12
+ choose queue, steer or interrupt from the user's intent and current facts:
13
+
14
+ ```sh
15
+ yui task message queue <task> "<continuation>" --request-id <id> --to <role> --work-item <work-id>
16
+ yui task message steer <task> "<current-turn correction>" --request-id <id> --to leader --expected-target <turn>
17
+ yui task role interrupt <task> <role> --expected-target <turn> [--then-message <task/message>] [--request-id <id>]
18
+ ```
19
+
20
+ Queue waits for the next legal opportunity. Steer addresses only the exact
21
+ current native Turn; Worker/Reviewer steer also needs its existing WorkItem or
22
+ ReviewRound. Bare interrupt stores a control request, not a new Message.
23
+ `interrupt-requested` is not a terminal or proof that background resources
24
+ stopped. Then names an already-saved input and reserves its next opportunity
25
+ only within the original Session/writer boundary.
26
+
27
+ Read `task role session inspect` first. Unsupported and proven-unsubmitted
28
+ steer may be composed with interrupt when the user's intent permits stopping;
29
+ accepted, pending or unknown steer must not be resent through another action
30
+ or request id. Never silently cancel, replace a Session or downgrade to queue.
31
+
32
+ Global inputs use `role message queue|steer <role>` and `role interrupt <role>`
33
+ with their own owner, not a fabricated Task/Run. See
34
+ [Runtime](../../yui-runtime/SKILL.md) for scope and controlled-console boundaries.
35
+
36
+ Managed dispatch freezes the Assignment for its assignee. For ordinary
37
+ clarification, feedback or a continuation of that same work, send a Message:
38
+
39
+ ```sh
40
+ yui task message send <task> "<clarification or continuation>" --to <role> --work-item <work-id>
41
+ yui task message send <task> "<review clarification>" --to <role> --review-round <round-id>
42
+ ```
43
+
44
+ Busy execution queues the Message. Its terminal triggers continuation in the
45
+ same compatible Session and workspace; do not fabricate a failure, submit an
46
+ unfinished Candidate, or change WorkItem status merely to answer a question.
47
+ Read Message delivery and the exact resulting AgentRun separately from business
48
+ acceptance. A Message never expands scope, applies desired configuration, or
49
+ changes a Review's frozen candidate. An ownership change preserves the original
50
+ recipient; transfer still-pending input only with explicit `task message handoff`.
51
+ Late input to terminal work or an obsolete Review remains visible with a bounded
52
+ nondelivery reason. Use the existing formal operation for new scope or Review.
53
+
54
+ For unknown delivery or Session replacement, read
55
+ [runtime recovery](../../yui-runtime/references/recovery.md). Preserve the original
56
+ input; do not replay uncertainty or treat it as a global Task lock.
57
+
58
+ ### Leader-owned WorkItem
59
+
60
+ Use this only when the result merits separate management/acceptance. Omit
61
+ `--role` for direct execution: the Leader owns coordination and performs the
62
+ work without a managed executor Assignment. `--role leader` instead selects the
63
+ Leader Role as a **managed AgentRun executor**; it is not how to label direct
64
+ ownership. Do not self-dispatch merely to gain execution authority.
65
+
66
+ For a writable Project result, create and inspect its WorkItem-owned workspace
67
+ before editing. The Leader can work there directly; isolation does not require a
68
+ Worker. Task main, WorkItem Develop, and Review workspaces remain distinct owners.
69
+
70
+ ```sh
71
+ yui task work create <task> "<separately accepted result>" \
72
+ --project <project> --objective "<outcome>" --accept "<criterion>"
73
+ yui task work isolate <work-id>
74
+ yui task work update <work-id> running
75
+ # Implement and verify in the returned WorkItem workspace; commit and leave it clean.
76
+ yui task work update <work-id> done --summary "<result and evidence>"
77
+ ```
78
+
79
+ `done` freezes a direct Candidate, not an AgentRun result or acceptance.
80
+ Inspect it, then integrate the exact isolated result before acceptance:
81
+
82
+ ```sh
83
+ yui task integration start <task> --work-item <work-id> \
84
+ --project <project> --strategy <ff|cherry-pick|merge|manual>
85
+ # Inspect the attempt and finish it through Integration's normal checks/continuation.
86
+ yui task work accept <work-id> --summary "<decision and evidence>"
87
+ ```
88
+
89
+ Read [Integration](integration.md) for checks, continuation, and recovery.
90
+ Keep the same unit through ordinary fixes.
91
+ A read-only or Gitless result with no writable Projects needs no Git isolation;
92
+ submit its actual evidence and accept it explicitly. Existing exact Task-final
93
+ metadata-only Candidates retain their contract; do not establish a special Review
94
+ contract merely to avoid the ordinary writable WorkItem isolation boundary.
95
+
96
+ For a native child, pass a bounded brief and applicable Profile constraints
97
+ through the provider's child tools. A small investigation needs no synthetic
98
+ WorkItem. If the child implements an existing Leader-owned WorkItem, keep that
99
+ WorkItem roleless, supply its exact workspace and scope, and mark it running.
100
+ Native children inherit only current parent authority and gain no Yui Role,
101
+ AgentRun, Session or broader workspace. Their
102
+ results are best-effort until Yui externalizes them; use a managed Task Role
103
+ when independent durability matters. Inspect the returned result before
104
+ submitting `done` or recording failure progress. `done` creates a Candidate;
105
+ `work accept` records the separate acceptance. WorkItem responsibility remains
106
+ open through execution failure and becomes accepted only on that decision.
107
+ A Profile's runtime source applies when
108
+ materializing a Task Role, not when launching a native child. The child
109
+ inherits the Leader Agent; apply a Profile model or effort only when the native
110
+ tool actually supports and confirms that override.
111
+
112
+ ### Managed Task Role
113
+
114
+ ```sh
115
+ yui task role add <task-id> <role> --profile <profile>
116
+ yui task role show <task-id> <role>
117
+ yui task work create <task-id> "<outcome>" --role <role> \
118
+ --project <project> --objective "<bounded outcome>" --accept "<criterion>"
119
+ yui task work dispatch <work-id> --input "<decision-complete brief>"
120
+ ```
121
+
122
+ Add `--after` only for a real dependency. Likely file overlap is not by itself
123
+ a dependency. A Worker may read the complete authorized Task context but may
124
+ write only its WorkItem Projects and workspace. Dispatch prepares that isolated
125
+ workspace and freezes the Assignment; inspect the completed original AgentRun
126
+ result before submitting its exact Candidate, integrating, and accepting.
127
+
128
+ Profiles carry portable behavior plus either a dynamic Global Worker runtime
129
+ source or an explicit Agent with optional model and effort. Applying a Profile
130
+ to a Task Role resolves and freezes the complete binding; later Profile or
131
+ Global Worker changes do not rewrite that Role. Before dispatch, use
132
+ `config profile show` and `task role show` to read the exact behavior, Agent, model,
133
+ effort, Profile, and workspace. Do not reconstruct or guess launch
134
+ configuration. Use the WorkItem assignee directly unless replicated execution
135
+ was deliberately selected.
136
+
137
+ Managed Task main, WorkItem, ReviewRound, and Integration workspaces have
138
+ different owners. Never edit stable Project checkouts, managed refs, Yui state
139
+ files, or another owner's workspace. A Task's recorded base is durable; do not
140
+ silently replace it merely because its remote branch later moves.
@@ -0,0 +1,79 @@
1
+ # Acceptance and completion
2
+
3
+ Read before accepting a Candidate or attempting Task completion, not on every
4
+ execution turn. Read [Review](review.md) when a managed result actually requires
5
+ disposition, and [Integration](integration.md) before integrating isolated Git
6
+ changes; neither is mandatory for unrelated direct implementation.
7
+
8
+ ## Accept, integrate, and complete
9
+
10
+ A Worker or Reviewer AgentRun result is evidence, not acceptance. Inspect the
11
+ result, diff, checks, and current Candidate before deciding.
12
+
13
+ Group confirmed findings by root cause. Use the traced paths to check other
14
+ reachable consumers/boundaries within scope and repair affected instances
15
+ together, not just the reported checkpoint. Refresh the short material index
16
+ and repair evidence where they changed, without accumulating round-by-round
17
+ history. For ordinary full re-review, preserve the current complete
18
+ candidate and requirements; add repair delta, prior finding dispositions and
19
+ still-valid evidence. Delta is an attention aid, not the full-review boundary.
20
+ Do not conflate this with an explicitly authorized equivalence Delta Recheck.
21
+ Neither finding counts, fixed round counts nor a majority vote decides acceptance.
22
+
23
+ If a result is insufficient, reject it with bounded feedback and redispatch
24
+ the same WorkItem and Role while scope remains valid. Before accepting isolated
25
+ Git changes, read [Integration](integration.md) to capture and
26
+ integrate the latest Candidate. Do not edit managed refs or bypass Yui's
27
+ compare-and-swap boundary.
28
+
29
+ After an authorized PR/MR operation, follow
30
+ [publication recording](../../yui-runtime/references/publication.md).
31
+ External delivery and Task completion remain separate facts.
32
+ Keep authorized follow-up delivery of this result in this Task and its legal
33
+ managed workspace: synchronize, resolve necessary conflicts, validate, perform
34
+ only the authorized external operations, and record their exact evidence.
35
+ Do not refer ordinary delivery to a new Task. When remote delivery is part of
36
+ the current requirement, a local commit or completed Run does not satisfy it;
37
+ report a real blocker rather than declaring that requirement complete.
38
+
39
+ After a ReviewRound is terminal, the Leader or authorized Operator owns
40
+ `task work review cleanup <task>/<round>`. Preserve dirty diagnostic evidence
41
+ and resolve it explicitly; do not ask a Reviewer to clean its own runtime
42
+ after its final report. Cleanup can remain advisory at completion. Ordinary
43
+ archive requires settled business and stopped execution, not complete physical
44
+ release; safe resource retention is reported separately. Explicitly authorized force archive preserves
45
+ unresolved resources and diagnostics under the shared
46
+ [archive contract](../../yui-runtime/references/archive.md). The Leader
47
+ does not gain independent archive authorization. An original explicit user
48
+ archive request can authorize the Controller-owned ordinary archive described
49
+ in [source-authorized capabilities](authorization.md).
50
+
51
+ Complete only when the Task outcome is satisfied, required checks and review
52
+ contracts are settled, WorkItems are accepted or deliberately retired, latest
53
+ isolated results are integrated, and user inputs are resolved:
54
+
55
+ ```sh
56
+ yui task complete <task-id> \
57
+ --summary "<outcome, validation, and remaining risk>"
58
+ ```
59
+
60
+ Completion records the exact Project heads. Archive is a separate,
61
+ user-authorized action, never an implication of completion or publication.
62
+
63
+ Completion is offline by default. `--refresh-remote` only refreshes remote
64
+ freshness observations; neither path rebases or starts Integration checks.
65
+ For observation alone use `task base status <task> [--refresh]`. If upstream
66
+ changes need integration, choose it explicitly before completion:
67
+ `task upstream integrate <task> (--latest|--project <project>)` requests rebase
68
+ and the configured checks/CAS. Consume its exact Integration/Job and partial
69
+ results; a prepared candidate is not an advanced Task HEAD.
70
+ An established final Review is still prepared/dispatched by completion without
71
+ renewed approval. Inspect the returned stage and exact ReviewRound/Run: a
72
+ Review-pending, running or blocked result is not Task completion.
73
+
74
+ If completion reports `pending-user-input`, new user intent has not yet reached
75
+ the current notification window. End this native turn so the next notification
76
+ can be delivered, then read the original messages and reassess the outcome.
77
+ Do not spin on completion, drop messages, or manufacture another Run to proceed.
78
+ A current Leader Session can create a formal InputRequest during an ordinary
79
+ notification; no active AgentRun is required.
@@ -0,0 +1,26 @@
1
+ # Adjust Project delivery scope without erasing work
2
+
3
+ When explicit user intent or an original delegation allows a Project to leave
4
+ the final delivery, read that original Message and `task remote-delivery`.
5
+ Record the bounded decision with
6
+ `task project delivery <task> <project-id> --requirement excluded --reason <reason>
7
+ --source-message <message-id> --purpose <verbatim-authorization>
8
+ --if-current <scopeDecision.id|none>`.
9
+ Interpret whether the original really authorizes this scope change; a matching
10
+ quote alone is not semantic permission. Do not exclude a Project to conceal an
11
+ unmet commitment. Ask only for a genuinely missing scope decision, not a second
12
+ approval when existing user intent or delegated judgment already covers it.
13
+ Use the same operation with `--requirement required` and the latest decision ID
14
+ to restore normal checks. Reconcile a stale guard instead of overwriting newer
15
+ intent. These append-only decisions also work on completed, unarchived Tasks
16
+ without reopening, rewriting acceptance, or rerunning work.
17
+
18
+ Unchanged Projects need no exclusion. Required changed/unknown Projects still
19
+ need exact verified delivery. Excluded Projects retain their binding, code
20
+ changes and Publication facts and are not counted as merged or verified merely
21
+ because they are excluded. Scope is not execution, write, archive or deletion
22
+ authority: open commitments and unknown execution still need settlement, and
23
+ unique commits or dirty resources remain protected. With separate archive
24
+ authorization, use ordinary archive/preflight and report retained resources;
25
+ do not recommend force merely because an authorized Project is excluded.
26
+