agents-inc 0.149.2 → 0.150.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 (572) hide show
  1. package/CHANGELOG.md +2277 -0
  2. package/LICENSE +21 -0
  3. package/README.md +136 -19
  4. package/assets/demo.gif +0 -0
  5. package/assets/demo.tape +266 -0
  6. package/assets/logo.svg +75 -0
  7. package/dist/chunk-2RSNKBXC.js +84 -0
  8. package/dist/chunk-2RSNKBXC.js.map +1 -0
  9. package/dist/chunk-3LIU2ZEF.js +1355 -0
  10. package/dist/chunk-3LIU2ZEF.js.map +1 -0
  11. package/dist/chunk-4GL2F5AB.js +222 -0
  12. package/dist/chunk-4GL2F5AB.js.map +1 -0
  13. package/dist/chunk-4LPJZNT7.js +382 -0
  14. package/dist/chunk-4LPJZNT7.js.map +1 -0
  15. package/dist/chunk-5K5RBRTD.js +62 -0
  16. package/dist/chunk-5K5RBRTD.js.map +1 -0
  17. package/dist/chunk-6I6RZHYP.js +789 -0
  18. package/dist/chunk-6I6RZHYP.js.map +1 -0
  19. package/dist/chunk-7URSGJLE.js +430 -0
  20. package/dist/chunk-7URSGJLE.js.map +1 -0
  21. package/dist/chunk-C55DN7GE.js +35 -0
  22. package/dist/chunk-C55DN7GE.js.map +1 -0
  23. package/dist/chunk-CDMHSHBN.js +68 -0
  24. package/dist/chunk-CDMHSHBN.js.map +1 -0
  25. package/dist/chunk-CFQT72MJ.js +92 -0
  26. package/dist/chunk-CFQT72MJ.js.map +1 -0
  27. package/dist/chunk-DAG2ULNF.js +125 -0
  28. package/dist/chunk-DAG2ULNF.js.map +1 -0
  29. package/dist/chunk-DDG4F3FE.js +181 -0
  30. package/dist/chunk-DDG4F3FE.js.map +1 -0
  31. package/dist/chunk-DIBCRIMR.js +36 -0
  32. package/dist/chunk-DIBCRIMR.js.map +1 -0
  33. package/dist/chunk-DJAZE4PD.js +10929 -0
  34. package/dist/chunk-DJAZE4PD.js.map +1 -0
  35. package/dist/chunk-DUVWGO6E.js +54 -0
  36. package/dist/chunk-DUVWGO6E.js.map +1 -0
  37. package/dist/chunk-E4FT2KFV.js +174 -0
  38. package/dist/chunk-E4FT2KFV.js.map +1 -0
  39. package/dist/chunk-EKWAUOQB.js +96 -0
  40. package/dist/chunk-EKWAUOQB.js.map +1 -0
  41. package/dist/chunk-EN2GCPW7.js +300 -0
  42. package/dist/chunk-EN2GCPW7.js.map +1 -0
  43. package/dist/chunk-ES3NJZON.js +31 -0
  44. package/dist/chunk-ES3NJZON.js.map +1 -0
  45. package/dist/chunk-F3756A5B.js +20 -0
  46. package/dist/chunk-F3756A5B.js.map +1 -0
  47. package/dist/chunk-FWT3CBLL.js +51 -0
  48. package/dist/chunk-FWT3CBLL.js.map +1 -0
  49. package/dist/chunk-FYPUUYSG.js +31 -0
  50. package/dist/chunk-FYPUUYSG.js.map +1 -0
  51. package/dist/chunk-GRPSDKIS.js +112 -0
  52. package/dist/chunk-GRPSDKIS.js.map +1 -0
  53. package/dist/chunk-GYG5SE2D.js +81 -0
  54. package/dist/chunk-GYG5SE2D.js.map +1 -0
  55. package/dist/chunk-HIPGKIT3.js +287 -0
  56. package/dist/chunk-HIPGKIT3.js.map +1 -0
  57. package/dist/chunk-I3XKEGHM.js +16383 -0
  58. package/dist/chunk-I3XKEGHM.js.map +1 -0
  59. package/dist/chunk-IHO75PMZ.js +40 -0
  60. package/dist/chunk-IHO75PMZ.js.map +1 -0
  61. package/dist/chunk-IOJR5TOY.js +47 -0
  62. package/dist/chunk-IOJR5TOY.js.map +1 -0
  63. package/dist/chunk-K3OU6TGX.js +77 -0
  64. package/dist/chunk-K3OU6TGX.js.map +1 -0
  65. package/dist/chunk-KH7MOIM5.js +6010 -0
  66. package/dist/chunk-KH7MOIM5.js.map +1 -0
  67. package/dist/chunk-KIR7VYQD.js +63 -0
  68. package/dist/chunk-KIR7VYQD.js.map +1 -0
  69. package/dist/chunk-KOPEM3Q7.js +27 -0
  70. package/dist/chunk-KOPEM3Q7.js.map +1 -0
  71. package/dist/chunk-KSZ6PCY4.js +43 -0
  72. package/dist/chunk-KSZ6PCY4.js.map +1 -0
  73. package/dist/chunk-LRYNF3J7.js +111 -0
  74. package/dist/chunk-LRYNF3J7.js.map +1 -0
  75. package/dist/chunk-LYYXX2W5.js +87 -0
  76. package/dist/chunk-LYYXX2W5.js.map +1 -0
  77. package/dist/chunk-MC5DUZ3V.js +1135 -0
  78. package/dist/chunk-MC5DUZ3V.js.map +1 -0
  79. package/dist/chunk-N4IZ6GBO.js +300 -0
  80. package/dist/chunk-N4IZ6GBO.js.map +1 -0
  81. package/dist/chunk-NIKUMXE7.js +24 -0
  82. package/dist/chunk-NIKUMXE7.js.map +1 -0
  83. package/dist/chunk-NUIZ6ZUO.js +42 -0
  84. package/dist/chunk-NUIZ6ZUO.js.map +1 -0
  85. package/dist/chunk-O5ASLZ2K.js +270 -0
  86. package/dist/chunk-O5ASLZ2K.js.map +1 -0
  87. package/dist/chunk-OA5SUEQD.js +181 -0
  88. package/dist/chunk-OA5SUEQD.js.map +1 -0
  89. package/dist/chunk-OZZGXBCN.js +15 -0
  90. package/dist/chunk-OZZGXBCN.js.map +1 -0
  91. package/dist/chunk-P3PN5SVI.js +27 -0
  92. package/dist/chunk-P3PN5SVI.js.map +1 -0
  93. package/dist/chunk-P56WJ5FA.js +50 -0
  94. package/dist/chunk-P56WJ5FA.js.map +1 -0
  95. package/dist/chunk-PG4G4IIK.js +24 -0
  96. package/dist/chunk-PG4G4IIK.js.map +1 -0
  97. package/dist/chunk-QQLRX4KI.js +41 -0
  98. package/dist/chunk-QQLRX4KI.js.map +1 -0
  99. package/dist/chunk-RBHYLCUB.js +31 -0
  100. package/dist/chunk-RBHYLCUB.js.map +1 -0
  101. package/dist/chunk-RJN7W2C7.js +349 -0
  102. package/dist/chunk-RJN7W2C7.js.map +1 -0
  103. package/dist/chunk-RP7R73JO.js +179 -0
  104. package/dist/chunk-RP7R73JO.js.map +1 -0
  105. package/dist/chunk-SYUOXSPU.js +510 -0
  106. package/dist/chunk-SYUOXSPU.js.map +1 -0
  107. package/dist/chunk-THKIOI32.js +939 -0
  108. package/dist/chunk-THKIOI32.js.map +1 -0
  109. package/dist/chunk-UZRISDBZ.js +28 -0
  110. package/dist/chunk-UZRISDBZ.js.map +1 -0
  111. package/dist/chunk-V7QOSGQA.js +298 -0
  112. package/dist/chunk-V7QOSGQA.js.map +1 -0
  113. package/dist/chunk-VEP23B5W.js +27 -0
  114. package/dist/chunk-VEP23B5W.js.map +1 -0
  115. package/dist/chunk-VG2TVBFN.js +52 -0
  116. package/dist/chunk-VG2TVBFN.js.map +1 -0
  117. package/dist/chunk-VIFZ6NFH.js +27 -0
  118. package/dist/chunk-VIFZ6NFH.js.map +1 -0
  119. package/dist/chunk-XA57SX4T.js +115 -0
  120. package/dist/chunk-XA57SX4T.js.map +1 -0
  121. package/dist/chunk-YKKIJHZB.js +339 -0
  122. package/dist/chunk-YKKIJHZB.js.map +1 -0
  123. package/dist/chunk-YU2VGX5R.js +4205 -0
  124. package/dist/chunk-YU2VGX5R.js.map +1 -0
  125. package/dist/chunk-ZDLTLNU2.js +258 -0
  126. package/dist/chunk-ZDLTLNU2.js.map +1 -0
  127. package/dist/chunk-ZHTXPFDK.js +128 -0
  128. package/dist/chunk-ZHTXPFDK.js.map +1 -0
  129. package/dist/chunk-ZKJAJWK6.js +253 -0
  130. package/dist/chunk-ZKJAJWK6.js.map +1 -0
  131. package/dist/commands/build/marketplace.js +250 -0
  132. package/dist/commands/build/marketplace.js.map +1 -0
  133. package/dist/commands/build/plugins.js +176 -0
  134. package/dist/commands/build/plugins.js.map +1 -0
  135. package/dist/commands/compile.js +331 -0
  136. package/dist/commands/compile.js.map +1 -0
  137. package/dist/commands/doctor.js +475 -0
  138. package/dist/commands/doctor.js.map +1 -0
  139. package/dist/commands/edit.js +765 -0
  140. package/dist/commands/edit.js.map +1 -0
  141. package/dist/commands/eject.js +393 -0
  142. package/dist/commands/eject.js.map +1 -0
  143. package/dist/commands/import/skill.js +349 -0
  144. package/dist/commands/import/skill.js.map +1 -0
  145. package/dist/commands/init.js +66 -0
  146. package/dist/commands/init.js.map +1 -0
  147. package/dist/commands/list.js +115 -0
  148. package/dist/commands/list.js.map +1 -0
  149. package/dist/commands/new/agent.js +304 -0
  150. package/dist/commands/new/agent.js.map +1 -0
  151. package/dist/commands/new/marketplace.js +315 -0
  152. package/dist/commands/new/marketplace.js.map +1 -0
  153. package/dist/commands/new/skill.js +28 -0
  154. package/dist/commands/new/skill.js.map +1 -0
  155. package/dist/commands/search.js +176 -0
  156. package/dist/commands/search.js.map +1 -0
  157. package/dist/commands/uninstall.js +570 -0
  158. package/dist/commands/uninstall.js.map +1 -0
  159. package/dist/commands/update.js +368 -0
  160. package/dist/commands/update.js.map +1 -0
  161. package/dist/commands/validate.js +581 -0
  162. package/dist/commands/validate.js.map +1 -0
  163. package/dist/components/common/confirm.js +9 -0
  164. package/dist/components/common/confirm.js.map +1 -0
  165. package/dist/components/common/confirm.test.js +203 -0
  166. package/dist/components/common/confirm.test.js.map +1 -0
  167. package/dist/components/common/prompt-confirm.js +11 -0
  168. package/dist/components/common/prompt-confirm.js.map +1 -0
  169. package/dist/components/common/select-list.js +11 -0
  170. package/dist/components/common/select-list.js.map +1 -0
  171. package/dist/components/common/spinner.js +9 -0
  172. package/dist/components/common/spinner.js.map +1 -0
  173. package/dist/components/wizard/category-grid.js +16 -0
  174. package/dist/components/wizard/category-grid.js.map +1 -0
  175. package/dist/components/wizard/category-grid.test.js +1253 -0
  176. package/dist/components/wizard/category-grid.test.js.map +1 -0
  177. package/dist/components/wizard/checkbox-grid.js +14 -0
  178. package/dist/components/wizard/checkbox-grid.js.map +1 -0
  179. package/dist/components/wizard/checkbox-grid.test.js +264 -0
  180. package/dist/components/wizard/checkbox-grid.test.js.map +1 -0
  181. package/dist/components/wizard/domain-selection.js +22 -0
  182. package/dist/components/wizard/domain-selection.js.map +1 -0
  183. package/dist/components/wizard/run-wizard-session.js +47 -0
  184. package/dist/components/wizard/run-wizard-session.js.map +1 -0
  185. package/dist/components/wizard/scroll-affordance.js +10 -0
  186. package/dist/components/wizard/scroll-affordance.js.map +1 -0
  187. package/dist/components/wizard/search-modal.js +14 -0
  188. package/dist/components/wizard/search-modal.js.map +1 -0
  189. package/dist/components/wizard/search-modal.test.js +212 -0
  190. package/dist/components/wizard/search-modal.test.js.map +1 -0
  191. package/dist/components/wizard/selection-card.js +10 -0
  192. package/dist/components/wizard/selection-card.js.map +1 -0
  193. package/dist/components/wizard/skill-agent-summary.js +16 -0
  194. package/dist/components/wizard/skill-agent-summary.js.map +1 -0
  195. package/dist/components/wizard/source-grid.js +23 -0
  196. package/dist/components/wizard/source-grid.js.map +1 -0
  197. package/dist/components/wizard/source-grid.test.js +1094 -0
  198. package/dist/components/wizard/source-grid.test.js.map +1 -0
  199. package/dist/components/wizard/stack-selection.js +20 -0
  200. package/dist/components/wizard/stack-selection.js.map +1 -0
  201. package/dist/components/wizard/step-agents.js +22 -0
  202. package/dist/components/wizard/step-agents.js.map +1 -0
  203. package/dist/components/wizard/step-agents.test.js +204 -0
  204. package/dist/components/wizard/step-agents.test.js.map +1 -0
  205. package/dist/components/wizard/step-build.js +22 -0
  206. package/dist/components/wizard/step-build.js.map +1 -0
  207. package/dist/components/wizard/step-build.test.js +552 -0
  208. package/dist/components/wizard/step-build.test.js.map +1 -0
  209. package/dist/components/wizard/step-confirm.js +21 -0
  210. package/dist/components/wizard/step-confirm.js.map +1 -0
  211. package/dist/components/wizard/step-confirm.test.js +744 -0
  212. package/dist/components/wizard/step-confirm.test.js.map +1 -0
  213. package/dist/components/wizard/step-settings.js +19 -0
  214. package/dist/components/wizard/step-settings.js.map +1 -0
  215. package/dist/components/wizard/step-settings.test.js +244 -0
  216. package/dist/components/wizard/step-settings.test.js.map +1 -0
  217. package/dist/components/wizard/step-sources.js +28 -0
  218. package/dist/components/wizard/step-sources.js.map +1 -0
  219. package/dist/components/wizard/step-sources.test.js +155 -0
  220. package/dist/components/wizard/step-sources.test.js.map +1 -0
  221. package/dist/components/wizard/step-stack.js +21 -0
  222. package/dist/components/wizard/step-stack.js.map +1 -0
  223. package/dist/components/wizard/step-stack.test.js +262 -0
  224. package/dist/components/wizard/step-stack.test.js.map +1 -0
  225. package/dist/components/wizard/summary-panel.js +20 -0
  226. package/dist/components/wizard/summary-panel.js.map +1 -0
  227. package/dist/components/wizard/summary-panel.test.js +317 -0
  228. package/dist/components/wizard/summary-panel.test.js.map +1 -0
  229. package/dist/components/wizard/toast.js +10 -0
  230. package/dist/components/wizard/toast.js.map +1 -0
  231. package/dist/components/wizard/wizard-layout.js +26 -0
  232. package/dist/components/wizard/wizard-layout.js.map +1 -0
  233. package/dist/components/wizard/wizard-layout.test.js +200 -0
  234. package/dist/components/wizard/wizard-layout.test.js.map +1 -0
  235. package/dist/components/wizard/wizard-tabs.js +20 -0
  236. package/dist/components/wizard/wizard-tabs.js.map +1 -0
  237. package/dist/components/wizard/wizard-tabs.test.js +290 -0
  238. package/dist/components/wizard/wizard-tabs.test.js.map +1 -0
  239. package/dist/components/wizard/wizard.js +48 -0
  240. package/dist/components/wizard/wizard.js.map +1 -0
  241. package/dist/config-exports.js +20 -0
  242. package/dist/config-exports.js.map +1 -0
  243. package/dist/copy-local-skills-CA7P73RZ.js +15 -0
  244. package/dist/copy-local-skills-CA7P73RZ.js.map +1 -0
  245. package/dist/dist-VNJNNJK7.js +550 -0
  246. package/dist/dist-VNJNNJK7.js.map +1 -0
  247. package/dist/hooks/init.js +90 -0
  248. package/dist/hooks/init.js.map +1 -0
  249. package/dist/index.js +10 -0
  250. package/dist/index.js.map +1 -0
  251. package/dist/load-agent-defs-6MAY5ABI.js +16 -0
  252. package/dist/load-agent-defs-6MAY5ABI.js.map +1 -0
  253. package/dist/loader-E2ERJYVA.js +23 -0
  254. package/dist/loader-E2ERJYVA.js.map +1 -0
  255. package/dist/magic-string.es-5TV73NJD.js +1316 -0
  256. package/dist/magic-string.es-5TV73NJD.js.map +1 -0
  257. package/dist/recompile-project-agents-VYQJ6UZB.js +20 -0
  258. package/dist/recompile-project-agents-VYQJ6UZB.js.map +1 -0
  259. package/dist/source-loader-VVHMQEX5.js +20 -0
  260. package/dist/source-loader-VVHMQEX5.js.map +1 -0
  261. package/dist/source-manager-TPDXV5FO.js +18 -0
  262. package/dist/source-manager-TPDXV5FO.js.map +1 -0
  263. package/dist/src/agents/_templates/agent.liquid +161 -0
  264. package/dist/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
  265. package/dist/src/agents/_templates/methodologies/context-management.liquid +162 -0
  266. package/dist/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
  267. package/dist/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
  268. package/dist/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
  269. package/dist/src/agents/_templates/methodologies/write-verification.liquid +43 -0
  270. package/dist/src/agents/developer/ai-developer/critical-reminders.md +54 -0
  271. package/dist/src/agents/developer/ai-developer/critical-requirements.md +59 -0
  272. package/dist/src/agents/developer/ai-developer/identity.md +51 -0
  273. package/dist/src/agents/developer/ai-developer/metadata.yaml +12 -0
  274. package/dist/src/agents/developer/ai-developer/output.md +366 -0
  275. package/dist/src/agents/developer/ai-developer/playbook.md +335 -0
  276. package/dist/src/agents/developer/api-developer/critical-reminders.md +46 -0
  277. package/dist/src/agents/developer/api-developer/critical-requirements.md +44 -0
  278. package/dist/src/agents/developer/api-developer/identity.md +49 -0
  279. package/dist/src/agents/developer/api-developer/metadata.yaml +12 -0
  280. package/dist/src/agents/developer/api-developer/output.md +432 -0
  281. package/dist/src/agents/developer/api-developer/playbook.md +352 -0
  282. package/dist/src/agents/developer/cli-developer/critical-reminders.md +51 -0
  283. package/dist/src/agents/developer/cli-developer/critical-requirements.md +51 -0
  284. package/dist/src/agents/developer/cli-developer/identity.md +51 -0
  285. package/dist/src/agents/developer/cli-developer/metadata.yaml +12 -0
  286. package/dist/src/agents/developer/cli-developer/output.md +285 -0
  287. package/dist/src/agents/developer/cli-developer/playbook.md +386 -0
  288. package/dist/src/agents/developer/web-architecture/critical-reminders.md +48 -0
  289. package/dist/src/agents/developer/web-architecture/critical-requirements.md +65 -0
  290. package/dist/src/agents/developer/web-architecture/identity.md +64 -0
  291. package/dist/src/agents/developer/web-architecture/metadata.yaml +12 -0
  292. package/dist/src/agents/developer/web-architecture/output.md +449 -0
  293. package/dist/src/agents/developer/web-architecture/playbook.md +481 -0
  294. package/dist/src/agents/developer/web-developer/critical-reminders.md +40 -0
  295. package/dist/src/agents/developer/web-developer/critical-requirements.md +39 -0
  296. package/dist/src/agents/developer/web-developer/identity.md +32 -0
  297. package/dist/src/agents/developer/web-developer/metadata.yaml +12 -0
  298. package/dist/src/agents/developer/web-developer/output.md +323 -0
  299. package/dist/src/agents/developer/web-developer/playbook.md +349 -0
  300. package/dist/src/agents/meta/agent-summoner/critical-reminders.md +45 -0
  301. package/dist/src/agents/meta/agent-summoner/critical-requirements.md +52 -0
  302. package/dist/src/agents/meta/agent-summoner/identity.md +34 -0
  303. package/dist/src/agents/meta/agent-summoner/metadata.yaml +12 -0
  304. package/dist/src/agents/meta/agent-summoner/output.md +296 -0
  305. package/dist/src/agents/meta/agent-summoner/playbook.md +1469 -0
  306. package/dist/src/agents/meta/codex-keeper/critical-reminders.md +39 -0
  307. package/dist/src/agents/meta/codex-keeper/critical-requirements.md +29 -0
  308. package/dist/src/agents/meta/codex-keeper/identity.md +45 -0
  309. package/dist/src/agents/meta/codex-keeper/metadata.yaml +12 -0
  310. package/dist/src/agents/meta/codex-keeper/output.md +384 -0
  311. package/dist/src/agents/meta/codex-keeper/playbook.md +1183 -0
  312. package/dist/src/agents/meta/convention-keeper/critical-reminders.md +32 -0
  313. package/dist/src/agents/meta/convention-keeper/critical-requirements.md +32 -0
  314. package/dist/src/agents/meta/convention-keeper/identity.md +33 -0
  315. package/dist/src/agents/meta/convention-keeper/metadata.yaml +12 -0
  316. package/dist/src/agents/meta/convention-keeper/output.md +206 -0
  317. package/dist/src/agents/meta/convention-keeper/playbook.md +180 -0
  318. package/dist/src/agents/meta/skill-summoner/critical-reminders.md +112 -0
  319. package/dist/src/agents/meta/skill-summoner/critical-requirements.md +62 -0
  320. package/dist/src/agents/meta/skill-summoner/identity.md +31 -0
  321. package/dist/src/agents/meta/skill-summoner/metadata.yaml +13 -0
  322. package/dist/src/agents/meta/skill-summoner/output.md +390 -0
  323. package/dist/src/agents/meta/skill-summoner/playbook.md +1457 -0
  324. package/dist/src/agents/pattern/pattern-scout/critical-reminders.md +71 -0
  325. package/dist/src/agents/pattern/pattern-scout/critical-requirements.md +31 -0
  326. package/dist/src/agents/pattern/pattern-scout/identity.md +25 -0
  327. package/dist/src/agents/pattern/pattern-scout/metadata.yaml +10 -0
  328. package/dist/src/agents/pattern/pattern-scout/output.md +290 -0
  329. package/dist/src/agents/pattern/pattern-scout/playbook.md +1806 -0
  330. package/dist/src/agents/pattern/web-pattern-critique/critical-reminders.md +30 -0
  331. package/dist/src/agents/pattern/web-pattern-critique/critical-requirements.md +28 -0
  332. package/dist/src/agents/pattern/web-pattern-critique/identity.md +41 -0
  333. package/dist/src/agents/pattern/web-pattern-critique/metadata.yaml +12 -0
  334. package/dist/src/agents/pattern/web-pattern-critique/output.md +314 -0
  335. package/dist/src/agents/pattern/web-pattern-critique/playbook.md +572 -0
  336. package/dist/src/agents/planning/api-pm/critical-reminders.md +48 -0
  337. package/dist/src/agents/planning/api-pm/critical-requirements.md +41 -0
  338. package/dist/src/agents/planning/api-pm/identity.md +39 -0
  339. package/dist/src/agents/planning/api-pm/metadata.yaml +12 -0
  340. package/dist/src/agents/planning/api-pm/output.md +475 -0
  341. package/dist/src/agents/planning/api-pm/playbook.md +129 -0
  342. package/dist/src/agents/planning/web-pm/critical-reminders.md +36 -0
  343. package/dist/src/agents/planning/web-pm/critical-requirements.md +32 -0
  344. package/dist/src/agents/planning/web-pm/identity.md +26 -0
  345. package/dist/src/agents/planning/web-pm/metadata.yaml +12 -0
  346. package/dist/src/agents/planning/web-pm/output.md +314 -0
  347. package/dist/src/agents/planning/web-pm/playbook.md +318 -0
  348. package/dist/src/agents/researcher/api-researcher/critical-reminders.md +27 -0
  349. package/dist/src/agents/researcher/api-researcher/critical-requirements.md +28 -0
  350. package/dist/src/agents/researcher/api-researcher/identity.md +71 -0
  351. package/dist/src/agents/researcher/api-researcher/metadata.yaml +10 -0
  352. package/dist/src/agents/researcher/api-researcher/output.md +254 -0
  353. package/dist/src/agents/researcher/api-researcher/playbook.md +201 -0
  354. package/dist/src/agents/researcher/web-researcher/critical-reminders.md +39 -0
  355. package/dist/src/agents/researcher/web-researcher/critical-requirements.md +26 -0
  356. package/dist/src/agents/researcher/web-researcher/identity.md +69 -0
  357. package/dist/src/agents/researcher/web-researcher/metadata.yaml +10 -0
  358. package/dist/src/agents/researcher/web-researcher/output.md +241 -0
  359. package/dist/src/agents/researcher/web-researcher/playbook.md +217 -0
  360. package/dist/src/agents/reviewer/ai-reviewer/critical-reminders.md +40 -0
  361. package/dist/src/agents/reviewer/ai-reviewer/critical-requirements.md +37 -0
  362. package/dist/src/agents/reviewer/ai-reviewer/identity.md +51 -0
  363. package/dist/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
  364. package/dist/src/agents/reviewer/ai-reviewer/output.md +395 -0
  365. package/dist/src/agents/reviewer/ai-reviewer/playbook.md +90 -0
  366. package/dist/src/agents/reviewer/api-reviewer/critical-reminders.md +31 -0
  367. package/dist/src/agents/reviewer/api-reviewer/critical-requirements.md +27 -0
  368. package/dist/src/agents/reviewer/api-reviewer/identity.md +51 -0
  369. package/dist/src/agents/reviewer/api-reviewer/metadata.yaml +12 -0
  370. package/dist/src/agents/reviewer/api-reviewer/output.md +343 -0
  371. package/dist/src/agents/reviewer/api-reviewer/playbook.md +288 -0
  372. package/dist/src/agents/reviewer/cli-reviewer/critical-reminders.md +33 -0
  373. package/dist/src/agents/reviewer/cli-reviewer/critical-requirements.md +30 -0
  374. package/dist/src/agents/reviewer/cli-reviewer/identity.md +44 -0
  375. package/dist/src/agents/reviewer/cli-reviewer/metadata.yaml +12 -0
  376. package/dist/src/agents/reviewer/cli-reviewer/output.md +414 -0
  377. package/dist/src/agents/reviewer/cli-reviewer/playbook.md +218 -0
  378. package/dist/src/agents/reviewer/infra-reviewer/critical-reminders.md +38 -0
  379. package/dist/src/agents/reviewer/infra-reviewer/critical-requirements.md +38 -0
  380. package/dist/src/agents/reviewer/infra-reviewer/identity.md +53 -0
  381. package/dist/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
  382. package/dist/src/agents/reviewer/infra-reviewer/output.md +364 -0
  383. package/dist/src/agents/reviewer/infra-reviewer/playbook.md +161 -0
  384. package/dist/src/agents/reviewer/web-reviewer/critical-reminders.md +31 -0
  385. package/dist/src/agents/reviewer/web-reviewer/critical-requirements.md +26 -0
  386. package/dist/src/agents/reviewer/web-reviewer/identity.md +40 -0
  387. package/dist/src/agents/reviewer/web-reviewer/metadata.yaml +12 -0
  388. package/dist/src/agents/reviewer/web-reviewer/output.md +333 -0
  389. package/dist/src/agents/reviewer/web-reviewer/playbook.md +156 -0
  390. package/dist/src/agents/tester/api-tester/critical-reminders.md +41 -0
  391. package/dist/src/agents/tester/api-tester/critical-requirements.md +41 -0
  392. package/dist/src/agents/tester/api-tester/identity.md +47 -0
  393. package/dist/src/agents/tester/api-tester/metadata.yaml +12 -0
  394. package/dist/src/agents/tester/api-tester/output.md +284 -0
  395. package/dist/src/agents/tester/api-tester/playbook.md +275 -0
  396. package/dist/src/agents/tester/cli-tester/critical-reminders.md +36 -0
  397. package/dist/src/agents/tester/cli-tester/critical-requirements.md +36 -0
  398. package/dist/src/agents/tester/cli-tester/identity.md +43 -0
  399. package/dist/src/agents/tester/cli-tester/metadata.yaml +12 -0
  400. package/dist/src/agents/tester/cli-tester/output.md +313 -0
  401. package/dist/src/agents/tester/cli-tester/playbook.md +221 -0
  402. package/dist/src/agents/tester/web-tester/critical-reminders.md +31 -0
  403. package/dist/src/agents/tester/web-tester/critical-requirements.md +28 -0
  404. package/dist/src/agents/tester/web-tester/identity.md +41 -0
  405. package/dist/src/agents/tester/web-tester/metadata.yaml +12 -0
  406. package/dist/src/agents/tester/web-tester/output.md +321 -0
  407. package/dist/src/agents/tester/web-tester/playbook.md +428 -0
  408. package/dist/stores/d227-same-scope-tombstone-duplicate.test.js +118 -0
  409. package/dist/stores/d227-same-scope-tombstone-duplicate.test.js.map +1 -0
  410. package/dist/stores/wizard-store.js +21 -0
  411. package/dist/stores/wizard-store.js.map +1 -0
  412. package/dist/stores/wizard-store.test.js +3053 -0
  413. package/dist/stores/wizard-store.test.js.map +1 -0
  414. package/package.json +130 -12
  415. package/src/agents/_templates/agent.liquid +161 -0
  416. package/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
  417. package/src/agents/_templates/methodologies/context-management.liquid +162 -0
  418. package/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
  419. package/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
  420. package/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
  421. package/src/agents/_templates/methodologies/write-verification.liquid +43 -0
  422. package/src/agents/developer/ai-developer/critical-reminders.md +54 -0
  423. package/src/agents/developer/ai-developer/critical-requirements.md +59 -0
  424. package/src/agents/developer/ai-developer/identity.md +51 -0
  425. package/src/agents/developer/ai-developer/metadata.yaml +12 -0
  426. package/src/agents/developer/ai-developer/output.md +366 -0
  427. package/src/agents/developer/ai-developer/playbook.md +335 -0
  428. package/src/agents/developer/api-developer/critical-reminders.md +46 -0
  429. package/src/agents/developer/api-developer/critical-requirements.md +44 -0
  430. package/src/agents/developer/api-developer/identity.md +49 -0
  431. package/src/agents/developer/api-developer/metadata.yaml +12 -0
  432. package/src/agents/developer/api-developer/output.md +432 -0
  433. package/src/agents/developer/api-developer/playbook.md +352 -0
  434. package/src/agents/developer/cli-developer/critical-reminders.md +51 -0
  435. package/src/agents/developer/cli-developer/critical-requirements.md +51 -0
  436. package/src/agents/developer/cli-developer/identity.md +51 -0
  437. package/src/agents/developer/cli-developer/metadata.yaml +12 -0
  438. package/src/agents/developer/cli-developer/output.md +285 -0
  439. package/src/agents/developer/cli-developer/playbook.md +386 -0
  440. package/src/agents/developer/web-architecture/critical-reminders.md +48 -0
  441. package/src/agents/developer/web-architecture/critical-requirements.md +65 -0
  442. package/src/agents/developer/web-architecture/identity.md +64 -0
  443. package/src/agents/developer/web-architecture/metadata.yaml +12 -0
  444. package/src/agents/developer/web-architecture/output.md +449 -0
  445. package/src/agents/developer/web-architecture/playbook.md +481 -0
  446. package/src/agents/developer/web-developer/critical-reminders.md +40 -0
  447. package/src/agents/developer/web-developer/critical-requirements.md +39 -0
  448. package/src/agents/developer/web-developer/identity.md +32 -0
  449. package/src/agents/developer/web-developer/metadata.yaml +12 -0
  450. package/src/agents/developer/web-developer/output.md +323 -0
  451. package/src/agents/developer/web-developer/playbook.md +349 -0
  452. package/src/agents/meta/agent-summoner/critical-reminders.md +45 -0
  453. package/src/agents/meta/agent-summoner/critical-requirements.md +52 -0
  454. package/src/agents/meta/agent-summoner/identity.md +34 -0
  455. package/src/agents/meta/agent-summoner/metadata.yaml +12 -0
  456. package/src/agents/meta/agent-summoner/output.md +296 -0
  457. package/src/agents/meta/agent-summoner/playbook.md +1469 -0
  458. package/src/agents/meta/codex-keeper/critical-reminders.md +39 -0
  459. package/src/agents/meta/codex-keeper/critical-requirements.md +29 -0
  460. package/src/agents/meta/codex-keeper/identity.md +45 -0
  461. package/src/agents/meta/codex-keeper/metadata.yaml +12 -0
  462. package/src/agents/meta/codex-keeper/output.md +384 -0
  463. package/src/agents/meta/codex-keeper/playbook.md +1183 -0
  464. package/src/agents/meta/convention-keeper/critical-reminders.md +32 -0
  465. package/src/agents/meta/convention-keeper/critical-requirements.md +32 -0
  466. package/src/agents/meta/convention-keeper/identity.md +33 -0
  467. package/src/agents/meta/convention-keeper/metadata.yaml +12 -0
  468. package/src/agents/meta/convention-keeper/output.md +206 -0
  469. package/src/agents/meta/convention-keeper/playbook.md +180 -0
  470. package/src/agents/meta/skill-summoner/critical-reminders.md +112 -0
  471. package/src/agents/meta/skill-summoner/critical-requirements.md +62 -0
  472. package/src/agents/meta/skill-summoner/identity.md +31 -0
  473. package/src/agents/meta/skill-summoner/metadata.yaml +13 -0
  474. package/src/agents/meta/skill-summoner/output.md +390 -0
  475. package/src/agents/meta/skill-summoner/playbook.md +1457 -0
  476. package/src/agents/pattern/pattern-scout/critical-reminders.md +71 -0
  477. package/src/agents/pattern/pattern-scout/critical-requirements.md +31 -0
  478. package/src/agents/pattern/pattern-scout/identity.md +25 -0
  479. package/src/agents/pattern/pattern-scout/metadata.yaml +10 -0
  480. package/src/agents/pattern/pattern-scout/output.md +290 -0
  481. package/src/agents/pattern/pattern-scout/playbook.md +1806 -0
  482. package/src/agents/pattern/web-pattern-critique/critical-reminders.md +30 -0
  483. package/src/agents/pattern/web-pattern-critique/critical-requirements.md +28 -0
  484. package/src/agents/pattern/web-pattern-critique/identity.md +41 -0
  485. package/src/agents/pattern/web-pattern-critique/metadata.yaml +12 -0
  486. package/src/agents/pattern/web-pattern-critique/output.md +314 -0
  487. package/src/agents/pattern/web-pattern-critique/playbook.md +572 -0
  488. package/src/agents/planning/api-pm/critical-reminders.md +48 -0
  489. package/src/agents/planning/api-pm/critical-requirements.md +41 -0
  490. package/src/agents/planning/api-pm/identity.md +39 -0
  491. package/src/agents/planning/api-pm/metadata.yaml +12 -0
  492. package/src/agents/planning/api-pm/output.md +475 -0
  493. package/src/agents/planning/api-pm/playbook.md +129 -0
  494. package/src/agents/planning/web-pm/critical-reminders.md +36 -0
  495. package/src/agents/planning/web-pm/critical-requirements.md +32 -0
  496. package/src/agents/planning/web-pm/identity.md +26 -0
  497. package/src/agents/planning/web-pm/metadata.yaml +12 -0
  498. package/src/agents/planning/web-pm/output.md +314 -0
  499. package/src/agents/planning/web-pm/playbook.md +318 -0
  500. package/src/agents/researcher/api-researcher/critical-reminders.md +27 -0
  501. package/src/agents/researcher/api-researcher/critical-requirements.md +28 -0
  502. package/src/agents/researcher/api-researcher/identity.md +71 -0
  503. package/src/agents/researcher/api-researcher/metadata.yaml +10 -0
  504. package/src/agents/researcher/api-researcher/output.md +254 -0
  505. package/src/agents/researcher/api-researcher/playbook.md +201 -0
  506. package/src/agents/researcher/web-researcher/critical-reminders.md +39 -0
  507. package/src/agents/researcher/web-researcher/critical-requirements.md +26 -0
  508. package/src/agents/researcher/web-researcher/identity.md +69 -0
  509. package/src/agents/researcher/web-researcher/metadata.yaml +10 -0
  510. package/src/agents/researcher/web-researcher/output.md +241 -0
  511. package/src/agents/researcher/web-researcher/playbook.md +217 -0
  512. package/src/agents/reviewer/ai-reviewer/critical-reminders.md +40 -0
  513. package/src/agents/reviewer/ai-reviewer/critical-requirements.md +37 -0
  514. package/src/agents/reviewer/ai-reviewer/identity.md +51 -0
  515. package/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
  516. package/src/agents/reviewer/ai-reviewer/output.md +395 -0
  517. package/src/agents/reviewer/ai-reviewer/playbook.md +90 -0
  518. package/src/agents/reviewer/api-reviewer/critical-reminders.md +31 -0
  519. package/src/agents/reviewer/api-reviewer/critical-requirements.md +27 -0
  520. package/src/agents/reviewer/api-reviewer/identity.md +51 -0
  521. package/src/agents/reviewer/api-reviewer/metadata.yaml +12 -0
  522. package/src/agents/reviewer/api-reviewer/output.md +343 -0
  523. package/src/agents/reviewer/api-reviewer/playbook.md +288 -0
  524. package/src/agents/reviewer/cli-reviewer/critical-reminders.md +33 -0
  525. package/src/agents/reviewer/cli-reviewer/critical-requirements.md +30 -0
  526. package/src/agents/reviewer/cli-reviewer/identity.md +44 -0
  527. package/src/agents/reviewer/cli-reviewer/metadata.yaml +12 -0
  528. package/src/agents/reviewer/cli-reviewer/output.md +414 -0
  529. package/src/agents/reviewer/cli-reviewer/playbook.md +218 -0
  530. package/src/agents/reviewer/infra-reviewer/critical-reminders.md +38 -0
  531. package/src/agents/reviewer/infra-reviewer/critical-requirements.md +38 -0
  532. package/src/agents/reviewer/infra-reviewer/identity.md +53 -0
  533. package/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
  534. package/src/agents/reviewer/infra-reviewer/output.md +364 -0
  535. package/src/agents/reviewer/infra-reviewer/playbook.md +161 -0
  536. package/src/agents/reviewer/web-reviewer/critical-reminders.md +31 -0
  537. package/src/agents/reviewer/web-reviewer/critical-requirements.md +26 -0
  538. package/src/agents/reviewer/web-reviewer/identity.md +40 -0
  539. package/src/agents/reviewer/web-reviewer/metadata.yaml +12 -0
  540. package/src/agents/reviewer/web-reviewer/output.md +333 -0
  541. package/src/agents/reviewer/web-reviewer/playbook.md +156 -0
  542. package/src/agents/tester/api-tester/critical-reminders.md +41 -0
  543. package/src/agents/tester/api-tester/critical-requirements.md +41 -0
  544. package/src/agents/tester/api-tester/identity.md +47 -0
  545. package/src/agents/tester/api-tester/metadata.yaml +12 -0
  546. package/src/agents/tester/api-tester/output.md +284 -0
  547. package/src/agents/tester/api-tester/playbook.md +275 -0
  548. package/src/agents/tester/cli-tester/critical-reminders.md +36 -0
  549. package/src/agents/tester/cli-tester/critical-requirements.md +36 -0
  550. package/src/agents/tester/cli-tester/identity.md +43 -0
  551. package/src/agents/tester/cli-tester/metadata.yaml +12 -0
  552. package/src/agents/tester/cli-tester/output.md +313 -0
  553. package/src/agents/tester/cli-tester/playbook.md +221 -0
  554. package/src/agents/tester/web-tester/critical-reminders.md +31 -0
  555. package/src/agents/tester/web-tester/critical-requirements.md +28 -0
  556. package/src/agents/tester/web-tester/identity.md +41 -0
  557. package/src/agents/tester/web-tester/metadata.yaml +12 -0
  558. package/src/agents/tester/web-tester/output.md +321 -0
  559. package/src/agents/tester/web-tester/playbook.md +428 -0
  560. package/src/schemas/agent-frontmatter.schema.json +88 -0
  561. package/src/schemas/agent.schema.json +103 -0
  562. package/src/schemas/custom-metadata.schema.json +74 -0
  563. package/src/schemas/hooks.schema.json +47 -0
  564. package/src/schemas/marketplace.schema.json +119 -0
  565. package/src/schemas/metadata.schema.json +387 -0
  566. package/src/schemas/plugin.schema.json +127 -0
  567. package/src/schemas/project-config.schema.json +189 -0
  568. package/src/schemas/project-source-config.schema.json +96 -0
  569. package/src/schemas/skill-frontmatter.schema.json +42 -0
  570. package/src/schemas/stack.schema.json +191 -0
  571. package/src/schemas/stacks.schema.json +107 -0
  572. package/bin/run.js +0 -3
