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,176 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ compileAllAgentPlugins,
4
+ printAgentCompilationSummary
5
+ } from "../../chunk-YKKIJHZB.js";
6
+ import {
7
+ BaseCommand
8
+ } from "../../chunk-OA5SUEQD.js";
9
+ import "../../chunk-SYUOXSPU.js";
10
+ import "../../chunk-P3PN5SVI.js";
11
+ import {
12
+ compileAllSkillPlugins,
13
+ compileSkillPlugin,
14
+ printCompilationSummary,
15
+ readPluginManifest
16
+ } from "../../chunk-KH7MOIM5.js";
17
+ import {
18
+ listDirectories,
19
+ remove,
20
+ setVerbose
21
+ } from "../../chunk-3LIU2ZEF.js";
22
+ import "../../chunk-DJAZE4PD.js";
23
+ import "../../chunk-VEP23B5W.js";
24
+ import {
25
+ DIRS,
26
+ PLUGINS_DIST_PATH
27
+ } from "../../chunk-O5ASLZ2K.js";
28
+ import "../../chunk-YU2VGX5R.js";
29
+ import {
30
+ init_esm_shims
31
+ } from "../../chunk-P56WJ5FA.js";
32
+
33
+ // src/cli/commands/build/plugins.ts
34
+ init_esm_shims();
35
+ import { Flags } from "@oclif/core";
36
+ import path from "path";
37
+ var BuildPlugins = class _BuildPlugins extends BaseCommand {
38
+ static summary = "Build skills and agents into standalone plugins";
39
+ static description = "Build skills and agents into standalone plugins. By default, compiles all skills. Use --skill to compile a specific skill only. Use --agents-dir to also compile agents.";
40
+ static examples = [
41
+ {
42
+ description: "Compile every skill into plugins",
43
+ command: "<%= config.bin %> <%= command.id %>"
44
+ },
45
+ {
46
+ description: "Compile a single skill by name",
47
+ command: "<%= config.bin %> <%= command.id %> --skill cli-commander"
48
+ },
49
+ {
50
+ description: "Write plugins to a custom output directory",
51
+ command: "<%= config.bin %> <%= command.id %> --output-dir ./plugins"
52
+ },
53
+ {
54
+ description: "Also compile agents from a directory",
55
+ command: "<%= config.bin %> <%= command.id %> --agents-dir ./agents"
56
+ },
57
+ {
58
+ description: "Compile with verbose logging",
59
+ command: "<%= config.bin %> <%= command.id %> --verbose"
60
+ }
61
+ ];
62
+ // Override parent baseFlags to drop --source (build plugins reads from local DIRS.skills, not a remote source)
63
+ static baseFlags = {};
64
+ static flags = {
65
+ "agents-dir": Flags.string({
66
+ char: "a",
67
+ description: "Agents source directory (builds one plugin per agent)"
68
+ }),
69
+ "output-dir": Flags.string({
70
+ char: "o",
71
+ description: "Output directory",
72
+ default: PLUGINS_DIST_PATH
73
+ }),
74
+ skill: Flags.string({
75
+ description: "Compile only a specific skill (path to skill directory)"
76
+ }),
77
+ verbose: Flags.boolean({
78
+ char: "v",
79
+ description: "Enable verbose logging",
80
+ default: false
81
+ })
82
+ };
83
+ async run() {
84
+ const { flags } = await this.parse(_BuildPlugins);
85
+ setVerbose(flags.verbose);
86
+ const projectRoot = process.cwd();
87
+ const skillsDir = path.resolve(projectRoot, DIRS.skills);
88
+ const outputDir = path.resolve(projectRoot, flags["output-dir"]);
89
+ this.printHeader(skillsDir, outputDir);
90
+ try {
91
+ const expectedSkillPlugins = await this.compileSkills(flags.skill, skillsDir, outputDir);
92
+ if (flags["agents-dir"]) {
93
+ await this.compileAgents(projectRoot, flags["agents-dir"], outputDir);
94
+ }
95
+ if (expectedSkillPlugins) {
96
+ await this.pruneStaleSkillPlugins(outputDir, expectedSkillPlugins);
97
+ }
98
+ this.log("");
99
+ this.logSuccess("Plugin compilation complete!");
100
+ } catch (error) {
101
+ this.log("Compilation failed");
102
+ this.handleError(error);
103
+ }
104
+ }
105
+ printHeader(skillsDir, outputDir) {
106
+ this.log("");
107
+ this.log("Compiling skill plugins");
108
+ this.log(` Skills directory: ${skillsDir}`);
109
+ this.log(` Output directory: ${outputDir}`);
110
+ this.log("");
111
+ }
112
+ /**
113
+ * Compiles skills and returns the set of plugin directory names that should
114
+ * exist afterward — used to prune stale plugins. Returns `null` when pruning
115
+ * must be skipped: single-skill mode (would wipe every other plugin) or a
116
+ * partial compile failure (a failed skill is indistinguishable from a removed
117
+ * one, so deleting it would be a worse bug than the stale entry).
118
+ */
119
+ async compileSkills(skillFlag, skillsDir, outputDir) {
120
+ if (skillFlag) {
121
+ const skillPath = path.resolve(skillsDir, skillFlag);
122
+ this.log(`Compiling skill at ${skillPath}...`);
123
+ const result = await compileSkillPlugin({
124
+ skillPath,
125
+ outputDir
126
+ });
127
+ this.log(`Compiled ${result.skillName}`);
128
+ this.log(` Plugin path: ${result.pluginPath}`);
129
+ return null;
130
+ }
131
+ this.log("Finding and compiling all skills...");
132
+ const { compiled, failed } = await compileAllSkillPlugins(skillsDir, outputDir);
133
+ this.log(`Compiled ${compiled.length} skill plugins`);
134
+ printCompilationSummary(compiled);
135
+ if (failed.length > 0) {
136
+ this.warn(
137
+ `Skipping stale-plugin pruning: ${failed.length} skill(s) failed to compile (${failed.join(", ")}). A failed skill is indistinguishable from a removed one.`
138
+ );
139
+ return null;
140
+ }
141
+ return new Set(compiled.map((result) => result.skillName));
142
+ }
143
+ async compileAgents(projectRoot, agentsDir, outputDir) {
144
+ const resolvedAgentsDir = path.resolve(projectRoot, agentsDir);
145
+ this.log("");
146
+ this.log("Compiling agent plugins");
147
+ this.log(` Agents directory: ${resolvedAgentsDir}`);
148
+ this.log("");
149
+ this.log("Finding and compiling all agents...");
150
+ const agentResults = await compileAllAgentPlugins(resolvedAgentsDir, outputDir);
151
+ this.log(`Compiled ${agentResults.length} agent plugins`);
152
+ printAgentCompilationSummary(agentResults);
153
+ }
154
+ /**
155
+ * Removes skill-plugin directories in `outputDir` that no longer correspond to
156
+ * a compiled skill. Only skill plugins are pruned: agent plugins are preserved
157
+ * (this run has no authority over them) and non-plugin directories are left
158
+ * untouched. Callers must only invoke this after a clean full-scan compile.
159
+ */
160
+ async pruneStaleSkillPlugins(outputDir, expectedSkillPlugins) {
161
+ const dirNames = await listDirectories(outputDir);
162
+ for (const dirName of dirNames) {
163
+ if (expectedSkillPlugins.has(dirName)) continue;
164
+ const pluginDir = path.join(outputDir, dirName);
165
+ const manifest = await readPluginManifest(pluginDir);
166
+ if (!manifest) continue;
167
+ if (manifest.agents !== void 0) continue;
168
+ await remove(pluginDir);
169
+ this.log(` Pruned stale plugin: ${dirName}`);
170
+ }
171
+ }
172
+ };
173
+ export {
174
+ BuildPlugins as default
175
+ };
176
+ //# sourceMappingURL=plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/cli/commands/build/plugins.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\";\nimport path from \"path\";\n\nimport { BaseCommand } from \"../../base-command\";\nimport { setVerbose } from \"../../utils/logger\";\nimport { listDirectories, remove } from \"../../utils/fs\";\nimport { DIRS, PLUGINS_DIST_PATH } from \"../../consts\";\nimport {\n compileAllSkillPlugins,\n compileSkillPlugin,\n printCompilationSummary,\n} from \"../../lib/skills\";\nimport { compileAllAgentPlugins, printAgentCompilationSummary } from \"../../lib/agents\";\nimport { readPluginManifest } from \"../../lib/plugins\";\n\nexport default class BuildPlugins extends BaseCommand {\n static summary = \"Build skills and agents into standalone plugins\";\n\n static description =\n \"Build skills and agents into standalone plugins. By default, compiles all skills. Use --skill to compile a specific skill only. Use --agents-dir to also compile agents.\";\n\n static examples = [\n {\n description: \"Compile every skill into plugins\",\n command: \"<%= config.bin %> <%= command.id %>\",\n },\n {\n description: \"Compile a single skill by name\",\n command: \"<%= config.bin %> <%= command.id %> --skill cli-commander\",\n },\n {\n description: \"Write plugins to a custom output directory\",\n command: \"<%= config.bin %> <%= command.id %> --output-dir ./plugins\",\n },\n {\n description: \"Also compile agents from a directory\",\n command: \"<%= config.bin %> <%= command.id %> --agents-dir ./agents\",\n },\n {\n description: \"Compile with verbose logging\",\n command: \"<%= config.bin %> <%= command.id %> --verbose\",\n },\n ];\n\n // Override parent baseFlags to drop --source (build plugins reads from local DIRS.skills, not a remote source)\n static baseFlags = {} as (typeof BaseCommand)[\"baseFlags\"];\n\n static flags = {\n \"agents-dir\": Flags.string({\n char: \"a\",\n description: \"Agents source directory (builds one plugin per agent)\",\n }),\n \"output-dir\": Flags.string({\n char: \"o\",\n description: \"Output directory\",\n default: PLUGINS_DIST_PATH,\n }),\n skill: Flags.string({\n description: \"Compile only a specific skill (path to skill directory)\",\n }),\n verbose: Flags.boolean({\n char: \"v\",\n description: \"Enable verbose logging\",\n default: false,\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(BuildPlugins);\n setVerbose(flags.verbose);\n\n const projectRoot = process.cwd();\n const skillsDir = path.resolve(projectRoot, DIRS.skills);\n const outputDir = path.resolve(projectRoot, flags[\"output-dir\"]);\n\n this.printHeader(skillsDir, outputDir);\n\n try {\n const expectedSkillPlugins = await this.compileSkills(flags.skill, skillsDir, outputDir);\n\n if (flags[\"agents-dir\"]) {\n await this.compileAgents(projectRoot, flags[\"agents-dir\"], outputDir);\n }\n\n if (expectedSkillPlugins) {\n await this.pruneStaleSkillPlugins(outputDir, expectedSkillPlugins);\n }\n\n this.log(\"\");\n this.logSuccess(\"Plugin compilation complete!\");\n } catch (error) {\n this.log(\"Compilation failed\");\n this.handleError(error);\n }\n }\n\n private printHeader(skillsDir: string, outputDir: string): void {\n this.log(\"\");\n this.log(\"Compiling skill plugins\");\n this.log(` Skills directory: ${skillsDir}`);\n this.log(` Output directory: ${outputDir}`);\n this.log(\"\");\n }\n\n /**\n * Compiles skills and returns the set of plugin directory names that should\n * exist afterward — used to prune stale plugins. Returns `null` when pruning\n * must be skipped: single-skill mode (would wipe every other plugin) or a\n * partial compile failure (a failed skill is indistinguishable from a removed\n * one, so deleting it would be a worse bug than the stale entry).\n */\n private async compileSkills(\n skillFlag: string | undefined,\n skillsDir: string,\n outputDir: string,\n ): Promise<Set<string> | null> {\n if (skillFlag) {\n const skillPath = path.resolve(skillsDir, skillFlag);\n this.log(`Compiling skill at ${skillPath}...`);\n\n const result = await compileSkillPlugin({\n skillPath,\n outputDir,\n });\n\n this.log(`Compiled ${result.skillName}`);\n this.log(` Plugin path: ${result.pluginPath}`);\n return null;\n }\n\n this.log(\"Finding and compiling all skills...\");\n\n const { compiled, failed } = await compileAllSkillPlugins(skillsDir, outputDir);\n\n this.log(`Compiled ${compiled.length} skill plugins`);\n printCompilationSummary(compiled);\n\n if (failed.length > 0) {\n this.warn(\n `Skipping stale-plugin pruning: ${failed.length} skill(s) failed to compile ` +\n `(${failed.join(\", \")}). A failed skill is indistinguishable from a removed one.`,\n );\n return null;\n }\n\n return new Set(compiled.map((result) => result.skillName));\n }\n\n private async compileAgents(\n projectRoot: string,\n agentsDir: string,\n outputDir: string,\n ): Promise<void> {\n const resolvedAgentsDir = path.resolve(projectRoot, agentsDir);\n\n this.log(\"\");\n this.log(\"Compiling agent plugins\");\n this.log(` Agents directory: ${resolvedAgentsDir}`);\n this.log(\"\");\n\n this.log(\"Finding and compiling all agents...\");\n\n const agentResults = await compileAllAgentPlugins(resolvedAgentsDir, outputDir);\n\n this.log(`Compiled ${agentResults.length} agent plugins`);\n printAgentCompilationSummary(agentResults);\n }\n\n /**\n * Removes skill-plugin directories in `outputDir` that no longer correspond to\n * a compiled skill. Only skill plugins are pruned: agent plugins are preserved\n * (this run has no authority over them) and non-plugin directories are left\n * untouched. Callers must only invoke this after a clean full-scan compile.\n */\n private async pruneStaleSkillPlugins(\n outputDir: string,\n expectedSkillPlugins: ReadonlySet<string>,\n ): Promise<void> {\n const dirNames = await listDirectories(outputDir);\n\n for (const dirName of dirNames) {\n if (expectedSkillPlugins.has(dirName)) continue;\n\n const pluginDir = path.join(outputDir, dirName);\n const manifest = await readPluginManifest(pluginDir);\n if (!manifest) continue;\n if (manifest.agents !== undefined) continue;\n\n await remove(pluginDir);\n this.log(` Pruned stale plugin: ${dirName}`);\n }\n }\n}\n"],"mappings":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WAAW,OAAO,SAAS,CAAC;AAAA,EAC3D;AAAA,EAEA,MAAc,cACZ,aACA,WACA,WACe;AACf,UAAM,oBAAoB,KAAK,QAAQ,aAAa,SAAS;AAE7D,SAAK,IAAI,EAAE;AACX,SAAK,IAAI,yBAAyB;AAClC,SAAK,IAAI,uBAAuB,iBAAiB,EAAE;AACnD,SAAK,IAAI,EAAE;AAEX,SAAK,IAAI,qCAAqC;AAE9C,UAAM,eAAe,MAAM,uBAAuB,mBAAmB,SAAS;AAE9E,SAAK,IAAI,YAAY,aAAa,MAAM,gBAAgB;AACxD,iCAA6B,YAAY;AAAA,EAC3C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAc,uBACZ,WACA,sBACe;AACf,UAAM,WAAW,MAAM,gBAAgB,SAAS;AAEhD,eAAW,WAAW,UAAU;AAC9B,UAAI,qBAAqB,IAAI,OAAO,EAAG;AAEvC,YAAM,YAAY,KAAK,KAAK,WAAW,OAAO;AAC9C,YAAM,WAAW,MAAM,mBAAmB,SAAS;AACnD,UAAI,CAAC,SAAU;AACf,UAAI,SAAS,WAAW,OAAW;AAEnC,YAAM,OAAO,SAAS;AACtB,WAAK,IAAI,0BAA0B,OAAO,EAAE;AAAA,IAC9C;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,331 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ ERROR_MESSAGES,
4
+ INFO_MESSAGES,
5
+ STATUS_MESSAGES,
6
+ configTypesRefreshFailed,
7
+ globalScopedAgentsHint,
8
+ registeredProjectUpdateSkipped
9
+ } from "../chunk-GYG5SE2D.js";
10
+ import {
11
+ detectBothInstallations
12
+ } from "../chunk-DDG4F3FE.js";
13
+ import {
14
+ compileAgents,
15
+ discoverInstalledSkills
16
+ } from "../chunk-N4IZ6GBO.js";
17
+ import "../chunk-CDMHSHBN.js";
18
+ import {
19
+ loadAgentDefs
20
+ } from "../chunk-VIFZ6NFH.js";
21
+ import "../chunk-YKKIJHZB.js";
22
+ import {
23
+ BaseCommand,
24
+ EXIT_CODES
25
+ } from "../chunk-OA5SUEQD.js";
26
+ import "../chunk-SYUOXSPU.js";
27
+ import "../chunk-P3PN5SVI.js";
28
+ import {
29
+ ConfigLoadError,
30
+ effectivelyExcludedSkillIds,
31
+ getStackSkillIds,
32
+ loadProjectConfig,
33
+ loadProjectConfigFromDir,
34
+ loadSkillsMatrixFromSource,
35
+ reconcileTypesFromDisk,
36
+ resolveSource
37
+ } from "../chunk-KH7MOIM5.js";
38
+ import {
39
+ getErrorMessage,
40
+ setVerbose,
41
+ verbose
42
+ } from "../chunk-3LIU2ZEF.js";
43
+ import "../chunk-DJAZE4PD.js";
44
+ import "../chunk-VEP23B5W.js";
45
+ import {
46
+ CLI_INVOKE_COMMAND,
47
+ STANDARD_FILES
48
+ } from "../chunk-O5ASLZ2K.js";
49
+ import "../chunk-YU2VGX5R.js";
50
+ import {
51
+ init_esm_shims
52
+ } from "../chunk-P56WJ5FA.js";
53
+
54
+ // src/cli/commands/compile.ts
55
+ init_esm_shims();
56
+ import { Flags } from "@oclif/core";
57
+ import os from "os";
58
+ var Compile = class _Compile extends BaseCommand {
59
+ static summary = "Compile agents using local skills and agent definitions";
60
+ static description = "Compile agents with resolved skill references. Compiles to the Claude plugin directory.";
61
+ static examples = [
62
+ "<%= config.bin %> <%= command.id %>",
63
+ "<%= config.bin %> <%= command.id %> --verbose"
64
+ ];
65
+ static flags = {
66
+ ...BaseCommand.baseFlags,
67
+ verbose: Flags.boolean({
68
+ char: "v",
69
+ description: "Enable verbose logging",
70
+ default: false
71
+ })
72
+ };
73
+ async run() {
74
+ const { flags } = await this.parse(_Compile);
75
+ setVerbose(flags.verbose);
76
+ const cwd = process.cwd();
77
+ const installations = await this.detectInstallations(cwd);
78
+ await this.resolveAndLogSource(flags.source);
79
+ const agentDefs = await this.loadAgentDefsOrFail(cwd);
80
+ await this.compileAllScopes(installations, agentDefs, cwd, flags.source);
81
+ }
82
+ async detectInstallations(cwd) {
83
+ let installations;
84
+ try {
85
+ installations = await detectBothInstallations(cwd);
86
+ } catch (error) {
87
+ if (error instanceof ConfigLoadError) {
88
+ this.error(error.message, { exit: EXIT_CODES.ERROR });
89
+ }
90
+ throw error;
91
+ }
92
+ if (!installations.global && !installations.project) {
93
+ this.error(ERROR_MESSAGES.NO_INSTALLATION, {
94
+ exit: EXIT_CODES.ERROR
95
+ });
96
+ }
97
+ return installations;
98
+ }
99
+ async resolveAndLogSource(sourceFlag) {
100
+ this.log(STATUS_MESSAGES.RESOLVING_SOURCE);
101
+ try {
102
+ const sourceConfig = await resolveSource(sourceFlag);
103
+ this.log(`Source: ${sourceConfig.sourceOrigin}`);
104
+ } catch (error) {
105
+ this.log(ERROR_MESSAGES.FAILED_RESOLVE_SOURCE);
106
+ this.handleError(error);
107
+ }
108
+ }
109
+ async loadAgentDefsOrFail(cwd) {
110
+ this.log(STATUS_MESSAGES.LOADING_AGENT_PARTIALS);
111
+ try {
112
+ const defs = await loadAgentDefs({ projectDir: cwd });
113
+ this.log("Agent partials loaded");
114
+ verbose(` Agents: ${defs.agentSourcePaths.agentsDir}`);
115
+ verbose(` Templates: ${defs.agentSourcePaths.templatesDir}`);
116
+ return defs;
117
+ } catch (error) {
118
+ this.log(ERROR_MESSAGES.FAILED_LOAD_AGENT_PARTIALS);
119
+ this.handleError(error);
120
+ }
121
+ }
122
+ async compileAllScopes(installations, agentDefs, cwd, sourceFlag) {
123
+ const passes = buildCompilePasses(installations, cwd, agentDefs);
124
+ let totalPassesWithSkills = 0;
125
+ for (const pass of passes) {
126
+ const hadSkills = await this.runCompilePass(pass, cwd, sourceFlag);
127
+ if (hadSkills) totalPassesWithSkills++;
128
+ }
129
+ if (totalPassesWithSkills === 0) {
130
+ this.error(
131
+ `No skills found. Add skills with '${CLI_INVOKE_COMMAND} add <skill>' or create in .claude/skills/.`,
132
+ { exit: EXIT_CODES.ERROR }
133
+ );
134
+ }
135
+ }
136
+ async discoverAllSkills(projectDir) {
137
+ this.log(STATUS_MESSAGES.DISCOVERING_SKILLS);
138
+ const result = await discoverInstalledSkills(projectDir);
139
+ if (result.totalSkillCount === 0) return result;
140
+ this.log(formatDiscoveryMessage(result));
141
+ return result;
142
+ }
143
+ /**
144
+ * A stack skill that is not among the discovered skills is dropped from every
145
+ * agent that references it. The resolver only records that at verbose level, so
146
+ * the default output would claim a successful recompile of an agent that no
147
+ * longer matches config.ts. Name each dropped skill instead.
148
+ */
149
+ async warnUnresolvedStackSkills(projectDir, allSkills) {
150
+ const loaded = await loadProjectConfig(projectDir);
151
+ if (!loaded?.config.stack) return;
152
+ const excludedIds = effectivelyExcludedSkillIds(loaded.config.skills);
153
+ const unresolved = getStackSkillIds(loaded.config.stack).filter(
154
+ (id) => !excludedIds.has(id) && !(id in allSkills)
155
+ );
156
+ for (const id of unresolved) {
157
+ this.warn(
158
+ `Skill '${id}' is configured but was not found \u2014 agents will be compiled without it.`
159
+ );
160
+ }
161
+ }
162
+ /**
163
+ * The project pass compiled no agents, but the project config may still declare
164
+ * global-scope agents whose stack lives in the global config. Without a pointer
165
+ * the "No agents to recompile" line reads as a silent no-op after a global stack
166
+ * change, so name the global context and the count.
167
+ */
168
+ async hintGlobalScopedAgents(projectDir) {
169
+ const loaded = await loadProjectConfigFromDir(projectDir);
170
+ if (!loaded) return;
171
+ const globalAgentCount = loaded.config.agents.filter(
172
+ (agent) => !agent.excluded && agent.scope === "global"
173
+ ).length;
174
+ if (globalAgentCount === 0) return;
175
+ this.log(globalScopedAgentsHint(globalAgentCount));
176
+ }
177
+ /**
178
+ * The documented hand-edit workflow is "edit config.ts, then run compile", and
179
+ * the type unions in config-types.ts are derived from config.ts — so a compile
180
+ * pass that leaves them untouched strands stale unions after a hand-edit.
181
+ * Regenerates them from the scope's persisted config exactly as the wizard
182
+ * write path would: standalone narrowed unions at global scope, import-and-
183
+ * extend at project scope. `matrixOnly` keeps the default-source path offline.
184
+ * A failed refresh downgrades to a warning — the compiled agents are already
185
+ * written and remain valid; only the type unions may still be stale.
186
+ *
187
+ * `skipExtraSources: true` is NOT a divergence from the wizard's full
188
+ * multi-source load: extra-source loading only annotates each skill's
189
+ * `availableSources`/`activeSource` for wizard UI tagging — it never adds
190
+ * skills or categories to the matrix, and the config-types writer never reads
191
+ * those annotations, so the emitted types are byte-identical either way
192
+ * (pinned by the skipExtraSources parity test in local-installer.test.ts).
193
+ * Skipping avoids fetching every registered extra source (network on a cold
194
+ * cache, plus unreachable-remote warnings) on this offline compile path.
195
+ */
196
+ async refreshConfigTypes(pass, cwd, sourceFlag) {
197
+ let report;
198
+ try {
199
+ const loaded = await loadProjectConfigFromDir(pass.projectDir);
200
+ if (!loaded) {
201
+ verbose(
202
+ `No config found at ${pass.projectDir} \u2014 skipping ${STANDARD_FILES.CONFIG_TYPES_TS} refresh`
203
+ );
204
+ return;
205
+ }
206
+ const { matrix } = await loadSkillsMatrixFromSource({
207
+ sourceFlag,
208
+ projectDir: pass.projectDir,
209
+ skipExtraSources: true,
210
+ matrixOnly: true
211
+ });
212
+ report = await reconcileTypesFromDisk(
213
+ pass.projectDir,
214
+ loaded.config,
215
+ { matrix, agents: pass.agents },
216
+ { currentProjectDir: cwd }
217
+ );
218
+ this.log(INFO_MESSAGES.CONFIG_TYPES_REFRESHED);
219
+ } catch (error) {
220
+ this.warn(configTypesRefreshFailed(getErrorMessage(error)));
221
+ return;
222
+ }
223
+ this.reportPropagation(report);
224
+ }
225
+ /**
226
+ * Renders the fan-out the refresh above performed. Kept out of the refresh's
227
+ * catch on purpose: a project the fan-out could not reach is reported as that,
228
+ * not as a failure to refresh the type unions — which did succeed.
229
+ */
230
+ reportPropagation(report) {
231
+ for (const skippedPath of report.propagated.skipped) {
232
+ this.warn(registeredProjectUpdateSkipped(skippedPath));
233
+ }
234
+ for (const warning of report.recompile.warnings) {
235
+ this.warn(warning);
236
+ }
237
+ if (report.propagated.updated.length === 0) return;
238
+ const { recompiledCount, failedCount } = report.recompile;
239
+ const failureSuffix = failedCount > 0 ? ` (${failedCount} failed)` : "";
240
+ this.log(`Recompiled agents in ${recompiledCount} registered projects${failureSuffix}`);
241
+ }
242
+ async runCompilePass(params, cwd, sourceFlag) {
243
+ const { label, projectDir, installation, sourcePath, scopeFilter } = params;
244
+ this.log("");
245
+ this.log(`Compiling ${label.toLowerCase()} agents...`);
246
+ this.log("");
247
+ verbose(` Project: ${projectDir}`);
248
+ verbose(` Agents: ${installation.agentsDir}`);
249
+ const { allSkills, totalSkillCount } = await this.discoverAllSkills(projectDir);
250
+ if (totalSkillCount === 0) {
251
+ this.log(`No skills found for ${label.toLowerCase()} pass, skipping`);
252
+ await this.refreshConfigTypes(params, cwd, sourceFlag);
253
+ return false;
254
+ }
255
+ await this.warnUnresolvedStackSkills(projectDir, allSkills);
256
+ this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);
257
+ try {
258
+ const recompileResult = await compileAgents({
259
+ projectDir,
260
+ sourcePath,
261
+ skills: allSkills,
262
+ pluginDir: projectDir,
263
+ outputDir: installation.agentsDir,
264
+ scopeFilter
265
+ });
266
+ if (recompileResult.failed.length > 0) {
267
+ this.log(
268
+ `Recompiled ${recompileResult.compiled.length} ${label.toLowerCase()} agents (${recompileResult.failed.length} failed)`
269
+ );
270
+ for (const warning of recompileResult.warnings) {
271
+ this.warn(warning);
272
+ }
273
+ } else if (recompileResult.compiled.length > 0) {
274
+ this.log(`Recompiled ${recompileResult.compiled.length} ${label.toLowerCase()} agents`);
275
+ } else {
276
+ this.log(INFO_MESSAGES.NO_AGENTS_TO_RECOMPILE);
277
+ if (label === "Project") {
278
+ await this.hintGlobalScopedAgents(projectDir);
279
+ }
280
+ }
281
+ if (recompileResult.compiled.length > 0) {
282
+ verbose(` Compiled: ${recompileResult.compiled.join(", ")}`);
283
+ }
284
+ } catch (error) {
285
+ this.log(ERROR_MESSAGES.FAILED_COMPILE_AGENTS);
286
+ this.handleError(error);
287
+ }
288
+ await this.refreshConfigTypes(params, cwd, sourceFlag);
289
+ this.log("");
290
+ this.logSuccess(`${label} compile complete!`);
291
+ this.log("");
292
+ return true;
293
+ }
294
+ };
295
+ function buildCompilePasses(installations, cwd, agentDefs) {
296
+ const { sourcePath, agents } = agentDefs;
297
+ const passes = [];
298
+ if (installations.global) {
299
+ passes.push({
300
+ label: "Global",
301
+ projectDir: os.homedir(),
302
+ installation: installations.global,
303
+ sourcePath,
304
+ agents,
305
+ scopeFilter: installations.hasBoth ? "global" : void 0
306
+ });
307
+ }
308
+ if (installations.project) {
309
+ passes.push({
310
+ label: "Project",
311
+ projectDir: cwd,
312
+ installation: installations.project,
313
+ sourcePath,
314
+ agents,
315
+ scopeFilter: installations.hasBoth ? "project" : void 0
316
+ });
317
+ }
318
+ return passes;
319
+ }
320
+ function formatDiscoveryMessage(result) {
321
+ const { totalSkillCount, pluginSkillCount } = result;
322
+ const localCount = totalSkillCount - pluginSkillCount;
323
+ if (pluginSkillCount > 0 && localCount > 0) {
324
+ return `Discovered ${totalSkillCount} skills (${pluginSkillCount} from plugins, ${localCount} local)`;
325
+ }
326
+ return pluginSkillCount > 0 ? `Discovered ${pluginSkillCount} skills from plugins` : `Discovered ${totalSkillCount} local skills`;
327
+ }
328
+ export {
329
+ Compile as default
330
+ };
331
+ //# sourceMappingURL=compile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/cli/commands/compile.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\";\nimport os from \"os\";\nimport { BaseCommand } from \"../base-command\";\nimport { setVerbose, verbose } from \"../utils/logger\";\nimport {\n detectBothInstallations,\n type BothInstallations,\n loadAgentDefs,\n type AgentDefs,\n compileAgents,\n discoverInstalledSkills,\n type DiscoveredSkills,\n} from \"../lib/operations\";\nimport {\n ConfigLoadError,\n effectivelyExcludedSkillIds,\n loadProjectConfig,\n loadProjectConfigFromDir,\n resolveSource,\n} from \"../lib/configuration\";\nimport { getStackSkillIds } from \"../lib/stacks\";\nimport { loadSkillsMatrixFromSource } from \"../lib/loading\";\nimport { CLI_INVOKE_COMMAND, STANDARD_FILES } from \"../consts\";\nimport { EXIT_CODES } from \"../lib/exit-codes\";\nimport { getErrorMessage } from \"../utils/errors\";\nimport {\n ERROR_MESSAGES,\n STATUS_MESSAGES,\n INFO_MESSAGES,\n configTypesRefreshFailed,\n globalScopedAgentsHint,\n registeredProjectUpdateSkipped,\n} from \"../utils/messages\";\nimport { reconcileTypesFromDisk, type GateReport } from \"../lib/config-gate/index.js\";\nimport type { Installation } from \"../lib/installation\";\nimport type { SkillScope } from \"../types/config\";\nimport type { AgentDefinition, AgentName, SkillDefinitionMap } from \"../types\";\n\nexport default class Compile extends BaseCommand {\n static summary = \"Compile agents using local skills and agent definitions\";\n\n static description =\n \"Compile agents with resolved skill references. Compiles to the Claude plugin directory.\";\n\n static examples = [\n \"<%= config.bin %> <%= command.id %>\",\n \"<%= config.bin %> <%= command.id %> --verbose\",\n ];\n\n static flags = {\n ...BaseCommand.baseFlags,\n verbose: Flags.boolean({\n char: \"v\",\n description: \"Enable verbose logging\",\n default: false,\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Compile);\n setVerbose(flags.verbose);\n const cwd = process.cwd();\n\n const installations = await this.detectInstallations(cwd);\n await this.resolveAndLogSource(flags.source);\n const agentDefs = await this.loadAgentDefsOrFail(cwd);\n await this.compileAllScopes(installations, agentDefs, cwd, flags.source);\n }\n\n private async detectInstallations(cwd: string): Promise<BothInstallations> {\n let installations: BothInstallations;\n try {\n installations = await detectBothInstallations(cwd);\n } catch (error) {\n // A corrupt config (file present but unparseable) must not let compile run\n // config-less — that resurrects every deselected agent. Hard-error naming\n // the offending file before any compilation happens.\n if (error instanceof ConfigLoadError) {\n this.error(error.message, { exit: EXIT_CODES.ERROR });\n }\n throw error;\n }\n\n if (!installations.global && !installations.project) {\n this.error(ERROR_MESSAGES.NO_INSTALLATION, {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n return installations;\n }\n\n private async resolveAndLogSource(sourceFlag?: string): Promise<void> {\n this.log(STATUS_MESSAGES.RESOLVING_SOURCE);\n try {\n const sourceConfig = await resolveSource(sourceFlag);\n this.log(`Source: ${sourceConfig.sourceOrigin}`);\n } catch (error) {\n this.log(ERROR_MESSAGES.FAILED_RESOLVE_SOURCE);\n this.handleError(error);\n }\n }\n\n private async loadAgentDefsOrFail(cwd: string): Promise<AgentDefs> {\n this.log(STATUS_MESSAGES.LOADING_AGENT_PARTIALS);\n try {\n const defs = await loadAgentDefs({ projectDir: cwd });\n this.log(\"Agent partials loaded\");\n verbose(` Agents: ${defs.agentSourcePaths.agentsDir}`);\n verbose(` Templates: ${defs.agentSourcePaths.templatesDir}`);\n return defs;\n } catch (error) {\n this.log(ERROR_MESSAGES.FAILED_LOAD_AGENT_PARTIALS);\n this.handleError(error);\n }\n }\n\n private async compileAllScopes(\n installations: BothInstallations,\n agentDefs: AgentDefs,\n cwd: string,\n sourceFlag?: string,\n ): Promise<void> {\n // When both installations exist, filter each pass to its own scope to prevent\n // the project pass from overwriting global agents with zero-skill versions\n // (the project config's stack only has project agent entries).\n const passes = buildCompilePasses(installations, cwd, agentDefs);\n\n let totalPassesWithSkills = 0;\n for (const pass of passes) {\n const hadSkills = await this.runCompilePass(pass, cwd, sourceFlag);\n if (hadSkills) totalPassesWithSkills++;\n }\n\n if (totalPassesWithSkills === 0) {\n this.error(\n `No skills found. Add skills with '${CLI_INVOKE_COMMAND} add <skill>' or create in .claude/skills/.`,\n { exit: EXIT_CODES.ERROR },\n );\n }\n }\n\n private async discoverAllSkills(projectDir: string): Promise<DiscoveredSkills> {\n this.log(STATUS_MESSAGES.DISCOVERING_SKILLS);\n const result = await discoverInstalledSkills(projectDir);\n if (result.totalSkillCount === 0) return result;\n this.log(formatDiscoveryMessage(result));\n return result;\n }\n\n /**\n * A stack skill that is not among the discovered skills is dropped from every\n * agent that references it. The resolver only records that at verbose level, so\n * the default output would claim a successful recompile of an agent that no\n * longer matches config.ts. Name each dropped skill instead.\n */\n private async warnUnresolvedStackSkills(\n projectDir: string,\n allSkills: SkillDefinitionMap,\n ): Promise<void> {\n const loaded = await loadProjectConfig(projectDir);\n if (!loaded?.config.stack) return;\n\n const excludedIds = effectivelyExcludedSkillIds(loaded.config.skills);\n const unresolved = getStackSkillIds(loaded.config.stack).filter(\n (id) => !excludedIds.has(id) && !(id in allSkills),\n );\n\n for (const id of unresolved) {\n this.warn(\n `Skill '${id}' is configured but was not found — agents will be compiled without it.`,\n );\n }\n }\n\n /**\n * The project pass compiled no agents, but the project config may still declare\n * global-scope agents whose stack lives in the global config. Without a pointer\n * the \"No agents to recompile\" line reads as a silent no-op after a global stack\n * change, so name the global context and the count.\n */\n private async hintGlobalScopedAgents(projectDir: string): Promise<void> {\n const loaded = await loadProjectConfigFromDir(projectDir);\n if (!loaded) return;\n\n const globalAgentCount = loaded.config.agents.filter(\n (agent) => !agent.excluded && agent.scope === \"global\",\n ).length;\n if (globalAgentCount === 0) return;\n\n this.log(globalScopedAgentsHint(globalAgentCount));\n }\n\n /**\n * The documented hand-edit workflow is \"edit config.ts, then run compile\", and\n * the type unions in config-types.ts are derived from config.ts — so a compile\n * pass that leaves them untouched strands stale unions after a hand-edit.\n * Regenerates them from the scope's persisted config exactly as the wizard\n * write path would: standalone narrowed unions at global scope, import-and-\n * extend at project scope. `matrixOnly` keeps the default-source path offline.\n * A failed refresh downgrades to a warning — the compiled agents are already\n * written and remain valid; only the type unions may still be stale.\n *\n * `skipExtraSources: true` is NOT a divergence from the wizard's full\n * multi-source load: extra-source loading only annotates each skill's\n * `availableSources`/`activeSource` for wizard UI tagging — it never adds\n * skills or categories to the matrix, and the config-types writer never reads\n * those annotations, so the emitted types are byte-identical either way\n * (pinned by the skipExtraSources parity test in local-installer.test.ts).\n * Skipping avoids fetching every registered extra source (network on a cold\n * cache, plus unreachable-remote warnings) on this offline compile path.\n */\n private async refreshConfigTypes(\n pass: CompilePass,\n cwd: string,\n sourceFlag?: string,\n ): Promise<void> {\n let report: GateReport;\n try {\n const loaded = await loadProjectConfigFromDir(pass.projectDir);\n if (!loaded) {\n verbose(\n `No config found at ${pass.projectDir} — skipping ${STANDARD_FILES.CONFIG_TYPES_TS} refresh`,\n );\n return;\n }\n\n const { matrix } = await loadSkillsMatrixFromSource({\n sourceFlag,\n projectDir: pass.projectDir,\n skipExtraSources: true,\n matrixOnly: true,\n });\n // `cwd` is excluded from the fan-out: when compile runs inside a registered\n // project, the project pass compiles that project's agents itself, so\n // letting the home pass reach it would compile them twice.\n report = await reconcileTypesFromDisk(\n pass.projectDir,\n loaded.config,\n { matrix, agents: pass.agents },\n { currentProjectDir: cwd },\n );\n this.log(INFO_MESSAGES.CONFIG_TYPES_REFRESHED);\n } catch (error) {\n this.warn(configTypesRefreshFailed(getErrorMessage(error)));\n return;\n }\n\n this.reportPropagation(report);\n }\n\n /**\n * Renders the fan-out the refresh above performed. Kept out of the refresh's\n * catch on purpose: a project the fan-out could not reach is reported as that,\n * not as a failure to refresh the type unions — which did succeed.\n */\n private reportPropagation(report: GateReport): void {\n for (const skippedPath of report.propagated.skipped) {\n this.warn(registeredProjectUpdateSkipped(skippedPath));\n }\n for (const warning of report.recompile.warnings) {\n this.warn(warning);\n }\n if (report.propagated.updated.length === 0) return;\n\n const { recompiledCount, failedCount } = report.recompile;\n const failureSuffix = failedCount > 0 ? ` (${failedCount} failed)` : \"\";\n this.log(`Recompiled agents in ${recompiledCount} registered projects${failureSuffix}`);\n }\n\n private async runCompilePass(\n params: CompilePass,\n cwd: string,\n sourceFlag?: string,\n ): Promise<boolean> {\n const { label, projectDir, installation, sourcePath, scopeFilter } = params;\n\n this.log(\"\");\n this.log(`Compiling ${label.toLowerCase()} agents...`);\n this.log(\"\");\n\n verbose(` Project: ${projectDir}`);\n verbose(` Agents: ${installation.agentsDir}`);\n\n const { allSkills, totalSkillCount } = await this.discoverAllSkills(projectDir);\n\n if (totalSkillCount === 0) {\n this.log(`No skills found for ${label.toLowerCase()} pass, skipping`);\n // The config loads independently of discovered skills: a hand-edited\n // config.ts can list skills while nothing is installed for this scope,\n // and its type unions must follow the config rather than stay stale.\n await this.refreshConfigTypes(params, cwd, sourceFlag);\n return false;\n }\n\n await this.warnUnresolvedStackSkills(projectDir, allSkills);\n\n this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);\n try {\n const recompileResult = await compileAgents({\n projectDir,\n sourcePath,\n skills: allSkills,\n pluginDir: projectDir,\n outputDir: installation.agentsDir,\n scopeFilter,\n });\n\n if (recompileResult.failed.length > 0) {\n this.log(\n `Recompiled ${recompileResult.compiled.length} ${label.toLowerCase()} agents (${recompileResult.failed.length} failed)`,\n );\n for (const warning of recompileResult.warnings) {\n this.warn(warning);\n }\n } else if (recompileResult.compiled.length > 0) {\n this.log(`Recompiled ${recompileResult.compiled.length} ${label.toLowerCase()} agents`);\n } else {\n this.log(INFO_MESSAGES.NO_AGENTS_TO_RECOMPILE);\n if (label === \"Project\") {\n await this.hintGlobalScopedAgents(projectDir);\n }\n }\n\n if (recompileResult.compiled.length > 0) {\n verbose(` Compiled: ${recompileResult.compiled.join(\", \")}`);\n }\n } catch (error) {\n this.log(ERROR_MESSAGES.FAILED_COMPILE_AGENTS);\n this.handleError(error);\n }\n\n await this.refreshConfigTypes(params, cwd, sourceFlag);\n\n this.log(\"\");\n this.logSuccess(`${label} compile complete!`);\n this.log(\"\");\n\n return true;\n }\n}\n\ntype CompilePass = {\n label: \"Global\" | \"Project\";\n projectDir: string;\n installation: Installation;\n sourcePath: string;\n agents: Record<AgentName, AgentDefinition>;\n scopeFilter?: SkillScope;\n};\n\nfunction buildCompilePasses(\n installations: BothInstallations,\n cwd: string,\n agentDefs: AgentDefs,\n): CompilePass[] {\n const { sourcePath, agents } = agentDefs;\n const passes: CompilePass[] = [];\n\n if (installations.global) {\n passes.push({\n label: \"Global\",\n projectDir: os.homedir(),\n installation: installations.global,\n sourcePath,\n agents,\n scopeFilter: installations.hasBoth ? \"global\" : undefined,\n });\n }\n\n if (installations.project) {\n passes.push({\n label: \"Project\",\n projectDir: cwd,\n installation: installations.project,\n sourcePath,\n agents,\n scopeFilter: installations.hasBoth ? \"project\" : undefined,\n });\n }\n\n return passes;\n}\n\nfunction formatDiscoveryMessage(result: DiscoveredSkills): string {\n const { totalSkillCount, pluginSkillCount } = result;\n const localCount = totalSkillCount - pluginSkillCount;\n\n if (pluginSkillCount > 0 && localCount > 0) {\n return `Discovered ${totalSkillCount} skills (${pluginSkillCount} from plugins, ${localCount} local)`;\n }\n\n return pluginSkillCount > 0\n ? `Discovered ${pluginSkillCount} skills from plugins`\n : `Discovered ${totalSkillCount} local skills`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,aAAa;AACtB,OAAO,QAAQ;AAqCf,IAAqB,UAArB,MAAqB,iBAAgB,YAAY;AAAA,EAC/C,OAAO,UAAU;AAAA,EAEjB,OAAO,cACL;AAAA,EAEF,OAAO,WAAW;AAAA,IAChB;AAAA,IACA;AAAA,EACF;AAAA,EAEA,OAAO,QAAQ;AAAA,IACb,GAAG,YAAY;AAAA,IACf,SAAS,MAAM,QAAQ;AAAA,MACrB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,EAAE,MAAM,IAAI,MAAM,KAAK,MAAM,QAAO;AAC1C,eAAW,MAAM,OAAO;AACxB,UAAM,MAAM,QAAQ,IAAI;AAExB,UAAM,gBAAgB,MAAM,KAAK,oBAAoB,GAAG;AACxD,UAAM,KAAK,oBAAoB,MAAM,MAAM;AAC3C,UAAM,YAAY,MAAM,KAAK,oBAAoB,GAAG;AACpD,UAAM,KAAK,iBAAiB,eAAe,WAAW,KAAK,MAAM,MAAM;AAAA,EACzE;AAAA,EAEA,MAAc,oBAAoB,KAAyC;AACzE,QAAI;AACJ,QAAI;AACF,sBAAgB,MAAM,wBAAwB,GAAG;AAAA,IACnD,SAAS,OAAO;AAId,UAAI,iBAAiB,iBAAi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