selftune 0.2.22 → 0.2.24

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 (270) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +95 -15
  3. package/apps/local-dashboard/dist/assets/index-DgY2KGP-.css +1 -0
  4. package/apps/local-dashboard/dist/assets/index-Dmx7LPVX.js +15 -0
  5. package/apps/local-dashboard/dist/assets/vendor-react-C5oyHiV1.js +11 -0
  6. package/apps/local-dashboard/dist/assets/{vendor-table-BIiI3YhS.js → vendor-table-Bc_bbKd8.js} +1 -1
  7. package/apps/local-dashboard/dist/assets/vendor-ui-B3BPIYy7.js +1 -0
  8. package/apps/local-dashboard/dist/index.html +5 -5
  9. package/cli/selftune/adapters/codex/install.ts +310 -78
  10. package/cli/selftune/adapters/opencode/install.ts +3 -4
  11. package/cli/selftune/adapters/pi/hook.ts +273 -0
  12. package/cli/selftune/adapters/pi/install.ts +207 -0
  13. package/cli/selftune/alpha-upload/build-payloads.ts +3 -3
  14. package/cli/selftune/alpha-upload/stage-canonical.ts +17 -11
  15. package/cli/selftune/auto-update.ts +200 -8
  16. package/cli/selftune/canonical-export.ts +55 -25
  17. package/cli/selftune/command-surface.ts +397 -0
  18. package/cli/selftune/constants.ts +10 -1
  19. package/cli/selftune/contribute/contribute.ts +64 -13
  20. package/cli/selftune/contribution-config.ts +57 -3
  21. package/cli/selftune/contribution-preferences.ts +117 -0
  22. package/cli/selftune/contribution-signals.ts +8 -4
  23. package/cli/selftune/contribution-staging.ts +13 -2
  24. package/cli/selftune/contributions.ts +55 -121
  25. package/cli/selftune/creator-contributions.ts +29 -10
  26. package/cli/selftune/cron/setup.ts +7 -3
  27. package/cli/selftune/dashboard-contract.ts +87 -0
  28. package/cli/selftune/dashboard-server.ts +168 -17
  29. package/cli/selftune/dashboard.ts +350 -17
  30. package/cli/selftune/eval/baseline.ts +21 -5
  31. package/cli/selftune/eval/execution-eval.ts +170 -0
  32. package/cli/selftune/eval/family-overlap.ts +2 -2
  33. package/cli/selftune/eval/hooks-to-evals.ts +228 -82
  34. package/cli/selftune/eval/import-skillsbench.ts +2 -2
  35. package/cli/selftune/eval/invocation-classifier.ts +56 -0
  36. package/cli/selftune/eval/synthetic-evals.ts +5 -3
  37. package/cli/selftune/eval/unit-test-cli.ts +7 -4
  38. package/cli/selftune/evolution/apply-proposal.ts +295 -0
  39. package/cli/selftune/evolution/engines/judge-engine.ts +96 -0
  40. package/cli/selftune/evolution/engines/replay-engine.ts +180 -0
  41. package/cli/selftune/evolution/evidence.ts +2 -6
  42. package/cli/selftune/evolution/evolve-body.ts +152 -38
  43. package/cli/selftune/evolution/evolve.ts +244 -52
  44. package/cli/selftune/evolution/rollback.ts +0 -1
  45. package/cli/selftune/evolution/validate-body.ts +111 -49
  46. package/cli/selftune/evolution/validate-host-replay.ts +510 -60
  47. package/cli/selftune/evolution/validate-proposal.ts +11 -150
  48. package/cli/selftune/evolution/validate-routing.ts +51 -108
  49. package/cli/selftune/evolution/validation-contract.ts +91 -0
  50. package/cli/selftune/grading/auto-grade.ts +11 -7
  51. package/cli/selftune/grading/grade-session.ts +10 -16
  52. package/cli/selftune/hooks/skill-eval.ts +2 -1
  53. package/cli/selftune/hooks-shared/types.ts +1 -0
  54. package/cli/selftune/index.ts +58 -15
  55. package/cli/selftune/ingestors/claude-replay.ts +15 -10
  56. package/cli/selftune/ingestors/codex-wrapper.ts +3 -3
  57. package/cli/selftune/ingestors/opencode-ingest.ts +2 -2
  58. package/cli/selftune/ingestors/pi-ingest.ts +727 -0
  59. package/cli/selftune/init.ts +38 -4
  60. package/cli/selftune/localdb/direct-write.ts +120 -1
  61. package/cli/selftune/localdb/materialize.ts +6 -7
  62. package/cli/selftune/localdb/queries/cron.ts +34 -0
  63. package/cli/selftune/localdb/queries/dashboard.ts +834 -0
  64. package/cli/selftune/localdb/queries/evolution.ts +158 -0
  65. package/cli/selftune/localdb/queries/execution.ts +133 -0
  66. package/cli/selftune/localdb/queries/json.ts +18 -0
  67. package/cli/selftune/localdb/queries/monitoring.ts +263 -0
  68. package/cli/selftune/localdb/queries/raw.ts +95 -0
  69. package/cli/selftune/localdb/queries/staging.ts +270 -0
  70. package/cli/selftune/localdb/queries/trust.ts +392 -0
  71. package/cli/selftune/localdb/queries.ts +60 -2162
  72. package/cli/selftune/localdb/schema.ts +59 -0
  73. package/cli/selftune/monitoring/watch.ts +96 -29
  74. package/cli/selftune/normalization.ts +3 -0
  75. package/cli/selftune/observability.ts +12 -3
  76. package/cli/selftune/orchestrate/cli.ts +161 -0
  77. package/cli/selftune/orchestrate/execute.ts +295 -0
  78. package/cli/selftune/orchestrate/finalize.ts +157 -0
  79. package/cli/selftune/orchestrate/locks.ts +40 -0
  80. package/cli/selftune/orchestrate/plan.ts +131 -0
  81. package/cli/selftune/orchestrate/post-run.ts +59 -0
  82. package/cli/selftune/orchestrate/prepare.ts +334 -0
  83. package/cli/selftune/orchestrate/report.ts +182 -0
  84. package/cli/selftune/orchestrate/runtime.ts +120 -0
  85. package/cli/selftune/orchestrate/signals.ts +48 -0
  86. package/cli/selftune/orchestrate.ts +162 -1142
  87. package/cli/selftune/registry/client.ts +74 -0
  88. package/cli/selftune/registry/history.ts +54 -0
  89. package/cli/selftune/registry/index.ts +90 -0
  90. package/cli/selftune/registry/install.ts +141 -0
  91. package/cli/selftune/registry/list.ts +44 -0
  92. package/cli/selftune/registry/push.ts +171 -0
  93. package/cli/selftune/registry/rollback.ts +49 -0
  94. package/cli/selftune/registry/status.ts +62 -0
  95. package/cli/selftune/registry/sync.ts +125 -0
  96. package/cli/selftune/repair/skill-usage.ts +9 -3
  97. package/cli/selftune/routes/overview.ts +5 -2
  98. package/cli/selftune/routes/skill-report.ts +15 -2
  99. package/cli/selftune/schedule.ts +5 -5
  100. package/cli/selftune/status.ts +70 -2
  101. package/cli/selftune/sync.ts +127 -23
  102. package/cli/selftune/testing-readiness.ts +597 -0
  103. package/cli/selftune/types.ts +46 -5
  104. package/cli/selftune/uninstall.ts +2 -1
  105. package/cli/selftune/utils/canonical-log.ts +1 -9
  106. package/cli/selftune/utils/cli-error.ts +9 -0
  107. package/cli/selftune/utils/jsonl.ts +1 -30
  108. package/cli/selftune/utils/llm-call.ts +126 -6
  109. package/cli/selftune/utils/skill-discovery.ts +24 -0
  110. package/cli/selftune/workflows/proposals.ts +184 -0
  111. package/cli/selftune/workflows/skill-scaffold.ts +241 -0
  112. package/cli/selftune/workflows/workflows.ts +100 -26
  113. package/node_modules/@selftune/telemetry-contract/fixtures/complete-push.ts +1 -1
  114. package/node_modules/@selftune/telemetry-contract/fixtures/evidence-only-push.ts +2 -2
  115. package/node_modules/@selftune/telemetry-contract/fixtures/golden.test.ts +0 -1
  116. package/node_modules/@selftune/telemetry-contract/fixtures/partial-push-no-sessions.ts +1 -1
  117. package/node_modules/@selftune/telemetry-contract/fixtures/partial-push-unresolved-parents.ts +2 -2
  118. package/node_modules/@selftune/telemetry-contract/package.json +1 -1
  119. package/node_modules/@selftune/telemetry-contract/src/index.ts +1 -0
  120. package/node_modules/@selftune/telemetry-contract/src/schemas.ts +63 -5
  121. package/node_modules/@selftune/telemetry-contract/src/types.ts +97 -7
  122. package/node_modules/@selftune/telemetry-contract/tests/compatibility.test.ts +0 -1
  123. package/package.json +25 -9
  124. package/packages/dashboard-core/AGENTS.md +18 -0
  125. package/packages/dashboard-core/README.md +30 -0
  126. package/packages/dashboard-core/index.ts +3 -0
  127. package/packages/dashboard-core/package.json +39 -0
  128. package/packages/dashboard-core/src/chrome/DashboardChrome.tsx +74 -0
  129. package/packages/dashboard-core/src/chrome/DashboardHeader.tsx +200 -0
  130. package/packages/dashboard-core/src/chrome/DashboardSidebar.tsx +219 -0
  131. package/packages/dashboard-core/src/chrome/RuntimeBadge.tsx +46 -0
  132. package/packages/dashboard-core/src/chrome/index.ts +14 -0
  133. package/packages/dashboard-core/src/chrome/types.ts +81 -0
  134. package/packages/dashboard-core/src/chrome/utils.ts +23 -0
  135. package/packages/dashboard-core/src/gates/FeatureGate.tsx +11 -0
  136. package/packages/dashboard-core/src/gates/LockedRoute.tsx +29 -0
  137. package/packages/dashboard-core/src/gates/UpgradeCard.tsx +89 -0
  138. package/packages/dashboard-core/src/gates/index.ts +3 -0
  139. package/packages/dashboard-core/src/host/DashboardHostProvider.tsx +62 -0
  140. package/packages/dashboard-core/src/host/adapter.ts +47 -0
  141. package/packages/dashboard-core/src/host/capabilities.ts +55 -0
  142. package/packages/dashboard-core/src/host/index.ts +3 -0
  143. package/packages/dashboard-core/src/models/analytics.ts +39 -0
  144. package/packages/dashboard-core/src/models/index.ts +4 -0
  145. package/packages/dashboard-core/src/models/overview.ts +98 -0
  146. package/packages/dashboard-core/src/models/runtime.ts +7 -0
  147. package/packages/dashboard-core/src/models/skills.ts +34 -0
  148. package/packages/dashboard-core/src/routes/index.ts +2 -0
  149. package/packages/dashboard-core/src/routes/manifest.test.ts +70 -0
  150. package/packages/dashboard-core/src/routes/manifest.ts +451 -0
  151. package/packages/dashboard-core/src/routes/types.ts +39 -0
  152. package/packages/dashboard-core/src/screens/analytics/AnalyticsScreen.tsx +278 -0
  153. package/packages/dashboard-core/src/screens/analytics/index.ts +1 -0
  154. package/packages/dashboard-core/src/screens/index.ts +37 -0
  155. package/packages/dashboard-core/src/screens/overview/OverviewComparisonSurface.test.ts +101 -0
  156. package/packages/dashboard-core/src/screens/overview/OverviewComparisonSurface.tsx +393 -0
  157. package/packages/dashboard-core/src/screens/overview/OverviewCompositionSurface.test.tsx +113 -0
  158. package/packages/dashboard-core/src/screens/overview/OverviewCompositionSurface.tsx +72 -0
  159. package/packages/dashboard-core/src/screens/overview/OverviewCoreSurface.tsx +71 -0
  160. package/packages/dashboard-core/src/screens/overview/OverviewOnboardingBanner.tsx +90 -0
  161. package/packages/dashboard-core/src/screens/overview/OverviewRunSummary.tsx +40 -0
  162. package/packages/dashboard-core/src/screens/overview/index.ts +16 -0
  163. package/packages/dashboard-core/src/screens/overview/types.ts +13 -0
  164. package/packages/dashboard-core/src/screens/skill-report/SkillReportDailyBreakdownSection.tsx +99 -0
  165. package/packages/dashboard-core/src/screens/skill-report/SkillReportDataQualityTabContent.tsx +35 -0
  166. package/packages/dashboard-core/src/screens/skill-report/SkillReportEvidenceRail.tsx +71 -0
  167. package/packages/dashboard-core/src/screens/skill-report/SkillReportEvidenceSection.tsx +63 -0
  168. package/packages/dashboard-core/src/screens/skill-report/SkillReportEvidenceTabContent.tsx +25 -0
  169. package/packages/dashboard-core/src/screens/skill-report/SkillReportInvocationsSection.tsx +24 -0
  170. package/packages/dashboard-core/src/screens/skill-report/SkillReportMissedQueriesSection.tsx +79 -0
  171. package/packages/dashboard-core/src/screens/skill-report/SkillReportScaffold.tsx +150 -0
  172. package/packages/dashboard-core/src/screens/skill-report/SkillReportSections.test.tsx +224 -0
  173. package/packages/dashboard-core/src/screens/skill-report/SkillReportTabs.test.tsx +76 -0
  174. package/packages/dashboard-core/src/screens/skill-report/SkillReportTabs.tsx +88 -0
  175. package/packages/dashboard-core/src/screens/skill-report/SkillReportTrendSection.tsx +33 -0
  176. package/packages/dashboard-core/src/screens/skill-report/SkillReportTrustBadge.tsx +67 -0
  177. package/packages/dashboard-core/src/screens/skill-report/index.ts +45 -0
  178. package/packages/dashboard-core/src/screens/skills/SkillsLibraryScreen.tsx +162 -0
  179. package/packages/dashboard-core/src/screens/skills/index.ts +6 -0
  180. package/packages/telemetry-contract/fixtures/complete-push.ts +1 -1
  181. package/packages/telemetry-contract/fixtures/evidence-only-push.ts +2 -2
  182. package/packages/telemetry-contract/fixtures/golden.test.ts +0 -1
  183. package/packages/telemetry-contract/fixtures/partial-push-no-sessions.ts +1 -1
  184. package/packages/telemetry-contract/fixtures/partial-push-unresolved-parents.ts +2 -2
  185. package/packages/telemetry-contract/package.json +1 -1
  186. package/packages/telemetry-contract/src/index.ts +1 -0
  187. package/packages/telemetry-contract/src/schemas.ts +63 -5
  188. package/packages/telemetry-contract/src/types.ts +97 -7
  189. package/packages/telemetry-contract/tests/compatibility.test.ts +0 -1
  190. package/packages/ui/AGENTS.md +16 -0
  191. package/packages/ui/README.md +1 -1
  192. package/packages/ui/package.json +1 -1
  193. package/packages/ui/src/components/ActivityTimeline.tsx +152 -168
  194. package/packages/ui/src/components/AnalyticsCharts.tsx +344 -0
  195. package/packages/ui/src/components/EvidenceViewer.tsx +229 -464
  196. package/packages/ui/src/components/EvolutionTimeline.tsx +34 -87
  197. package/packages/ui/src/components/InfoTip.tsx +1 -2
  198. package/packages/ui/src/components/InvocationsPanel.tsx +413 -0
  199. package/packages/ui/src/components/JobHistoryTimeline.tsx +156 -0
  200. package/packages/ui/src/components/OrchestrateRunsPanel.tsx +18 -36
  201. package/packages/ui/src/components/OverviewPanels.tsx +693 -0
  202. package/packages/ui/src/components/PipelineStatusBar.tsx +65 -0
  203. package/packages/ui/src/components/SkillReportGuide.tsx +215 -0
  204. package/packages/ui/src/components/SkillReportPanels.tsx +919 -0
  205. package/packages/ui/src/components/SkillsLibrary.tsx +437 -0
  206. package/packages/ui/src/components/index.ts +56 -1
  207. package/packages/ui/src/components/section-cards.tsx +18 -35
  208. package/packages/ui/src/components/skill-health-grid.tsx +47 -37
  209. package/packages/ui/src/lib/constants.tsx +0 -1
  210. package/packages/ui/src/primitives/card.tsx +1 -1
  211. package/packages/ui/src/primitives/checkbox.tsx +1 -1
  212. package/packages/ui/src/primitives/dropdown-menu.tsx +2 -2
  213. package/packages/ui/src/primitives/select.tsx +2 -2
  214. package/packages/ui/src/primitives/tabs.tsx +7 -6
  215. package/packages/ui/src/types.ts +182 -4
  216. package/skill/SKILL.md +130 -318
  217. package/skill/agents/diagnosis-analyst.md +3 -3
  218. package/skill/agents/evolution-reviewer.md +3 -3
  219. package/skill/agents/integration-guide.md +3 -3
  220. package/skill/agents/pattern-analyst.md +2 -2
  221. package/skill/references/cli-quick-reference.md +89 -0
  222. package/skill/references/creator-playbook.md +131 -0
  223. package/skill/references/examples.md +48 -0
  224. package/skill/references/troubleshooting.md +47 -0
  225. package/skill/references/version-history.md +1 -1
  226. package/skill/selftune.contribute.json +11 -0
  227. package/skill/{Workflows → workflows}/Baseline.md +20 -1
  228. package/skill/{Workflows → workflows}/Contribute.md +23 -10
  229. package/skill/{Workflows → workflows}/Contributions.md +13 -5
  230. package/skill/workflows/CreateTestDeploy.md +170 -0
  231. package/skill/{Workflows → workflows}/CreatorContributions.md +18 -6
  232. package/skill/{Workflows → workflows}/Cron.md +1 -1
  233. package/skill/{Workflows → workflows}/Dashboard.md +20 -0
  234. package/skill/{Workflows → workflows}/Doctor.md +1 -1
  235. package/skill/{Workflows → workflows}/Evals.md +67 -2
  236. package/skill/{Workflows → workflows}/Evolve.md +119 -30
  237. package/skill/{Workflows → workflows}/EvolveBody.md +41 -1
  238. package/skill/{Workflows → workflows}/Grade.md +1 -1
  239. package/skill/{Workflows → workflows}/Ingest.md +60 -2
  240. package/skill/{Workflows → workflows}/Initialize.md +16 -9
  241. package/skill/{Workflows → workflows}/Orchestrate.md +13 -3
  242. package/skill/{Workflows → workflows}/PlatformHooks.md +19 -3
  243. package/skill/workflows/Registry.md +99 -0
  244. package/skill/{Workflows → workflows}/Schedule.md +3 -3
  245. package/skill/workflows/SignalsDashboard.md +87 -0
  246. package/skill/{Workflows → workflows}/Sync.md +3 -1
  247. package/skill/{Workflows → workflows}/UnitTest.md +19 -0
  248. package/skill/{Workflows → workflows}/Watch.md +42 -2
  249. package/skill/{Workflows → workflows}/Workflows.md +39 -2
  250. package/apps/local-dashboard/dist/assets/index-D8O-RG1I.js +0 -60
  251. package/apps/local-dashboard/dist/assets/index-_EcLywDg.css +0 -1
  252. package/apps/local-dashboard/dist/assets/vendor-react-CKkiCskZ.js +0 -11
  253. package/apps/local-dashboard/dist/assets/vendor-ui-CGEmUayx.js +0 -12
  254. package/cli/selftune/utils/html.ts +0 -27
  255. package/packages/ui/src/components/RecentActivityFeed.tsx +0 -117
  256. /package/skill/{Workflows → workflows}/AlphaUpload.md +0 -0
  257. /package/skill/{Workflows → workflows}/AutoActivation.md +0 -0
  258. /package/skill/{Workflows → workflows}/Badge.md +0 -0
  259. /package/skill/{Workflows → workflows}/Composability.md +0 -0
  260. /package/skill/{Workflows → workflows}/EvolutionMemory.md +0 -0
  261. /package/skill/{Workflows → workflows}/ExportCanonical.md +0 -0
  262. /package/skill/{Workflows → workflows}/Hook.md +0 -0
  263. /package/skill/{Workflows → workflows}/ImportSkillsBench.md +0 -0
  264. /package/skill/{Workflows → workflows}/Quickstart.md +0 -0
  265. /package/skill/{Workflows → workflows}/Recover.md +0 -0
  266. /package/skill/{Workflows → workflows}/RepairSkillUsage.md +0 -0
  267. /package/skill/{Workflows → workflows}/Replay.md +0 -0
  268. /package/skill/{Workflows → workflows}/Rollback.md +0 -0
  269. /package/skill/{Workflows → workflows}/Telemetry.md +0 -0
  270. /package/skill/{Workflows → workflows}/Uninstall.md +0 -0
