selftune 0.2.30 → 0.2.32

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 (102) hide show
  1. package/README.md +83 -56
  2. package/apps/local-dashboard/dist/assets/index-B-ut4w0B.js +15 -0
  3. package/apps/local-dashboard/dist/assets/index-BFGfCVrL.css +1 -0
  4. package/apps/local-dashboard/dist/assets/vendor-ui-DfowE3Hu.js +1 -0
  5. package/apps/local-dashboard/dist/index.html +3 -3
  6. package/cli/selftune/command-surface.ts +613 -2
  7. package/cli/selftune/create/baseline.ts +429 -0
  8. package/cli/selftune/create/check.ts +35 -0
  9. package/cli/selftune/create/init.ts +115 -0
  10. package/cli/selftune/create/package-candidate-state.ts +771 -0
  11. package/cli/selftune/create/package-evaluator.ts +710 -0
  12. package/cli/selftune/create/package-fingerprint.ts +142 -0
  13. package/cli/selftune/create/package-search.ts +377 -0
  14. package/cli/selftune/create/publish.ts +431 -0
  15. package/cli/selftune/create/readiness.ts +495 -0
  16. package/cli/selftune/create/replay.ts +330 -0
  17. package/cli/selftune/create/report.ts +74 -0
  18. package/cli/selftune/create/scaffold.ts +121 -0
  19. package/cli/selftune/create/skills-ref-adapter.ts +177 -0
  20. package/cli/selftune/create/status.ts +33 -0
  21. package/cli/selftune/create/templates.ts +249 -0
  22. package/cli/selftune/cron/setup.ts +1 -1
  23. package/cli/selftune/dashboard-action-events.ts +4 -1
  24. package/cli/selftune/dashboard-action-result.ts +789 -24
  25. package/cli/selftune/dashboard-action-stream.ts +80 -0
  26. package/cli/selftune/dashboard-contract.ts +146 -3
  27. package/cli/selftune/dashboard-server.ts +5 -4
  28. package/cli/selftune/eval/hooks-to-evals.ts +58 -35
  29. package/cli/selftune/eval/synthetic-evals.ts +145 -17
  30. package/cli/selftune/evolution/bounded-mutations.ts +1045 -0
  31. package/cli/selftune/evolution/evolve-body.ts +9 -36
  32. package/cli/selftune/evolution/evolve.ts +8 -72
  33. package/cli/selftune/evolution/stopping-criteria.ts +5 -13
  34. package/cli/selftune/evolution/unblock-suggestions.ts +0 -16
  35. package/cli/selftune/evolution/validate-host-replay.ts +115 -15
  36. package/cli/selftune/improve.ts +206 -0
  37. package/cli/selftune/index.ts +123 -6
  38. package/cli/selftune/init.ts +1 -1
  39. package/cli/selftune/localdb/queries/dashboard.ts +30 -0
  40. package/cli/selftune/localdb/schema.ts +52 -0
  41. package/cli/selftune/monitoring/watch.ts +257 -23
  42. package/cli/selftune/orchestrate/execute.ts +300 -1
  43. package/cli/selftune/orchestrate/finalize.ts +14 -0
  44. package/cli/selftune/orchestrate/plan.ts +22 -5
  45. package/cli/selftune/orchestrate/prepare.ts +59 -4
  46. package/cli/selftune/orchestrate/report.ts +1 -1
  47. package/cli/selftune/orchestrate.ts +34 -1
  48. package/cli/selftune/publish.ts +35 -0
  49. package/cli/selftune/registry/github-install.ts +256 -0
  50. package/cli/selftune/registry/index.ts +1 -1
  51. package/cli/selftune/registry/install.ts +58 -7
  52. package/cli/selftune/routes/actions.ts +81 -15
  53. package/cli/selftune/routes/overview.ts +1 -1
  54. package/cli/selftune/routes/skill-report.ts +147 -2
  55. package/cli/selftune/run.ts +18 -0
  56. package/cli/selftune/schedule.ts +3 -3
  57. package/cli/selftune/search-run.ts +703 -0
  58. package/cli/selftune/status.ts +35 -11
  59. package/cli/selftune/testing-readiness.ts +431 -40
  60. package/cli/selftune/types.ts +316 -0
  61. package/cli/selftune/utils/eval-readiness.ts +1 -0
  62. package/cli/selftune/utils/json-output.ts +11 -0
  63. package/cli/selftune/utils/lifecycle-surface.ts +48 -0
  64. package/cli/selftune/utils/query-filter.ts +82 -1
  65. package/cli/selftune/utils/tui.ts +85 -2
  66. package/cli/selftune/verify.ts +205 -0
  67. package/cli/selftune/workflows/proposals.ts +1 -1
  68. package/cli/selftune/workflows/skill-scaffold.ts +141 -63
  69. package/cli/selftune/workflows/workflows.ts +4 -4
  70. package/package.json +1 -1
  71. package/packages/dashboard-core/src/routes/manifest.ts +2 -2
  72. package/packages/ui/src/components/SkillReportPanels.tsx +7 -7
  73. package/packages/ui/src/primitives/button.tsx +5 -0
  74. package/skill/SKILL.md +148 -85
  75. package/skill/references/cli-quick-reference.md +16 -1
  76. package/skill/references/creator-playbook.md +31 -10
  77. package/skill/workflows/Baseline.md +8 -9
  78. package/skill/workflows/Contributions.md +4 -4
  79. package/skill/workflows/Create.md +173 -0
  80. package/skill/workflows/CreateTestDeploy.md +34 -30
  81. package/skill/workflows/Cron.md +2 -2
  82. package/skill/workflows/Dashboard.md +3 -3
  83. package/skill/workflows/Evals.md +13 -7
  84. package/skill/workflows/Evolve.md +75 -32
  85. package/skill/workflows/EvolveBody.md +22 -15
  86. package/skill/workflows/Hook.md +1 -1
  87. package/skill/workflows/Improve.md +168 -0
  88. package/skill/workflows/Initialize.md +3 -3
  89. package/skill/workflows/Orchestrate.md +49 -12
  90. package/skill/workflows/Publish.md +100 -0
  91. package/skill/workflows/Registry.md +19 -13
  92. package/skill/workflows/Run.md +72 -0
  93. package/skill/workflows/Schedule.md +2 -2
  94. package/skill/workflows/SearchRun.md +89 -0
  95. package/skill/workflows/SignalsDashboard.md +2 -2
  96. package/skill/workflows/UnitTest.md +13 -4
  97. package/skill/workflows/Verify.md +136 -0
  98. package/skill/workflows/Watch.md +114 -47
  99. package/skill/workflows/Workflows.md +13 -8
  100. package/apps/local-dashboard/dist/assets/index-BcXquWFB.css +0 -1
  101. package/apps/local-dashboard/dist/assets/index-Coq42hE4.js +0 -15
  102. package/apps/local-dashboard/dist/assets/vendor-ui-B0H8s1mP.js +0 -1