@@ -0,0 +1,1355 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ typedKeys
4
+ } from "./chunk-VEP23B5W.js";
5
+ import {
6
+ AUTHOR_HANDLE_PATTERN,
7
+ CLAUDE_SRC_DIR,
8
+ DIRS,
9
+ KEBAB_CASE_PATTERN,
10
+ LOCAL_PSEUDO_CATEGORY,
11
+ PROJECT_ROOT,
12
+ STANDARD_DIRS,
13
+ STANDARD_FILES
14
+ } from "./chunk-O5ASLZ2K.js";
15
+ import {
16
+ init_esm_shims
17
+ } from "./chunk-P56WJ5FA.js";
18
+
19
+ // src/cli/lib/loading/loader.ts
20
+ init_esm_shims();
21
+ import { parse as parseYaml2 } from "yaml";
22
+ import path2 from "path";
23
+ import { unique } from "remeda";
24
+
25
+ // src/cli/utils/errors.ts
26
+ init_esm_shims();
27
+ function getErrorMessage(error) {
28
+ return error instanceof Error ? error.message : String(error);
29
+ }
30
+
31
+ // src/cli/utils/frontmatter.ts
32
+ init_esm_shims();
33
+ import { parse as parseYaml } from "yaml";
34
+ function extractFrontmatter(content) {
35
+ const frontmatterRegex = /^---\r?\n([\s\S]*?)\r?\n---/;
36
+ const match = content.match(frontmatterRegex);
37
+ if (!match || !match[1]) {
38
+ return null;
39
+ }
40
+ try {
41
+ return parseYaml(match[1]);
42
+ } catch {
43
+ return null;
44
+ }
45
+ }
46
+
47
+ // src/cli/utils/fs.ts
48
+ init_esm_shims();
49
+ import fs from "fs-extra";
50
+ import fg from "fast-glob";
51
+ import os from "os";
52
+ import path from "path";
53
+
54
+ // src/cli/lib/config-gate/gate-token.ts
55
+ init_esm_shims();
56
+ import { AsyncLocalStorage } from "async_hooks";
57
+ var gateToken = new AsyncLocalStorage();
58
+ var GlobalPairWriteViolation = class extends Error {
59
+ constructor(targetPath) {
60
+ super(
61
+ `${targetPath} may only be written through config-gate \u2014 see src/cli/lib/config-gate/index.ts`
62
+ );
63
+ this.name = "GlobalPairWriteViolation";
64
+ }
65
+ };
66
+ function withGateToken(fn) {
67
+ return gateToken.run(true, fn);
68
+ }
69
+ function hasGateToken() {
70
+ return gateToken.getStore() === true;
71
+ }
72
+ function assertGateToken(targetPath) {
73
+ if (hasGateToken()) return;
74
+ throw new GlobalPairWriteViolation(targetPath);
75
+ }
76
+
77
+ // src/cli/utils/fs.ts
78
+ function isPathWithin(child, parent) {
79
+ const resolvedChild = path.resolve(child);
80
+ const resolvedParent = path.resolve(parent);
81
+ return resolvedChild === resolvedParent || resolvedChild.startsWith(resolvedParent + path.sep);
82
+ }
83
+ async function readFile(filePath) {
84
+ return fs.readFile(filePath, "utf-8");
85
+ }
86
+ async function readFileSafe(filePath, maxSizeBytes) {
87
+ const stats = await fs.stat(filePath);
88
+ if (stats.size > maxSizeBytes) {
89
+ throw new Error(
90
+ `File too large: '${filePath}' is ${stats.size} bytes (limit: ${maxSizeBytes} bytes)`
91
+ );
92
+ }
93
+ return fs.readFile(filePath, "utf-8");
94
+ }
95
+ async function readFileOptional(filePath, fallback = "") {
96
+ try {
97
+ return await fs.readFile(filePath, "utf-8");
98
+ } catch {
99
+ return fallback;
100
+ }
101
+ }
102
+ async function fileExists(filePath) {
103
+ return fs.pathExists(filePath);
104
+ }
105
+ async function directoryExists(dirPath) {
106
+ try {
107
+ const stat = await fs.stat(dirPath);
108
+ return stat.isDirectory();
109
+ } catch {
110
+ return false;
111
+ }
112
+ }
113
+ async function listDirectories(dirPath) {
114
+ try {
115
+ const entries = await fs.readdir(dirPath, { withFileTypes: true });
116
+ return entries.filter((e) => e.isDirectory()).map((e) => e.name);
117
+ } catch {
118
+ return [];
119
+ }
120
+ }
121
+ async function glob(pattern, cwd) {
122
+ return fg(pattern, { cwd, onlyFiles: true });
123
+ }
124
+ function isGlobalPairPath(resolvedPath) {
125
+ const globalConfigDir = path.join(os.homedir(), CLAUDE_SRC_DIR);
126
+ return resolvedPath === path.join(globalConfigDir, STANDARD_FILES.CONFIG_TS) || resolvedPath === path.join(globalConfigDir, STANDARD_FILES.CONFIG_TYPES_TS);
127
+ }
128
+ async function writeFile(filePath, content) {
129
+ const resolvedPath = path.resolve(filePath);
130
+ if (isGlobalPairPath(resolvedPath)) assertGateToken(resolvedPath);
131
+ await fs.ensureDir(path.dirname(filePath));
132
+ await fs.writeFile(filePath, content, "utf-8");
133
+ }
134
+ async function ensureDir(dirPath) {
135
+ await fs.ensureDir(dirPath);
136
+ }
137
+ async function remove(filePath) {
138
+ await fs.remove(filePath);
139
+ }
140
+ async function copy(src, dest) {
141
+ await fs.copy(src, dest);
142
+ }
143
+
144
+ // src/cli/utils/logger.ts
145
+ init_esm_shims();
146
+ var verboseMode = false;
147
+ function setVerbose(enabled) {
148
+ verboseMode = enabled;
149
+ }
150
+ function verbose(msg) {
151
+ if (verboseMode) {
152
+ console.log(` ${msg}`);
153
+ }
154
+ }
155
+ function log(msg) {
156
+ console.log(msg);
157
+ }
158
+ var bufferMode = false;
159
+ var messageBuffer = [];
160
+ function enableBuffering() {
161
+ bufferMode = true;
162
+ messageBuffer = [];
163
+ }
164
+ function drainBuffer() {
165
+ const messages = [...messageBuffer];
166
+ messageBuffer = [];
167
+ return messages;
168
+ }
169
+ function disableBuffering() {
170
+ bufferMode = false;
171
+ messageBuffer = [];
172
+ }
173
+ function warn(msg, options) {
174
+ if (options?.suppressInTest && process.env.VITEST) {
175
+ return;
176
+ }
177
+ if (bufferMode) {
178
+ messageBuffer.push({ level: "warn", text: msg });
179
+ return;
180
+ }
181
+ console.warn(` Warning: ${msg}`);
182
+ }
183
+
184
+ // src/cli/lib/schemas.ts
185
+ init_esm_shims();
186
+ import { z } from "zod";
187
+ import { partition } from "remeda";
188
+
189
+ // src/cli/lib/schema-validator.ts
190
+ init_esm_shims();
191
+ function formatZodIssue(issue) {
192
+ const path3 = issue.path.join(".");
193
+ if (issue.code === "unrecognized_keys") {
194
+ return `Unrecognized key: "${issue.keys.join('", "')}"`;
195
+ }
196
+ return path3 ? `${path3}: ${issue.message}` : issue.message;
197
+ }
198
+ function formatZodErrors(error) {
199
+ return error.issues.map(formatZodIssue);
200
+ }
201
+
202
+ // src/cli/types/generated/source-types.ts
203
+ init_esm_shims();
204
+ var SKILL_SLUGS = [
205
+ "angular-standalone",
206
+ "ant-design",
207
+ "anthropic-sdk",
208
+ "api-performance",
209
+ "apollo-server",
210
+ "app-links",
211
+ "appwrite",
212
+ "astro",
213
+ "auth-security",
214
+ "aws-sdk",
215
+ "axiom-pino-sentry",
216
+ "better-auth-drizzle-hono",
217
+ "biome",
218
+ "ble-nfc",
219
+ "bullmq",
220
+ "chakra-ui",
221
+ "changesets",
222
+ "chroma",
223
+ "clack",
224
+ "claude-vision",
225
+ "clerk",
226
+ "cli-commander",
227
+ "cli-reviewing",
228
+ "cloudflare-workers",
229
+ "cockroachdb",
230
+ "cohere-sdk",
231
+ "css-animations",
232
+ "cva",
233
+ "cypress-e2e",
234
+ "d3",
235
+ "date-fns",
236
+ "detox",
237
+ "dnd-kit",
238
+ "docker",
239
+ "docusaurus",
240
+ "drizzle",
241
+ "eas",
242
+ "edgedb",
243
+ "elasticsearch",
244
+ "electron",
245
+ "electron-forge",
246
+ "electron-ipc",
247
+ "electron-multiwindow",
248
+ "electron-security",
249
+ "electron-storage",
250
+ "electron-testing",
251
+ "electron-ui",
252
+ "electron-updater",
253
+ "elevenlabs",
254
+ "elysia",
255
+ "error-boundaries",
256
+ "eslint-prettier",
257
+ "expo",
258
+ "expo-router",
259
+ "express",
260
+ "expressive-typescript",
261
+ "fastify",
262
+ "file-upload-patterns",
263
+ "firebase",
264
+ "framer-motion",
265
+ "gesture-handler",
266
+ "git-hooks",
267
+ "github-actions",
268
+ "google-gemini-sdk",
269
+ "graphql-apollo",
270
+ "graphql-urql",
271
+ "headless-ui",
272
+ "hono",
273
+ "huggingface-inference",
274
+ "image-handling",
275
+ "jotai",
276
+ "knex",
277
+ "kubernetes",
278
+ "langchain",
279
+ "langfuse",
280
+ "leaflet",
281
+ "lexical",
282
+ "litellm",
283
+ "llamaindex",
284
+ "maestro",
285
+ "mantine",
286
+ "mapbox",
287
+ "meilisearch",
288
+ "mercurius",
289
+ "mistral-sdk",
290
+ "mmkv",
291
+ "mobx",
292
+ "modal",
293
+ "mongodb",
294
+ "mongoose",
295
+ "msw",
296
+ "mui",
297
+ "mysql",
298
+ "native-js",
299
+ "nativewind",
300
+ "neon",
301
+ "nestjs",
302
+ "netlify",
303
+ "next-intl",
304
+ "nextauth",
305
+ "nextjs",
306
+ "ngrx-signalstore",
307
+ "nuxt",
308
+ "nx",
309
+ "oclif-ink",
310
+ "offline-first",
311
+ "ollama",
312
+ "openai-sdk",
313
+ "openai-whisper",
314
+ "openapi",
315
+ "payload",
316
+ "pinecone",
317
+ "pinia",
318
+ "planetscale",
319
+ "playwright-e2e",
320
+ "pnpm-workspaces",
321
+ "postgresql",
322
+ "posthog-analytics",
323
+ "posthog-flags",
324
+ "prisma",
325
+ "promptfoo",
326
+ "pulumi",
327
+ "push",
328
+ "qdrant",
329
+ "qwik",
330
+ "radix-ui",
331
+ "react",
332
+ "react-hook-form",
333
+ "react-intl",
334
+ "react-native",
335
+ "react-native-paper",
336
+ "react-native-performance",
337
+ "react-native-security",
338
+ "react-navigation",
339
+ "react-query",
340
+ "react-router",
341
+ "react-testing-library",
342
+ "react-three-fiber",
343
+ "reanimated",
344
+ "recharts",
345
+ "redis",
346
+ "redux-toolkit",
347
+ "remix",
348
+ "replicate",
349
+ "research-methodology",
350
+ "resend-react-email",
351
+ "result-types",
352
+ "reviewing",
353
+ "rxjs",
354
+ "sanity",
355
+ "scss-modules",
356
+ "sequelize",
357
+ "service-workers",
358
+ "setup-axiom-pino-sentry",
359
+ "setup-env",
360
+ "setup-posthog",
361
+ "setup-resend",
362
+ "shadcn-ui",
363
+ "skia",
364
+ "socket-io",
365
+ "solidjs",
366
+ "sqlite-powersync",
367
+ "sse",
368
+ "sst",
369
+ "storybook",
370
+ "strapi",
371
+ "strategies",
372
+ "stripe",
373
+ "supabase",
374
+ "surrealdb",
375
+ "svelte",
376
+ "sveltekit",
377
+ "swr",
378
+ "tailwind",
379
+ "tamagui",
380
+ "tanstack-form",
381
+ "tanstack-router",
382
+ "tanstack-table",
383
+ "tasks",
384
+ "tauri",
385
+ "tauri-backend",
386
+ "tauri-bundling",
387
+ "tauri-mobile",
388
+ "tauri-multiwindow",
389
+ "tauri-plugins",
390
+ "tauri-security",
391
+ "terraform",
392
+ "tiptap",
393
+ "together-ai",
394
+ "tool-use-patterns",
395
+ "trpc",
396
+ "turborepo",
397
+ "turborepo-ci",
398
+ "turso",
399
+ "typeorm",
400
+ "typescript-config",
401
+ "unistyles",
402
+ "upstash",
403
+ "vee-validate",
404
+ "vercel",
405
+ "vercel-ai-sdk",
406
+ "vercel-kv",
407
+ "vercel-postgres",
408
+ "view-transitions",
409
+ "vision-camera",
410
+ "vite",
411
+ "vitepress",
412
+ "vitest",
413
+ "vue-composition-api",
414
+ "vue-i18n",
415
+ "vue-test-utils",
416
+ "vuetify",
417
+ "vueuse",
418
+ "watermelondb",
419
+ "weaviate",
420
+ "web-accessibility",
421
+ "web-performance",
422
+ "webhooks",
423
+ "websockets",
424
+ "yoga",
425
+ "zod-validation",
426
+ "zustand"
427
+ ];
428
+ var CATEGORIES = [
429
+ "ai-infrastructure",
430
+ "ai-observability",
431
+ "ai-orchestration",
432
+ "ai-patterns",
433
+ "ai-provider",
434
+ "api-analytics",
435
+ "api-api",
436
+ "api-auth",
437
+ "api-baas",
438
+ "api-caching",
439
+ "api-cms",
440
+ "api-commerce",
441
+ "api-database",
442
+ "api-email",
443
+ "api-framework",
444
+ "api-graphql",
445
+ "api-messaging",
446
+ "api-observability",
447
+ "api-performance",
448
+ "api-queue",
449
+ "api-search",
450
+ "api-specs",
451
+ "api-vector-db",
452
+ "cli-framework",
453
+ "cli-prompts",
454
+ "desktop-backend",
455
+ "desktop-framework",
456
+ "desktop-ipc",
457
+ "desktop-mobile",
458
+ "desktop-multiwindow",
459
+ "desktop-packaging",
460
+ "desktop-plugins",
461
+ "desktop-security",
462
+ "desktop-storage",
463
+ "desktop-testing",
464
+ "desktop-ui",
465
+ "desktop-updates",
466
+ "infra-ci-cd",
467
+ "infra-config",
468
+ "infra-containers",
469
+ "infra-iac",
470
+ "infra-platform",
471
+ "meta-design",
472
+ "meta-methodology",
473
+ "meta-reviewing",
474
+ "mobile-animation",
475
+ "mobile-background",
476
+ "mobile-camera",
477
+ "mobile-deep-linking",
478
+ "mobile-deployment",
479
+ "mobile-framework",
480
+ "mobile-hardware",
481
+ "mobile-navigation",
482
+ "mobile-notifications",
483
+ "mobile-performance",
484
+ "mobile-security",
485
+ "mobile-storage",
486
+ "mobile-styling",
487
+ "mobile-testing",
488
+ "mobile-ui-components",
489
+ "shared-monorepo",
490
+ "shared-security",
491
+ "shared-tooling",
492
+ "web-3d",
493
+ "web-accessibility",
494
+ "web-animation",
495
+ "web-client-state",
496
+ "web-dataviz",
497
+ "web-dnd",
498
+ "web-editor",
499
+ "web-error-handling",
500
+ "web-file-upload",
501
+ "web-files",
502
+ "web-forms",
503
+ "web-framework",
504
+ "web-i18n",
505
+ "web-maps",
506
+ "web-meta-framework",
507
+ "web-mocking",
508
+ "web-performance",
509
+ "web-pwa",
510
+ "web-realtime",
511
+ "web-routing",
512
+ "web-server-state",
513
+ "web-styling",
514
+ "web-testing",
515
+ "web-tooling",
516
+ "web-ui-components",
517
+ "web-utilities"
518
+ ];
519
+ var DOMAINS = [
520
+ "ai",
521
+ "api",
522
+ "cli",
523
+ "desktop",
524
+ "infra",
525
+ "meta",
526
+ "mobile",
527
+ "shared",
528
+ "web"
529
+ ];
530
+ var AGENT_NAMES = [
531
+ "agent-summoner",
532
+ "ai-developer",
533
+ "ai-reviewer",
534
+ "api-developer",
535
+ "api-pm",
536
+ "api-researcher",
537
+ "api-reviewer",
538
+ "api-tester",
539
+ "cli-developer",
540
+ "cli-reviewer",
541
+ "cli-tester",
542
+ "codex-keeper",
543
+ "convention-keeper",
544
+ "infra-reviewer",
545
+ "pattern-scout",
546
+ "skill-summoner",
547
+ "web-architecture",
548
+ "web-developer",
549
+ "web-pattern-critique",
550
+ "web-pm",
551
+ "web-researcher",
552
+ "web-reviewer",
553
+ "web-tester"
554
+ ];
555
+
556
+ // src/cli/types/matrix.ts
557
+ init_esm_shims();
558
+ var MODEL_NAMES = ["sonnet", "opus", "haiku", "fable", "inherit"];
559
+ var EFFORT_NAMES = ["low", "medium", "high", "xhigh", "max"];
560
+ var PERMISSION_MODES = [
561
+ "default",
562
+ "acceptEdits",
563
+ "dontAsk",
564
+ "bypassPermissions",
565
+ "plan",
566
+ "delegate"
567
+ ];
568
+
569
+ // src/cli/lib/schemas.ts
570
+ var boundSkillSchema = z.object({
571
+ id: z.string(),
572
+ sourceUrl: z.string(),
573
+ sourceName: z.string(),
574
+ boundTo: z.string(),
575
+ description: z.string().optional()
576
+ });
577
+ var modelNameSchema = z.enum(MODEL_NAMES);
578
+ var effortLevelSchema = z.enum(EFFORT_NAMES);
579
+ var permissionModeSchema = z.enum(PERMISSION_MODES);
580
+ var skillSlugSchema = z.enum(SKILL_SLUGS);
581
+ function validateCategoryField(val, ctx) {
582
+ if (!val.category) return;
583
+ if (val.custom) {
584
+ if (!KEBAB_CASE_PATTERN.test(val.category)) {
585
+ ctx.addIssue({
586
+ code: "custom",
587
+ path: ["category"],
588
+ message: "Custom category must be kebab-case"
589
+ });
590
+ }
591
+ return;
592
+ }
593
+ const result = categoryPathSchema.safeParse(val.category);
594
+ if (!result.success) {
595
+ for (const issue of result.error.issues) {
596
+ ctx.addIssue({ ...issue, path: ["category"] });
597
+ }
598
+ }
599
+ }
600
+ var categoryPathSchema = z.string().refine(
601
+ (val) => {
602
+ if (val === LOCAL_PSEUDO_CATEGORY) return true;
603
+ if (CATEGORIES.includes(val)) return true;
604
+ return KEBAB_CASE_PATTERN.test(val);
605
+ },
606
+ {
607
+ message: "Must be a valid category path (e.g., 'web-framework', 'shared-testing', or 'local')"
608
+ }
609
+ );
610
+ var agentHookActionSchema = z.object({
611
+ type: z.enum(["command", "script", "prompt"]),
612
+ command: z.string().optional(),
613
+ script: z.string().optional(),
614
+ prompt: z.string().optional()
615
+ });
616
+ var agentHookDefinitionSchema = z.object({
617
+ matcher: z.string().optional(),
618
+ hooks: z.array(agentHookActionSchema).optional()
619
+ });
620
+ var hooksRecordSchema = z.record(z.string(), z.array(agentHookDefinitionSchema));
621
+ var strictAgentHookDefinitionSchema = z.object({
622
+ matcher: z.string().optional(),
623
+ hooks: z.array(agentHookActionSchema).min(1)
624
+ });
625
+ var strictHooksRecordSchema = z.record(
626
+ z.string(),
627
+ z.array(strictAgentHookDefinitionSchema)
628
+ );
629
+ var skillAssignmentSchema = z.object({
630
+ id: z.string(),
631
+ preloaded: z.boolean().optional(),
632
+ local: z.boolean().optional(),
633
+ path: z.string().optional()
634
+ });
635
+ var skillFrontmatterLoaderSchema = z.object({
636
+ /** Lenient (any string): local/custom skills have non-builtin IDs */
637
+ name: z.string(),
638
+ description: z.string(),
639
+ model: modelNameSchema.optional()
640
+ });
641
+ var skillMetadataLoaderSchema = z.object({
642
+ // Field accepts any string; cross-field validation in superRefine enforces strict/custom rules
643
+ category: z.string().optional(),
644
+ author: z.string().optional(),
645
+ domain: z.string(),
646
+ custom: z.boolean().optional()
647
+ }).passthrough().superRefine(validateCategoryField);
648
+ var matrixRawMetadataSchema = z.object({
649
+ category: categoryPathSchema,
650
+ author: z.string(),
651
+ displayName: z.string().optional(),
652
+ slug: z.string(),
653
+ cliDescription: z.string().optional(),
654
+ usageGuidance: z.string().optional(),
655
+ // Boundary cast: domain is a string at the YAML parse boundary; narrowed to Domain type
656
+ domain: z.string(),
657
+ custom: z.boolean().optional()
658
+ });
659
+ var pluginAuthorSchema = z.object({
660
+ name: z.string().min(1),
661
+ email: z.string().optional()
662
+ });
663
+ var pluginManifestObjectSchema = z.object({
664
+ name: z.string(),
665
+ version: z.string().optional(),
666
+ description: z.string().optional(),
667
+ author: pluginAuthorSchema.optional(),
668
+ keywords: z.array(z.string()).optional(),
669
+ commands: z.union([z.string(), z.array(z.string())]).optional(),
670
+ agents: z.union([z.string(), z.array(z.string())]).optional(),
671
+ skills: z.union([z.string(), z.array(z.string())]).optional(),
672
+ hooks: z.union([z.string(), hooksRecordSchema]).optional()
673
+ });
674
+ var pluginManifestSchema = pluginManifestObjectSchema;
675
+ var pluginManifestValidationSchema = pluginManifestObjectSchema.strict();
676
+ var agentYamlConfigSchema = z.object({
677
+ id: z.string(),
678
+ title: z.string(),
679
+ description: z.string(),
680
+ model: modelNameSchema.optional(),
681
+ effort: effortLevelSchema.optional(),
682
+ tools: z.array(z.string()),
683
+ disallowedTools: z.array(z.string()).optional(),
684
+ permissionMode: permissionModeSchema.optional(),
685
+ hooks: hooksRecordSchema.optional(),
686
+ outputFormat: z.string().optional(),
687
+ domain: z.string().optional(),
688
+ custom: z.boolean().optional()
689
+ });
690
+ var skillAssignmentElementSchema = z.union([
691
+ z.string(),
692
+ skillAssignmentSchema
693
+ ]);
694
+ var stackAgentConfigSchema = z.record(
695
+ z.string(),
696
+ z.union([skillAssignmentElementSchema, z.array(skillAssignmentElementSchema)])
697
+ );
698
+ var projectConfigLoaderSchema = z.object({
699
+ /** Project/plugin name in kebab-case */
700
+ name: z.string().optional(),
701
+ description: z.string().optional(),
702
+ /** Per-agent configuration with scope (e.g., [{ name: "web-developer", scope: "project" }]) */
703
+ agents: z.array(
704
+ z.object({
705
+ name: z.string(),
706
+ scope: z.enum(["project", "global"]),
707
+ /** Per-agent overrides of the agent's own metadata defaults */
708
+ model: modelNameSchema.optional(),
709
+ effort: effortLevelSchema.optional(),
710
+ excluded: z.boolean().optional()
711
+ })
712
+ ).optional(),
713
+ /** Per-skill configuration with scope and source */
714
+ skills: z.array(
715
+ z.object({
716
+ id: z.string(),
717
+ scope: z.enum(["project", "global"]),
718
+ source: z.string(),
719
+ excluded: z.boolean().optional()
720
+ })
721
+ ).optional(),
722
+ /** Author handle (e.g., "@vince") */
723
+ author: z.string().optional(),
724
+ /** Selected domains from the wizard (persisted for edit mode restoration) */
725
+ domains: z.array(z.string()).optional(),
726
+ /** Selected agents from the wizard (persisted for edit mode restoration) */
727
+ selectedAgents: z.array(z.string()).optional(),
728
+ /** Agent-to-category-to-skill mappings from selected stack (accepts same formats as stacks.ts) */
729
+ stack: z.record(z.string(), stackAgentConfigSchema).optional(),
730
+ /** Skills source path or URL (e.g., "github:my-org/skills") */
731
+ source: z.string().optional(),
732
+ /** Marketplace identifier for plugin installation */
733
+ marketplace: z.string().optional(),
734
+ /** Separate source for agents when different from skills source */
735
+ agentsSource: z.string().optional(),
736
+ /** Tracked project installation paths (global config only) */
737
+ projects: z.array(z.string()).optional()
738
+ }).passthrough();
739
+ var categoryDefinitionSchema = z.object({
740
+ id: z.string(),
741
+ displayName: z.string(),
742
+ description: z.string(),
743
+ domain: z.string().optional(),
744
+ exclusive: z.boolean(),
745
+ required: z.boolean(),
746
+ order: z.number(),
747
+ icon: z.string().optional()
748
+ });
749
+ var skillRefInRules = skillSlugSchema;
750
+ var skillGroupRuleSchema = z.object({
751
+ skills: z.array(skillRefInRules).min(2),
752
+ reason: z.string()
753
+ });
754
+ var conflictRuleSchema = skillGroupRuleSchema;
755
+ var discourageRuleSchema = skillGroupRuleSchema;
756
+ var recommendationSchema = z.object({
757
+ skill: skillRefInRules,
758
+ reason: z.string()
759
+ });
760
+ var compatibilityGroupSchema = skillGroupRuleSchema;
761
+ var requireRuleSchema = z.object({
762
+ skill: skillRefInRules,
763
+ needs: z.array(skillRefInRules).min(1),
764
+ needsAny: z.boolean().optional(),
765
+ reason: z.string()
766
+ });
767
+ var alternativeGroupSchema = z.object({
768
+ purpose: z.string(),
769
+ skills: z.array(skillRefInRules).min(1)
770
+ });
771
+ var relationshipDefinitionsSchema = z.object({
772
+ conflicts: z.array(conflictRuleSchema),
773
+ discourages: z.array(discourageRuleSchema),
774
+ recommends: z.array(recommendationSchema),
775
+ requires: z.array(requireRuleSchema),
776
+ alternatives: z.array(alternativeGroupSchema),
777
+ compatibleWith: z.array(compatibilityGroupSchema).optional().default([])
778
+ });
779
+ var skillCategoriesFileSchema = z.object({
780
+ version: z.string(),
781
+ categories: z.record(z.string(), categoryDefinitionSchema)
782
+ });
783
+ var skillRulesFileSchema = z.object({
784
+ version: z.string(),
785
+ relationships: relationshipDefinitionsSchema.optional()
786
+ });
787
+ var localRawMetadataSchema = z.object({
788
+ /** Short name shown in the wizard grid (e.g., "my-custom-react") */
789
+ displayName: z.string(),
790
+ /** Kebab-case short key for alias resolution (e.g., "react") */
791
+ slug: z.string(),
792
+ /** One-line description for the wizard */
793
+ cliDescription: z.string().optional(),
794
+ /** Category to place this skill in (e.g., "web-framework") */
795
+ // Field accepts any string; cross-field validation in superRefine enforces strict/custom rules
796
+ category: z.string(),
797
+ /** When an AI agent should invoke this skill */
798
+ usageGuidance: z.string().optional(),
799
+ /** Domain this skill belongs to (e.g., "web", "api", "cli") */
800
+ domain: z.string(),
801
+ /** True if this skill was created outside the CLI's built-in vocabulary */
802
+ custom: z.boolean().optional()
803
+ }).passthrough().superRefine(validateCategoryField);
804
+ var localSkillMetadataSchema = z.object({
805
+ forkedFrom: z.object({
806
+ /** Original skill ID before forking — lenient (any string) since custom/extra-source skills have non-builtin IDs */
807
+ skillId: z.string(),
808
+ /** SHA hash of the original content at fork time (for diff detection) */
809
+ contentHash: z.string(),
810
+ /** ISO date when the fork was created */
811
+ date: z.string(),
812
+ /** Source URL the skill was installed from (e.g., "github:agents-inc/skills") */
813
+ source: z.string().optional()
814
+ }).optional()
815
+ }).passthrough();
816
+ var stackSchema = z.object({
817
+ id: z.string().min(1),
818
+ name: z.string().min(1),
819
+ description: z.string(),
820
+ /** Maps agent IDs to their category-to-skill assignments */
821
+ agents: z.record(z.string(), stackAgentConfigSchema),
822
+ /** High-level philosophy guiding this stack's technology choices */
823
+ philosophy: z.string().optional()
824
+ });
825
+ var stacksConfigSchema = z.object({
826
+ stacks: z.array(stackSchema).min(1)
827
+ });
828
+ var marketplaceRemoteSourceSchema = z.object({
829
+ source: z.enum(["github", "url"]),
830
+ repo: z.string().optional(),
831
+ url: z.string().optional(),
832
+ ref: z.string().optional()
833
+ });
834
+ var marketplacePluginSchema = z.object({
835
+ name: z.string().min(1),
836
+ /** Local directory path (relative to pluginRoot) or remote source config */
837
+ source: z.union([z.string(), marketplaceRemoteSourceSchema]),
838
+ description: z.string().optional(),
839
+ version: z.string().optional(),
840
+ author: pluginAuthorSchema.optional(),
841
+ /** Lenient: external data may have any category string or none at all */
842
+ category: z.string().optional(),
843
+ keywords: z.array(z.string()).optional()
844
+ });
845
+ var marketplaceOwnerSchema = pluginAuthorSchema;
846
+ var marketplaceMetadataSchema = z.object({
847
+ /** Base directory for resolving plugin source paths (e.g., "plugins/") */
848
+ pluginRoot: z.string().optional()
849
+ });
850
+ var marketplaceSchema = z.object({
851
+ $schema: z.string().optional(),
852
+ name: z.string().min(1),
853
+ version: z.string().min(1),
854
+ description: z.string().optional(),
855
+ owner: marketplaceOwnerSchema,
856
+ metadata: marketplaceMetadataSchema.optional(),
857
+ plugins: z.array(marketplacePluginSchema).min(1)
858
+ });
859
+ var permissionConfigSchema = z.object({
860
+ /** Tool names or patterns to explicitly allow */
861
+ allow: z.array(z.string()).optional(),
862
+ /** Tool names or patterns to explicitly deny */
863
+ deny: z.array(z.string()).optional()
864
+ });
865
+ var settingsFileSchema = z.object({
866
+ permissions: permissionConfigSchema.optional()
867
+ }).passthrough();
868
+ var importedSkillMetadataSchema = z.object({
869
+ forkedFrom: z.object({
870
+ /** Source URL or identifier where the skill was imported from */
871
+ source: z.string(),
872
+ /** Original skill name in the source */
873
+ skillName: z.string(),
874
+ /** SHA hash of the original content at import time */
875
+ contentHash: z.string(),
876
+ /** ISO date when the import was performed */
877
+ date: z.string()
878
+ }).optional()
879
+ }).passthrough();
880
+ var brandingConfigSchema = z.object({
881
+ /** Custom CLI name (e.g., "Acme Dev Tools") */
882
+ name: z.string().optional(),
883
+ /** Custom tagline shown in wizard header */
884
+ tagline: z.string().optional()
885
+ });
886
+ var projectSourceConfigSchema = z.object({
887
+ /** Primary skills source (path or URL) */
888
+ source: z.string().optional(),
889
+ /** Author handle for this project's config */
890
+ author: z.string().optional(),
891
+ /** Marketplace identifier for plugin installation */
892
+ marketplace: z.string().optional(),
893
+ /** Separate source for agent definitions (when different from skills) */
894
+ agentsSource: z.string().optional(),
895
+ /** Additional skill sources (private marketplaces, custom repos) */
896
+ sources: z.array(
897
+ z.object({
898
+ /** Display name for the source (shown in wizard) */
899
+ name: z.string(),
900
+ /** Source URL (e.g., "github:acme-corp/claude-skills") */
901
+ url: z.string(),
902
+ description: z.string().optional(),
903
+ /** Git ref (branch/tag/commit) for the source */
904
+ ref: z.string().optional()
905
+ })
906
+ ).optional(),
907
+ /** Skills explicitly bound to categories via search (from Step Sources) */
908
+ boundSkills: z.array(boundSkillSchema).optional(),
909
+ /** Branding overrides for white-labeling the CLI */
910
+ branding: brandingConfigSchema.optional(),
911
+ /** Custom skills directory override (default: "src/skills") */
912
+ skillsDir: z.string().optional(),
913
+ /** Custom agents directory override (default: "src/agents") */
914
+ agentsDir: z.string().optional(),
915
+ /** Custom stacks file path override (default: "config/stacks.ts") */
916
+ stacksFile: z.string().optional(),
917
+ /** Custom categories file path override (default: "config/skill-categories.ts") */
918
+ categoriesFile: z.string().optional(),
919
+ /** Custom rules file path override (default: "config/skill-rules.ts") */
920
+ rulesFile: z.string().optional()
921
+ }).passthrough();
922
+ var agentYamlGenerationSchema = z.object({
923
+ $schema: z.string().optional(),
924
+ id: z.string().min(1),
925
+ title: z.string().min(1),
926
+ description: z.string().min(1),
927
+ model: modelNameSchema.optional(),
928
+ effort: effortLevelSchema.optional(),
929
+ tools: z.array(z.string()).min(1),
930
+ disallowedTools: z.array(z.string()).optional(),
931
+ permissionMode: permissionModeSchema.optional(),
932
+ hooks: strictHooksRecordSchema.optional(),
933
+ outputFormat: z.string().optional(),
934
+ domain: z.string().optional(),
935
+ custom: z.boolean().optional()
936
+ }).strict();
937
+ var agentFrontmatterValidationSchema = z.object({
938
+ /** Agent name in kebab-case (becomes the Task tool identifier) */
939
+ name: z.string().regex(KEBAB_CASE_PATTERN).min(1),
940
+ description: z.string().min(1),
941
+ /** Comma-separated list of allowed tools */
942
+ tools: z.string().optional(),
943
+ /** Comma-separated list of denied tools */
944
+ disallowedTools: z.string().optional(),
945
+ model: modelNameSchema.optional(),
946
+ effort: effortLevelSchema.optional(),
947
+ permissionMode: permissionModeSchema.optional(),
948
+ /** Skill names to preload (embed in agent prompt) */
949
+ skills: z.array(z.string().min(1)).optional(),
950
+ hooks: strictHooksRecordSchema.optional()
951
+ }).strict();
952
+ var skillFrontmatterValidationSchema = z.object({
953
+ name: z.string().min(1),
954
+ description: z.string().min(1),
955
+ /** If true, Claude cannot invoke this skill on its own */
956
+ "disable-model-invocation": z.boolean().optional(),
957
+ /** If true, user can invoke this skill directly */
958
+ "user-invocable": z.boolean().optional(),
959
+ /** Comma-separated list of tools this skill can use */
960
+ "allowed-tools": z.string().optional(),
961
+ model: modelNameSchema.optional(),
962
+ /** "fork" means skill runs in a forked context (separate conversation) */
963
+ context: z.enum(["fork"]).optional(),
964
+ /** Agent name this skill is scoped to */
965
+ agent: z.string().optional(),
966
+ /** Hint text shown when user invokes the skill */
967
+ "argument-hint": z.string().optional()
968
+ }).strict();
969
+ var forkedFromSchema = z.object({
970
+ /** Original skill ID */
971
+ skillId: z.string(),
972
+ /** Version of the original at fork time */
973
+ version: z.number().int().min(1).optional(),
974
+ /** Content hash of the original at fork time */
975
+ contentHash: z.string(),
976
+ /** Source URL or identifier */
977
+ source: z.string().optional(),
978
+ /** ISO date of the fork */
979
+ date: z.string()
980
+ });
981
+ var CLI_DESCRIPTION_MAX_LENGTH = 60;
982
+ var skillMetadataBaseSchema = z.object({
983
+ /** Author handle — must start with @ (e.g., "@vince") */
984
+ author: z.string().regex(AUTHOR_HANDLE_PATTERN),
985
+ /** Short display name for the wizard grid (max 30 chars) */
986
+ displayName: z.string().min(1).max(30),
987
+ /** One-line description for the wizard (max 60 chars recommended; over-length is a validation warning) */
988
+ cliDescription: z.string().min(1).max(CLI_DESCRIPTION_MAX_LENGTH),
989
+ /** When an AI agent should invoke this skill (min 10 chars to ensure usefulness) */
990
+ usageGuidance: z.string().min(10),
991
+ /** 7-char hex SHA of skill content (for change detection) */
992
+ contentHash: z.string().regex(/^[a-f0-9]{7}$/).optional(),
993
+ /** ISO date of last update */
994
+ updated: z.string().optional(),
995
+ /** Provenance tracking when skill was forked from another */
996
+ forkedFrom: forkedFromSchema.optional(),
997
+ /** Domain assignment from metadata */
998
+ domain: z.string().optional(),
999
+ /** True if this skill was created outside the CLI's built-in vocabulary */
1000
+ custom: z.boolean().optional()
1001
+ });
1002
+ var metadataValidationSchema = skillMetadataBaseSchema.extend({
1003
+ /** Domain-prefixed category — must be a known built-in category */
1004
+ category: z.enum(CATEGORIES),
1005
+ /** Kebab-case short key — must be a known built-in slug */
1006
+ slug: z.enum(SKILL_SLUGS)
1007
+ }).strict();
1008
+ var customMetadataValidationSchema = skillMetadataBaseSchema.extend({
1009
+ /** Any string category — custom skills may define their own categories */
1010
+ category: z.string(),
1011
+ /** Kebab-case short key for alias resolution, search, and relationship rules */
1012
+ slug: z.string().regex(/^[a-z][a-z0-9-]*$/).min(1).max(50)
1013
+ });
1014
+ var stackSkillAssignmentSchema = z.object({
1015
+ id: z.string().min(1),
1016
+ /** If true, skill content is embedded in the compiled agent prompt */
1017
+ preloaded: z.boolean().optional()
1018
+ }).strict();
1019
+ var stackConfigValidationSchema = z.object({
1020
+ /** Unique stack identifier in kebab-case */
1021
+ id: z.string().regex(KEBAB_CASE_PATTERN).optional(),
1022
+ name: z.string().min(1),
1023
+ version: z.string(),
1024
+ author: z.string().min(1),
1025
+ description: z.string().optional(),
1026
+ /** ISO date when this stack was first created */
1027
+ created: z.string().optional(),
1028
+ /** ISO date of last update */
1029
+ updated: z.string().optional(),
1030
+ /** Primary framework this stack is designed for (e.g., "nextjs", "remix") */
1031
+ framework: z.string().optional(),
1032
+ /** All skills used in this stack (flat list, at least one required) */
1033
+ skills: z.array(stackSkillAssignmentSchema).min(1),
1034
+ /** Agent IDs this stack compiles (at least one required) */
1035
+ agents: z.array(z.string().regex(KEBAB_CASE_PATTERN)).min(1),
1036
+ /** Per-agent skill assignments: { agentId: { category: [skillAssignment] } } */
1037
+ agentSkills: z.record(z.string(), z.record(z.string(), z.array(stackSkillAssignmentSchema))).optional(),
1038
+ /** High-level philosophy guiding technology choices */
1039
+ philosophy: z.string().optional(),
1040
+ /** Guiding principles for agents using this stack */
1041
+ principles: z.array(z.string().min(1)).optional(),
1042
+ tags: z.array(z.string().regex(KEBAB_CASE_PATTERN)).optional(),
1043
+ /** Per-skill overrides: alternative suggestions and lock status */
1044
+ overrides: z.record(
1045
+ z.string(),
1046
+ z.object({
1047
+ /** Suggested alternative skill IDs if this one is swapped */
1048
+ alternatives: z.array(z.string().min(1)).optional(),
1049
+ /** If true, this skill cannot be swapped by the user */
1050
+ locked: z.boolean().optional()
1051
+ }).strict()
1052
+ ).optional(),
1053
+ /** Community metrics for sorting/ranking */
1054
+ metrics: z.object({
1055
+ upvotes: z.number().int().min(0).optional(),
1056
+ downloads: z.number().int().min(0).optional()
1057
+ }).strict().optional(),
1058
+ /** Lifecycle hooks triggered by file changes or commands */
1059
+ hooks: strictHooksRecordSchema.optional()
1060
+ }).strict();
1061
+ function formatZodIssues(issues) {
1062
+ return issues.map(formatZodIssue).join("; ");
1063
+ }
1064
+ function validateSkillMetadata(rawMetadata) {
1065
+ const schema = isCustomMetadata(rawMetadata) ? customMetadataValidationSchema : metadataValidationSchema;
1066
+ return schema.safeParse(rawMetadata);
1067
+ }
1068
+ function isOverLengthCliDescription(issue) {
1069
+ return issue.code === "too_big" && issue.path.length === 1 && issue.path[0] === "cliDescription";
1070
+ }
1071
+ function readCliDescription(raw) {
1072
+ if (raw == null || typeof raw !== "object") return void 0;
1073
+ const value = raw.cliDescription;
1074
+ return typeof value === "string" ? value : void 0;
1075
+ }
1076
+ function formatOverLengthWarning(issue, cliDescription) {
1077
+ if (cliDescription === void 0) return formatZodIssue(issue);
1078
+ return `cliDescription is ${cliDescription.length} characters \u2014 exceeds the recommended maximum of ${CLI_DESCRIPTION_MAX_LENGTH}`;
1079
+ }
1080
+ function splitMetadataValidationIssues(error, rawMetadata) {
1081
+ const [overLength, hardFailures] = partition(error.issues, isOverLengthCliDescription);
1082
+ const cliDescription = readCliDescription(rawMetadata);
1083
+ const warnings = overLength.map((issue) => formatOverLengthWarning(issue, cliDescription));
1084
+ return { errors: hardFailures.map(formatZodIssue), warnings };
1085
+ }
1086
+ function validateNestingDepth(value, maxDepth) {
1087
+ function check(val, depth) {
1088
+ if (depth > maxDepth) return false;
1089
+ if (Array.isArray(val)) {
1090
+ return val.every((item) => check(item, depth + 1));
1091
+ }
1092
+ if (val !== null && typeof val === "object") {
1093
+ return Object.values(val).every((v) => check(v, depth + 1));
1094
+ }
1095
+ return true;
1096
+ }
1097
+ return check(value, 0);
1098
+ }
1099
+ function isCustomMetadata(raw) {
1100
+ if (raw == null || typeof raw !== "object") return false;
1101
+ if (!("custom" in raw)) return false;
1102
+ return raw.custom === true;
1103
+ }
1104
+ function warnUnknownFields(parsed, expectedKeys, context) {
1105
+ const expectedSet = new Set(expectedKeys);
1106
+ const unknownKeys = Object.keys(parsed).filter((k) => !expectedSet.has(k));
1107
+ if (unknownKeys.length > 0) {
1108
+ warn(`Unknown fields in ${context}: ${unknownKeys.join(", ")}`);
1109
+ }
1110
+ }
1111
+
1112
+ // src/cli/lib/loading/loader.ts
1113
+ function parseFrontmatter(content, filePath) {
1114
+ const rawFrontmatter = extractFrontmatter(content);
1115
+ if (rawFrontmatter === null) return null;
1116
+ const parsed = skillFrontmatterLoaderSchema.safeParse(rawFrontmatter);
1117
+ if (!parsed.success) {
1118
+ const location = filePath ?? "unknown file";
1119
+ warn(`Invalid SKILL.md frontmatter in '${location}': ${formatZodIssues(parsed.error.issues)}`);
1120
+ return null;
1121
+ }
1122
+ return parsed.data;
1123
+ }
1124
+ async function loadAgentsFromDir(agentsDir, sourceRoot, options) {
1125
+ const agents = {};
1126
+ const files = await glob(`**/${STANDARD_FILES.AGENT_METADATA_YAML}`, agentsDir);
1127
+ for (const file of files) {
1128
+ const fullPath = path2.join(agentsDir, file);
1129
+ try {
1130
+ const content = await readFile(fullPath);
1131
+ const config = agentYamlConfigSchema.parse(parseYaml2(content));
1132
+ agents[config.id] = {
1133
+ title: config.title,
1134
+ description: config.description,
1135
+ model: config.model,
1136
+ tools: config.tools,
1137
+ path: path2.dirname(file),
1138
+ sourceRoot,
1139
+ ...options.agentBaseDir ? { agentBaseDir: options.agentBaseDir } : {},
1140
+ ...config.domain ? { domain: config.domain } : {},
1141
+ ...options.includeCustomFlag && config.custom === true ? { custom: true } : {}
1142
+ };
1143
+ verbose(`Loaded ${options.verboseLabel}: ${config.id} from ${file}`);
1144
+ } catch (error) {
1145
+ warn(`Skipping invalid metadata.yaml at '${fullPath}': ${getErrorMessage(error)}`);
1146
+ }
1147
+ }
1148
+ return agents;
1149
+ }
1150
+ async function loadAllAgents(projectRoot) {
1151
+ return loadAgentsFromDir(path2.join(projectRoot, DIRS.agents), projectRoot, {
1152
+ includeCustomFlag: true,
1153
+ verboseLabel: "agent"
1154
+ });
1155
+ }
1156
+ async function loadMergedAgents(sourcePath) {
1157
+ const [cliAgents, sourceAgents] = await Promise.all([
1158
+ loadAllAgents(PROJECT_ROOT),
1159
+ loadAllAgents(sourcePath)
1160
+ ]);
1161
+ return { ...cliAgents, ...sourceAgents };
1162
+ }
1163
+ async function loadProjectAgents(projectRoot) {
1164
+ const projectAgentsDir = path2.join(projectRoot, CLAUDE_SRC_DIR, STANDARD_DIRS.AGENTS);
1165
+ if (!await directoryExists(projectAgentsDir)) {
1166
+ verbose(`No project agents directory at ${projectAgentsDir}`);
1167
+ const noAgents = {};
1168
+ return noAgents;
1169
+ }
1170
+ return loadAgentsFromDir(projectAgentsDir, projectRoot, {
1171
+ // Project agents are in .claude-src/agents/
1172
+ agentBaseDir: `${CLAUDE_SRC_DIR}/agents`,
1173
+ verboseLabel: "project agent"
1174
+ });
1175
+ }
1176
+ async function buildIdToDirectoryPathMap(skillsDir) {
1177
+ const files = await glob(`**/${STANDARD_FILES.SKILL_MD}`, skillsDir);
1178
+ const parsed = await Promise.all(
1179
+ files.map(async (file) => {
1180
+ const fullPath = path2.join(skillsDir, file);
1181
+ return { file, frontmatter: parseFrontmatter(await readFile(fullPath), fullPath) };
1182
+ })
1183
+ );
1184
+ return Object.fromEntries(
1185
+ parsed.filter(
1186
+ (entry) => Boolean(entry.frontmatter?.name)
1187
+ ).flatMap(({ file, frontmatter }) => {
1188
+ const directoryPath = file.replace(`/${STANDARD_FILES.SKILL_MD}`, "");
1189
+ return [
1190
+ [frontmatter.name, directoryPath],
1191
+ [directoryPath, directoryPath]
1192
+ ];
1193
+ })
1194
+ );
1195
+ }
1196
+ async function loadSkillsByIds(skillIds, projectRoot) {
1197
+ const skills = {};
1198
+ const skillsDir = path2.join(projectRoot, DIRS.skills);
1199
+ const idToDirectoryPath = await buildIdToDirectoryPathMap(skillsDir);
1200
+ const expandDirectoryRef = (skillId) => {
1201
+ const childSkills = typedKeys(idToDirectoryPath).filter(
1202
+ (id) => idToDirectoryPath[id]?.startsWith(`${skillId}/`)
1203
+ );
1204
+ if (childSkills.length === 0) {
1205
+ warn(`Unknown skill reference '${skillId}'`);
1206
+ return [];
1207
+ }
1208
+ verbose(`Expanded directory '${skillId}' to ${childSkills.length} skills`);
1209
+ return childSkills;
1210
+ };
1211
+ const uniqueSkillIds = unique(
1212
+ skillIds.flatMap(({ id }) => idToDirectoryPath[id] ? [id] : expandDirectoryRef(id))
1213
+ );
1214
+ for (const skillId of uniqueSkillIds) {
1215
+ const directoryPath = idToDirectoryPath[skillId];
1216
+ if (!directoryPath) {
1217
+ warn(`Could not find skill '${skillId}': no matching skill found`);
1218
+ continue;
1219
+ }
1220
+ const skillPath = path2.join(skillsDir, directoryPath);
1221
+ const skillMdPath = path2.join(skillPath, STANDARD_FILES.SKILL_MD);
1222
+ try {
1223
+ const content = await readFile(skillMdPath);
1224
+ const frontmatter = parseFrontmatter(content, skillMdPath);
1225
+ if (!frontmatter) {
1226
+ warn(`Skipping '${skillId}': missing or invalid frontmatter`);
1227
+ continue;
1228
+ }
1229
+ const canonicalId = frontmatter.name;
1230
+ const skillDef = {
1231
+ id: canonicalId,
1232
+ path: `${DIRS.skills}/${directoryPath}/`,
1233
+ description: frontmatter.description
1234
+ };
1235
+ skills[canonicalId] = skillDef;
1236
+ verbose(`Loaded skill: ${canonicalId} (from ${directoryPath})`);
1237
+ } catch (error) {
1238
+ warn(`Could not load skill '${skillId}': ${error}`);
1239
+ }
1240
+ }
1241
+ return skills;
1242
+ }
1243
+ async function loadSkillsFromDir(skillsDir, options = {}) {
1244
+ const { pathPrefix = "", requireMetadata = false } = options;
1245
+ const skills = {};
1246
+ if (!await directoryExists(skillsDir)) {
1247
+ return skills;
1248
+ }
1249
+ const skillFiles = await glob(`**/${STANDARD_FILES.SKILL_MD}`, skillsDir);
1250
+ for (const skillFile of skillFiles) {
1251
+ const skillPath = path2.join(skillsDir, skillFile);
1252
+ const skillDir = path2.dirname(skillPath);
1253
+ const relativePath = path2.relative(skillsDir, skillDir);
1254
+ const skillDirName = path2.basename(skillDir);
1255
+ const displayPath = pathPrefix ? `${pathPrefix}/${relativePath}/` : `${relativePath}/`;
1256
+ if (requireMetadata) {
1257
+ const metadataPath = path2.join(skillDir, STANDARD_FILES.METADATA_YAML);
1258
+ if (!await fileExists(metadataPath)) {
1259
+ warn(
1260
+ `Skill '${skillDirName}' in '${displayPath}' is missing ${STANDARD_FILES.METADATA_YAML} \u2014 skipped. Add ${STANDARD_FILES.METADATA_YAML} to register it with the CLI.`
1261
+ );
1262
+ continue;
1263
+ }
1264
+ }
1265
+ try {
1266
+ const content = await readFile(skillPath);
1267
+ const frontmatter = parseFrontmatter(content, skillPath);
1268
+ if (!frontmatter?.name) {
1269
+ warn(`Skipping skill in '${skillDirName}': missing or invalid frontmatter name`);
1270
+ continue;
1271
+ }
1272
+ const canonicalId = frontmatter.name;
1273
+ skills[canonicalId] = {
1274
+ id: canonicalId,
1275
+ path: displayPath,
1276
+ description: frontmatter.description || ""
1277
+ };
1278
+ verbose(` Loaded skill: ${canonicalId}`);
1279
+ } catch (error) {
1280
+ verbose(` Failed to load skill: ${skillFile} - ${error}`);
1281
+ }
1282
+ }
1283
+ return skills;
1284
+ }
1285
+ async function loadPluginSkills(pluginDir) {
1286
+ return loadSkillsFromDir(path2.join(pluginDir, "skills"), {
1287
+ pathPrefix: "skills",
1288
+ requireMetadata: false
1289
+ });
1290
+ }
1291
+
1292
+ export {
1293
+ getErrorMessage,
1294
+ setVerbose,
1295
+ verbose,
1296
+ log,
1297
+ enableBuffering,
1298
+ drainBuffer,
1299
+ disableBuffering,
1300
+ warn,
1301
+ extractFrontmatter,
1302
+ GlobalPairWriteViolation,
1303
+ withGateToken,
1304
+ assertGateToken,
1305
+ isPathWithin,
1306
+ readFile,
1307
+ readFileSafe,
1308
+ readFileOptional,
1309
+ fileExists,
1310
+ directoryExists,
1311
+ listDirectories,
1312
+ glob,
1313
+ writeFile,
1314
+ ensureDir,
1315
+ remove,
1316
+ copy,
1317
+ formatZodErrors,
1318
+ DOMAINS,
1319
+ AGENT_NAMES,
1320
+ MODEL_NAMES,
1321
+ EFFORT_NAMES,
1322
+ modelNameSchema,
1323
+ skillMetadataLoaderSchema,
1324
+ matrixRawMetadataSchema,
1325
+ pluginManifestSchema,
1326
+ pluginManifestValidationSchema,
1327
+ projectConfigLoaderSchema,
1328
+ skillCategoriesFileSchema,
1329
+ skillRulesFileSchema,
1330
+ localRawMetadataSchema,
1331
+ localSkillMetadataSchema,
1332
+ stacksConfigSchema,
1333
+ marketplaceSchema,
1334
+ settingsFileSchema,
1335
+ importedSkillMetadataSchema,
1336
+ projectSourceConfigSchema,
1337
+ agentYamlGenerationSchema,
1338
+ agentFrontmatterValidationSchema,
1339
+ skillFrontmatterValidationSchema,
1340
+ metadataValidationSchema,
1341
+ stackConfigValidationSchema,
1342
+ formatZodIssues,
1343
+ validateSkillMetadata,
1344
+ splitMetadataValidationIssues,
1345
+ validateNestingDepth,
1346
+ warnUnknownFields,
1347
+ parseFrontmatter,
1348
+ loadAllAgents,
1349
+ loadMergedAgents,
1350
+ loadProjectAgents,
1351
+ loadSkillsByIds,
1352
+ loadSkillsFromDir,
1353
+ loadPluginSkills
1354
+ };
1355
+ //# sourceMappingURL=chunk-3LIU2ZEF.js.map