package/skill/SKILL.md CHANGED
@@ -4,50 +4,33 @@ description: >
4
4
  Self-improving skills toolkit that watches real agent sessions, detects missed
5
5
  triggers, grades execution quality, and evolves skill descriptions to match how
6
6
  users actually talk. Use when grading sessions, generating evals, evolving skill
7
- descriptions or routing tables, checking skill health, viewing the dashboard,
8
- ingesting sessions from other platforms, or running autonomous improvement loops.
7
+ descriptions or routing tables, discovering reusable workflows, scaffolding new
8
+ workflow skills, checking skill health, viewing the dashboard, ingesting sessions
9
+ from other platforms, or running autonomous improvement loops.
9
10
  Make sure to use this skill whenever the user mentions skill improvement, skill
10
11
  performance, skill triggers, skill evolution, skill health, undertriggering,
11
12
  overtriggering, session grading, or wants to know how their skills are doing —
12
13
  even if they don't say "selftune" explicitly.
13
14
  metadata:
14
15
  author: selftune-dev
15
- version: 0.2.10
16
+ version: 0.2.24
16
17
  category: developer-tools
17
18
  ---
18
19
 
19
20
  # selftune
20
21
 
21
22
  Observe real agent sessions, detect missed triggers, grade execution quality,
22
- and evolve skill descriptions toward the language real users actually use.
23
+ evolve skill descriptions toward the language real users actually use, and
24
+ scaffold workflow skills from repeated telemetry patterns.
23
25
 
