@zq-silk/yui 0.8.3 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +40 -22
- package/README.md +46 -16
- package/dist/cli/commandCatalog.js +23 -11
- package/dist/cli/operatorWizard.js +10 -20
- package/dist/cli.js +154 -16
- package/dist/commands/executionAuditCommands.js +30 -0
- package/dist/commands/operatorCommands.js +42 -1
- package/dist/commands/taskCommands.js +386 -138
- package/dist/commands/taskCompletionGate.js +36 -24
- package/dist/commands/taskContextCommand.js +6 -1
- package/dist/commands/taskInputCommands.js +48 -10
- package/dist/commands/taskNextActionCommand.js +36 -3
- package/dist/context/sessionBootstrapManifest.js +82 -1
- package/dist/controller/clientRuntime.js +7 -7
- package/dist/controller/controller.js +16 -8
- package/dist/controller/fileSchedulerStoreAdapter.js +64 -5
- package/dist/controller/handoverCandidate.js +10 -3
- package/dist/controller/sessionNotify.js +4 -22
- package/dist/executor/agentAdapter.js +2 -2
- package/dist/executor/agentExecutor.js +25 -5
- package/dist/executor/fileRoleLaunchPlanner.js +16 -11
- package/dist/integration/gitIntegrationService.js +50 -2
- package/dist/integration/integrationCheckEvidenceReuse.js +53 -0
- package/dist/observability/executionAudit.js +47 -1
- package/dist/observability/faultClassification.js +6 -4
- package/dist/observability/orchestrationMetrics.js +196 -0
- package/dist/operator/operatorSessionHistory.js +36 -0
- package/dist/release/releaseHandover.js +7 -5
- package/dist/release/runtimeRelease.js +15 -0
- package/dist/repository/taskWorkspaceCoordinator.js +13 -10
- package/dist/review/deltaRecheck.js +3 -2
- package/dist/review/reviewFindingLedger.js +5 -4
- package/dist/review/reviewOutcomeClassifier.js +252 -54
- package/dist/review/taskFinalReviewContractEvent.js +1 -0
- package/dist/review/taskFinalReviewContractRebind.js +350 -0
- package/dist/run/runIdentity.js +10 -70
- package/dist/runtime/agentHost.js +3 -4
- package/dist/runtime/codexAppServerRuntime.js +6 -0
- package/dist/runtime/firstProgressStopLoss.js +52 -0
- package/dist/runtime/launchBroker.js +10 -2
- package/dist/runtime/runtimeDeadlines.js +14 -0
- package/dist/runtime/sessionTitle.js +24 -12
- package/dist/runtime/structuredProviderHost.js +7 -1
- package/dist/runtime/tmuxAdapters.js +10 -3
- package/dist/scheduler/activeRoleRunDelivery.js +20 -18
- package/dist/scheduler/leaderWakeupProcessor.js +33 -2
- package/dist/scheduler/wakeReason.js +1 -0
- package/dist/storage/sqliteStore.js +8 -1
- package/dist/storage/taskStore.js +10 -1
- package/dist/task/completionReadiness.js +48 -19
- package/dist/task/deliveryGuard.js +3 -1
- package/dist/task/nextAction.js +145 -52
- package/dist/task/repairWave.js +14 -1
- package/dist/task/task.js +10 -0
- package/dist/web/webSnapshot.js +7 -1
- package/i18n/README.zh-CN.md +28 -8
- package/package.json +1 -1
- package/skills/yui-leader/SKILL.md +73 -31
- package/skills/yui-operator/SKILL.md +51 -10
- package/skills/yui-reviewer/SKILL.md +23 -0
|
@@ -33,10 +33,16 @@ workspace or infer a Lane result from a non-durable checkout.
|
|
|
33
33
|
|
|
34
34
|
## Default to the Leader-first fast path
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
Start from the Task's recorded delivery path:
|
|
37
|
+
|
|
38
|
+
- **Direct**: for a low-risk Project Task, implement, commit, and verify in the
|
|
39
|
+
managed Task main. Do not create a WorkItem, ChangeSet, IntegrationAttempt,
|
|
40
|
+
Worker Role, or managed ReviewRound merely to leave more records.
|
|
41
|
+
- **Integrated**: create one roleless WorkItem for the bounded result. Keep its
|
|
42
|
+
investigation, implementation, targeted checks, and ordinary review fixes
|
|
43
|
+
together. Split only for independently acceptable ownership or real parallel
|
|
44
|
+
value; a phase name is not a reason to create another WorkItem, Role,
|
|
45
|
+
Session, Run, Message, or Input.
|
|
40
46
|
|
|
41
47
|
Choose the executor in this order:
|
|
42
48
|
|
|
@@ -54,18 +60,19 @@ Do not dispatch a Task Role merely to obtain a fresh context, run a command,
|
|
|
54
60
|
perform a routine small edit, or add an intermediate review. Direct and native
|
|
55
61
|
execution add no Worker Role, Worker Yui Session, or Worker AgentRun. The exact
|
|
56
62
|
Leader Run remains active until an explicit Yui yield, completion, or exact
|
|
57
|
-
failure; native child lifecycle never decides that Run outcome.
|
|
58
|
-
|
|
63
|
+
failure; native child lifecycle never decides that Run outcome. Task main is
|
|
64
|
+
the direct path's durable delivery boundary; the WorkItem and its workspace are
|
|
65
|
+
the integrated path's boundary.
|
|
59
66
|
|
|
60
67
|
Provider-native foreground and background child lifecycle stays owned by the
|
|
61
68
|
current Agent Session. Structured child completion notifications may resume the
|
|
62
69
|
Leader in later provider Turns while the same Yui AgentRun remains active.
|
|
63
70
|
|
|
64
|
-
A Project
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Task-final Review when
|
|
68
|
-
|
|
71
|
+
A direct Project result uses a clean committed Task main and exact completion
|
|
72
|
+
head proof. An integrated result uses one WorkItem-owned Develop workspace and
|
|
73
|
+
a clean committed Candidate; Candidate, ChangeSet, committed Integration,
|
|
74
|
+
acceptance, Task-final Review when required, and Task completion remain
|
|
75
|
+
distinct judgments and records.
|
|
69
76
|
|
|
70
77
|
Use this validation and review cadence unless Project Policy requires more:
|
|
71
78
|
|
|
@@ -75,15 +82,24 @@ Use this validation and review cadence unless Project Policy requires more:
|
|
|
75
82
|
2. Have a native child return one consolidated result for the requested round.
|
|
76
83
|
The Leader inspects that result, the diff, and the acceptance criteria; do
|
|
77
84
|
not create progress handoffs or poll the child.
|
|
78
|
-
3.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
or
|
|
85
|
+
3. For direct delivery, run Project Policy's complete local delivery validation
|
|
86
|
+
once on the final Task-main commit, then complete. Use a bounded native
|
|
87
|
+
review when useful. If an independently managed final Review is required,
|
|
88
|
+
promote to integrated before Task main advances. An already established
|
|
89
|
+
immutable final Review remains binding.
|
|
90
|
+
4. For integrated delivery, capture the Candidate and run the complete delivery
|
|
91
|
+
validation once on the Integration candidate. Use one independent Task-final
|
|
92
|
+
Review of the frozen committed heads when policy requires it; do not
|
|
93
|
+
substitute per-WorkItem ReviewRounds or repeat a successful full check on an
|
|
94
|
+
unchanged commit.
|
|
95
|
+
|
|
96
|
+
Yui may reuse a successful Integration check only for the same Task, Project,
|
|
97
|
+
exact candidate commit, ordered check commands, immutable runtime release, and
|
|
98
|
+
available DurableJob logs. Treat that reused result as the same local
|
|
99
|
+
Integration evidence; do not start another DurableJob for ceremony. A changed
|
|
100
|
+
commit, command order, runtime release, missing log, or VerificationPlan always
|
|
101
|
+
reruns. PR CI remains an independent environment and is not replaced by local
|
|
102
|
+
evidence reuse.
|
|
87
103
|
|
|
88
104
|
Route a reachable finding back to the original execution unit: the Leader
|
|
89
105
|
fixes direct work, the same native child handles its bounded correction, and
|
|
@@ -100,6 +116,16 @@ children through adapter metadata, and routes a later result reference through
|
|
|
100
116
|
the durable inbox. Do not poll, send a waiting Message, rewrite a checkpoint,
|
|
101
117
|
or yield merely to preserve that native wait.
|
|
102
118
|
|
|
119
|
+
Before the first durable Leader action, Yui permits at most one automatic
|
|
120
|
+
same-Session Provider continuation. If two fresh Leader generations still
|
|
121
|
+
produce no WorkItem, Review, Integration, or Leader-attributed durable event,
|
|
122
|
+
the Controller stops before a third generation, marks recovery failed, and
|
|
123
|
+
hands the exact evidence to the unique global Operator. Do not bypass that
|
|
124
|
+
stop-loss by manufacturing another Role, Run, Session, or Task. The Operator
|
|
125
|
+
must inspect the failure and explicitly recover or change the configured
|
|
126
|
+
Leader; after first durable progress, ordinary bounded Provider retry policy
|
|
127
|
+
continues to apply.
|
|
128
|
+
|
|
103
129
|
Native child results have an explicit durability boundary. A native subagent is
|
|
104
130
|
best-effort by default: its result returns through the parent Conversation, and
|
|
105
131
|
if the parent Session is lost before Yui externalizes the result, rerun the
|
|
@@ -515,7 +541,10 @@ authorized expansions.
|
|
|
515
541
|
or ask the user.
|
|
516
542
|
- Route a reachable final-Review finding to the original Worker while that
|
|
517
543
|
WorkItem is open; otherwise create the smallest Repair WorkItem. Resolve
|
|
518
|
-
|
|
544
|
+
all findings from one final Review in one consolidated Repair WorkItem by
|
|
545
|
+
default. Select `task review finding repair-wave --strategy parallel` only
|
|
546
|
+
when the groups have independently acceptable ownership and the concurrency
|
|
547
|
+
benefit exceeds the added Integration and Review cost. Use Leader/Integration
|
|
519
548
|
for merge or small local fixes, and create an architecture WorkItem only for
|
|
520
549
|
a genuinely cross-cutting design issue. The Leader owns the decision and
|
|
521
550
|
completion; routine retries and routing do not need an InputRequest.
|
|
@@ -523,12 +552,19 @@ authorized expansions.
|
|
|
523
552
|
WorkItem review with a new `task work review`, accept with an explicit
|
|
524
553
|
rationale, or ask the user. `yui task run retry <run-id>` retries an exact
|
|
525
554
|
failed Task-final Reviewer execution under the same semantic ReviewRound. If
|
|
526
|
-
that immutable Round
|
|
527
|
-
|
|
555
|
+
that immutable Round is durably proven non-semantic without any review
|
|
556
|
+
checks, evidence, finding, or ambiguous output—even when a pre-review
|
|
557
|
+
context/workspace failure historically terminalized it as completed/yielded—
|
|
558
|
+
the Leader may run
|
|
528
559
|
`yui task review force-fresh <task>/<review-round>` to create one distinct
|
|
529
560
|
full Round over the identical frozen heads. It fails closed for every
|
|
530
561
|
semantic or ambiguous prior result; target the new failed Round explicitly
|
|
531
562
|
if another non-semantic failure occurs.
|
|
563
|
+
- Use `task next-action`'s derived Review outcome literally: non-semantic means
|
|
564
|
+
recover the same frozen head with `force-fresh`; ambiguous means diagnose the
|
|
565
|
+
inconsistent evidence without creating a Repair WorkItem; only semantic
|
|
566
|
+
negative evidence may create a repair wave. Non-semantic and ambiguous
|
|
567
|
+
attempts do not consume the full semantic Review budget.
|
|
532
568
|
- If the same non-resource user choice or unavailable external fact repeats,
|
|
533
569
|
persist context and create an InputRequest instead of looping. Never use an
|
|
534
570
|
InputRequest to solicit authorization for an unrequested real-resource test;
|
|
@@ -611,6 +647,10 @@ yui task integration cleanup <integration-id>
|
|
|
611
647
|
yui task work cleanup <task>/<work> --integrated
|
|
612
648
|
```
|
|
613
649
|
|
|
650
|
+
Terminal child worktrees are completion advisories, not semantic blockers.
|
|
651
|
+
Clean them before archive; do not create a new WorkItem, ReviewRound, or Run
|
|
652
|
+
only to make cleanup happen before Task completion.
|
|
653
|
+
|
|
614
654
|
Use `--abandon` only for deliberate discard. Dirty worktrees remain available
|
|
615
655
|
for capture or resolution. Cleanup must never stop a Role already serving a
|
|
616
656
|
newer WorkItem. If the original execution Session cannot be resumed, surface
|
|
@@ -686,14 +726,16 @@ results are outstanding: the provider owns their completion notifications, and
|
|
|
686
726
|
Yui keeps this AgentRun active across intermediate provider Turns. After native
|
|
687
727
|
work drains, continue to Task completion, InputRequest, or final yield.
|
|
688
728
|
|
|
689
|
-
Complete only after
|
|
690
|
-
latest isolated results are integrated or deliberately
|
|
691
|
-
inputs are resolved.
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
729
|
+
Complete only after the selected delivery path's evidence is satisfied, Role
|
|
730
|
+
work is terminal, latest isolated results are integrated or deliberately
|
|
731
|
+
abandoned, and user inputs are resolved. Direct delivery has no WorkItem gate;
|
|
732
|
+
integrated delivery retains it. Task completion is a semantic boundary: it
|
|
733
|
+
records exact Project heads, reports terminal-workspace cleanup advisories, and
|
|
734
|
+
notifies the global Operator. It does not stop this Leader. Do not kill tmux
|
|
735
|
+
panes, edit Session records, or add a provider-specific cleanup step. After
|
|
736
|
+
completion succeeds, end the current Turn immediately so the Operator can
|
|
737
|
+
settle advisories and perform the explicit archive boundary; do not stop or
|
|
738
|
+
mutate the native Session yourself.
|
|
697
739
|
|
|
698
740
|
```sh
|
|
699
741
|
yui task complete <task-id> --summary "<outcome, validation, and remaining risks>"
|
|
@@ -115,12 +115,18 @@ outcome may bind multiple Projects and independent base refs. A feature, bug
|
|
|
115
115
|
fix, and question do not need separate Task types; intent and acceptance
|
|
116
116
|
criteria carry the difference.
|
|
117
117
|
|
|
118
|
+
The Task title is the human-facing label used in Agent session lists. Keep it to
|
|
119
|
+
one concise outcome phrase, ideally within 20 characters. Put request details,
|
|
120
|
+
constraints, and context in the Task description or the first routed Message; do
|
|
121
|
+
not add `Yui`, Role, or Task-id prefixes because Yui adds those when naming
|
|
122
|
+
native sessions.
|
|
123
|
+
|
|
118
124
|
```sh
|
|
119
125
|
yui operator submit "<related request>" --task <task-id>
|
|
120
126
|
yui task create "<distinct mission>" \
|
|
121
127
|
--project <project-a> --project <project-b> \
|
|
122
128
|
--base <project-a>=<ref> --base <project-b>=<ref> \
|
|
123
|
-
--
|
|
129
|
+
--delivery integrated
|
|
124
130
|
yui operator submit "<request and routing context>" --task <new-task-id>
|
|
125
131
|
yui task activate <new-task-id>
|
|
126
132
|
```
|
|
@@ -139,11 +145,25 @@ separate Tasks merely because it spans several Projects or files. A Task may
|
|
|
139
145
|
carry many features and rounds of WorkItems toward its shared outcome, but it is
|
|
140
146
|
not a permanent backlog; genuinely independent goals become their own Tasks.
|
|
141
147
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
Choose the Project delivery path before activation and report it with the Task:
|
|
149
|
+
|
|
150
|
+
- `--delivery direct` for one bounded, low-risk outcome that Project Policy
|
|
151
|
+
allows the Leader to implement and verify on Task main. Direct delivery does
|
|
152
|
+
not require a WorkItem, ChangeSet, IntegrationAttempt, or policy-created
|
|
153
|
+
managed ReviewRound; it still requires a clean committed managed Task main.
|
|
154
|
+
- `--delivery integrated` when Project Policy requires independent provenance,
|
|
155
|
+
Integration CAS, or final Review, and whenever the change crosses Projects,
|
|
156
|
+
storage/migration, permission or authorization, destructive behavior,
|
|
157
|
+
concurrency/recovery invariants, or release machinery. It requires the
|
|
158
|
+
WorkItem, ChangeSet, and committed Integration evidence chain.
|
|
159
|
+
- Omit `--delivery` only for a Task with no Project bindings. The legacy
|
|
160
|
+
`--require-integration` flag remains an alias for `--delivery integrated`.
|
|
161
|
+
|
|
162
|
+
Risk is a Leader/Project Policy judgment, not a file-count score. When evidence
|
|
163
|
+
changes the risk, promotion from direct to integrated is explicit and
|
|
164
|
+
irreversible; never silently downgrade an integrated Task to make completion
|
|
165
|
+
easier. Do not pre-create WorkItems merely because integrated delivery might
|
|
166
|
+
become necessary later.
|
|
147
167
|
|
|
148
168
|
Managed workspaces are owner-keyed, not Role-keyed: Task main, WorkItem
|
|
149
169
|
Develop, ReviewRound, and IntegrationAttempt each retain their own durable
|
|
@@ -158,10 +178,16 @@ outcome: keep it on the original Task, submit only the delta and its reason, and
|
|
|
158
178
|
let the Leader retire the affected WorkItem, optionally name its replacement,
|
|
159
179
|
and create the replacement. When a change instead abandons the current outcome for an
|
|
160
180
|
independent one, do not force it onto the original Task; apply the strict
|
|
161
|
-
new-Task rule above. If the delta
|
|
162
|
-
|
|
163
|
-
`yui task update <task-id> --
|
|
164
|
-
|
|
181
|
+
new-Task rule above. If the delta promotes a Project-backed direct Task into
|
|
182
|
+
guarded delivery, first run
|
|
183
|
+
`yui task update <task-id> --delivery integrated`, read back the delivery path,
|
|
184
|
+
and only then submit the delta. Promotion is allowed only while Task main is
|
|
185
|
+
still at its recorded base and no WorkItem, ChangeSet, Integration, or Review
|
|
186
|
+
evidence exists. If implementation already advanced Task main, keep the branch
|
|
187
|
+
intact and either finish under the direct contract or create an integrated
|
|
188
|
+
replacement Task; never manufacture provenance for earlier commits. Bind a
|
|
189
|
+
Project before selecting a delivery path
|
|
190
|
+
for a previously Gitless Task. When a completed Task
|
|
165
191
|
receives genuinely new work, reopen it only if it is still the same outcome;
|
|
166
192
|
otherwise create a follow-up Task and reference the earlier result.
|
|
167
193
|
|
|
@@ -283,6 +309,12 @@ ChangeSet is integrated.
|
|
|
283
309
|
|
|
284
310
|
- Enter the global Session with `yui operator enter`; do not recursively run it
|
|
285
311
|
from inside Operator.
|
|
312
|
+
- Use `yui operator status` to distinguish the one GlobalRole-selected active
|
|
313
|
+
writer from retained historical conversations. Historical Sessions are
|
|
314
|
+
evidence only and never a second Operator authority. Use `operator resume`
|
|
315
|
+
only for an existing explicit conversation; creating a conversation is the
|
|
316
|
+
separate, deliberate `operator new` action. Recovery must never create an
|
|
317
|
+
extra Operator Session implicitly.
|
|
286
318
|
- Enter an active Task Leader with `yui task enter <task-id>`, or a persistent
|
|
287
319
|
Role with `yui task enter <task-id> <role>`.
|
|
288
320
|
- Relay explicit Task information with
|
|
@@ -310,6 +342,15 @@ ChangeSet is integrated.
|
|
|
310
342
|
Run, Agent, receipt, launch, and Session identities; never reconstruct them
|
|
311
343
|
from terminal text or ask the user to paste them.
|
|
312
344
|
- Retry only an explicitly failed recovery Job.
|
|
345
|
+
- When a Leader first-progress stop-loss is reported, inspect its two exact
|
|
346
|
+
native generations and absence of durable progress. Do not request a third
|
|
347
|
+
automatic generation or create another Operator. Recover the existing Task
|
|
348
|
+
only after choosing an explicit valid Leader configuration or a direct
|
|
349
|
+
maintenance action.
|
|
350
|
+
- Use `yui task next-action <task>` and `yui execution audit` orchestration
|
|
351
|
+
advisories as read-only cost evidence. They may flag excess WorkItems,
|
|
352
|
+
repeated Reviews/checks, pre-progress generations, or terminal workspaces;
|
|
353
|
+
they never authorize acceptance, deletion, or automatic protocol changes.
|
|
313
354
|
|
|
314
355
|
A Task terminal notification reports the outcome, user impact, remaining risk,
|
|
315
356
|
and whether the Task is archive-eligible; it grants no archive authority. Task
|
|
@@ -20,6 +20,29 @@ A Role is an executor, not a workspace owner: the ReviewRound owns its fresh
|
|
|
20
20
|
workspace. Review edits are confined to that workspace, never modify the
|
|
21
21
|
WorkItem Develop workspace, and never become a ChangeSet source.
|
|
22
22
|
|
|
23
|
+
## Separate infrastructure failure from review judgment
|
|
24
|
+
|
|
25
|
+
Verify the exact Run identity, Context Pack, frozen head, and ReviewRound-owned
|
|
26
|
+
workspace before inspecting candidate sources. If context loading or workspace
|
|
27
|
+
binding fails before review begins:
|
|
28
|
+
|
|
29
|
+
- do not inspect the candidate, run candidate checks, invent findings, accept
|
|
30
|
+
risk, or claim the frozen result was reviewed;
|
|
31
|
+
- return only the exact infrastructure diagnosis, with no semantic findings or
|
|
32
|
+
checks, through the assigned Review Run;
|
|
33
|
+
- do not recommend a Repair WorkItem—the Leader must recover the same frozen
|
|
34
|
+
review boundary with `task review force-fresh` when Yui proves the outcome
|
|
35
|
+
non-semantic;
|
|
36
|
+
- if any candidate inspection or Reviewer output did occur, report it
|
|
37
|
+
explicitly. Mixed infrastructure and semantic evidence is ambiguous and must
|
|
38
|
+
fail closed, never be relabeled as a clean transport failure.
|
|
39
|
+
|
|
40
|
+
Yui derives `semantic`, `non-semantic`, or `ambiguous` from the immutable
|
|
41
|
+
Round, Run receipt, completion Event, and finding evidence. Never write or
|
|
42
|
+
simulate a classification field. A non-semantic attempt consumes no semantic
|
|
43
|
+
Review budget and cannot satisfy acceptance; an ambiguous attempt requires
|
|
44
|
+
Leader diagnosis before another review or repair decision.
|
|
45
|
+
|
|
23
46
|
Keep the context layers distinct. Yui Core owns ReviewRound identity,
|
|
24
47
|
lifecycle, access, workspace, and exact-yield safety; this generic Skill owns
|
|
25
48
|
portable review behavior; Agent-native Project Skills and Project Policy and
|