@g3nomaly/skills 1.0.0 → 1.0.1

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 (384) hide show
  1. package/dist/cli/adapter.d.ts +19 -16
  2. package/dist/cli/adapter.d.ts.map +1 -1
  3. package/dist/cli/adapter.js +39 -63
  4. package/dist/cli/adapter.js.map +1 -1
  5. package/dist/cli/commands/add.d.ts +7 -10
  6. package/dist/cli/commands/add.d.ts.map +1 -1
  7. package/dist/cli/commands/add.js +12 -98
  8. package/dist/cli/commands/add.js.map +1 -1
  9. package/dist/cli/commands/ls.d.ts +9 -2
  10. package/dist/cli/commands/ls.d.ts.map +1 -1
  11. package/dist/cli/commands/ls.js +21 -5
  12. package/dist/cli/commands/ls.js.map +1 -1
  13. package/dist/cli/commands/remove.d.ts +7 -7
  14. package/dist/cli/commands/remove.d.ts.map +1 -1
  15. package/dist/cli/commands/remove.js +11 -56
  16. package/dist/cli/commands/remove.js.map +1 -1
  17. package/dist/cli/commands/source.d.ts +29 -0
  18. package/dist/cli/commands/source.d.ts.map +1 -0
  19. package/dist/cli/commands/source.js +31 -0
  20. package/dist/cli/commands/source.js.map +1 -0
  21. package/dist/cli/commands/update.d.ts +6 -6
  22. package/dist/cli/commands/update.d.ts.map +1 -1
  23. package/dist/cli/commands/update.js +9 -43
  24. package/dist/cli/commands/update.js.map +1 -1
  25. package/dist/cli/index.js +79 -58
  26. package/dist/cli/index.js.map +1 -1
  27. package/dist/index.d.ts +2 -8
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +2 -8
  30. package/dist/index.js.map +1 -1
  31. package/dist/packages/index.d.ts +3 -0
  32. package/dist/packages/index.d.ts.map +1 -0
  33. package/dist/packages/index.js +3 -0
  34. package/dist/packages/index.js.map +1 -0
  35. package/dist/packages/install.d.ts +24 -0
  36. package/dist/packages/install.d.ts.map +1 -0
  37. package/dist/packages/install.js +47 -0
  38. package/dist/packages/install.js.map +1 -0
  39. package/dist/registry/index.d.ts +4 -2
  40. package/dist/registry/index.d.ts.map +1 -1
  41. package/dist/registry/index.js +3 -2
  42. package/dist/registry/index.js.map +1 -1
  43. package/dist/registry/locate.d.ts +22 -0
  44. package/dist/registry/locate.d.ts.map +1 -0
  45. package/dist/registry/locate.js +81 -0
  46. package/dist/registry/locate.js.map +1 -0
  47. package/dist/registry/manifest.d.ts +9 -0
  48. package/dist/registry/manifest.d.ts.map +1 -0
  49. package/dist/registry/manifest.js +14 -0
  50. package/dist/registry/manifest.js.map +1 -0
  51. package/dist/registry/readSkillDir.d.ts +8 -6
  52. package/dist/registry/readSkillDir.d.ts.map +1 -1
  53. package/dist/registry/readSkillDir.js +19 -24
  54. package/dist/registry/readSkillDir.js.map +1 -1
  55. package/dist/registry/readSource.d.ts +9 -0
  56. package/dist/registry/readSource.d.ts.map +1 -0
  57. package/dist/registry/readSource.js +30 -0
  58. package/dist/registry/readSource.js.map +1 -0
  59. package/dist/registry/types.d.ts +16 -16
  60. package/dist/registry/types.d.ts.map +1 -1
  61. package/dist/registry/types.js +13 -23
  62. package/dist/registry/types.js.map +1 -1
  63. package/dist/sources/builtins.d.ts +4 -0
  64. package/dist/sources/builtins.d.ts.map +1 -0
  65. package/dist/sources/builtins.js +5 -0
  66. package/dist/sources/builtins.js.map +1 -0
  67. package/dist/sources/index.d.ts +2 -0
  68. package/dist/sources/index.d.ts.map +1 -0
  69. package/dist/sources/index.js +3 -0
  70. package/dist/sources/index.js.map +1 -0
  71. package/dist/utils/frontmatter.d.ts +7 -0
  72. package/dist/utils/frontmatter.d.ts.map +1 -0
  73. package/dist/utils/frontmatter.js +20 -0
  74. package/dist/utils/frontmatter.js.map +1 -0
  75. package/dist/utils/index.d.ts +2 -0
  76. package/dist/utils/index.d.ts.map +1 -0
  77. package/dist/utils/index.js +3 -0
  78. package/dist/utils/index.js.map +1 -0
  79. package/package.json +8 -32
  80. package/dist/cli/commands/hook.d.ts +0 -6
  81. package/dist/cli/commands/hook.d.ts.map +0 -1
  82. package/dist/cli/commands/hook.js +0 -18
  83. package/dist/cli/commands/hook.js.map +0 -1
  84. package/dist/decisions/index.d.ts +0 -6
  85. package/dist/decisions/index.d.ts.map +0 -1
  86. package/dist/decisions/index.js +0 -5
  87. package/dist/decisions/index.js.map +0 -1
  88. package/dist/decisions/paths.d.ts +0 -4
  89. package/dist/decisions/paths.d.ts.map +0 -1
  90. package/dist/decisions/paths.js +0 -12
  91. package/dist/decisions/paths.js.map +0 -1
  92. package/dist/decisions/read.d.ts +0 -18
  93. package/dist/decisions/read.d.ts.map +0 -1
  94. package/dist/decisions/read.js +0 -45
  95. package/dist/decisions/read.js.map +0 -1
  96. package/dist/decisions/write.d.ts +0 -20
  97. package/dist/decisions/write.d.ts.map +0 -1
  98. package/dist/decisions/write.js +0 -48
  99. package/dist/decisions/write.js.map +0 -1
  100. package/dist/filetree/ensure.d.ts +0 -7
  101. package/dist/filetree/ensure.d.ts.map +0 -1
  102. package/dist/filetree/ensure.js +0 -36
  103. package/dist/filetree/ensure.js.map +0 -1
  104. package/dist/filetree/entries.d.ts +0 -9
  105. package/dist/filetree/entries.d.ts.map +0 -1
  106. package/dist/filetree/entries.js +0 -49
  107. package/dist/filetree/entries.js.map +0 -1
  108. package/dist/filetree/frontmatter.d.ts +0 -16
  109. package/dist/filetree/frontmatter.d.ts.map +0 -1
  110. package/dist/filetree/frontmatter.js +0 -43
  111. package/dist/filetree/frontmatter.js.map +0 -1
  112. package/dist/filetree/generate.d.ts +0 -16
  113. package/dist/filetree/generate.d.ts.map +0 -1
  114. package/dist/filetree/generate.js +0 -62
  115. package/dist/filetree/generate.js.map +0 -1
  116. package/dist/filetree/index.d.ts +0 -17
  117. package/dist/filetree/index.d.ts.map +0 -1
  118. package/dist/filetree/index.js +0 -13
  119. package/dist/filetree/index.js.map +0 -1
  120. package/dist/filetree/levels.d.ts +0 -25
  121. package/dist/filetree/levels.d.ts.map +0 -1
  122. package/dist/filetree/levels.js +0 -45
  123. package/dist/filetree/levels.js.map +0 -1
  124. package/dist/filetree/locate.d.ts +0 -44
  125. package/dist/filetree/locate.d.ts.map +0 -1
  126. package/dist/filetree/locate.js +0 -76
  127. package/dist/filetree/locate.js.map +0 -1
  128. package/dist/filetree/paths.d.ts +0 -15
  129. package/dist/filetree/paths.d.ts.map +0 -1
  130. package/dist/filetree/paths.js +0 -38
  131. package/dist/filetree/paths.js.map +0 -1
  132. package/dist/filetree/read.d.ts +0 -23
  133. package/dist/filetree/read.d.ts.map +0 -1
  134. package/dist/filetree/read.js +0 -36
  135. package/dist/filetree/read.js.map +0 -1
  136. package/dist/filetree/remove.d.ts +0 -9
  137. package/dist/filetree/remove.d.ts.map +0 -1
  138. package/dist/filetree/remove.js +0 -17
  139. package/dist/filetree/remove.js.map +0 -1
  140. package/dist/filetree/root.d.ts +0 -9
  141. package/dist/filetree/root.d.ts.map +0 -1
  142. package/dist/filetree/root.js +0 -15
  143. package/dist/filetree/root.js.map +0 -1
  144. package/dist/filetree/status.d.ts +0 -21
  145. package/dist/filetree/status.d.ts.map +0 -1
  146. package/dist/filetree/status.js +0 -55
  147. package/dist/filetree/status.js.map +0 -1
  148. package/dist/hooks/cli.d.ts +0 -29
  149. package/dist/hooks/cli.d.ts.map +0 -1
  150. package/dist/hooks/cli.js +0 -65
  151. package/dist/hooks/cli.js.map +0 -1
  152. package/dist/hooks/index.d.ts +0 -3
  153. package/dist/hooks/index.d.ts.map +0 -1
  154. package/dist/hooks/index.js +0 -3
  155. package/dist/hooks/index.js.map +0 -1
  156. package/dist/plugins/grilling/.claude-plugin/plugin.json +0 -7
  157. package/dist/plugins/grilling/skills/domain-modeling/ADR-FORMAT.md +0 -47
  158. package/dist/plugins/grilling/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
  159. package/dist/plugins/grilling/skills/domain-modeling/SKILL.md +0 -74
  160. package/dist/plugins/grilling/skills/domain-modeling/agents/openai.yaml +0 -3
  161. package/dist/plugins/grilling/skills/grill-me/SKILL.md +0 -7
  162. package/dist/plugins/grilling/skills/grill-me/agents/openai.yaml +0 -5
  163. package/dist/plugins/grilling/skills/grill-with-docs/SKILL.md +0 -7
  164. package/dist/plugins/grilling/skills/grill-with-docs/agents/openai.yaml +0 -5
  165. package/dist/plugins/grilling/skills/grilling/SKILL.md +0 -12
  166. package/dist/plugins/grilling/skills/grilling/agents/openai.yaml +0 -3
  167. package/dist/plugins/speech/.claude-plugin/plugin.json +0 -7
  168. package/dist/plugins/speech/skills/emphasise/SKILL.md +0 -49
  169. package/dist/plugins/speech/skills/emphasise/agents/openai.yaml +0 -5
  170. package/dist/plugins/speech/skills/unslop/SKILL.md +0 -80
  171. package/dist/plugins/task-manager/.claude-plugin/plugin.json +0 -11
  172. package/dist/plugins/task-manager/hooks/hooks.json +0 -19
  173. package/dist/plugins/task-manager/skills/decisions/SKILL.md +0 -39
  174. package/dist/plugins/task-manager/skills/decisions/agents/openai.yaml +0 -5
  175. package/dist/plugins/task-manager/skills/decisions/references/usage.md +0 -26
  176. package/dist/plugins/task-manager/skills/task-manager/SKILL.md +0 -99
  177. package/dist/plugins/task-manager/skills/vocabulary/SKILL.md +0 -42
  178. package/dist/plugins/task-manager/skills/vocabulary/agents/openai.yaml +0 -5
  179. package/dist/plugins/task-manager/skills/vocabulary/references/usage.md +0 -26
  180. package/dist/plugins/using-hooks/.claude-plugin/plugin.json +0 -7
  181. package/dist/plugins/using-hooks/skills/hook-post-tool-use/SKILL.md +0 -79
  182. package/dist/plugins/using-hooks/skills/hook-post-tool-use/agents/openai.yaml +0 -5
  183. package/dist/plugins/using-hooks/skills/hook-pre-tool-use/SKILL.md +0 -84
  184. package/dist/plugins/using-hooks/skills/hook-pre-tool-use/agents/openai.yaml +0 -5
  185. package/dist/plugins/using-hooks/skills/hook-stop/SKILL.md +0 -69
  186. package/dist/plugins/using-hooks/skills/hook-stop/agents/openai.yaml +0 -5
  187. package/dist/plugins/using-hooks/skills/hook-user-prompt-submit/SKILL.md +0 -64
  188. package/dist/plugins/using-hooks/skills/hook-user-prompt-submit/agents/openai.yaml +0 -5
  189. package/dist/plugins/workflow/.claude-plugin/plugin.json +0 -16
  190. package/dist/plugins/workflow/agents/reviewer.md +0 -9
  191. package/dist/plugins/workflow/skills/execute/SKILL.md +0 -21
  192. package/dist/plugins/workflow/skills/execute/agents/openai.yaml +0 -5
  193. package/dist/plugins/workflow/skills/orchestrator/SKILL.md +0 -27
  194. package/dist/plugins/workflow/skills/orchestrator/agents/openai.yaml +0 -5
  195. package/dist/plugins/workflow/skills/plan/SKILL.md +0 -18
  196. package/dist/plugins/workflow/skills/plan/agents/openai.yaml +0 -5
  197. package/dist/plugins/workflow/skills/plan/references/task-frontmatter.md +0 -33
  198. package/dist/plugins/workflow/skills/review/SKILL.md +0 -25
  199. package/dist/plugins/workflow/skills/review/agents/openai.yaml +0 -5
  200. package/dist/plugins/workflow/skills/run/SKILL.md +0 -33
  201. package/dist/plugins/workflow/skills/run/agents/openai.yaml +0 -5
  202. package/dist/plugins/workflow/skills/run/references/sub-agents.md +0 -46
  203. package/dist/plugins/workflow/skills/sync/SKILL.md +0 -18
  204. package/dist/plugins/workflow/skills/sync/agents/openai.yaml +0 -5
  205. package/dist/plugins/workflow/skills/worktree/SKILL.md +0 -38
  206. package/dist/plugins/workflow/skills/worktree/agents/openai.yaml +0 -5
  207. package/dist/plugins/workflow/skills/worktree/references/git-commands.md +0 -27
  208. package/dist/plugins/writing/.claude-plugin/plugin.json +0 -7
  209. package/dist/plugins/writing/skills/writing-great-hooks/SKILL.md +0 -192
  210. package/dist/plugins/writing/skills/writing-great-hooks/agents/openai.yaml +0 -5
  211. package/dist/plugins/writing/skills/writing-great-skills/GLOSSARY.md +0 -201
  212. package/dist/plugins/writing/skills/writing-great-skills/SKILL.md +0 -92
  213. package/dist/plugins/writing/skills/writing-great-skills/agents/openai.yaml +0 -5
  214. package/dist/plugins/writing/skills/writing-great-tasks/SKILL.md +0 -136
  215. package/dist/plugins/writing/skills/writing-great-tasks/agents/openai.yaml +0 -5
  216. package/dist/plugins/writing/skills/writing-great-tasks/templates/template_task.md +0 -108
  217. package/dist/registry/loadPackageRegistry.d.ts +0 -14
  218. package/dist/registry/loadPackageRegistry.d.ts.map +0 -1
  219. package/dist/registry/loadPackageRegistry.js +0 -59
  220. package/dist/registry/loadPackageRegistry.js.map +0 -1
  221. package/dist/registry/userManifest.d.ts +0 -7
  222. package/dist/registry/userManifest.d.ts.map +0 -1
  223. package/dist/registry/userManifest.js +0 -21
  224. package/dist/registry/userManifest.js.map +0 -1
  225. package/dist/remote/fetch.d.ts +0 -16
  226. package/dist/remote/fetch.d.ts.map +0 -1
  227. package/dist/remote/fetch.js +0 -41
  228. package/dist/remote/fetch.js.map +0 -1
  229. package/dist/remote/index.d.ts +0 -7
  230. package/dist/remote/index.d.ts.map +0 -1
  231. package/dist/remote/index.js +0 -5
  232. package/dist/remote/index.js.map +0 -1
  233. package/dist/remote/manifest.d.ts +0 -23
  234. package/dist/remote/manifest.d.ts.map +0 -1
  235. package/dist/remote/manifest.js +0 -116
  236. package/dist/remote/manifest.js.map +0 -1
  237. package/dist/remote/registry.d.ts +0 -18
  238. package/dist/remote/registry.d.ts.map +0 -1
  239. package/dist/remote/registry.js +0 -58
  240. package/dist/remote/registry.js.map +0 -1
  241. package/dist/schemas/config.d.ts +0 -3
  242. package/dist/schemas/config.d.ts.map +0 -1
  243. package/dist/schemas/config.js +0 -3
  244. package/dist/schemas/config.js.map +0 -1
  245. package/dist/schemas/decision.d.ts +0 -43
  246. package/dist/schemas/decision.d.ts.map +0 -1
  247. package/dist/schemas/decision.js +0 -24
  248. package/dist/schemas/decision.js.map +0 -1
  249. package/dist/schemas/index.d.ts +0 -17
  250. package/dist/schemas/index.d.ts.map +0 -1
  251. package/dist/schemas/index.js +0 -10
  252. package/dist/schemas/index.js.map +0 -1
  253. package/dist/schemas/phase.d.ts +0 -46
  254. package/dist/schemas/phase.d.ts.map +0 -1
  255. package/dist/schemas/phase.js +0 -16
  256. package/dist/schemas/phase.js.map +0 -1
  257. package/dist/schemas/plan.d.ts +0 -44
  258. package/dist/schemas/plan.d.ts.map +0 -1
  259. package/dist/schemas/plan.js +0 -15
  260. package/dist/schemas/plan.js.map +0 -1
  261. package/dist/schemas/primitives.d.ts +0 -38
  262. package/dist/schemas/primitives.d.ts.map +0 -1
  263. package/dist/schemas/primitives.js +0 -33
  264. package/dist/schemas/primitives.js.map +0 -1
  265. package/dist/schemas/task.d.ts +0 -70
  266. package/dist/schemas/task.d.ts.map +0 -1
  267. package/dist/schemas/task.js +0 -19
  268. package/dist/schemas/task.js.map +0 -1
  269. package/dist/schemas/term.d.ts +0 -17
  270. package/dist/schemas/term.d.ts.map +0 -1
  271. package/dist/schemas/term.js +0 -22
  272. package/dist/schemas/term.js.map +0 -1
  273. package/dist/schemas/validation.d.ts +0 -24
  274. package/dist/schemas/validation.d.ts.map +0 -1
  275. package/dist/schemas/validation.js +0 -39
  276. package/dist/schemas/validation.js.map +0 -1
  277. package/dist/task-manager/hooks/add-decision.d.ts +0 -2
  278. package/dist/task-manager/hooks/add-decision.d.ts.map +0 -1
  279. package/dist/task-manager/hooks/add-decision.js +0 -19
  280. package/dist/task-manager/hooks/add-decision.js.map +0 -1
  281. package/dist/task-manager/hooks/cleanup.d.ts +0 -2
  282. package/dist/task-manager/hooks/cleanup.d.ts.map +0 -1
  283. package/dist/task-manager/hooks/cleanup.js +0 -27
  284. package/dist/task-manager/hooks/cleanup.js.map +0 -1
  285. package/dist/task-manager/hooks/get-decision.d.ts +0 -2
  286. package/dist/task-manager/hooks/get-decision.d.ts.map +0 -1
  287. package/dist/task-manager/hooks/get-decision.js +0 -11
  288. package/dist/task-manager/hooks/get-decision.js.map +0 -1
  289. package/dist/task-manager/hooks/get-entry.d.ts +0 -2
  290. package/dist/task-manager/hooks/get-entry.d.ts.map +0 -1
  291. package/dist/task-manager/hooks/get-entry.js +0 -20
  292. package/dist/task-manager/hooks/get-entry.js.map +0 -1
  293. package/dist/task-manager/hooks/get-term.d.ts +0 -2
  294. package/dist/task-manager/hooks/get-term.d.ts.map +0 -1
  295. package/dist/task-manager/hooks/get-term.js +0 -13
  296. package/dist/task-manager/hooks/get-term.js.map +0 -1
  297. package/dist/task-manager/hooks/guard-tree.d.ts +0 -2
  298. package/dist/task-manager/hooks/guard-tree.d.ts.map +0 -1
  299. package/dist/task-manager/hooks/guard-tree.js +0 -63
  300. package/dist/task-manager/hooks/guard-tree.js.map +0 -1
  301. package/dist/task-manager/hooks/index.d.ts +0 -4
  302. package/dist/task-manager/hooks/index.d.ts.map +0 -1
  303. package/dist/task-manager/hooks/index.js +0 -32
  304. package/dist/task-manager/hooks/index.js.map +0 -1
  305. package/dist/task-manager/hooks/list-decisions.d.ts +0 -2
  306. package/dist/task-manager/hooks/list-decisions.d.ts.map +0 -1
  307. package/dist/task-manager/hooks/list-decisions.js +0 -20
  308. package/dist/task-manager/hooks/list-decisions.js.map +0 -1
  309. package/dist/task-manager/hooks/list-entries.d.ts +0 -2
  310. package/dist/task-manager/hooks/list-entries.d.ts.map +0 -1
  311. package/dist/task-manager/hooks/list-entries.js +0 -19
  312. package/dist/task-manager/hooks/list-entries.js.map +0 -1
  313. package/dist/task-manager/hooks/list-terms.d.ts +0 -2
  314. package/dist/task-manager/hooks/list-terms.d.ts.map +0 -1
  315. package/dist/task-manager/hooks/list-terms.js +0 -8
  316. package/dist/task-manager/hooks/list-terms.js.map +0 -1
  317. package/dist/task-manager/hooks/next-entry.d.ts +0 -2
  318. package/dist/task-manager/hooks/next-entry.d.ts.map +0 -1
  319. package/dist/task-manager/hooks/next-entry.js +0 -23
  320. package/dist/task-manager/hooks/next-entry.js.map +0 -1
  321. package/dist/task-manager/hooks/remove-term.d.ts +0 -2
  322. package/dist/task-manager/hooks/remove-term.d.ts.map +0 -1
  323. package/dist/task-manager/hooks/remove-term.js +0 -15
  324. package/dist/task-manager/hooks/remove-term.js.map +0 -1
  325. package/dist/task-manager/hooks/set-state.d.ts +0 -2
  326. package/dist/task-manager/hooks/set-state.d.ts.map +0 -1
  327. package/dist/task-manager/hooks/set-state.js +0 -15
  328. package/dist/task-manager/hooks/set-state.js.map +0 -1
  329. package/dist/task-manager/hooks/set-term.d.ts +0 -2
  330. package/dist/task-manager/hooks/set-term.d.ts.map +0 -1
  331. package/dist/task-manager/hooks/set-term.js +0 -27
  332. package/dist/task-manager/hooks/set-term.js.map +0 -1
  333. package/dist/task-manager/hooks/sync-tree.d.ts +0 -2
  334. package/dist/task-manager/hooks/sync-tree.d.ts.map +0 -1
  335. package/dist/task-manager/hooks/sync-tree.js +0 -28
  336. package/dist/task-manager/hooks/sync-tree.js.map +0 -1
  337. package/dist/task-manager/index.d.ts +0 -2
  338. package/dist/task-manager/index.d.ts.map +0 -1
  339. package/dist/task-manager/index.js +0 -3
  340. package/dist/task-manager/index.js.map +0 -1
  341. package/dist/vocabulary/file.d.ts +0 -15
  342. package/dist/vocabulary/file.d.ts.map +0 -1
  343. package/dist/vocabulary/file.js +0 -80
  344. package/dist/vocabulary/file.js.map +0 -1
  345. package/dist/vocabulary/index.d.ts +0 -4
  346. package/dist/vocabulary/index.d.ts.map +0 -1
  347. package/dist/vocabulary/index.js +0 -4
  348. package/dist/vocabulary/index.js.map +0 -1
  349. package/dist/vocabulary/match.d.ts +0 -22
  350. package/dist/vocabulary/match.d.ts.map +0 -1
  351. package/dist/vocabulary/match.js +0 -31
  352. package/dist/vocabulary/match.js.map +0 -1
  353. package/dist/workflow/gates.d.ts +0 -24
  354. package/dist/workflow/gates.d.ts.map +0 -1
  355. package/dist/workflow/gates.js +0 -34
  356. package/dist/workflow/gates.js.map +0 -1
  357. package/dist/workflow/hooks/advance-step.d.ts +0 -2
  358. package/dist/workflow/hooks/advance-step.d.ts.map +0 -1
  359. package/dist/workflow/hooks/advance-step.js +0 -51
  360. package/dist/workflow/hooks/advance-step.js.map +0 -1
  361. package/dist/workflow/hooks/current-step.d.ts +0 -2
  362. package/dist/workflow/hooks/current-step.d.ts.map +0 -1
  363. package/dist/workflow/hooks/current-step.js +0 -24
  364. package/dist/workflow/hooks/current-step.js.map +0 -1
  365. package/dist/workflow/hooks/index.d.ts +0 -4
  366. package/dist/workflow/hooks/index.d.ts.map +0 -1
  367. package/dist/workflow/hooks/index.js +0 -10
  368. package/dist/workflow/hooks/index.js.map +0 -1
  369. package/dist/workflow/hooks/ready-phases.d.ts +0 -2
  370. package/dist/workflow/hooks/ready-phases.d.ts.map +0 -1
  371. package/dist/workflow/hooks/ready-phases.js +0 -15
  372. package/dist/workflow/hooks/ready-phases.js.map +0 -1
  373. package/dist/workflow/index.d.ts +0 -8
  374. package/dist/workflow/index.d.ts.map +0 -1
  375. package/dist/workflow/index.js +0 -6
  376. package/dist/workflow/index.js.map +0 -1
  377. package/dist/workflow/phase.d.ts +0 -16
  378. package/dist/workflow/phase.d.ts.map +0 -1
  379. package/dist/workflow/phase.js +0 -22
  380. package/dist/workflow/phase.js.map +0 -1
  381. package/dist/workflow/steps.d.ts +0 -15
  382. package/dist/workflow/steps.d.ts.map +0 -1
  383. package/dist/workflow/steps.js +0 -32
  384. package/dist/workflow/steps.js.map +0 -1
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Path of a target's `skills.json`, which sits beside its install directory:
3
+ * `.claude/skills` → `.claude/skills.json`.
4
+ *
5
+ * @param installDir - Relative to `projectRoot`, e.g. `.claude/skills`
6
+ * @returns absolute path
7
+ */
8
+ export declare function skillsManifestPath(projectRoot: string, installDir: string): string;
9
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/registry/manifest.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAElF"}
@@ -0,0 +1,14 @@
1
+ // packages/skills/src/registry/manifest.ts
2
+ import path from "node:path";
3
+ const MANIFEST_FILE = "skills.json";
4
+ /**
5
+ * Path of a target's `skills.json`, which sits beside its install directory:
6
+ * `.claude/skills` → `.claude/skills.json`.
7
+ *
8
+ * @param installDir - Relative to `projectRoot`, e.g. `.claude/skills`
9
+ * @returns absolute path
10
+ */
11
+ export function skillsManifestPath(projectRoot, installDir) {
12
+ return path.join(projectRoot, path.dirname(installDir), MANIFEST_FILE);
13
+ }
14
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/registry/manifest.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAmB,EAAE,UAAkB;IACxE,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,CAAC;AACzE,CAAC"}
@@ -1,12 +1,14 @@
1
+ import type { ReadContext } from "@g3nomaly/core/installer";
1
2
  import type { SkillMeta } from "./types";
