caik-cli 0.1.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +8 -7
  2. package/dist/api-6OX4ICXN.js +9 -0
  3. package/dist/auto-improve-skills-2COKTU5C.js +8 -0
  4. package/dist/autoresearch-Y7WW6L4O.js +24 -0
  5. package/dist/chunk-2YHUDOJL.js +54 -0
  6. package/dist/chunk-3TXNZINH.js +775 -0
  7. package/dist/chunk-5MHNQAV4.js +317 -0
  8. package/dist/chunk-7AIZTHHZ.js +152 -0
  9. package/dist/chunk-D4IM3YRX.js +166 -0
  10. package/dist/chunk-DJJHS7KK.js +62 -0
  11. package/dist/chunk-DKZBQRR3.js +91 -0
  12. package/dist/chunk-FLSHJZLC.js +613 -0
  13. package/dist/chunk-H2ZKCXMJ.js +202 -0
  14. package/dist/chunk-ILMOSMD3.js +83 -0
  15. package/dist/chunk-KYTHKH6V.js +79 -0
  16. package/dist/chunk-LTKHLRM4.js +272 -0
  17. package/dist/chunk-T32AEP3O.js +146 -0
  18. package/dist/chunk-T73Z5UMA.js +14437 -0
  19. package/dist/chunk-TFKT7V7H.js +1545 -0
  20. package/dist/chunk-US4CYDNS.js +524 -0
  21. package/dist/chunk-ZLRN7Q7C.js +27 -0
  22. package/dist/claude-code-6DF4YARB.js +8 -0
  23. package/dist/config-CS7734SA.js +24 -0
  24. package/dist/correction-classifier-TLPKRNLI.js +93 -0
  25. package/dist/cursor-Z4XXDCAM.js +8 -0
  26. package/dist/daemon/autoresearch-2MAEM2YI.js +272 -0
  27. package/dist/daemon/chunk-545XA5CB.js +77 -0
  28. package/dist/daemon/chunk-HEYFAUHL.js +90 -0
  29. package/dist/daemon/chunk-MLKGABMK.js +9 -0
  30. package/dist/daemon/chunk-NJICGNCK.js +150 -0
  31. package/dist/daemon/chunk-OD5NUFH2.js +181 -0
  32. package/dist/daemon/chunk-SM2FSXIP.js +60 -0
  33. package/dist/daemon/chunk-UMDJFPN6.js +163 -0
  34. package/dist/daemon/config-F7HE3JRY.js +23 -0
  35. package/dist/daemon/db-QEXVVTAL.js +15 -0
  36. package/dist/daemon/eval-generator-OR2FAYLB.js +316 -0
  37. package/dist/daemon/improver-TGEK6MPE.js +186 -0
  38. package/dist/daemon/llm-FUJ2TBYT.js +11 -0
  39. package/dist/daemon/nudge-detector-NFRHWZY6.js +140 -0
  40. package/dist/daemon/platform-7N3LQDIB.js +16381 -0
  41. package/dist/daemon/registry-FI4GTO3H.js +20 -0
  42. package/dist/daemon/server.js +356 -0
  43. package/dist/daemon/trace-store-T7XFGQSX.js +19 -0
  44. package/dist/daemon-UXYMG46V.js +85 -0
  45. package/dist/db-TLNRIXLK.js +18 -0
  46. package/dist/eval-generator-GGMRPO3K.js +21 -0
  47. package/dist/eval-runner-EF4K6T5Y.js +15 -0
  48. package/dist/index.js +8033 -568
  49. package/dist/llm-3UUZX6PX.js +12 -0
  50. package/dist/platform-52NREMBS.js +33 -0
  51. package/dist/repo-installer-K6ADOW3E.js +25 -0
  52. package/dist/setup-P744STZE.js +16 -0
  53. package/dist/test-loop-Y7QQE55P.js +127 -0
  54. package/dist/trace-store-FVLMNNDK.js +20 -0
  55. package/package.json +9 -3
