@zq-silk/yui 0.6.13 → 0.6.15

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 (90) hide show
  1. package/README.md +34 -5
  2. package/dist/cli/commandCatalog.js +172 -62
  3. package/dist/cli/helpRenderer.js +3 -1
  4. package/dist/cli.js +102 -11
  5. package/dist/commands/configCommands.js +521 -171
  6. package/dist/commands/deliveryGuardPreflight.js +2 -2
  7. package/dist/commands/executionAuditCommands.js +56 -3
  8. package/dist/commands/projectCommands.js +518 -55
  9. package/dist/commands/releaseCommands.js +0 -1
  10. package/dist/commands/taskActor.js +17 -0
  11. package/dist/commands/taskBaseCommands.js +29 -0
  12. package/dist/commands/taskCommands.js +577 -126
  13. package/dist/commands/taskContextCommand.js +36 -2
  14. package/dist/commands/taskNextActionCommand.js +48 -3
  15. package/dist/commands/taskPublicationCommands.js +319 -0
  16. package/dist/commands/taskRoleRuntimeStatus.js +83 -59
  17. package/dist/commands/telemetryCommands.js +14 -13
  18. package/dist/config/yuiConfig.js +161 -8
  19. package/dist/context/sessionContextBudget.js +71 -0
  20. package/dist/context/wakeNotification.js +65 -0
  21. package/dist/controller/clientRuntime.js +2 -1
  22. package/dist/controller/ephemeralResourceReaper.js +2 -1
  23. package/dist/controller/fileSchedulerStoreAdapter.js +191 -16
  24. package/dist/controller/jobSupervisor.js +5 -4
  25. package/dist/controller/resourceCleanupLinux.js +6 -6
  26. package/dist/controller/resourceInventoryLinux.js +3 -3
  27. package/dist/controller/runtime.js +88 -10
  28. package/dist/controller/updateReconciliation.js +4 -3
  29. package/dist/doctor/doctor.js +26 -7
  30. package/dist/executor/agentConfigurationCatalog.js +18 -0
  31. package/dist/executor/fileRoleLaunchPlanner.js +3 -3
  32. package/dist/lifecycle/contextBudgetRollover.js +81 -0
  33. package/dist/lifecycle/exactRunTerminalization.js +16 -2
  34. package/dist/lifecycle/providerErrorClass.js +33 -12
  35. package/dist/observability/executionAudit.js +214 -6
  36. package/dist/output/table.js +18 -0
  37. package/dist/repository/gitWorkspace.js +92 -0
  38. package/dist/repository/project.js +218 -4
  39. package/dist/repository/taskBaseFreshness.js +318 -0
  40. package/dist/repository/taskWorkspacePreparer.js +16 -2
  41. package/dist/review/deltaRecheck.js +253 -0
  42. package/dist/review/reviewConfig.js +31 -0
  43. package/dist/review/reviewFindingLedger.js +5 -1
  44. package/dist/review/reviewRound.js +156 -1
  45. package/dist/run/providerRetry.js +21 -3
  46. package/dist/run/providerRetryConfig.js +13 -60
  47. package/dist/run/recoveryProjection.js +198 -0
  48. package/dist/runtime/builtinAgentDrivers.js +3 -0
  49. package/dist/runtime/builtinTranscriptUsage.js +76 -32
  50. package/dist/runtime/continuationManager.js +17 -0
  51. package/dist/runtime/index.js +2 -0
  52. package/dist/runtime/launchDiagnostics.js +154 -0
  53. package/dist/runtime/lifecycleReservation.js +13 -0
  54. package/dist/runtime/providerContinuation.js +38 -0
  55. package/dist/runtime/providerContinuationReconciliationService.js +1 -0
  56. package/dist/runtime/providerErrorCodes.js +278 -0
  57. package/dist/runtime/runtimeHealthPolicy.js +20 -0
  58. package/dist/runtime/runtimeObservation.js +7 -1
  59. package/dist/runtime/runtimeProjection.js +115 -23
  60. package/dist/runtime/tmuxAdapters.js +242 -48
  61. package/dist/scheduler/activeRoleRunDelivery.js +139 -3
  62. package/dist/scheduler/activeTaskProgress.js +4 -3
  63. package/dist/scheduler/leaderWakeupProcessor.js +105 -15
  64. package/dist/scheduler/roleRunLiveness.js +2 -1
  65. package/dist/scheduler/roleRunStall.js +3 -2
  66. package/dist/scheduler/taskWake.js +72 -0
  67. package/dist/scheduler/wakeReason.js +64 -0
  68. package/dist/scheduler/wakeupQueue.js +2 -1
  69. package/dist/setup/setupCommand.js +1 -1
  70. package/dist/storage/migration/productionRegistry.js +325 -1
  71. package/dist/storage/sqliteSchema.js +61 -2
  72. package/dist/storage/sqliteStore.js +129 -2
  73. package/dist/storage/storeRpc.js +1 -0
  74. package/dist/storage/taskStore.js +262 -5
  75. package/dist/storage/upgrade/recordVersions.js +6 -1
  76. package/dist/storage/upgrade/sqliteStateMigration.js +22 -2
  77. package/dist/task/completionReadiness.js +289 -0
  78. package/dist/task/publicationReference.js +123 -0
  79. package/dist/task/taskRecordReference.js +3 -1
  80. package/dist/telemetry/telemetryConfig.js +23 -18
  81. package/dist/telemetry/telemetryWiring.js +8 -8
  82. package/dist/tmux/tmuxManager.js +50 -9
  83. package/dist/web/assets/client/i18n.js +4 -0
  84. package/dist/web/assets/client/view.js +18 -0
  85. package/dist/web/webSnapshot.js +100 -10
  86. package/i18n/README.zh-CN.md +5 -5
  87. package/package.json +1 -1
  88. package/skills/yui-leader/SKILL.md +49 -10
  89. package/skills/yui-operator/SKILL.md +17 -3
  90. package/skills/yui-worker/SKILL.md +8 -0