2
3
  export declare const SKILL_FILE = "SKILL.md";
3
4
  /**
4
- * Reads one skill directory into its registry entry; the key is the directory
5
- * name and every file below it becomes a `files[]` entry at `<key>/<file>`.
6
- * Used by `loadPackageRegistry` for shipped skills and by the remote registry
7
- * for cloned repositories.
5
+ * Reads one skill folder into its registry entry. The key is the folder
6
+ * name and every file below it, hooks included, becomes a `files[]` entry at
7
+ * `<key>/<file>`, so the skill installs as one self-contained folder.
8
8
  *
9
- * @throws when the directory holds no SKILL.md or its frontmatter is invalid
9
+ * @param skillDir - Absolute skill folder inside a source checkout
10
+ * @param context - Origin to record, the plugin as group, and the plugin's version
11
+ * @throws when the folder holds no SKILL.md or its frontmatter is invalid
10
12
  */
11
- export declare function readSkillDir(skillDir: string, group: string, version?: string): Promise<[string, SkillMeta]>;
13
+ export declare function readSkillDir(skillDir: string, context: ReadContext): Promise<[string, SkillMeta]>;
12
14
  //# sourceMappingURL=readSkillDir.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"readSkillDir.d.ts","sourceRoot":"","sources":["../../src/registry/readSkillDir.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAA4B,SAAS,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,UAAU,aAAa,CAAC;AAsBrC;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CA0BlH"}