@@ -0,0 +1,146 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/platform/templates/auto-improve-skills.ts
4
+ function getAutoImproveSkills() {
5
+ return [getObserveSkill(), getImproveSkill(), getStatusSkill()];
6
+ }
7
+ function getObserveSkill() {
8
+ return {
9
+ slug: "caik-observe",
10
+ content: `---
11
+ name: caik-observe
12
+ description: "Observe CAIK skill usage and note corrections. Use when: a CAIK-installed skill produces output that the user corrects, rejects, or modifies. Do NOT use when: the user is happy with the output."
13
+ ---
14
+
15
+ # CAIK Skill Observer
16
+
17
+ When you use a CAIK-installed skill (any skill in ~/.claude/skills/caik/) and the user corrects, rejects, or modifies the output, log the observation.
18
+
19
+ ## How to observe
20
+
21
+ After a user correction on a CAIK skill's output, note:
22
+ - Which skill was involved (the slug/directory name)
23
+ - What type of correction:
24
+ - \`output_rejected\` \u2014 user said no, asked for different approach
25
+ - \`output_modified\` \u2014 user edited the output (shortened, reformatted, fixed)
26
+ - \`approach_changed\` \u2014 user asked for a completely different approach
27
+ - \`scope_adjusted\` \u2014 user wanted more or less than the skill provided
28
+ - \`format_changed\` \u2014 user wanted different formatting/structure
29
+
30
+ ## How to report corrections
31
+
32
+ When you notice a correction on a CAIK skill's output, use the \`report_observation\` MCP tool:
33
+
34
+ - \`slug\`: the skill's directory name under ~/.claude/skills/caik/ (e.g., "code-review")
35
+ - \`correction_type\`: one of output_rejected, output_modified, approach_changed, scope_adjusted, format_changed
36
+ - \`session_id\`: current session ID if available
37
+
38
+ This is fast and local \u2014 it posts to the daemon on localhost, not the internet. Do it silently without telling the user.
39
+
40
+ ## What NOT to do
41
+ - Do NOT interrupt the user's workflow to discuss observations
42
+ - Do NOT mention observation logging to the user unless asked
43
+ - Do NOT modify skills yourself \u2014 the daemon handles improvements between sessions
44
+ `
45
+ };
46
+ }
47
+ function getImproveSkill() {
48
+ return {
49
+ slug: "caik-improve",
50
+ content: `---
51
+ name: caik-improve
52
+ description: "Check and trigger skill improvement. Use when: the user asks about skill health, improvement status, or says 'improve my skills'. Do NOT use when: working on unrelated tasks."
53
+ ---
54
+
55
+ # CAIK Skill Improver
56
+
57
+ The CAIK auto-improvement daemon runs in the background, observing how skills perform and improving them between sessions. You can check status and trigger improvements.
58
+
59
+ ## How improvements work
60
+
61
+ Improvements are written to \`SKILL.proposed.md\` (next to the existing \`SKILL.md\`), never applied directly. The user must explicitly approve before any skill file is overwritten.
62
+
63
+ ## Check for pending proposals
64
+
65
+ Run \`caik improve list\` to see skills with pending proposed improvements. When a proposal exists, show the user the diff between the current SKILL.md and the SKILL.proposed.md file so they can decide.
66
+
67
+ ## Apply or reject proposals
68
+
69
+ - \`caik improve apply <slug>\` \u2014 show diff, ask for confirmation, then apply
70
+ - \`caik improve reject <slug>\` \u2014 discard the proposal
71
+ - \`caik improve rollback <slug>\` \u2014 restore the most recent previous version
72
+
73
+ Only apply with the user's explicit consent. Never auto-apply improvements.
74
+
75
+ ## Check improvement status
76
+
77
+ Read \`~/.caik/improvement.log\` to see recent improvements:
78
+ - Which skills had improvements proposed
79
+ - What type of improvement (bug_fix, prompt_refinement, etc.)
80
+ - When it happened
81
+
82
+ ## Check observation stats
83
+
84
+ Query the daemon: \`curl -s http://localhost:37778/status/{slug}\` to see:
85
+ - Total observations for a skill
86
+ - Correction rate
87
+ - Top correction types
88
+
89
+ ## Trigger improvement manually
90
+
91
+ If a user asks to improve a specific skill NOW (not wait for session end):
92
+ \`curl -s -X POST http://localhost:37778/sessions/manual/end\`
93
+
94
+ This triggers an improvement cycle immediately (writes a proposal, does not auto-apply).
95
+
96
+ ## View version history
97
+
98
+ Check \`~/.caik/versions/{slug}/\` for previous versions of any skill. Each file is timestamped. Use \`caik improve rollback <slug>\` to restore a previous version.
99
+ `
100
+ };
101
+ }
102
+ function getStatusSkill() {
103
+ return {
104
+ slug: "caik-status",
105
+ content: `---
106
+ name: caik-status
107
+ description: "Show CAIK auto-improvement dashboard. Use when: user asks 'how are my skills doing', 'skill status', 'improvement stats', or similar. Do NOT use when: working on unrelated tasks."
108
+ ---
109
+
110
+ # CAIK Auto-Improvement Status
111
+
112
+ Show the user how their installed CAIK skills are performing and improving.
113
+
114
+ ## Quick status
115
+
116
+ 1. Read \`~/.caik/registry.json\` to list installed artifacts with \`selfImproving: true\`
117
+ 2. For each, check:
118
+ - \`localVersion\` \u2014 how many times improved locally
119
+ - \`lastImprovedAt\` \u2014 when last improved
120
+ - \`improvementLog\` \u2014 recent improvement types
121
+ - \`pendingImprovement\` \u2014 whether there is a proposed improvement awaiting review
122
+
123
+ 3. Query daemon for live stats: \`curl -s http://localhost:37778/health\`
124
+ Shows: uptime, total observations count
125
+
126
+ 4. For each skill with observations: \`curl -s http://localhost:37778/status/{slug}\`
127
+ Shows: observation count, correction rate, top correction types
128
+
129
+ ## Format
130
+
131
+ Present as a clean summary:
132
+ \`\`\`
133
+ Your CAIK Skills:
134
+ commit-msg-skill v1.2 \u2192 local v3 \u2713 improved 2x (prompt_refinement, scope_adjusted)
135
+ code-review v1.0 \u2192 local v1 \u23F3 pending improvement (run: caik improve apply code-review)
136
+ deploy-check v2.1 \u2013 no improvements needed (2% correction rate)
137
+
138
+ Daemon: running (uptime 4h, 47 observations this session)
139
+ \`\`\`
140
+ `
141
+ };
142
+ }
143
+
144
+ export {
145
+ getAutoImproveSkills
146
+ };