package/README.md CHANGED
@@ -250,22 +250,36 @@ operation and requires the checkout to be on that branch; detached or mismatched
250
250
 
251
251
  Use `task context` as the first detailed read of an existing Task. It combines the Task, Brief, active Decisions, recent Milestones, Roles, current and recent WorkItems with their Runs, recent Messages, open and resolved InputRequests, and recent Events. Terminal output keeps histories and long text compact; `yui --json task context <task-id>` returns the complete records in the top-level `data` field.
252
252
 
253
+ Leader wakeups stay deliberately small: the wake envelope carries only the
254
+ aggregated wake reasons, a delta window, and read pointers. The durable wake
255
+ ledger is the on-demand read for what changed:
256
+
257
+ ```sh
258
+ yui task wake list <task-id>
259
+ yui task wake show <task-id> <wake-id>
260
+ ```
261
+
262
+ `wake list` shows the dispatch history with status, reasons, and consuming
263
+ Run; `wake show` renders one wake's delta window — the Events, Messages, and
264
+ Runs recorded between its cursors. A human or Agent can still force a wake
265
+ with `yui task wake <task-id> --force --reason "<text>"`.
266
+
253
267
  Human-facing timestamps default to Beijing time (`Asia/Shanghai`) while durable
254
268
  records and `--json` data remain UTC/RFC 3339. Inspect or change the IANA
255
269
  timezone with:
256
270
 
257
271
  ```sh
258
272
  yui config show
259
- yui config set --time-zone Europe/London
273
+ yui config set time-zone Europe/London
260
274
  ```
261
275
 
262
276
  WorkItem review is one global, optional rule that reuses an existing Global
263
277
  Role's Agent, model, permissions, prompt, and Skills:
264
278
 