24
26
  **You are the operator.** The user installed this skill so YOU can manage their
25
27
  skill health autonomously. They will say things like "set up selftune",
26
28
  "improve my skills", or "how are my skills doing?" — and you route to the
27
29
  correct workflow below. The user does not run CLI commands directly; you do.
28
30
 
29
- ## Why this matters
30
-
31
- Skills are only useful when they trigger at the right time with the right
32
- instructions. But user language drifts — the phrases people use to ask for help
33
- rarely match the trigger keywords a skill author imagined. selftune closes this
34
- gap by observing real sessions, finding where skills fail to activate or
35
- execute poorly, and rewriting descriptions to match actual usage patterns. The
36
- result: skills that get better over time without manual tuning.
37
-
38
- ## Communicating with the user
39
-
40
- Users range from experienced developers who'll say "evolve the pptx description
41
- using the latest eval set" to non-technical users who'll say "make my skills
42
- better". Pay attention to context cues:
43
-
44
- - If they use terms like "eval set", "routing table", "JSONL" — match their precision
45
- - If they say "improve my skills" or "how's it going" — explain what you're doing in plain language, summarize results, and suggest next steps
46
- - When in doubt, briefly explain what a command does before running it
47
-
48
31
  ## Bootstrap
49
32
 
50
- If `~/.selftune/config.json` does not exist, read `Workflows/Initialize.md`
33
+ If `~/.selftune/config.json` does not exist, read `workflows/Initialize.md`
51
34
  first. The CLI must be installed (`selftune` on PATH) before other commands