@@ -37,6 +37,542 @@ export function renderCommandHelp(surface: PublicCommandSurface): string {
37
37
  }
38
38
 
39
39
  export const PUBLIC_COMMAND_SURFACES = {
40
+ createInit: {
41
+ command: "selftune create init",
42
+ summary: "Initialize a draft skill package",
43
+ usage: "selftune create init --name <name> --description <text> [options]",
44
+ flags: [
45
+ {
46
+ token: "--name",
47
+ helpLabel: "--name",
48
+ description: "Display name for the new skill package (required)",
49
+ },
50
+ {
51
+ token: "--description",
52
+ helpLabel: "--description",
53
+ description: "Short routing description for the draft skill (required)",
54
+ },
55
+ {
56
+ token: "--output-dir",
57
+ helpLabel: "--output-dir",
58
+ description: "Parent directory for the new package (default: repo .agents/skills)",
59
+ },
60
+ {
61
+ token: "--force",
62
+ helpLabel: "--force",
63
+ description: "Overwrite scaffold files if the skill directory already exists",
64
+ },
65
+ {
66
+ token: "--json",
67
+ helpLabel: "--json",
68
+ description: "Emit the created package summary as JSON",
69
+ },
70
+ {
71
+ token: "--help",
72
+ helpLabel: "-h, --help",
73
+ description: "Show this help message",
74
+ },
75
+ ],
76
+ quickReference:
77
+ "selftune create init --name <name> --description <text> [--output-dir PATH] [--force] [--json]",
78
+ extraHelpSections: [
79
+ `Generated package layout:
80
+ <skill-name>/
81
+ SKILL.md
82
+ workflows/default.md
83
+ references/overview.md
84
+ scripts/
85
+ assets/
86
+ selftune.create.json`,
87
+ ],
88
+ },
89
+ createScaffold: {
90
+ command: "selftune create scaffold",
91
+ summary: "Scaffold a draft skill package from an observed workflow",
92
+ usage: "selftune create scaffold --from-workflow <id|index> [options]",
93
+ flags: [
94
+ {
95
+ token: "--from-workflow",
96
+ helpLabel: "--from-workflow",
97
+ description: "Workflow ID or 1-based index from `selftune workflows` (required)",
98
+ },
99
+ {
100
+ token: "--output-dir",
101
+ helpLabel: "--output-dir",
102
+ description: "Parent directory for the new package (default: repo .agents/skills)",
103
+ },
104
+ {
105
+ token: "--skill-name",
106
+ helpLabel: "--skill-name",
107
+ description: "Override the generated skill name",
108
+ },
109
+ {
110
+ token: "--description",
111
+ helpLabel: "--description",
112
+ description: "Override the generated routing description",
113
+ },
114
+ {
115
+ token: "--write",
116
+ helpLabel: "--write",
117
+ description: "Persist the scaffold package to disk instead of previewing it",
118
+ },
119
+ {
120
+ token: "--force",
121
+ helpLabel: "--force",
122
+ description: "Overwrite scaffold files if the skill directory already exists",
123
+ },
124
+ {
125
+ token: "--json",
126
+ helpLabel: "--json",
127
+ description: "Emit the scaffold package summary as JSON",
128
+ },
129
+ {
130
+ token: "--min-occurrences",
131
+ helpLabel: "--min-occurrences",
132
+ description: "Minimum workflow frequency to consider when resolving the selection",
133
+ },
134
+ {
135
+ token: "--skill",
136
+ helpLabel: "--skill",
137
+ description: "Restrict workflow discovery to chains containing the named skill",
138
+ },
139
+ {
140
+ token: "--help",
141
+ helpLabel: "-h, --help",
142
+ description: "Show this help message",
143
+ },
144
+ ],
145
+ quickReference:
146
+ "selftune create scaffold --from-workflow <id|index> [--output-dir PATH] [--skill-name NAME] [--description TEXT] [--write] [--force] [--json]",
147
+ extraHelpSections: [
148
+ `Workflow discovery:
149
+ This command reads the current SQLite telemetry and skill-usage records,
150
+ resolves a workflow by ID or list index, and then scaffolds the same package
151
+ shape used by \`selftune create init\`.`,
152
+ ],
153
+ },
154
+ createCheck: {
155
+ command: "selftune create check",
156
+ summary: "Validate a draft skill package and recommend the next creator-loop step",
157
+ usage: "selftune create check --skill-path <path> [options]",
158
+ flags: [
159
+ {
160
+ token: "--skill-path",
161
+ helpLabel: "--skill-path",
162
+ description: "Path to a skill directory or SKILL.md file (required)",
163
+ },
164
+ {
165
+ token: "--json",
166
+ helpLabel: "--json",
167
+ description: "Emit the readiness report as JSON",
168
+ },
169
+ {
170
+ token: "--help",
171
+ helpLabel: "-h, --help",
172
+ description: "Show this help message",
173
+ },
174
+ ],
175
+ quickReference: "selftune create check --skill-path <path> [--json]",
176
+ extraHelpSections: [
177
+ `Validation order:
178
+ 1. Run the Agent Skills spec validator (\`skills-ref validate\`) when available
179
+ 2. Check package structure and selftune.create.json
180
+ 3. Check eval, unit-test, replay, and baseline readiness for the creator loop`,
181
+ ],
182
+ },
183
+ createReplay: {
184
+ command: "selftune create replay",
185
+ summary: "Run replay validation against the current draft package",
186
+ usage: "selftune create replay --skill-path <path> [options]",
187
+ flags: [
188
+ {
189
+ token: "--skill-path",
190
+ helpLabel: "--skill-path",
191
+ description: "Path to a skill directory or SKILL.md file (required)",
192
+ },
193
+ {
194
+ token: "--mode",
195
+ helpLabel: "--mode",
196
+ description: "Replay scope: routing or package (default: routing)",
197
+ },
198
+ {
199
+ token: "--agent",
200
+ helpLabel: "--agent",
201
+ description: "Runtime agent to use (claude, codex, opencode, pi)",
202
+ },
203
+ {
204
+ token: "--eval-set",
205
+ helpLabel: "--eval-set",
206
+ description: "Override the eval-set path instead of using the canonical one",
207
+ },
208
+ {
209
+ token: "--json",
210
+ helpLabel: "--json",
211
+ description: "Emit the replay summary as JSON",
212
+ },
213
+ {
214
+ token: "--help",
215
+ helpLabel: "-h, --help",
216
+ description: "Show this help message",
217
+ },
218
+ ],
219
+ quickReference:
220
+ "selftune create replay --skill-path <path> [--mode routing|package] [--agent AGENT] [--json]",
221
+ },
222
+ createBaseline: {
223
+ command: "selftune create baseline",
224
+ summary: "Measure draft-package lift against a no-skill baseline",
225
+ usage: "selftune create baseline --skill-path <path> [options]",
226
+ flags: [
227
+ {
228
+ token: "--skill-path",
229
+ helpLabel: "--skill-path",
230
+ description: "Path to a skill directory or SKILL.md file (required)",
231
+ },
232
+ {
233
+ token: "--mode",
234
+ helpLabel: "--mode",
235
+ description: "Baseline mode: routing or package (default: routing)",
236
+ },
237
+ {
238
+ token: "--agent",
239
+ helpLabel: "--agent",
240
+ description: "Agent CLI to use for the baseline run",
241
+ },
242
+ {
243
+ token: "--eval-set",
244
+ helpLabel: "--eval-set",
245
+ description: "Override the eval-set path instead of using the canonical one",
246
+ },
247
+ {
248
+ token: "--json",
249
+ helpLabel: "--json",
250
+ description: "Emit the baseline summary as JSON",
251
+ },
252
+ {
253
+ token: "--help",
254
+ helpLabel: "-h, --help",
255
+ description: "Show this help message",
256
+ },
257
+ ],
258
+ quickReference:
259
+ "selftune create baseline --skill-path <path> [--mode routing|package] [--agent AGENT] [--json]",
260
+ },
261
+ createReport: {
262
+ command: "selftune create report",
263
+ summary: "Render a benchmark-style package evaluation report for the current draft",
264
+ usage: "selftune create report --skill-path <path> [options]",
265
+ flags: [
266
+ {
267
+ token: "--skill-path",
268
+ helpLabel: "--skill-path",
269
+ description: "Path to a skill directory or SKILL.md file (required)",
270
+ },
271
+ {
272
+ token: "--agent",
273
+ helpLabel: "--agent",
274
+ description: "Runtime agent to use for package evaluation",
275
+ },
276
+ {
277
+ token: "--eval-set",
278
+ helpLabel: "--eval-set",
279
+ description: "Override the eval-set path instead of using the canonical one",
280
+ },
281
+ {
282
+ token: "--json",
283
+ helpLabel: "--json",
284
+ description: "Emit the full package evaluation payload as JSON",
285
+ },
286
+ {
287
+ token: "--help",
288
+ helpLabel: "-h, --help",
289
+ description: "Show this help message",
290
+ },
291
+ ],
292
+ quickReference:
293
+ "selftune create report --skill-path <path> [--agent AGENT] [--eval-set PATH] [--json]",
294
+ extraHelpSections: [
295
+ `Report output:
296
+ Runs the package evaluator with replay + baseline, then renders the same
297
+ benchmark-style report shape used for review-ready publish evidence.
298
+ Exit code is 0 when the package passes evaluation and 1 otherwise.`,
299
+ ],
300
+ },
301
+ createPublish: {
302
+ command: "selftune create publish",
303
+ summary:
304
+ "Re-run package replay and baseline, then hand off a validated draft package into watch",
305
+ usage: "selftune create publish --skill-path <path> [options]",
306
+ flags: [
307
+ {
308
+ token: "--skill-path",
309
+ helpLabel: "--skill-path",
310
+ description: "Path to a skill directory or SKILL.md file (required)",
311
+ },
312
+ {
313
+ token: "--watch",
314
+ helpLabel: "--watch",
315
+ description: "Start watch immediately after publish succeeds",
316
+ },
317
+ {
318
+ token: "--ignore-watch-alerts",
319
+ helpLabel: "--ignore-watch-alerts",
320
+ description: "Bypass the publish-time watch gate after watch runs",
321
+ },
322
+ {
323
+ token: "--json",
324
+ helpLabel: "--json",
325
+ description: "Emit the publish summary as JSON",
326
+ },
327
+ {
328
+ token: "--help",
329
+ helpLabel: "-h, --help",
330
+ description: "Show this help message",
331
+ },
332
+ ],
333
+ quickReference:
334
+ "selftune create publish --skill-path <path> [--watch] [--ignore-watch-alerts] [--json]",
335
+ extraHelpSections: [
336
+ `Publish flow:
337
+ 1. Re-run \`selftune create replay --mode package\`
338
+ 2. Re-run \`selftune create baseline --mode package\`
339
+ 3. Return the next \`selftune watch\` command, or start watch immediately when \`--watch\` is passed
340
+ 4. Apply a watch-trust gate after watch completes; use \`--ignore-watch-alerts\` only when you deliberately want to bypass that gate`,
341
+ ],
342
+ },
343
+ createStatus: {
344
+ command: "selftune create status",
345
+ summary: "Show the current draft-package readiness state",
346
+ usage: "selftune create status --skill-path <path> [options]",
347
+ flags: [
348
+ {
349
+ token: "--skill-path",
350
+ helpLabel: "--skill-path",
351
+ description: "Path to a skill directory or SKILL.md file (required)",
352
+ },
353
+ {
354
+ token: "--json",
355
+ helpLabel: "--json",
356
+ description: "Emit the status payload as JSON",
357
+ },
358
+ {
359
+ token: "--help",
360
+ helpLabel: "-h, --help",
361
+ description: "Show this help message",
362
+ },
363
+ ],
364
+ quickReference: "selftune create status --skill-path <path> [--json]",
365
+ },
366
+ verify: {
367
+ command: "selftune verify",
368
+ summary: "Verify a draft skill package and report whether it is ready to publish",
369
+ usage: "selftune verify --skill-path <path> [options]",
370
+ flags: [
371
+ {
372
+ token: "--skill-path",
373
+ helpLabel: "--skill-path",
374
+ description: "Path to a skill directory or SKILL.md file (required)",
375
+ },
376
+ {
377
+ token: "--agent",
378
+ helpLabel: "--agent",
379
+ description: "Runtime agent to use for package evaluation once readiness passes",
380
+ },
381
+ {
382
+ token: "--eval-set",
383
+ helpLabel: "--eval-set",
384
+ description: "Override the eval-set path instead of using the canonical one",
385
+ },
386
+ {
387
+ token: "--no-auto-fix",
388
+ helpLabel: "--no-auto-fix",
389
+ description: "Skip automatic evidence generation when readiness checks fail",
390
+ },
391
+ {
392
+ token: "--json",
393
+ helpLabel: "--json",
394
+ description: "Emit readiness plus report data as JSON",
395
+ },
396
+ {
397
+ token: "--help",
398
+ helpLabel: "-h, --help",
399
+ description: "Show this help message",
400
+ },
401
+ ],
402
+ quickReference:
403
+ "selftune verify --skill-path <path> [--agent AGENT] [--eval-set PATH] [--no-auto-fix] [--json]",
404
+ extraHelpSections: [
405
+ `Lifecycle behavior:
406
+ 1. Run the same draft-package readiness checks as \`selftune create check\`
407
+ 2. Auto-generate missing evidence (evals, unit tests, replay, baseline) unless --no-auto-fix
408
+ 3. If the draft is ready, run the benchmark-style package report
409
+ 4. Recommend \`selftune publish\` when verification passes`,
410
+ ],
411
+ },
412
+ publish: {
413
+ command: "selftune publish",
414
+ summary: "Publish a verified draft package and start watch by default",
415
+ usage: "selftune publish --skill-path <path> [options]",
416
+ flags: [
417
+ {
418
+ token: "--skill-path",
419
+ helpLabel: "--skill-path",
420
+ description: "Path to a skill directory or SKILL.md file (required)",
421
+ },
422
+ {
423
+ token: "--no-watch",
424
+ helpLabel: "--no-watch",
425
+ description: "Skip the default watch handoff and return the next watch command instead",
426
+ },
427
+ {
428
+ token: "--ignore-watch-alerts",
429
+ helpLabel: "--ignore-watch-alerts",
430
+ description: "Bypass the publish-time watch gate after watch runs",
431
+ },
432
+ {
433
+ token: "--json",
434
+ helpLabel: "--json",
435
+ description: "Emit the publish summary as JSON",
436
+ },
437
+ {
438
+ token: "--help",
439
+ helpLabel: "-h, --help",
440
+ description: "Show this help message",
441
+ },
442
+ ],
443
+ quickReference:
444
+ "selftune publish --skill-path <path> [--no-watch] [--ignore-watch-alerts] [--json]",
445
+ extraHelpSections: [
446
+ `Default behavior:
447
+ \`selftune publish\` delegates to the draft-package publish flow and enables
448
+ watch automatically. Use \`--no-watch\` when you want a manual watch handoff.`,
449
+ ],
450
+ },
451
+ improve: {
452
+ command: "selftune improve",
453
+ summary: "Improve a skill through the smallest matching mutation surface",
454
+ usage: "selftune improve --skill <name> --skill-path <path> [options]",
455
+ flags: [
456
+ {
457
+ token: "--scope",
458
+ helpLabel: "--scope",
459
+ description: "Improvement scope: auto|description|routing|body|package (default: auto)",
460
+ },
461
+ {
462
+ token: "--skill",
463
+ helpLabel: "--skill",
464
+ description: "Skill name (required)",
465
+ },
466
+ {
467
+ token: "--skill-path",
468
+ helpLabel: "--skill-path",
469
+ description: "Path to SKILL.md (required)",
470
+ },
471
+ {
472
+ token: "--agent",
473
+ helpLabel: "--agent",
474
+ description: "Agent CLI to use; for body/routing this sets both teacher and student agents",
475
+ },
476
+ {
477
+ token: "--eval-set",
478
+ helpLabel: "--eval-set",
479
+ description: "Path to eval set JSON (optional, builds from logs if omitted)",
480
+ },
481
+ {
482
+ token: "--dry-run",
483
+ helpLabel: "--dry-run",
484
+ description: "Validate candidate changes without deploying",
485
+ },
486
+ {
487
+ token: "--validation-mode",
488
+ helpLabel: "--validation-mode",
489
+ description: "Validation strategy: auto|replay|judge (default: auto)",
490
+ },
491
+ {
492
+ token: "--help",
493
+ helpLabel: "-h, --help",
494
+ description: "Show this help message",
495
+ },
496
+ ],
497
+ quickReference:
498
+ "selftune improve --skill <name> --skill-path <path> [--scope auto|description|routing|body|package] [--dry-run] [--validation-mode auto|replay|judge]",
499
+ extraHelpSections: [
500
+ `Scope mapping:
501
+ auto|description -> \`selftune evolve\`
502
+ routing -> \`selftune evolve body --target routing\`
503
+ body -> \`selftune evolve body --target body\`
504
+ package -> \`selftune search-run\`
505
+
506
+ Today \`auto\` defaults to description-surface evolution unless you pick a
507
+ broader scope explicitly. Package scope runs bounded search as a measured
508
+ review loop; without \`--dry-run\` it also promotes the winning candidate back
509
+ into the draft package.`,
510
+ ],
511
+ },
512
+ searchRun: {
513
+ command: "selftune search-run",
514
+ summary: "Run a bounded package search over routing and body candidate variants",
515
+ usage: "selftune search-run --skill-path <path> [options]",
516
+ flags: [
517
+ {
518
+ token: "--skill-path",
519
+ helpLabel: "--skill-path",
520
+ description: "Path to a skill directory or SKILL.md file (required)",
521
+ },
522
+ {
523
+ token: "--skill",
524
+ helpLabel: "--skill",
525
+ description: "Override the inferred skill name for candidate lineage and reporting",
526
+ },
527
+ {
528
+ token: "--surface",
529
+ helpLabel: "--surface",
530
+ description: "Mutation surface: routing|body|both (default: both)",
531
+ },
532
+ {
533
+ token: "--max-candidates",
534
+ helpLabel: "--max-candidates",
535
+ description: "Cap candidate variants evaluated in this search run (default: 5)",
536
+ },
537
+ {
538
+ token: "--agent",
539
+ helpLabel: "--agent",
540
+ description: "Runtime agent to use for shared package evaluation",
541
+ },
542
+ {
543
+ token: "--eval-set",
544
+ helpLabel: "--eval-set",
545
+ description: "Override the eval-set path used for package evaluation",
546
+ },
547
+ {
548
+ token: "--apply-winner",
549
+ helpLabel: "--apply-winner",
550
+ description: "Promote the winning candidate back into the draft package",
551
+ },
552
+ {
553
+ token: "--json",
554
+ helpLabel: "--json",
555
+ description: "Emit the full search result as JSON",
556
+ },
557
+ {
558
+ token: "--help",
559
+ helpLabel: "-h, --help",
560
+ description: "Show this help message",
561
+ },
562
+ ],
563
+ quickReference:
564
+ "selftune search-run --skill-path <path> [--skill NAME] [--surface routing|body|both] [--max-candidates N] [--agent AGENT] [--eval-set PATH] [--apply-winner] [--json]",
565
+ extraHelpSections: [
566
+ `Search behavior:
567
+ 1. Generate eval-informed targeted routing/body variants, then deterministic
568
+ fallback variants to fill the minibatch
569
+ 2. Evaluate each variant through the shared package evaluator
570
+ 3. Compare accepted candidates against the measured frontier
571
+ 4. Persist the search run, winner, and provenance for dashboard review
572
+ 5. Optionally promote the winner back into the draft package and refresh the
573
+ canonical package-evaluation artifact`,
574
+ ],
575
+ },
40
576
  evalGenerate: {
41
577
  command: "selftune eval generate",
42
578
  summary: "Build eval sets from logs or SKILL.md",
@@ -87,6 +623,12 @@ export const PUBLIC_COMMAND_SURFACES = {
87
623
  helpLabel: "--skill-log",
88
624
  description: "Path to skill_usage_log.jsonl",
89
625
  },
626
+ {
627
+ token: "--agent",
628
+ helpLabel: "--agent",
629
+ description:
630
+ "Agent CLI to use for synthetic/blended eval generation (claude, codex, opencode, pi)",
631
+ },
90
632
  {
91
633
  token: "--query-log",
92
634
  helpLabel: "--query-log",
@@ -129,7 +671,7 @@ export const PUBLIC_COMMAND_SURFACES = {
129
671
  },
130
672
  ],
131
673
  quickReference:
132
- "selftune eval generate --skill <name> [--list-skills] [--stats] [--max N] [--seed N] [--output PATH] [--blend]",
674
+ "selftune eval generate --skill <name> [--list-skills] [--stats] [--max N] [--seed N] [--output PATH] [--agent AGENT] [--blend]",
133
675
  extraHelpSections: [
134
676
  `Recommended creator loop:
135
677
  1. selftune eval generate --skill <name>
@@ -169,7 +711,7 @@ Generated evals are stored canonically in SQLite and mirrored into ~/.selftune/e
169
711
  {
170
712
  token: "--confidence",
171
713
  helpLabel: "--confidence",
172
- description: "Confidence threshold 0.0-1.0 (default: 0.6)",
714
+ description: "Low-confidence review threshold 0.0-1.0 (default: 0.6)",
173
715
  },
174
716
  {
175
717
  token: "--max-iterations",
@@ -394,4 +936,73 @@ Generated evals are stored canonically in SQLite and mirrored into ~/.selftune/e
394
936
  selftune orchestrate --loop --loop-interval 600 # every 10 minutes`,
395
937
  ],
396
938
  },
939
+ run: {
940
+ command: "selftune run",
941
+ summary: "Autonomous sync, grade, improve, and watch loop",
942
+ usage: "selftune run [options]",
943
+ flags: [
944
+ {
945
+ token: "--dry-run",
946
+ helpLabel: "--dry-run",
947
+ description: "Preview actions without mutations",
948
+ },
949
+ {
950
+ token: "--review-required",
951
+ helpLabel: "--review-required",
952
+ description: "Validate candidates but require human review before deploy",
953
+ },
954
+ {
955
+ token: "--auto-approve",
956
+ helpLabel: "--auto-approve",
957
+ description: "Deprecated alias; autonomous mode is now the default",
958
+ },
959
+ {
960
+ token: "--skill",
961
+ helpLabel: "--skill <name>",
962
+ description: "Scope to a single skill",
963
+ },
964
+ {
965
+ token: "--max-skills",
966
+ helpLabel: "--max-skills <n>",
967
+ description: "Cap skills processed per run (default: 5)",
968
+ },
969
+ {
970
+ token: "--recent-window",
971
+ helpLabel: "--recent-window <hrs>",
972
+ description: "Hours to look back for watch targets (default: 48)",
973
+ },
974
+ {
975
+ token: "--sync-force",
976
+ helpLabel: "--sync-force",
977
+ description: "Force full rescan during sync",
978
+ },
979
+ {
980
+ token: "--max-auto-grade",
981
+ helpLabel: "--max-auto-grade <n>",
982
+ description: "Max ungraded skills to auto-grade per run (default: 5, 0 to disable)",
983
+ },
984
+ {
985
+ token: "--loop",
986
+ helpLabel: "--loop",
987
+ description: "Run in continuous loop mode (never stops)",
988
+ },
989
+ {
990
+ token: "--loop-interval",
991
+ helpLabel: "--loop-interval <s>",
992
+ description: "Seconds between iterations (default: 3600, min: 60)",
993
+ },
994
+ {
995
+ token: "--help",
996
+ helpLabel: "-h, --help",
997
+ description: "Show this help message",
998
+ },
999
+ ],
1000
+ quickReference:
1001
+ "selftune run [--dry-run] [--review-required] [--auto-approve] [--skill NAME] [--max-skills N] [--recent-window HOURS] [--sync-force] [--max-auto-grade N] [--loop] [--loop-interval SECS]",
1002
+ extraHelpSections: [
1003
+ `Alias behavior:
1004
+ \`selftune run\` is the intention-level alias for \`selftune orchestrate\`.
1005
+ It preserves the same JSON stdout + human-readable stderr behavior.`,
1006
+ ],
1007
+ },
397
1008
  } satisfies Record<string, PublicCommandSurface>;