265
279
  ```sh
266
- yui config review set --role reviewer --trigger always
267
- yui config review show
268
- yui config review clear
280
+ yui config set review --role reviewer --trigger always
281
+ yui config show
282
+ yui config clear review
269
283
  ```
270
284
 
271
285
  For Project-backed software delivery, use `--trigger final` to keep WorkItem
@@ -273,7 +287,7 @@ acceptance and Integration independent and run one fresh ReviewRound over the
273
287
  complete frozen integrated Task candidate before completion:
274
288
 
275
289
  ```sh
276
- yui config review set --role reviewer --trigger final
290
+ yui config set review --role reviewer --trigger final
277
291
  ```
278
292
 
279
293
  Every result entering Leader acceptance is one explicit candidate on its
@@ -343,6 +357,20 @@ yui task create "Update authentication" \
343
357
  yui task project add <task-id> shared-sdk --base main
344
358
  ```
345
359
 
360
+ Project-backed Tasks record the local baseline, redacted remote identity, and
361
+ the remote-tracking commit observed when their main workspace is created.
362
+ Inspect delivery freshness with:
363
+
364
+ ```sh
365
+ yui task base status <task-id>
366
+ yui task base status <task-id> --refresh
367
+ ```
368
+
369
+ The default check is offline and uses local remote-tracking refs. `--refresh`
370
+ is the explicit authorization to query the configured remote; Yui never
371
+ fetches, rebases, merges, or force-pushes as a hidden side effect of Task
372
+ completion.
373
+
346
374
  Implementation WorkItems declare the Projects they may modify. Their workspace
347
375
  keeps the same relative layout, creates isolated worktrees only for that write
348
376
  scope, and exposes the other Task Projects as context from Task main. Yui puts
@@ -610,6 +638,7 @@ When the requested outcome is finished, complete the Task to stop automatic Lead
610
638
 
611
639
  ```sh
612
640
  yui task complete <task-id> --summary "CSV export shipped and verified"
641
+ yui task complete <task-id> --summary-file delivery.txt --refresh-remote
613
642
  yui task reopen <task-id>