52
35
  will work. Do not proceed with other commands until initialization is complete.
53
36
 
@@ -57,130 +40,82 @@ will work. Do not proceed with other commands until initialization is complete.
57
40
  selftune <command> [options]
58
41
  ```
59
42
 
60
- Commands vary in output format. `selftune orchestrate`, `selftune watch`, and
61
- `selftune evolve --dry-run` emit structured JSON on stdout. `selftune status`,
62
- `selftune last`, and `selftune doctor` print human-readable text or structured
63
- JSON depending on the command. For alpha/bootstrap and health remediation, prefer
64
- machine-readable `guidance.next_command` or top-level `next_command` when present
65
- instead of inferring the next step from prose. `selftune dashboard` starts a
66
- local SPA server — it does not emit data.
43
+ Commands vary in output format:
67
44
 
68
- ## Quick Reference
45
+ - **JSON by default:** `selftune doctor` and `selftune watch` emit structured JSON on stdout.
46
+ - **Text by default:** `selftune status`, `selftune last`, `selftune orchestrate`, and `selftune evolve` print human-readable text.
47
+ - **JSON opt-in:** `selftune sync --json` enables structured JSON output.
48
+ - **Server:** `selftune dashboard` starts a local SPA server — it does not emit data.
69
49
 
70
- ```bash
71
- # Ingest group
72
- selftune ingest claude [--since DATE] [--dry-run] [--force] [--verbose]
73
- selftune ingest codex # (experimental)
74
- selftune ingest opencode # (experimental)
75
- selftune ingest openclaw [--agents-dir PATH] [--since DATE] [--dry-run] [--force] [--verbose] # (experimental)
76
- selftune ingest wrap-codex -- <codex args> # (experimental)
77
-
78
- # Grade group
79
- selftune grade auto --skill <name> [--expectations "..."] [--agent <name>]
80
- selftune grade baseline --skill <name> --skill-path <path> [--eval-set <path>] [--agent <name>]
81
-
82
- # Evolve group
83
- selftune evolve --skill <name> --skill-path <path> [--dry-run]
84
- selftune evolve body --skill <name> --skill-path <path> --target <body|routing> [--dry-run]
85
- selftune evolve rollback --skill <name> --skill-path <path> [--proposal-id <id>]
86
-
87
- # Eval group
88
- selftune eval generate --skill <name> [--list-skills] [--stats] [--max N] [--seed N] [--output PATH]
89
- selftune eval unit-test --skill <name> --tests <path> [--run-agent] [--generate]
90
- selftune eval import --dir <path> --skill <name> --output <path> [--match-strategy exact|fuzzy]
91
- selftune eval composability --skill <name> [--window N] [--telemetry-log <path>]
92
- selftune eval family-overlap --prefix <family-> | --skills <a,b,c> [--parent-skill <name>] [--min-overlap 0.3] [--min-shared 2]
93
-
94
- # Other commands
95
- selftune watch --skill <name> --skill-path <path> [--auto-rollback]
96
- selftune status
97
- selftune last
98
- selftune doctor
99
- selftune dashboard [--port <port>] [--no-open]
100
- selftune contributions [status|preview <skill>|upload [--dry-run]|approve <skill>|revoke <skill>|default <ask|always|never>|reset]
101
- selftune creator-contributions [status|enable --skill <name>|enable --all [--prefix <value>]|disable --skill <name>]
102
- selftune contribute [--skill NAME] [--preview] [--sanitize LEVEL] [--submit]
103
- selftune cron setup [--dry-run] # auto-detect platform (cron/launchd/systemd)
104
- selftune cron setup --platform openclaw [--dry-run] [--tz <timezone>] # OpenClaw-specific
105
- selftune cron list
106
- selftune cron remove [--dry-run]
107
- selftune telemetry [status|enable|disable]
108
- selftune export [TABLE...] [--output/-o DIR] [--since DATE]
109
-
110
- # Autonomous loop
111
- selftune orchestrate [--dry-run] [--review-required] [--auto-approve] [--skill NAME] [--max-skills N] [--recent-window HOURS] [--sync-force] [--max-auto-grade N] [--loop] [--loop-interval SECS]
112
- selftune sync [--since DATE] [--dry-run] [--force] [--no-claude] [--no-codex] [--no-opencode] [--no-openclaw] [--no-repair] [--json]
113
-
114
- # Discovery + badges
115
- selftune workflows [--skill NAME] [--skill-path PATH] [--min-occurrences N] [--window N] [--json] [save --skill NAME --skill-path PATH]
116
- selftune badge --skill <name> [--format svg|markdown|url] [--output PATH]
117
-
118
- # Maintenance
119
- selftune quickstart
120
- selftune repair-skill-usage [--since DATE] [--dry-run]
121
- selftune recover [--full] [--force] [--since DATE]
122
- selftune export-canonical [--out FILE] [--platform NAME] [--record-kind KIND] [--pretty] [--push-payload]
123
- selftune uninstall [--dry-run] [--keep-logs] [--npm-uninstall]
124
-
125
- # Hook dispatch (for debugging/manual invocation)
126
- selftune hook <name> # prompt-log | session-stop | skill-eval | auto-activate | skill-change-guard | evolution-guard
127
-
128
- # Platform hooks (non-Claude-Code agents)
129
- selftune codex hook
130
- selftune codex install [--dry-run] [--uninstall]
131
- selftune opencode hook
132
- selftune opencode install [--dry-run] [--uninstall]
133
- selftune cline hook
134
- selftune cline install [--dry-run] [--uninstall]
135
-
136
- # Alpha enrollment (device-code flow — browser opens automatically)
137
- selftune init --alpha --alpha-email <email>
138
- selftune alpha upload [--dry-run]
139
- selftune alpha relink
140
- selftune status # shows cloud link state + upload readiness
141
- ```
50
+ For health remediation, prefer machine-readable `guidance.next_command` or
51
+ top-level `next_command` from `selftune doctor` output instead of inferring the
52
+ next step from prose.
53
+
54
+ Run `selftune <command> --help` for exact flags. Read
55
+ `references/cli-quick-reference.md` when you need the full flag reference.
56
+
57
+ ## Creator Trust Loop
58
+
59
+ When the user wants to improve a skill, default to this creator loop before
60
+ jumping straight to mutation:
61
+
62
+ 1. `selftune eval generate --skill <name> --skill-path <path>`
63
+ 2. `selftune eval unit-test --skill <name> --generate --skill-path <path>`
64
+ 3. `selftune evolve --skill <name> --skill-path <path> --dry-run --validation-mode replay`
65
+ 4. `selftune grade baseline --skill <name> --skill-path <path>`
66
+ 5. `selftune evolve --skill <name> --skill-path <path> --with-baseline`
67
+ 6. then `selftune watch --skill <name>`
68
+
69
+ If the user asks "how do I know this skill works?" or "can I trust this skill
70
+ yet?", start with this loop, then use `selftune status`, the dashboard, or the
71
+ skill report to explain what is still missing, whether the skill is ready to
72
+ deploy, or whether it is already being watched live.
142
73
 
143
74
  ## Workflow Routing
144
75
 
145
- | Trigger keywords | Workflow | File |
146
- | --------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------- |
147
- | grade, score, evaluate, assess session, auto-grade | Grade | Workflows/Grade.md |
148
- | evals, eval set, undertriggering, skill stats, eval generate | Evals | Workflows/Evals.md |
149
- | evolve, improve, optimize skills, make skills better, triggers, catch more queries | Evolve | Workflows/Evolve.md |
150
- | evolve body, evolve routing, full body evolution, rewrite skill, teacher student | EvolveBody | Workflows/EvolveBody.md |
151
- | evolve rollback, undo, restore, revert evolution, go back, undo last change | Rollback | Workflows/Rollback.md |
152
- | watch, monitor, regression, post-deploy, keep an eye on | Watch | Workflows/Watch.md |
153
- | doctor, health, hooks, broken, diagnose, not working, something wrong | Doctor | Workflows/Doctor.md |
154
- | ingest, import, codex logs, opencode, openclaw, wrap codex | Ingest | Workflows/Ingest.md |
155
- | replay, backfill, claude transcripts, historical sessions | Replay | Workflows/Replay.md |
156
- | contributions, sharing preferences, opt in creator sharing, opt out creator sharing, approve contributions, revoke contributions, preview contributions, upload contributions, relay queue, contribution upload, contribution preview | Contributions | Workflows/Contributions.md |
157
- | creator contributions, bundle contribution config, selftune.contribute.json, enable creator contribution, disable creator contribution, bulk enable creator contribution, enable all creator contributions, creator prefix config, --all, --prefix | CreatorContributions | Workflows/CreatorContributions.md |
158
- | contribute, share, community, export data, anonymized, give back | Contribute | Workflows/Contribute.md |
159
- | init, setup, set up, bootstrap, first time, install, configure selftune, alpha, enroll, alpha enrollment, cloud link, upload credential | Initialize | Workflows/Initialize.md |
160
- | cron, schedule, automate evolution, run automatically | Cron | Workflows/Cron.md |
161
- | auto-activate, suggestions, activation rules, nag, why suggest | AutoActivation | Workflows/AutoActivation.md |
162
- | dashboard, visual, open dashboard, show dashboard, serve dashboard, live dashboard | Dashboard | Workflows/Dashboard.md |
163
- | evolution memory, session continuity, what happened last | EvolutionMemory | Workflows/EvolutionMemory.md |
164
- | grade baseline, baseline lift, adds value, skill value, no-skill comparison | Baseline | Workflows/Baseline.md |
165
- | eval unit-test, skill test, test skill, generate tests, run tests | UnitTest | Workflows/UnitTest.md |
166
- | eval composability, co-occurrence, skill conflicts, skills together, family overlap, sibling confusion, consolidate skill family | Composability | Workflows/Composability.md |
167
- | eval import, skillsbench, external evals, benchmark tasks | ImportSkillsBench | Workflows/ImportSkillsBench.md |
168
- | telemetry, analytics, disable analytics, opt out, tracking, privacy | Telemetry | Workflows/Telemetry.md |
169
- | orchestrate, autonomous, full loop, improve all skills, run selftune loop | Orchestrate | Workflows/Orchestrate.md |
170
- | sync, refresh, source truth, rescan sessions | Sync | Workflows/Sync.md |
171
- | badge, readme badge, skill badge, health badge | Badge | Workflows/Badge.md |
172
- | workflows, discover workflows, list workflows, multi-skill workflows | Workflows | Workflows/Workflows.md |
173
- | alpha upload, upload data, send alpha data, manual upload, dry run upload | AlphaUpload | Workflows/AlphaUpload.md |
174
- | recover, rebuild sqlite, recover db, legacy backfill, restore from export snapshot | Recover | Workflows/Recover.md |
175
- | quickstart, getting started, onboard, first time setup, new user | Quickstart | Workflows/Quickstart.md |
176
- | uninstall, remove selftune, clean up, teardown | Uninstall | Workflows/Uninstall.md |
177
- | repair, rebuild usage, fix skill usage, trustworthy usage, repair-skill-usage | RepairSkillUsage | Workflows/RepairSkillUsage.md |
178
- | export canonical, canonical export, canonical telemetry, push payload | ExportCanonical | Workflows/ExportCanonical.md |
179
- | hook, run hook, invoke hook, manual hook, debug hook | Hook | Workflows/Hook.md |
180
- | codex hooks, codex install, codex setup, opencode hooks, opencode install, opencode setup, cline hooks, cline install, cline setup, multi-platform, platform hooks, non-claude hooks, multiple agents, multi-agent | PlatformHooks | Workflows/PlatformHooks.md |
181
- | export, dump, jsonl, export sqlite, debug export | Export | _(direct command no workflow file)_ |
182
- | status, health summary, skill health, how are skills, skills doing, run selftune | Status | _(direct command — no workflow file)_ |
183
- | last, last session, recent session, what happened, what changed | Last | _(direct command — no workflow file)_ |
76
+ | Trigger keywords | Workflow | File |
77
+ | --- | --- | --- |
78
+ | create test deploy, creator loop, ship skill, ready to deploy, can I trust this skill, how do I know this skill works | CreateTestDeploy | workflows/CreateTestDeploy.md |
79
+ | grade, score, evaluate, assess session, auto-grade | Grade | workflows/Grade.md |
80
+ | evals, eval set, undertriggering, skill stats, eval generate | Evals | workflows/Evals.md |
81
+ | evolve, improve, optimize skills, make skills better, triggers, catch more queries, apply proposal, apply contributor proposal | Evolve | workflows/Evolve.md |
82
+ | evolve body, evolve routing, full body evolution, rewrite skill, teacher student | EvolveBody | workflows/EvolveBody.md |
83
+ | evolve rollback, undo, restore, revert evolution, go back, undo last change | Rollback | workflows/Rollback.md |
84
+ | watch, monitor, regression, post-deploy, keep an eye on | Watch | workflows/Watch.md |
85
+ | doctor, health, hooks, broken, diagnose, not working, something wrong | Doctor | workflows/Doctor.md |
86
+ | ingest, import, codex logs, opencode, openclaw, pi, wrap codex | Ingest | workflows/Ingest.md |
87
+ | replay, backfill, claude transcripts, historical sessions | Replay | workflows/Replay.md |
88
+ | contributions, sharing preferences, opt in/out creator sharing, approve/revoke contributions | Contributions | workflows/Contributions.md |
89
+ | creator contributions, selftune.contribute.json, enable/disable creator contribution | CreatorContributions | workflows/CreatorContributions.md |
90
+ | signals dashboard, contributor signals, signals page, community dashboard, community data, contributor stats, signal health, how are signals, how is community | SignalsDashboard | workflows/SignalsDashboard.md |
91
+ | contribute, share, export bundle, export data, anonymized, give back | Contribute | workflows/Contribute.md |
92
+ | init, setup, set up, bootstrap, first time, install, configure selftune, alpha, enroll | Initialize | workflows/Initialize.md |
93
+ | cron, schedule, automate evolution, run automatically | Cron | workflows/Cron.md |
94
+ | schedule, selftune schedule, launchd, systemd, crontab, automation setup | Schedule | workflows/Schedule.md |
95
+ | auto-activate, suggestions, activation rules, nag, why suggest | AutoActivation | workflows/AutoActivation.md |
96
+ | dashboard, visual, open dashboard, show dashboard, serve dashboard | Dashboard | workflows/Dashboard.md |
97
+ | evolution memory, session continuity, what happened last | EvolutionMemory | workflows/EvolutionMemory.md |
98
+ | grade baseline, baseline lift, adds value, skill value, no-skill comparison | Baseline | workflows/Baseline.md |
99
+ | eval unit-test, skill test, test skill, generate tests, run tests | UnitTest | workflows/UnitTest.md |
100
+ | eval composability, co-occurrence, skill conflicts, family overlap, sibling confusion | Composability | workflows/Composability.md |
101
+ | eval import, skillsbench, external evals, benchmark tasks | ImportSkillsBench | workflows/ImportSkillsBench.md |
102
+ | telemetry, analytics, disable analytics, opt out, tracking, privacy | Telemetry | workflows/Telemetry.md |
103
+ | orchestrate, autonomous, full loop, improve all skills, run selftune loop | Orchestrate | workflows/Orchestrate.md |
104
+ | sync, refresh, source truth, rescan sessions | Sync | workflows/Sync.md |
105
+ | badge, readme badge, skill badge, health badge | Badge | workflows/Badge.md |
106
+ | workflows, discover workflows, scaffold workflow skill, build skill from logs | Workflows | workflows/Workflows.md |
107
+ | alpha upload, upload data, send alpha data, manual upload | AlphaUpload | workflows/AlphaUpload.md |
108
+ | recover, rebuild sqlite, recover db, legacy backfill | Recover | workflows/Recover.md |
109
+ | quickstart, getting started, onboard, first time setup, new user | Quickstart | workflows/Quickstart.md |
110
+ | uninstall, remove selftune, clean up, teardown | Uninstall | workflows/Uninstall.md |
111
+ | repair, rebuild usage, fix skill usage, trustworthy usage | RepairSkillUsage | workflows/RepairSkillUsage.md |
112
+ | export canonical, canonical export, canonical telemetry, push payload | ExportCanonical | workflows/ExportCanonical.md |
113
+ | hook, run hook, invoke hook, manual hook, debug hook | Hook | workflows/Hook.md |
114
+ | codex/opencode/cline/pi hooks, platform hooks, non-claude hooks, multi-agent | PlatformHooks | workflows/PlatformHooks.md |
115
+ | registry, distribute, push/install/sync/rollback skill, team skills | Registry | workflows/Registry.md |
116
+ | export, dump, jsonl, export sqlite, debug export | Export | _(direct: `selftune export`)_ |
117
+ | status, health summary, skill health, how are skills, run selftune | Status | _(direct: `selftune status`)_ |
118
+ | last, last session, recent session, what happened | Last | _(direct: `selftune last`)_ |
184
119
 
185
120
  Workflows Grade, Evolve, Watch, and Ingest also run autonomously via `selftune orchestrate`.
186
121
 
@@ -190,187 +125,64 @@ Before running mutating workflows (evolve, evolve-body, evals, baseline), consul
190
125
  `references/interactive-config.md` for the pre-flight configuration pattern, model
191
126
  tier reference, and quick-path rules.
192
127
 
193
- ## The Feedback Loop
194
-
195
- The core idea: observe how users actually talk, find where skills miss, propose
196
- better descriptions, validate them, and deploy — with automatic rollback if things
197
- get worse. Every step produces evidence so you can explain _why_ a change was made.
198
-
199
- ```text
200
- Observe --> Detect --> Diagnose --> Propose --> Validate --> Audit --> Deploy --> Watch --> Rollback
201
- | |
202
- +--------------------------------------------------------------------+
203
- ```
204
-
205
- 1. **Observe** — Hooks capture every session (queries, triggers, metrics)
206
- 2. **Detect** — `selftune eval generate` extracts missed-trigger patterns
207
- 3. **Diagnose** — `selftune grade` evaluates session quality with evidence
208
- 4. **Propose** — `selftune evolve` generates description improvements
209
- 5. **Validate** — Evolution is tested against the eval set before deploying
210
- 6. **Audit** — Persist proposal, evidence, and decision metadata for traceability
211
- 7. **Deploy** — Updated description replaces the original (backup kept)
212
- 8. **Watch** — `selftune watch` monitors for regressions post-deploy
213
- 9. **Rollback** — `selftune evolve rollback` restores previous version if needed
214
-
215
128
  ## Specialized Agents
216
129
 
217
- selftune bundles focused agents in `agents/`. When you need deeper analysis,
218
- read the relevant agent file and follow its instructions — either inline or
219
- by spawning a subagent with those instructions as its prompt.
220
-
221
- On Claude Code, `selftune init` also syncs compatibility copies into
222
- `~/.claude/agents/` so native `--agent <name>` calls keep matching these
223
- bundled definitions.
224
-
225
- Treat these as worker-style subagents:
226
-
227
- - pass the required inputs from the parent agent
228
- - expect a structured report back
229
- - do not have them question the user directly unless you explicitly want that
230
-
231
- | Trigger keywords | Agent file | When to use |
232
- | ---------------------------------------------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
233
- | diagnose, root cause, why failing, debug performance | `agents/diagnosis-analyst.md` | When one skill has recurring low grades, regressions, or unclear failures after basic doctor/status review |
234
- | patterns, conflicts, cross-skill, overlap, optimize skills | `agents/pattern-analyst.md` | When multiple skills may overlap, misroute, or interfere, especially after composability flags conflict |
235
- | review evolution, check proposal, safe to deploy | `agents/evolution-reviewer.md` | Before deploying a dry-run or pending proposal, especially for high-stakes skills or marginal improvements |
236
- | set up selftune, integrate, configure project | `agents/integration-guide.md` | For complex setup and verification work in monorepos, multi-skill repos, or mixed-platform environments |
237
-
238
- ## Examples
239
-
240
- ### Scenario 1: First-time setup
241
-
242
- User says: "Set up selftune" or "Install selftune"
243
-
244
- Actions:
245
-
246
- 1. Read `Workflows/Initialize.md`
247
- 2. Run `selftune init` to bootstrap config (hooks are installed automatically)
248
- 3. Run `selftune doctor` to verify
249
-
250
- Result: Config at `~/.selftune/config.json`, hooks active, ready for session capture.
251
-
252
- ### Scenario 2: Improve a skill
253
-
254
- User says: "Make the pptx skill catch more queries" or "Evolve the Research skill"
255
-
256
- Actions:
257
-
258
- 1. `selftune eval generate --skill pptx` to find missed triggers
259
- 2. `selftune evolve --skill pptx --skill-path <path>` to propose changes
260
- 3. `selftune watch --skill pptx --skill-path <path>` to monitor post-deploy
261
-
262
- Result: Skill description updated to match real user language, with rollback available.
263
-
264
- ### Scenario 3: Check skill health
265
-
266
- User says: "How are my skills doing?" or "Run selftune"
267
-
268
- Actions:
269
-
270
- 1. `selftune status` for overall health summary
271
- 2. `selftune last` for most recent session insight
272
- 3. `selftune doctor` if issues detected
273
-
274
- Result: Pass rates, trend data, and actionable recommendations.
275
-
276
- ### Scenario 4: Autonomous operation
277
-
278
- User says: "Set up cron jobs" or "Run selftune automatically"
279
-
280
- Actions:
281
-
282
- 1. `selftune cron setup` to install OS-level scheduling
283
- 2. Orchestrate loop runs: ingest → grade → evolve → watch
284
-
285
- Result: Skills improve continuously without manual intervention.
286
-
287
- ## Troubleshooting
288
-
289
- ### CLI not found
290
-
291
- Error: `command not found: selftune`
292
-
293
- Cause: CLI not installed or not on PATH.
294
-
295
- Solution:
296
-
297
- 1. Run `npm install -g selftune` or check `bin/selftune.cjs` exists
298
- 2. Verify with `which selftune`
299
- 3. If using bun: `bun link` in the repo root
300
-
301
- ### No sessions to grade
302
-
303
- Error: `selftune grade` returns empty results.
304
-
305
- Cause: Hooks not capturing sessions, or no sessions since last ingest.
306
-
307
- Solution:
308
-
309
- 1. Run `selftune doctor` to verify hook installation
310
- 2. Run `selftune ingest claude --force` to re-ingest
311
- 3. Check `~/.claude/` for telemetry JSONL files
312
-
313
- ### Evolution proposes no changes
314
-
315
- Cause: Eval set too small or skill already well-tuned.
316
-
317
- Solution:
318
-
319
- 1. Run `selftune eval generate --skill <name> --max 50` for a larger eval set
320
- 2. Check `selftune status` — if pass rate is >90%, evolution may not be needed
321
- 3. Try `selftune evolve body` for deeper structural changes
322
-
323
- ### Dashboard won't serve
324
-
325
- Error: Port already in use or blank page.
326
-
327
- Solution:
130
+ selftune bundles focused agents in `agents/`. Read the relevant agent file and
131
+ follow its instructions — either inline or by spawning a subagent.
328
132
 
329
- 1. Try a different port: `selftune dashboard --port 3142`
330
- 2. Check if another process holds the port: `lsof -i :3141`
331
- 3. Use `--no-open` to start the server without opening a browser
133
+ | Trigger keywords | Agent file | When to use |
134
+ | --- | --- | --- |
135
+ | diagnose, root cause, why failing, debug performance | `agents/diagnosis-analyst.md` | Recurring low grades or unclear failures after doctor/status |
136
+ | patterns, conflicts, cross-skill, overlap | `agents/pattern-analyst.md` | Skills overlap, misroute, or interfere |
137
+ | review evolution, check proposal, safe to deploy | `agents/evolution-reviewer.md` | Before deploying high-stakes or marginal evolutions |
138
+ | set up selftune, integrate, configure project | `agents/integration-guide.md` | Complex setup: monorepos, multi-skill, mixed-platform |
332
139
 
333
140
  ## Negative Examples
334
141
 
335
- These should NOT trigger selftune — note that several are near-misses that
336
- share keywords but need different solutions:
142
+ These should NOT trigger selftune — near-misses that share keywords:
337
143
 
338
144
  - "Fix this React hydration bug" — general debugging, not skill improvement
339
- - "Create a PowerPoint about Q3 results" — this is pptx skill, not selftune
340
- - "Run my unit tests" — project tests, not skill eval tests (even though selftune has "eval unit-test", this is about _project_ tests)
341
- - "How do I use the Research skill?" — skill _usage_, not skill _improvement_ (route to the Research skill itself)
145
+ - "Create a PowerPoint about Q3 results" — pptx skill, not selftune
146
+ - "Run my unit tests" — project tests, not skill eval tests
147
+ - "How do I use the Research skill?" — skill _usage_, not _improvement_
342
148
  - "Generate a report from this data" — content generation, not skill evolution
343
- - "My build is failing" — project issue, not selftune health issue (even though "failing" overlaps with skill diagnostics language)
344
- - "Evaluate this code for security issues" — "evaluate" here means code review, not session grading
345
- - "Improve this function's performance" — code optimization, not skill optimization (even though "improve" and "performance" are selftune keywords)
346
-
347
- The key distinction: selftune is about improving _skills themselves_ (their
348
- descriptions, triggers, and execution quality). If the user is trying to
349
- accomplish a task _using_ a skill, route to that skill instead.
350
-
351
- ## Resource Index
352
-
353
- | Resource | Purpose | When to read |
354
- | ----------------------------------- | --------------------------------------------------- | ----------------------------------------------- |
355
- | `SKILL.md` | This file routing, triggers, quick reference | Always loaded |
356
- | `Workflows/*.md` | Step-by-step instructions for each workflow | When routing to a workflow |
357
- | `agents/diagnosis-analyst.md` | Deep-dive skill failure analysis | Spawn when doctor/grades show persistent issues |
358
- | `agents/pattern-analyst.md` | Cross-skill conflict detection | Spawn when composability flags conflicts |
359
- | `agents/evolution-reviewer.md` | Safety gate for evolution proposals | Spawn before deploying high-stakes evolutions |
360
- | `agents/integration-guide.md` | Guided setup for complex projects | Spawn for monorepos, multi-skill setups |
361
- | `Workflows/Quickstart.md` | Guided onboarding: init, ingest, status | First-time setup for new users |
362
- | `Workflows/Uninstall.md` | Clean removal of selftune data and config | When removing selftune completely |
363
- | `Workflows/RepairSkillUsage.md` | Rebuild skill usage from source transcripts | When skill usage data seems inaccurate |
364
- | `Workflows/Recover.md` | Recover SQLite from legacy/exported JSONL | When rebuilding or backfilling SQLite |
365
- | `Workflows/Contributions.md` | Manage creator-directed sharing preferences | When approving or revoking creator contribution |
366
- | `Workflows/CreatorContributions.md` | Manage bundled `selftune.contribute.json` configs | When preparing a skill package for creator contributions |
367
- | `Workflows/ExportCanonical.md` | Export canonical telemetry for downstream use | When exporting data for external consumption |
368
- | `Workflows/Hook.md` | Manual hook invocation for debugging | When debugging or testing hooks manually |
369
- | `Workflows/PlatformHooks.md` | Non-Claude-Code platform hook install/config | When setting up Codex, OpenCode, or Cline hooks |
370
- | `references/logs.md` | Log file formats (telemetry, usage, queries, audit) | When parsing or debugging log files |
371
- | `references/grading-methodology.md` | 3-tier grading model, evidence standards | When grading sessions or interpreting grades |
372
- | `references/invocation-taxonomy.md` | 4 invocation types, coverage analysis | When analyzing trigger coverage |
373
- | `references/interactive-config.md` | Pre-flight config pattern, model tiers | Before running mutating workflows |
374
- | `references/setup-patterns.md` | Platform-specific setup patterns | During complex setup scenarios |
375
- | `settings_snippet.json` | Claude Code hook configuration template | During initialization |
376
- | `assets/*.json` | Config templates (activation rules, settings) | During initialization |
149
+ - "My build is failing" — project issue, not selftune health
150
+ - "Evaluate this code for security issues" — code review, not session grading
151
+ - "Improve this function's performance" — code optimization, not skill optimization
152
+
153
+ The key distinction: selftune improves _skills themselves_ (descriptions, triggers,
154
+ execution quality). If the user wants to _use_ a skill, route to that skill instead.
155
+
156
+ ## Creator-Directed Contribution
157
+
158
+ This skill ships a `selftune.contribute.json` config that enables creator-directed
159
+ signal relay. When users install selftune and approve contribution, anonymous
160
+ usage signals (trigger, grade, miss_category) are relayed to the selftune
161
+ creator to improve the skill for everyone.
162
+
163
+ - The `creator_id` in the bundled config is the selftune creator's cloud user UUID.
164
+ - Users opt in via `selftune contributions approve selftune`.
165
+ - No raw session content is ever shared -- only privacy-safe aggregate signals.
166
+ - See `workflows/CreatorContributions.md` for creator-side setup.
167
+ - See `workflows/Contributions.md` for end-user opt-in/opt-out.
168
+
169
+ Routing keywords: creator contribution, selftune signals, dogfood relay,
170
+ community contribution, signal sharing, opt in creator, creator UUID.
171
+
172
+ ## Additional References
173
+
174
+ Load these on demand do not read unless needed for the current task:
175
+
176
+ | Reference | When to read |
177
+ | --- | --- |
178
+ | `references/cli-quick-reference.md` | Need exact CLI flags beyond `--help` |
179
+ | `references/troubleshooting.md` | Diagnosing common errors |
180
+ | `references/examples.md` | Need step-by-step scenario walkthroughs |
181
+ | `references/creator-playbook.md` | Publishing skills others install; before-ship vs after-ship creator loop |
182
+ | `references/interactive-config.md` | Before mutating workflows |
183
+ | `references/grading-methodology.md` | Grading sessions or interpreting grades |
184
+ | `references/invocation-taxonomy.md` | Analyzing trigger coverage |
185
+ | `references/logs.md` | Parsing or debugging log files |
186
+ | `references/setup-patterns.md` | Complex platform-specific setup |
187
+ | `references/version-history.md` | Checking what changed between versions |
188
+ | `settings_snippet.json` | During initialization |
@@ -50,9 +50,9 @@ parent. Do not ask the user directly unless the parent explicitly told you to.
50
50
  - The target skill's `SKILL.md`
51
51
  - Session transcripts referenced from telemetry or grading evidence
52
52
  - Relevant workflow docs:
53
- - `skill/Workflows/Doctor.md`
54
- - `skill/Workflows/Evals.md`
55
- - `skill/Workflows/Evolve.md`
53
+ - `skill/workflows/Doctor.md`
54
+ - `skill/workflows/Evals.md`
55
+ - `skill/workflows/Evolve.md`
56
56
  - `skill/references/grading-methodology.md`
57
57
  - `skill/references/invocation-taxonomy.md`
58
58
 
@@ -45,9 +45,9 @@ parent. Do not ask the user directly unless the parent explicitly told you to.
45
45
  - The current `SKILL.md`
46
46
  - Existing backup files if present
47
47
  - Eval set used for validation
48
- - `skill/Workflows/Evolve.md`
49
- - `skill/Workflows/EvolveBody.md`
50
- - `skill/Workflows/Watch.md`
48
+ - `skill/workflows/Evolve.md`
49
+ - `skill/workflows/EvolveBody.md`
50
+ - `skill/workflows/Watch.md`
51
51
  - `skill/references/invocation-taxonomy.md`
52
52
 
53
53
  ## Review Workflow
@@ -33,9 +33,9 @@ parent. Do not ask the user directly unless the parent explicitly told you to.
33
33
  - `selftune doctor` returns structured health data. Use it after each material
34
34
  setup change.
35
35
  - Use current workflow docs, especially:
36
- - `skill/Workflows/Initialize.md`
37
- - `skill/Workflows/Doctor.md`
38
- - `skill/Workflows/Ingest.md`
36
+ - `skill/workflows/Initialize.md`
37
+ - `skill/workflows/Doctor.md`
38
+ - `skill/workflows/Ingest.md`
39
39
  - `skill/references/setup-patterns.md`
40
40
  - Respect platform boundaries:
41
41
  - Claude Code prefers hooks installed by `selftune init`
@@ -46,8 +46,8 @@ you to.
46
46
  - `~/.claude/session_telemetry_log.jsonl`
47
47
  - `~/.claude/evolution_audit_log.jsonl`
48
48
  - Relevant `SKILL.md` files in the workspace
49
- - `skill/Workflows/Composability.md`
50
- - `skill/Workflows/Evals.md`
49
+ - `skill/workflows/Composability.md`
50
+ - `skill/workflows/Evals.md`
51
51
  - `skill/references/invocation-taxonomy.md`
52
52
 
53
53
  ## Analysis Workflow