1
+ {"version":3,"file":"readSkillDir.d.ts","sourceRoot":"","sources":["../../src/registry/readSkillDir.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAK,EAA4B,SAAS,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,UAAU,aAAa,CAAC;AAiBrC;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAqBvG"}
@@ -3,56 +3,51 @@ import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { z } from "zod";
5
5
  import { hashFile } from "@g3nomaly/core/hash";
6
- import { readFrontmatter } from "../filetree/frontmatter";
6
+ import { listFiles } from "@g3nomaly/core/installer";
7
+ import { readFrontmatter } from "../utils/frontmatter";
7
8
  export const SKILL_FILE = "SKILL.md";
8
9
  const SkillFrontmatterSchema = z.object({
9
10
  name: z.string().min(1),
10
11
  description: z.string().optional(),
11
- /** Registry keys (skill directory names) of skills this one references */
12
+ /** `<key>` or `<key>@<source>` of skills this one needs installed beside it */
12
13
  registryDependencies: z.array(z.string().min(1)).optional(),
13
14
  });
15
+ /** Kind of a file by its path inside the skill: `SKILL.md`, an agent file, a hook, or a reference. */
14
16
  function fileType(relativeToSkill) {
15
17
  if (relativeToSkill === SKILL_FILE)
16
18
  return "skill";
17
19
  if (relativeToSkill.startsWith(`agents${path.sep}`))
18
20
  return "agent";
21
+ if (relativeToSkill.startsWith(`hooks${path.sep}`))
22
+ return "hook";
19
23
  return "reference";
20
24
  }
21
- function walk(dir, base = dir) {
22
- return fs.readdirSync(dir, { withFileTypes: true }).flatMap((d) => {
23
- const full = path.join(dir, d.name);
24
- return d.isDirectory() ? walk(full, base) : [path.relative(base, full)];
25
- });
26
- }
27
25
  /**
28
- * Reads one skill directory into its registry entry; the key is the directory
29
- * name and every file below it becomes a `files[]` entry at `<key>/<file>`.
30
- * Used by `loadPackageRegistry` for shipped skills and by the remote registry
31
- * for cloned repositories.
26
+ * Reads one skill folder into its registry entry. The key is the folder
27
+ * name and every file below it, hooks included, becomes a `files[]` entry at
28
+ * `<key>/<file>`, so the skill installs as one self-contained folder.
32
29
  *
33
- * @throws when the directory holds no SKILL.md or its frontmatter is invalid
30
+ * @param skillDir - Absolute skill folder inside a source checkout
31
+ * @param context - Origin to record, the plugin as group, and the plugin's version
32
+ * @throws when the folder holds no SKILL.md or its frontmatter is invalid
34
33
  */
35
- export async function readSkillDir(skillDir, group, version) {
34
+ export async function readSkillDir(skillDir, context) {
36
35
  const skillMd = path.join(skillDir, SKILL_FILE);
37
- if (!fs.existsSync(skillMd)) {
36
+ if (!fs.existsSync(skillMd))
38
37
  throw new Error(`${skillDir} holds no ${SKILL_FILE}`);
39
- }
40
38
  const key = path.basename(skillDir);
41
39
  const frontmatter = SkillFrontmatterSchema.parse(await readFrontmatter(skillMd));
42
40
  const files = [];
43
- for (const rel of walk(skillDir).sort()) {
44
- files.push({
45
- path: path.join(key, rel),
46
- type: fileType(rel),
47
- hash: await hashFile(path.join(skillDir, rel)),
48
- });
41
+ for (const rel of listFiles(skillDir)) {
42
+ files.push({ path: path.join(key, rel), type: fileType(rel), hash: await hashFile(path.join(skillDir, rel)) });
49
43
  }
50
44
  return [key, {
51
45
  name: frontmatter.name,
52
46
  description: frontmatter.description,
53
- version,
54
- group,
47
+ version: context.version,
48
+ group: context.group,
55
49
  registryDependencies: frontmatter.registryDependencies,
50
+ origin: context.origin,
56
51
  files,
57
52
  }];
58
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"readSkillDir.js","sourceRoot":"","sources":["../../src/registry/readSkillDir.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;AAErC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAS,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,0EAA0E;IAC1E,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC,CAAC;AAEH,SAAS,QAAQ,CAAC,eAAuB;IACvC,IAAI,eAAe,KAAK,UAAU;QAAE,OAAO,OAAO,CAAC;IACnD,IAAI,eAAe,CAAC,UAAU,CAAC,SAAS,IAAI,CAAC,GAAG,EAAE,CAAC;QAAE,OAAO,OAAO,CAAC;IACpE,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,IAAI,CAAC,GAAW,EAAE,IAAI,GAAW,GAAG;IAC3C,OAAO,EAAE,CAAC,WAAW,CA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,9 @@
1
+ import type { ReadSource } from "@g3nomaly/core/installer";
2
+ import type { SkillMeta } from "./types";
3
+ /**
4
+ * Reads every skill a checked-out source declares through its plugin
5
+ * manifests, with the plugin as group. An unreadable skill is skipped with a
6
+ * warning. Handed to `loadSourceRegistry` by every skills command.
7
+ */
8
+ export declare const readSkillSource: ReadSource<SkillMeta>;
9
+ //# sourceMappingURL=readSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readSource.d.ts","sourceRoot":"","sources":["../../src/registry/readSource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAI3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,SAAS,CAmBjD,CAAC"}
@@ -0,0 +1,30 @@
1
+ // packages/skills/src/registry/readSource.ts
2
+ import path from "node:path";
3
+ import { errorMessage } from "@g3nomaly/core/utils";
4
+ import { locateSkills } from "./locate";
5
+ import { readSkillDir } from "./readSkillDir";
6
+ /**
7
+ * Reads every skill a checked-out source declares through its plugin
8
+ * manifests, with the plugin as group. An unreadable skill is skipped with a
9
+ * warning. Handed to `loadSourceRegistry` by every skills command.
10
+ */
11
+ export const readSkillSource = async (checkout) => {
12
+ const { plugins, warnings } = locateSkills(checkout.dir);
13
+ const entries = [];
14
+ for (const plugin of plugins) {
15
+ for (const skillDir of plugin.skillDirs) {
16
+ try {
17
+ entries.push(await readSkillDir(skillDir, {
18
+ origin: { source: checkout.name, dir: path.relative(checkout.dir, path.dirname(skillDir)), commit: checkout.commit, version: checkout.version },
19
+ group: plugin.name,
20
+ version: plugin.version,
21
+ }));
22
+ }
23
+ catch (error) {
24
+ warnings.push(`skipped ${path.relative(checkout.dir, skillDir)}: ${errorMessage(error)}`);
25
+ }
26
+ }
27
+ }
28
+ return { entries, warnings };
29
+ };
30
+ //# sourceMappingURL=readSource.js.map
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AC;YAC5F,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC,CAAC"}
@@ -1,51 +1,51 @@
1
1
  import { z } from "zod";
2
2
  export declare const SkillFileTypeSchema: z.ZodEnum<{
3
3
  agent: "agent";
4
+ hook: "hook";
4
5
  reference: "reference";
5
6
  skill: "skill";
6
7
  }>;
7
8
  export type SkillFileType = z.infer<typeof SkillFileTypeSchema>;
9
+ /** One file of a skill; `path` is `<skill>/<file>`, relative to the install directory. */
8
10
  export declare const SkillFileSchema: z.ZodObject<{
9
11
  path: z.ZodString;
12
+ hash: z.ZodOptional<z.ZodString>;
13
+ version: z.ZodOptional<z.ZodString>;
10
14
  type: z.ZodEnum<{
11
15
  agent: "agent";
16
+ hook: "hook";
12
17
  reference: "reference";
13
18
  skill: "skill";
14
19
  }>;
15
- hash: z.ZodOptional<z.ZodString>;
16
20
  }, z.core.$strip>;
17
21
  export type SkillFile = z.infer<typeof SkillFileSchema>;
18
- /** Where a remote-installed skill came from; absent on skills shipped in the package. */
19
- export declare const SkillSourceSchema: z.ZodObject<{
20
- remote: z.ZodString;
21
- commit: z.ZodString;
22
- dir: z.ZodString;
23
- }, z.core.$strip>;
24
- export type SkillSource = z.infer<typeof SkillSourceSchema>;
25
22
  /**
26
- * One installable skill. Built from a group's `plugin.json` plus the skill's
27
- * `SKILL.md` frontmatter by `loadPackageRegistry`, and written per install
23
+ * One installable skill. Built from a source's plugin manifest plus the
24
+ * skill's `SKILL.md` frontmatter by `readSkillDir`, and written per install
28
25
  * into `skills.json` by the `add` and `update` commands.
29
26
  */
30
27
  export declare const SkillMetaSchema: z.ZodObject<{
31
28
  name: z.ZodString;
32
29
  description: z.ZodOptional<z.ZodString>;
33
30
  version: z.ZodOptional<z.ZodString>;
31
+ origin: z.ZodObject<{
32
+ source: z.ZodString;
33
+ dir: z.ZodString;
34
+ commit: z.ZodOptional<z.ZodString>;
35
+ version: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strip>;
34
37
  group: z.ZodString;
35
38
  registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
36
- source: z.ZodOptional<z.ZodObject<{
37
- remote: z.ZodString;
38
- commit: z.ZodString;
39
- dir: z.ZodString;
40
- }, z.core.$strip>>;
41
39
  files: z.ZodArray<z.ZodObject<{
42
40
  path: z.ZodString;
41
+ hash: z.ZodOptional<z.ZodString>;
42
+ version: z.ZodOptional<z.ZodString>;
43
43
  type: z.ZodEnum<{
44
44
  agent: "agent";
45
+ hook: "hook";
45
46
  reference: "reference";
46
47
  skill: "skill";
47
48
  }>;
48
- hash: z.ZodOptional<z.ZodString>;
49
49
  }, z.core.$strip>>;
50
50
  }, z.core.$strip>;
51
51
  export type SkillMeta = z.infer<typeof SkillMetaSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;EAA0C,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,eAAe;;;;;;;;iBAK1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,yFAAyF;AACzF,eAAO,MAAM,iBAAiB;;;;iBAO5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;iBAU1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAO,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;;EAAkD,CAAC;AAEnF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,0FAA0F;AAC1F,eAAO,MAAM,eAAe;;;;;;;;;;iBAE1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;iBAS1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAO,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC"}
@@ -1,35 +1,25 @@
1
1
  // packages/skills/src/registry/types.ts
2
2
  import { z } from "zod";
3
- export const SkillFileTypeSchema = z.enum(["skill", "agent", "reference"]);
4
- export const SkillFileSchema = z.object({
5
- /** Relative to the install directory, e.g. `emphasise/SKILL.md`; the source adds the group: `<group>/<path>` */
6
- path: z.string().min(1),
3
+ import { BaseFileEntrySchema } from "@g3nomaly/core/registry";
4
+ import { OriginEntrySchema } from "@g3nomaly/core/installer";
5
+ export const SkillFileTypeSchema = z.enum(["skill", "agent", "hook", "reference"]);
6
+ /** One file of a skill; `path` is `<skill>/<file>`, relative to the install directory. */
7
+ export const SkillFileSchema = BaseFileEntrySchema.extend({
7
8
  type: SkillFileTypeSchema,
8
- hash: z.string().optional(),
9
- });
10
- /** Where a remote-installed skill came from; absent on skills shipped in the package. */
11
- export const SkillSourceSchema = z.object({
12
- /** Git URL the skill was installed from */
13
- remote: z.string().min(1),
14
- /** Commit the clone resolved to at install time */
15
- commit: z.string().min(1),
16
- /** Repo-relative directory holding the skill directory, so `<dir>/<files[].path>` is the source file */
17
- dir: z.string(),
18
9
  });
19
10
  /**
20
- * One installable skill. Built from a group's `plugin.json` plus the skill's
21
- * `SKILL.md` frontmatter by `loadPackageRegistry`, and written per install
11
+ * One installable skill. Built from a source's plugin manifest plus the
12
+ * skill's `SKILL.md` frontmatter by `readSkillDir`, and written per install
22
13
  * into `skills.json` by the `add` and `update` commands.
23
14
  */
24
- export const SkillMetaSchema = z.object({
25
- name: z.string().min(1),
26
- description: z.string().optional(),
27
- version: z.string().optional(),
28
- /** Plugin root the skill ships in, e.g. `speech` */
15
+ export const SkillMetaSchema = OriginEntrySchema.extend({
16
+ /** Plugin the skill ships in, e.g. `speech` */
29
17
  group: z.string().min(1),
30
- /** Registry keys (skill directory names) this skill needs installed alongside it */
18
+ /**
19
+ * Skills this one needs installed beside it. As read from a source these
20
+ * are `<key>` or `<key>@<source>`; once installed, the resolved keys.
21
+ */
31
22
  registryDependencies: z.array(z.string().min(1)).optional(),
32
- source: SkillSourceSchema.optional(),
33
23
  files: z.array(SkillFileSchema).min(1),
34
24
  });
35
25
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;AAI3E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,gHAAgH;IAChH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,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0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAInF,0FAA0F;AAC1F,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,mBAAmB;CAC1B,CAAC,CAAC;AAIH;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC,MAAM,CAAC;IACtD,+CAA+C;IAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB;;;OAGG;IACH,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACvC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { SourceRecord } from "@g3nomaly/core/sources";
2
+ /** Sources every project has without registering them; they cannot be removed. */
3
+ export declare const BUILTIN_SOURCES: SourceRecord;
4
+ //# sourceMappingURL=builtins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/sources/builtins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,kFAAkF;AAClF,eAAO,MAAM,eAAe,EAAE,YAE7B,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** Sources every project has without registering them; they cannot be removed. */
2
+ export const BUILTIN_SOURCES = {
3
+ "g3n-skills": { kind: "npm", package: "@g3nomaly/g3n-skills" },
4
+ };
5
+ //# sourceMappingURL=builtins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../src/sources/builtins.ts"],"names":[],"mappings":"AAGA,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,YAAY,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE;CAC/D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { BUILTIN_SOURCES } from "./builtins";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sources/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ // packages/skills/src/sources/index.ts
2
+ export { BUILTIN_SOURCES } from "./builtins";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sources/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Parses the YAML block between the `---` fences that open a `.md` file.
3
+ *
4
+ * @throws when the file has no frontmatter block or it is not a YAML mapping
5
+ */
6
+ export declare function readFrontmatter(file: string): Promise<Record<string, unknown>>;
7
+ //# sourceMappingURL=frontmatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../../src/utils/frontmatter.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAYpF"}
@@ -0,0 +1,20 @@
1
+ // packages/skills/src/utils/frontmatter.ts
2
+ const FENCE = "---";
3
+ /**
4
+ * Parses the YAML block between the `---` fences that open a `.md` file.
5
+ *
6
+ * @throws when the file has no frontmatter block or it is not a YAML mapping
7
+ */
8
+ export async function readFrontmatter(file) {
9
+ const lines = (await Bun.file(file).text()).split("\n");
10
+ const closing = lines.findIndex((line, index) => index > 0 && line.trimEnd() === FENCE);
11
+ if (lines[0]?.trimEnd() !== FENCE || closing === -1) {
12
+ throw new Error(`${file} has no ${FENCE} frontmatter block at the top`);
13
+ }
14
+ const frontmatter = Bun.YAML.parse(lines.slice(1, closing).join("\n"));
15
+ if (typeof frontmatter !== "object" || frontmatter === null || Array.isArray(frontmatter)) {
16
+ throw new Error(`${file} frontmatter is not a YAML mapping`);
17
+ }
18
+ return frontmatter;
19
+ }
20
+ //# sourceMappingURL=frontmatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../../src/utils/frontmatter.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,KAAK,GAAG,KAAK,CAAC;AAEpB;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAY;IAChD,MAAM,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,CAAC;IACxF,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,WAAW,KAAK,+BAA+B,CAAC,CAAC;IAC1E,CAAC;IAED,MAAM,WAAW,GAAY,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1F,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,oCAAoC,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,WAAsC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { readFrontmatter } from "./frontmatter";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ // packages/skills/src/utils/index.ts
2
+ export { readFrontmatter } from "./frontmatter";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@g3nomaly/skills",
3
- "version": "1.0.0",
4
- "description": "Shared logic and plugin roots for the g3n task-manager and workflow Claude Code plugins.",
3
+ "version": "1.0.1",
4
+ "description": "Installer for skills and their hooks from any registered source: git repositories, npm packages and local folders.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "g3n-skills": "./dist/cli/index.js"
@@ -12,47 +12,23 @@
12
12
  "types": "./dist/index.d.ts",
13
13
  "default": "./dist/index.js"
14
14
  },
15
- "./schemas": {
16
- "types": "./dist/schemas/index.d.ts",
17
- "default": "./dist/schemas/index.js"
18
- },
19
- "./filetree": {
20
- "types": "./dist/filetree/index.d.ts",
21
- "default": "./dist/filetree/index.js"
22
- },
23
- "./hooks": {
24
- "types": "./dist/hooks/index.d.ts",
25
- "default": "./dist/hooks/index.js"
26
- },
27
- "./package.json": "./package.json",
28
- "./registry": {
29
- "types": "./dist/registry/index.d.ts",
30
- "default": "./dist/registry/index.js"
31
- },
32
- "./cli/adapter": {
33
- "types": "./dist/cli/adapter.d.ts",
34
- "default": "./dist/cli/adapter.js"
35
- }
15
+ "./package.json": "./package.json"
36
16
  },
37
17
  "files": [
38
18
  "dist"
39
19
  ],
40
20
  "scripts": {
41
- "build": "rm -rf dist && bun run build:types && bun run build:plugins",
21
+ "build": "rm -rf dist && bun run build:types",
42
22
  "typecheck": "tsc --noEmit",
43
- "test": "bun test",
44
- "test:clean": "CLEAN_TMP=1 bun test",
45
23
  "skills": "bun run src/cli/index.ts",
46
- "build:marketplace": "bun scripts/build-marketplace.ts",
47
- "build:types": "tsc --project tsconfig.build.json",
48
- "build:plugins": "bun scripts/build-plugins.ts"
24
+ "build:types": "tsc --project tsconfig.build.json"
49
25
  },
50
26
  "dependencies": {
51
- "@g3nomaly/core": "^0.2.0",
52
- "zod": "^4.4.3",
27
+ "@g3nomaly/core": "^0.3.1",
53
28
  "@clack/prompts": "^1.7.0",
54
29
  "chalk": "^6.0.0",
55
- "commander": "^15.0.0"
30
+ "commander": "^15.0.0",
31
+ "zod": "^4.4.3"
56
32
  },
57
33
  "devDependencies": {
58
34
  "@types/bun": "^1.4.0",
@@ -1,6 +0,0 @@
1
- /**
2
- * Runs one task-manager or workflow hook with its flags passed through untouched.
3
- * Invoked as `g3n-skills hook <name> [flags]` from hooks.json and SKILL.md.
4
- */
5
- export declare function hookCommand(name: string | undefined, argv: readonly string[]): void;
6
- //# sourceMappingURL=hook.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/hook.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAOnF"}
@@ -1,18 +0,0 @@
1
- // packages/skills/src/cli/commands/hook.ts
2
- import { TASK_MANAGER_HOOKS } from "../../task-manager/hooks";
3
- import { WORKFLOW_HOOKS } from "../../workflow/hooks";
4
- import { runHook } from "../../hooks/cli";
5
- const HOOKS = { ...TASK_MANAGER_HOOKS, ...WORKFLOW_HOOKS };
6
- /**
7
- * Runs one task-manager or workflow hook with its flags passed through untouched.
8
- * Invoked as `g3n-skills hook <name> [flags]` from hooks.json and SKILL.md.
9
- */
10
- export function hookCommand(name, argv) {
11
- const hook = name === undefined ? undefined : HOOKS[name];
12
- if (hook === undefined) {
13
- console.error(`unknown hook "${name ?? ""}". Available: ${Object.keys(HOOKS).sort().join(", ")}`);
14
- process.exit(1);
15
- }
16
- runHook(() => hook(argv));
17
- }
18
- //# sourceMappingURL=hook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/cli/commands/hook.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAa,MAAM,iBAAiB,CAAC;AAErD,MAAM,KAAK,GAAmC,EAAE,GAAG,kBAAkB,EAAE,GAAG,cAAc,EAAE,CAAC;AAE3F;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAwB,EAAE,IAAuB;IAC3E,MAAM,IAAI,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1D,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,CAAC,KAAK,CAAC,iBAAiB,IAAI,IAAI,EAAE,iBAAiB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5B,CAAC"}
@@ -1,6 +0,0 @@
1
- export { decisionsDirFor, decisionPathFor } from "./paths";
2
- export { listDecisionIds, readDecision } from "./read";
3
- export type { DecisionDocument } from "./read";
4
- export { nextDecisionId, addDecision } from "./write";
5
- export type { NewDecision } from "./write";
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decisions/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
@@ -1,5 +0,0 @@
1
- // packages/skills/src/decisions/index.ts
2
- export { decisionsDirFor, decisionPathFor } from "./paths";
3
- export { listDecisionIds, readDecision } from "./read";
4
- export { nextDecisionId, addDecision } from "./write";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decisions/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
@@ -1,4 +0,0 @@
1
- /** Folder holding a plan's decision files. */
2
- export declare function decisionsDirFor(planDir: string): string;
3
- export declare function decisionPathFor(planDir: string, id: string): string;
4
- //# sourceMappingURL=paths.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/decisions/paths.ts"],"names":[],"mappings":"AAKA,8CAA8C;AAC9C,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEnE"}
@@ -1,12 +0,0 @@
1
- // packages/skills/src/decisions/paths.ts
2
- import { join } from "node:path";
3
- import { DECISIONS_DIR } from "../schemas/decision";
4
- import { MARKDOWN } from "../filetree/levels";
5
- /** Folder holding a plan's decision files. */
6
- export function decisionsDirFor(planDir) {
7
- return join(planDir, DECISIONS_DIR);
8
- }
9
- export function decisionPathFor(planDir, id) {
10
- return join(decisionsDirFor(planDir), `${id}${MARKDOWN}`);
11
- }
12
- //# sourceMappingURL=paths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/decisions/paths.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,8CAA8C;AAC9C,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,OAAO,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,EAAU;IACzD,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;AAC5D,CAAC"}
@@ -1,18 +0,0 @@
1
- import { type Decision } from "../schemas/decision";
2
- /** One decision as it sits on disk: where it was read from, its fields, its prose. */
3
- export interface DecisionDocument {
4
- file: string;
5
- meta: Decision;
6
- body: string;
7
- }
8
- /** Ids of a plan's decisions, in numbered order. A plan with no `decisions/` folder has none. */
9
- export declare function listDecisionIds(planDir: string): Promise<string[]>;
10
- /**
11
- * Reads one decision of a plan and checks it against its schema.
12
- *
13
- * @param id file name without extension, e.g. `0001-use-jwt`
14
- * @throws FileValidationError when a field fails its schema, or when the `id`
15
- * inside the file disagrees with the file it was read from
16
- */
17
- export declare function readDecision(planDir: string, id: string): Promise<DecisionDocument>;
18
- //# sourceMappingURL=read.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/decisions/read.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpE,sFAAsF;AACtF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,iGAAiG;AACjG,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAcxE;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAgBzF"}