614
643
  ```
615
644
 
@@ -1,4 +1,5 @@
1
1
  import { supportedAgentAdapterIds } from "../agent/adapterCatalog.js";
2
+ import { CONFIG_KEYS } from "../commands/configCommands.js";
2
3
  function buildNode(input, parentPath = []) {
3
4
  const path = [...parentPath, input.name];
4
5
  const children = (input.children ?? []).map((child) => buildNode(child, path));
@@ -36,6 +37,24 @@ function buildNode(input, parentPath = []) {
36
37
  function freezeRecord(record) {
37
38
  return Object.freeze(Object.fromEntries(Object.entries(record ?? {}).map(([key, values]) => [key, Object.freeze([...values])])));
38
39
  }
40
+ const CONFIG_KEY_VALUES = [
41
+ { name: "time-zone", summary: "IANA timezone for human-facing timestamps (default: Asia/Shanghai)." },
42
+ { name: "reconciliation-interval-seconds", summary: "Recovery reconciliation interval, 5-300 seconds (default: 120)." },
43
+ { name: "leader-next-action", summary: "Leader next-action mode: display, warn, or enforce (default: display)." },
44
+ { name: "context-budget", summary: "Per-Session context token budget; set with --soft-tokens <n> --hard-tokens <n> (default: soft 100000 / hard 120000)." },
45
+ { name: "resources-gc-mode", summary: "Resource GC mode: report or quarantine (default: report)." },
46
+ { name: "resources-gc-auto-quarantine", summary: "Auto-quarantine terminal Task resources: true or false (default: false)." },
47
+ { name: "provider-retry-mode", summary: "Provider retry mode: off, shadow, or enforce (default: enforce)." },
48
+ { name: "provider-retry-adapters", summary: "Adapters with in-place retry: all, comma-separated adapter ids, or off (default: all)." },
49
+ { name: "provider-retry-max-window-ms", summary: "Total retry budget per Run lineage in milliseconds (default: 600000)." },
50
+ { name: "yield-receipt-replay", summary: "Replay committed yield receipts on resend: true or false (default: true)." },
51
+ { name: "tmux-bin", summary: "Path to the tmux binary (default: tmux)." },
52
+ { name: "git-bin", summary: "Path to the git binary (default: git)." },
53
+ { name: "telemetry-mode", summary: "Telemetry mode: legacy, dual, or bounded (default: legacy)." },
54
+ { name: "telemetry-terminal-keep", summary: "Telemetry terminal retention count (default: 200)." },
55
+ { name: "telemetry-run-cap", summary: "Telemetry per-run row cap (default: 50000)." },
56
+ { name: "review", summary: "Global WorkItem review rule; set with --role <global-role> --trigger <always|leader|final> [--finding-ledger <shadow|enforce>] [--delta-recheck <enabled|disabled>] (default: disabled)." }
57
+ ];
39
58
  const agentChildren = [
40
59
  {
41
60
  name: "add",
@@ -195,10 +214,23 @@ const taskChildren = [
195
214
  {
196
215
  name: "complete",
197
216
  summary: "Complete an active Task and stop automatic wakeups.",
198
- usage: "yui task complete <id> (--summary <text>|--summary-file <path|->)",
199
- options: ["--summary", "--summary-file"],
217
+ usage: "yui task complete <id> (--summary <text>|--summary-file <path|->) [--refresh-remote]",
218
+ options: ["--summary", "--summary-file", "--refresh-remote"],
200
219
  fileOptions: ["--summary-file"]
201
220
  },
221
+ {
222
+ name: "base",
223
+ summary: "Inspect Task Project baseline freshness.",
224
+ sections: [{ id: "manage", title: "Commands", entries: ["status"] }],
225
+ children: [
226
+ {
227
+ name: "status",
228
+ summary: "Classify Task Project bases against local or refreshed remote refs.",
229
+ usage: "yui task base status <task> [--refresh]",
230
+ options: ["--refresh"]
231
+ }
232
+ ]
233
+ },
202
234
  { name: "reopen", summary: "Reopen a completed Task.", usage: "yui task reopen <id>" },
203
235
  {
204
236
  name: "retire",
@@ -246,13 +278,12 @@ const taskChildren = [
246
278
  {
247
279
  name: "list",
248
280
  summary: "List legacy Task refs and their live owners.",
249
- usage: "yui task history list [--task <task>]"
281
+ usage: "yui task history list [task]"
250
282
  },
251
283
  {
252
284
  name: "archive",
253
285
  summary: "Archive legacy Task refs without a live owner.",
254
- usage: "yui task history archive [<task>] [--force]",
255
- options: ["--force"]
286
+ usage: "yui task history archive [task]"
256
287
  }
257
288
  ]
258
289
  },
@@ -271,10 +302,19 @@ const taskChildren = [
271
302
  name: "send",
272
303
  summary: "Send a Task message.",
273
304
  usage: "yui task message send <id> (<body>|--body-file <path|->) [--wake-policy leader|none] [--delivery-mode followup|steer]",
274
- options: ["--body-file"],
305
+ options: ["--body-file", "--wake-policy", "--delivery-mode"],
306
+ optionValues: {
307
+ "--wake-policy": ["leader", "none"],
308
+ "--delivery-mode": ["followup", "steer"]
309
+ },
275
310
  fileOptions: ["--body-file"]
276
311
  },
277
- { name: "list", summary: "List Task messages.", usage: "yui task message list <id>" }
312
+ {
313
+ name: "list",
314
+ summary: "List Task messages.",
315
+ usage: "yui task message list <id> [--after <timestamp>] [--limit <n>]",
316
+ options: ["--after", "--limit"]
317
+ }
278
318
  ]
279
319
  },
280
320
  {
@@ -383,6 +423,29 @@ const taskChildren = [
383
423
  }
384
424
  ]
385
425
  },
426
+ {
427
+ name: "publication",
428
+ summary: "Record external PR/MR publication evidence for a Task.",
429
+ sections: [{ id: "manage", title: "Commands", entries: ["add", "list", "show"] }],
430
+ children: [
431
+ {
432
+ name: "add",
433
+ summary: "Record an external PR/MR and its publication state.",
434
+ usage: "yui task publication add <task> --project <project> --provider <github|gitlab> --repository <owner/name> --kind <pull-request|merge-request> --id <external-id> [--url <url>] [--title <text>] [--source-branch <branch>] [--target-branch <branch>] [--local-commit <sha>] [--remote-commit <sha>] [--state <open|merged|closed>] [--reported|--verified] [--evidence <text>] [--supersede <publication-id>] [--merged-at <iso-timestamp>]",
435
+ options: ["--project", "--provider", "--repository", "--kind", "--id", "--url", "--title", "--source-branch", "--target-branch", "--local-commit", "--remote-commit", "--state", "--reported", "--verified", "--evidence", "--supersede", "--merged-at"]
436
+ },
437
+ {
438
+ name: "list",
439
+ summary: "List external publication evidence for a Task.",
440
+ usage: "yui task publication list <task>"
441
+ },
442
+ {
443
+ name: "show",
444
+ summary: "Show one external publication reference.",
445
+ usage: "yui task publication show (<task>/<publication-id> | <task> <publication-id>)"
446
+ }
447
+ ]
448
+ },
386
449
  {
387
450
  name: "role",
388
451
  summary: "Manage Roles within a Task.",
@@ -549,9 +612,14 @@ const taskChildren = [
549
612
  {
550
613
  name: "run",
551
614
  summary: "Inspect and control Task Role Agent Runs.",
552
- sections: [{ id: "manage", title: "Commands", entries: ["list", "retry", "settle", "recover", "yield", "checkpoint"] }],
615
+ sections: [{ id: "manage", title: "Commands", entries: ["list", "show", "retry", "settle", "recover", "yield", "checkpoint"] }],
553
616
  children: [
554
617
  { name: "list", summary: "List Runs for a work item.", usage: "yui task run list <task>/<work>" },
618
+ {
619
+ name: "show",
620
+ summary: "Show one Run with its canonical recovery fence and exact recovery actions.",
621
+ usage: "yui task run show <task>/<run> [--json]"
622
+ },
555
623
  {
556
624
  name: "retry",
557
625
  summary: "Retry a failed execution Run or request a fresh Round for an exact failed final Review Run.",
@@ -565,8 +633,8 @@ const taskChildren = [
565
633
  {
566
634
  name: "recover",
567
635
  summary: "Record one exact Leader-controlled Run recovery decision.",
568
- usage: "yui task run recover <task>/<run> --action <diagnose|retry|replace-session|terminate> --expected-progress-at <timestamp> --provider-acceptance <accepted|rejected|ambiguous> --reason <text>",
569
- options: ["--action", "--expected-progress-at", "--provider-acceptance", "--reason", "--role", "--agent-id", "--adapter-id", "--native-session-id", "--launch-id"]
636
+ usage: "yui task run recover <task>/<run> --action <diagnose|retry|replace-session|terminate> (--expected-progress-at <timestamp>|--from-next-action <fingerprint>) --provider-acceptance <accepted|rejected|ambiguous> --reason <text>",
637
+ options: ["--action", "--expected-progress-at", "--progress-at", "--from-next-action", "--provider-acceptance", "--reason", "--role", "--agent-id", "--adapter-id", "--native-session-id", "--launch-id"]
570
638
  },
571
639
  {
572
640
  name: "yield",
@@ -593,8 +661,8 @@ const taskChildren = [
593
661
  {
594
662
  name: "request",
595
663
  summary: "Request one Task-local final ReviewRound from a Global Role.",
596
- usage: "yui task review request <task> --role <global-role> [--strategy fixed:<count>|adaptive:<max>] [--lane-role <role> ...]",
597
- options: ["--role", "--strategy", "--lane-role"]
664
+ usage: "yui task review request <task> --role <global-role> [--strategy fixed:<count>|adaptive:<max>] [--lane-role <role> ...] [--delta-recheck]",
665
+ options: ["--role", "--strategy", "--lane-role", "--delta-recheck"]
598
666
  },
599
667
  {
600
668
  name: "group",
@@ -764,10 +832,37 @@ const taskChildren = [
764
832
  summary: "Inspect the durable Task event history.",
765
833
  sections: [{ id: "manage", title: "Commands", entries: ["list", "show"] }],
766
834
  children: [
767
- { name: "list", summary: "List Task events.", usage: "yui task event list <task>" },
835
+ {
836
+ name: "list",
837
+ summary: "List Task events.",
838
+ usage: "yui task event list <task> [--after <timestamp>] [--limit <n>]",
839
+ options: ["--after", "--limit"]
840
+ },
768
841
  { name: "show", summary: "Show one Task event.", usage: "yui task event show <task> <event>" }
769
842
  ]
770
843
  },
844
+ {
845
+ name: "continuation",
846
+ summary: "Inspect native Provider child continuations and their durability mode.",
847
+ sections: [{ id: "manage", title: "Commands", entries: ["list"] }],
848
+ children: [
849
+ {
850
+ name: "list",
851
+ summary: "List native child continuations for a Task.",
852
+ usage: "yui task continuation list <task> [--json]",
853
+ options: ["--json"]
854
+ }
855
+ ]
856
+ },
857
+ {
858
+ name: "wake",
859
+ summary: "Inspect the durable Leader wake ledger and its delta content.",
860
+ sections: [{ id: "manage", title: "Commands", entries: ["list", "show"] }],
861
+ children: [
862
+ { name: "list", summary: "List recorded Leader wakes.", usage: "yui task wake list <task>" },
863
+ { name: "show", summary: "Show one wake and its delta content.", usage: "yui task wake show <task> <wake>" }
864
+ ]
865
+ },
771
866
  {
772
867
  name: "overlap",
773
868
  summary: "Show read-only cross-Task overlap diagnostics.",
@@ -933,51 +1028,28 @@ export const ROOT_COMMAND = buildNode({
933
1028
  {
934
1029
  name: "config",
935
1030
  summary: "Inspect or update Yui configuration.",
936
- sections: [{ id: "manage", title: "Commands", entries: ["show", "set", "review", "leader-next-action"] }],
1031
+ sections: [{ id: "manage", title: "Commands", entries: ["show", "set", "clear"] }],
937
1032
  children: [
938
1033
  { name: "show", summary: "Show effective Yui configuration." },
939
1034
  {
940
1035
  name: "set",
941
- summary: "Update Yui configuration.",
942
- usage: "yui config set <--time-zone <IANA timezone> | --reconciliation-interval-seconds <5-300> | --resources-gc-mode <report|quarantine> | --resources-gc-auto-quarantine <true|false>>",
943
- options: ["--time-zone", "--reconciliation-interval-seconds", "--resources-gc-mode", "--resources-gc-auto-quarantine"],
1036
+ summary: "Set one Yui configuration key.",
1037
+ usage: "yui config set <key> <value...>",
1038
+ sections: [{ id: "keys", title: "Configuration keys", entries: [...CONFIG_KEYS] }],
1039
+ values: CONFIG_KEY_VALUES,
1040
+ options: ["--role", "--trigger", "--finding-ledger", "--delta-recheck", "--delta-recheck-max-lines", "--delta-recheck-max-files"],
944
1041
  optionValues: {
945
- "--resources-gc-mode": ["report", "quarantine"],
946
- "--resources-gc-auto-quarantine": ["true", "false"]
1042
+ "--trigger": ["always", "leader", "final"],
1043
+ "--finding-ledger": ["shadow", "enforce"],
1044
+ "--delta-recheck": ["enabled", "disabled"]
947
1045
  }
948
1046
  },
949
1047
  {
950
- name: "review",
951
- summary: "Configure WorkItem review.",
952
- sections: [{ id: "manage", title: "Commands", entries: ["show", "set", "clear"] }],
953
- children: [
954
- { name: "show", summary: "Show the global review rule." },
955
- {
956
- name: "set",
957
- summary: "Enable review with a Global Role.",
958
- usage: "yui config review set --role <global-role> --trigger <always|leader|final> [--finding-ledger <shadow|enforce>]",
959
- options: ["--role", "--trigger", "--finding-ledger"],
960
- optionValues: {
961
- "--trigger": ["always", "leader", "final"],
962
- "--finding-ledger": ["shadow", "enforce"]
963
- }
964
- },
965
- { name: "clear", summary: "Disable global review." }
966
- ]
967
- },
968
- {
969
- name: "leader-next-action",
970
- summary: "Configure the Leader next-action/duplicate-guard mode.",
971
- sections: [{ id: "manage", title: "Commands", entries: ["show", "set", "clear"] }],
972
- children: [
973
- { name: "show", summary: "Show the Leader next-action mode." },
974
- {
975
- name: "set",
976
- summary: "Set the Leader next-action mode (display|warn|enforce).",
977
- usage: "yui config leader-next-action set <display|warn|enforce>"
978
- },
979
- { name: "clear", summary: "Reset to the default display mode." }
980
- ]
1048
+ name: "clear",
1049
+ summary: "Reset one Yui configuration key to its default.",
1050
+ usage: "yui config clear <key>",
1051
+ sections: [{ id: "keys", title: "Configuration keys", entries: [...CONFIG_KEYS] }],
1052
+ values: CONFIG_KEY_VALUES
981
1053
  }
982
1054
  ]
983
1055
  },
@@ -1061,23 +1133,23 @@ export const ROOT_COMMAND = buildNode({
1061
1133
  {
1062
1134
  name: "knowledge",
1063
1135
  summary: "Manage durable Project knowledge stored by Yui.",
1064
- sections: [{ id: "manage", title: "Commands", entries: ["add", "update", "retire", "list", "show"] }],
1136
+ sections: [
1137
+ {
1138
+ id: "manage",
1139
+ title: "Commands",
1140
+ entries: ["add", "retire", "list", "show", "propose", "proposals", "accept", "reject"]
1141
+ }
1142
+ ],
1065
1143
  children: [
1066
1144
  {
1067
1145
  name: "add",
1068
- summary: "Add Project knowledge.",
1146
+ summary: "Add Project knowledge (Operator authority).",
1069
1147
  usage: "yui project knowledge add <project> <title> --body <text>",
1070
1148
  options: ["--body"]
1071
1149
  },
1072
- {
1073
- name: "update",
1074
- summary: "Update active Project knowledge.",
1075
- usage: "yui project knowledge update <project> <knowledge> [--title <text>] [--body <text>]",
1076
- options: ["--title", "--body"]
1077
- },
1078
1150
  {
1079
1151
  name: "retire",
1080
- summary: "Retire Project knowledge without deleting its record.",
1152
+ summary: "Retire Project knowledge without deleting its record (Operator authority).",
1081
1153
  usage: "yui project knowledge retire <project> <knowledge>"
1082
1154
  },
1083
1155
  {
@@ -1090,6 +1162,44 @@ export const ROOT_COMMAND = buildNode({
1090
1162
  name: "show",
1091
1163
  summary: "Read one Project knowledge entry.",
1092
1164
  usage: "yui project knowledge show <project> <knowledge>"
1165
+ },
1166
+ {
1167
+ name: "propose",
1168
+ summary: "Propose a Task conclusion for promotion into Project knowledge.",
1169
+ usage: "yui project knowledge propose <project> --title <text> --body <text> --task <task>"
1170
+ + " [--decision <id>] [--milestone <id>] [--commit <sha>] [--scope <text>]"
1171
+ + " [--expires-when <text>] [--supersedes <knowledge-id>]",
1172
+ options: ["--title", "--body", "--task", "--decision", "--milestone", "--commit", "--scope", "--expires-when", "--supersedes"]
1173
+ },
1174
+ {
1175
+ name: "proposals",
1176
+ summary: "List or show Knowledge promotion proposals.",
1177
+ sections: [{ id: "manage", title: "Commands", entries: ["list", "show"] }],
1178
+ children: [
1179
+ {
1180
+ name: "list",
1181
+ summary: "List Knowledge promotion proposals (pending by default).",
1182
+ usage: "yui project knowledge proposals list <project> [--status pending|accepted|rejected] [--all]",
1183
+ options: ["--status", "--all"]
1184
+ },
1185
+ {
1186
+ name: "show",
1187
+ summary: "Show one Knowledge promotion proposal.",
1188
+ usage: "yui project knowledge proposals show <project> <proposal>"
1189
+ }
1190
+ ]
1191
+ },
1192
+ {
1193
+ name: "accept",
1194
+ summary: "Accept a Knowledge promotion proposal (Operator authority).",
1195
+ usage: "yui project knowledge accept <project> <proposal> [--update <knowledge-id>]",
1196
+ options: ["--update"]
1197
+ },
1198
+ {
1199
+ name: "reject",
1200
+ summary: "Reject a Knowledge promotion proposal (Operator authority).",
1201
+ usage: "yui project knowledge reject <project> <proposal> --reason <text>",
1202
+ options: ["--reason"]
1093
1203
  }
1094
1204
  ]
1095
1205
  }
@@ -1127,9 +1237,9 @@ export const ROOT_COMMAND = buildNode({
1127
1237
  name: "task",
1128
1238
  summary: "Manage Tasks, WorkItems, Agent Runs, and integration.",
1129
1239
  sections: [
1130
- { id: "lifecycle", title: "Lifecycle", entries: ["create", "project", "update", "activate", "complete", "reopen", "retire", "list", "show", "context", "next-action", "archive", "rebuild", "history", "replace", "reconcile"] },
1131
- { id: "collaboration", title: "Collaboration", entries: ["message", "input", "grant", "workflow", "work", "run", "review", "integration", "role", "enter", "overlap", "change-set"] },
1132
- { id: "knowledge", title: "Task Knowledge", entries: ["brief", "decision", "milestone", "event"] }
1240
+ { id: "lifecycle", title: "Lifecycle", entries: ["create", "project", "base", "update", "activate", "complete", "reopen", "retire", "list", "show", "context", "next-action", "archive", "rebuild", "history", "replace", "reconcile"] },
1241
+ { id: "collaboration", title: "Collaboration", entries: ["message", "input", "grant", "workflow", "publication", "work", "run", "review", "integration", "role", "enter", "overlap", "change-set"] },
1242
+ { id: "knowledge", title: "Task Knowledge", entries: ["brief", "decision", "milestone", "event", "continuation", "wake"] }
1133
1243
  ],
1134
1244
  children: taskChildren
1135
1245
  },
@@ -28,7 +28,9 @@ function describeOption(option) {
28
28
  "--project": "Select a Project.",
29
29
  "--role": "Select a Task role.",
30
30
  "--summary": "Set summary text.",
31
- "--task": "Select a Task."
31
+ "--task": "Select a Task.",
32
+ "--trigger": "Set the review trigger (always, leader, final).",
33
+ "--finding-ledger": "Set the review finding ledger mode (shadow, enforce)."
32
34
  };
33
35
  return descriptions[option] ?? `Set ${option.slice(2).replaceAll("-", " ")}.`;
34
36
  }