agents-inc 0.152.0 → 0.153.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 (440) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +44 -48
  3. package/dist/{chunk-LDP5ASDM.js → chunk-2HC2SNRP.js} +2 -15
  4. package/dist/chunk-2HC2SNRP.js.map +1 -0
  5. package/dist/{chunk-WKTHWQKM.js → chunk-35VOK7XE.js} +1338 -2573
  6. package/dist/chunk-35VOK7XE.js.map +1 -0
  7. package/dist/{chunk-SX5H6TSC.js → chunk-4VYALFQZ.js} +11 -8
  8. package/dist/chunk-4VYALFQZ.js.map +1 -0
  9. package/dist/{chunk-KXYVJGJP.js → chunk-6CNRMCFM.js} +3 -2
  10. package/dist/{chunk-KXYVJGJP.js.map → chunk-6CNRMCFM.js.map} +1 -1
  11. package/dist/{chunk-LZ52XEPR.js → chunk-ACKC577F.js} +7 -6
  12. package/dist/chunk-ACKC577F.js.map +1 -0
  13. package/dist/{chunk-XHUODHZ4.js → chunk-BMGBA6HJ.js} +22 -49
  14. package/dist/chunk-BMGBA6HJ.js.map +1 -0
  15. package/dist/{chunk-FVDKAVOL.js → chunk-EFU6P3B7.js} +18 -51
  16. package/dist/chunk-EFU6P3B7.js.map +1 -0
  17. package/dist/{chunk-STMHDOZD.js → chunk-F7Z5I6GU.js} +12 -9
  18. package/dist/chunk-F7Z5I6GU.js.map +1 -0
  19. package/dist/{chunk-E5X6RJ4E.js → chunk-FIHTAFST.js} +29 -26
  20. package/dist/chunk-FIHTAFST.js.map +1 -0
  21. package/dist/{chunk-QZZJFYUQ.js → chunk-FRWKCE6R.js} +3 -3
  22. package/dist/chunk-FRWKCE6R.js.map +1 -0
  23. package/dist/{chunk-5UWKOOIS.js → chunk-HEBPKK5L.js} +129 -195
  24. package/dist/chunk-HEBPKK5L.js.map +1 -0
  25. package/dist/{chunk-MJ2KHG24.js → chunk-IO4VEW5U.js} +6 -6
  26. package/dist/{chunk-MJ2KHG24.js.map → chunk-IO4VEW5U.js.map} +1 -1
  27. package/dist/{chunk-TUPYW2IQ.js → chunk-JC7DBPRD.js} +9 -12
  28. package/dist/chunk-JC7DBPRD.js.map +1 -0
  29. package/dist/{chunk-5GUOIJSG.js → chunk-JFAUQDZM.js} +3 -15
  30. package/dist/chunk-JFAUQDZM.js.map +1 -0
  31. package/dist/{chunk-ZL7PFNHN.js → chunk-K3O3YQYG.js} +2 -2
  32. package/dist/{chunk-SKQWRUPX.js → chunk-K7PJDWER.js} +59 -33
  33. package/dist/chunk-K7PJDWER.js.map +1 -0
  34. package/dist/{chunk-MVR3SYMN.js → chunk-KET3EVGX.js} +4 -3
  35. package/dist/{chunk-MVR3SYMN.js.map → chunk-KET3EVGX.js.map} +1 -1
  36. package/dist/{chunk-MWG4VU64.js → chunk-M5HSTNYU.js} +50 -56
  37. package/dist/chunk-M5HSTNYU.js.map +1 -0
  38. package/dist/{chunk-TJJPWUMA.js → chunk-NSJ2S7R5.js} +3 -2
  39. package/dist/{chunk-TJJPWUMA.js.map → chunk-NSJ2S7R5.js.map} +1 -1
  40. package/dist/{chunk-IHUY4M22.js → chunk-NXGMM5YN.js} +4 -4
  41. package/dist/chunk-NXQAY5U7.js +18441 -0
  42. package/dist/chunk-NXQAY5U7.js.map +1 -0
  43. package/dist/{chunk-Q2KG7UV3.js → chunk-OJJLYHM3.js} +2 -1
  44. package/dist/{chunk-Q2KG7UV3.js.map → chunk-OJJLYHM3.js.map} +1 -1
  45. package/dist/{chunk-PZIZNMHK.js → chunk-ORJ5Y222.js} +159 -138
  46. package/dist/chunk-ORJ5Y222.js.map +1 -0
  47. package/dist/{chunk-NR3OZGL4.js → chunk-OZXAJNLA.js} +2 -1
  48. package/dist/{chunk-NR3OZGL4.js.map → chunk-OZXAJNLA.js.map} +1 -1
  49. package/dist/{chunk-MM7CTTAV.js → chunk-Q5FLW4JG.js} +2 -2
  50. package/dist/{chunk-MM7CTTAV.js.map → chunk-Q5FLW4JG.js.map} +1 -1
  51. package/dist/{chunk-GRVKW3CC.js → chunk-R4SEU3DF.js} +3 -2
  52. package/dist/{chunk-GRVKW3CC.js.map → chunk-R4SEU3DF.js.map} +1 -1
  53. package/dist/{chunk-76ADG7LQ.js → chunk-R54KIGN2.js} +8 -22
  54. package/dist/chunk-R54KIGN2.js.map +1 -0
  55. package/dist/{chunk-SBHBBZKF.js → chunk-REKOWTIB.js} +25 -120
  56. package/dist/chunk-REKOWTIB.js.map +1 -0
  57. package/dist/chunk-TY6CAOL7.js +40 -0
  58. package/dist/chunk-TY6CAOL7.js.map +1 -0
  59. package/dist/{chunk-BNSRA6HL.js → chunk-U2DNAHFE.js} +39 -176
  60. package/dist/chunk-U2DNAHFE.js.map +1 -0
  61. package/dist/{chunk-PMM2MYMA.js → chunk-U2YSGBHA.js} +624 -349
  62. package/dist/chunk-U2YSGBHA.js.map +1 -0
  63. package/dist/{chunk-DTSG5XZB.js → chunk-V3ENMW7G.js} +3 -3
  64. package/dist/{chunk-L7SZXUBJ.js → chunk-VECFAKM5.js} +7 -6
  65. package/dist/{chunk-L7SZXUBJ.js.map → chunk-VECFAKM5.js.map} +1 -1
  66. package/dist/chunk-VGEBYCQZ.js +59 -0
  67. package/dist/chunk-VGEBYCQZ.js.map +1 -0
  68. package/dist/chunk-VZRO7RYT.js +3694 -0
  69. package/dist/chunk-VZRO7RYT.js.map +1 -0
  70. package/dist/{chunk-LASI35KT.js → chunk-WDAO3RUY.js} +14 -28
  71. package/dist/chunk-WDAO3RUY.js.map +1 -0
  72. package/dist/{chunk-MQ7FLIYS.js → chunk-WG6V6VJV.js} +3 -2
  73. package/dist/{chunk-MQ7FLIYS.js.map → chunk-WG6V6VJV.js.map} +1 -1
  74. package/dist/chunk-X5XJ6WKO.js +284 -0
  75. package/dist/chunk-X5XJ6WKO.js.map +1 -0
  76. package/dist/{chunk-RNJWAKMO.js → chunk-XGMOXMS4.js} +9 -8
  77. package/dist/chunk-XGMOXMS4.js.map +1 -0
  78. package/dist/{chunk-IUQBOCSU.js → chunk-ZBPEFQ4G.js} +2 -1
  79. package/dist/{chunk-IUQBOCSU.js.map → chunk-ZBPEFQ4G.js.map} +1 -1
  80. package/dist/{chunk-QRDTLVXG.js → chunk-ZNDLUWWD.js} +9 -22
  81. package/dist/chunk-ZNDLUWWD.js.map +1 -0
  82. package/dist/commands/build/marketplace.js +114 -35
  83. package/dist/commands/build/marketplace.js.map +1 -1
  84. package/dist/commands/build/plugins.js +9 -10
  85. package/dist/commands/build/plugins.js.map +1 -1
  86. package/dist/commands/compile.js +97 -70
  87. package/dist/commands/compile.js.map +1 -1
  88. package/dist/commands/doctor.js +793 -64
  89. package/dist/commands/doctor.js.map +1 -1
  90. package/dist/commands/edit.js +169 -208
  91. package/dist/commands/edit.js.map +1 -1
  92. package/dist/commands/eject.js +24 -39
  93. package/dist/commands/eject.js.map +1 -1
  94. package/dist/commands/init.js +41 -46
  95. package/dist/commands/list.js +10 -12
  96. package/dist/commands/list.js.map +1 -1
  97. package/dist/commands/search.js +20 -81
  98. package/dist/commands/search.js.map +1 -1
  99. package/dist/commands/uninstall.js +25 -31
  100. package/dist/commands/uninstall.js.map +1 -1
  101. package/dist/commands/update.js +82 -332
  102. package/dist/commands/update.js.map +1 -1
  103. package/dist/components/common/confirm.js +1 -1
  104. package/dist/components/common/prompt-confirm.js +1 -1
  105. package/dist/components/common/select-list.js +2 -2
  106. package/dist/components/common/spinner.js +1 -1
  107. package/dist/components/wizard/category-grid.js +5 -6
  108. package/dist/components/wizard/checkbox-grid.js +5 -6
  109. package/dist/components/wizard/domain-selection.js +12 -13
  110. package/dist/components/wizard/run-wizard-session.js +30 -36
  111. package/dist/components/wizard/scroll-affordance.js +2 -2
  112. package/dist/components/wizard/skill-agent-summary.js +7 -7
  113. package/dist/components/wizard/source-grid.js +6 -11
  114. package/dist/components/wizard/stack-selection.js +9 -9
  115. package/dist/components/wizard/step-agents.js +12 -12
  116. package/dist/components/wizard/step-build.js +10 -11
  117. package/dist/components/wizard/step-confirm.js +11 -11
  118. package/dist/components/wizard/step-sources.js +11 -17
  119. package/dist/components/wizard/step-stack.js +10 -10
  120. package/dist/components/wizard/summary-panel.js +10 -10
  121. package/dist/components/wizard/toast.js +2 -2
  122. package/dist/components/wizard/wizard-layout.js +15 -16
  123. package/dist/components/wizard/wizard-tabs.js +6 -12
  124. package/dist/components/wizard/wizard.js +29 -35
  125. package/dist/config-exports.js +1 -1
  126. package/dist/copy-local-skills-KF2RAVD3.js +14 -0
  127. package/dist/hooks/init.js +49 -48
  128. package/dist/hooks/init.js.map +1 -1
  129. package/dist/index.js +3 -1
  130. package/dist/index.js.map +1 -1
  131. package/dist/load-agent-defs-DGXGBU3Q.js +15 -0
  132. package/dist/{loader-5JP4S7CJ.js → loader-4U7UCE2Y.js} +7 -5
  133. package/dist/recompile-project-agents-CJVBAWDJ.js +20 -0
  134. package/dist/{source-loader-MZYCPL2S.js → source-loader-ZNSYJJCI.js} +6 -6
  135. package/dist/src/agents/developer/ai-developer/identity.md +4 -4
  136. package/dist/src/agents/developer/ai-developer/playbook.md +1 -1
  137. package/dist/src/agents/developer/api-developer/identity.md +4 -4
  138. package/dist/src/agents/developer/api-developer/metadata.yaml +1 -1
  139. package/dist/src/agents/developer/cli-developer/identity.md +4 -4
  140. package/dist/src/agents/developer/web-developer/identity.md +2 -2
  141. package/dist/src/agents/developer/web-developer/metadata.yaml +1 -1
  142. package/dist/src/agents/meta/agent-summoner/identity.md +4 -5
  143. package/dist/src/agents/meta/agent-summoner/output.md +2 -2
  144. package/dist/src/agents/meta/agent-summoner/playbook.md +15 -16
  145. package/dist/src/agents/meta/codex-keeper/identity.md +4 -4
  146. package/dist/src/agents/meta/codex-keeper/playbook.md +1 -1
  147. package/dist/src/agents/meta/convention-keeper/identity.md +1 -1
  148. package/dist/src/agents/meta/skill-summoner/critical-reminders.md +0 -34
  149. package/dist/src/agents/meta/skill-summoner/critical-requirements.md +27 -3
  150. package/dist/src/agents/meta/skill-summoner/identity.md +2 -2
  151. package/{src/agents/planning/web-pm → dist/src/agents/planning/pm}/critical-reminders.md +10 -7
  152. package/dist/src/agents/planning/{web-pm → pm}/critical-requirements.md +8 -4
  153. package/dist/src/agents/planning/pm/identity.md +47 -0
  154. package/dist/src/agents/planning/pm/metadata.yaml +12 -0
  155. package/dist/src/agents/planning/{web-pm → pm}/output.md +7 -90
  156. package/dist/src/agents/planning/pm/playbook.md +185 -0
  157. package/dist/src/agents/researcher/ai-researcher/critical-reminders.md +58 -0
  158. package/dist/src/agents/researcher/ai-researcher/critical-requirements.md +40 -0
  159. package/dist/src/agents/researcher/ai-researcher/identity.md +86 -0
  160. package/dist/src/agents/researcher/ai-researcher/metadata.yaml +10 -0
  161. package/dist/src/agents/researcher/ai-researcher/output.md +363 -0
  162. package/dist/src/agents/researcher/ai-researcher/playbook.md +545 -0
  163. package/dist/src/agents/researcher/api-researcher/critical-reminders.md +16 -0
  164. package/dist/src/agents/researcher/api-researcher/identity.md +7 -7
  165. package/dist/src/agents/researcher/cli-researcher/critical-reminders.md +50 -0
  166. package/dist/src/agents/researcher/cli-researcher/critical-requirements.md +36 -0
  167. package/dist/src/agents/researcher/cli-researcher/identity.md +87 -0
  168. package/dist/src/agents/researcher/cli-researcher/metadata.yaml +10 -0
  169. package/dist/src/agents/researcher/cli-researcher/output.md +343 -0
  170. package/dist/src/agents/researcher/cli-researcher/playbook.md +370 -0
  171. package/dist/src/agents/researcher/web-researcher/identity.md +5 -6
  172. package/dist/src/agents/reviewer/reviewer/critical-reminders.md +29 -0
  173. package/dist/src/agents/reviewer/reviewer/critical-requirements.md +31 -0
  174. package/dist/src/agents/reviewer/reviewer/identity.md +41 -0
  175. package/dist/src/agents/reviewer/reviewer/metadata.yaml +12 -0
  176. package/dist/src/agents/reviewer/reviewer/output.md +202 -0
  177. package/dist/src/agents/reviewer/reviewer/playbook.md +141 -0
  178. package/dist/src/agents/tester/ai-tester/critical-reminders.md +48 -0
  179. package/dist/src/agents/tester/ai-tester/critical-requirements.md +49 -0
  180. package/dist/src/agents/tester/ai-tester/identity.md +62 -0
  181. package/dist/src/agents/tester/ai-tester/metadata.yaml +12 -0
  182. package/dist/src/agents/tester/ai-tester/output.md +375 -0
  183. package/dist/src/agents/tester/ai-tester/playbook.md +789 -0
  184. package/dist/src/agents/tester/api-tester/identity.md +3 -3
  185. package/dist/src/agents/tester/cli-tester/critical-reminders.md +3 -3
  186. package/dist/src/agents/tester/cli-tester/critical-requirements.md +2 -2
  187. package/dist/src/agents/tester/cli-tester/identity.md +3 -3
  188. package/dist/src/agents/tester/cli-tester/output.md +4 -4
  189. package/dist/src/agents/tester/cli-tester/playbook.md +3 -3
  190. package/dist/src/agents/tester/web-tester/identity.md +3 -3
  191. package/dist/stores/wizard-store.js +8 -6
  192. package/package.json +13 -2
  193. package/src/agents/developer/ai-developer/identity.md +4 -4
  194. package/src/agents/developer/ai-developer/playbook.md +1 -1
  195. package/src/agents/developer/api-developer/identity.md +4 -4
  196. package/src/agents/developer/api-developer/metadata.yaml +1 -1
  197. package/src/agents/developer/cli-developer/identity.md +4 -4
  198. package/src/agents/developer/web-developer/identity.md +2 -2
  199. package/src/agents/developer/web-developer/metadata.yaml +1 -1
  200. package/src/agents/meta/agent-summoner/identity.md +4 -5
  201. package/src/agents/meta/agent-summoner/output.md +2 -2
  202. package/src/agents/meta/agent-summoner/playbook.md +15 -16
  203. package/src/agents/meta/codex-keeper/identity.md +4 -4
  204. package/src/agents/meta/codex-keeper/playbook.md +1 -1
  205. package/src/agents/meta/convention-keeper/identity.md +1 -1
  206. package/src/agents/meta/skill-summoner/critical-reminders.md +0 -34
  207. package/src/agents/meta/skill-summoner/critical-requirements.md +27 -3
  208. package/src/agents/meta/skill-summoner/identity.md +2 -2
  209. package/{dist/src/agents/planning/web-pm → src/agents/planning/pm}/critical-reminders.md +10 -7
  210. package/src/agents/planning/{web-pm → pm}/critical-requirements.md +8 -4
  211. package/src/agents/planning/pm/identity.md +47 -0
  212. package/src/agents/planning/pm/metadata.yaml +12 -0
  213. package/src/agents/planning/{web-pm → pm}/output.md +7 -90
  214. package/src/agents/planning/pm/playbook.md +185 -0
  215. package/src/agents/researcher/ai-researcher/critical-reminders.md +58 -0
  216. package/src/agents/researcher/ai-researcher/critical-requirements.md +40 -0
  217. package/src/agents/researcher/ai-researcher/identity.md +86 -0
  218. package/src/agents/researcher/ai-researcher/metadata.yaml +10 -0
  219. package/src/agents/researcher/ai-researcher/output.md +363 -0
  220. package/src/agents/researcher/ai-researcher/playbook.md +545 -0
  221. package/src/agents/researcher/api-researcher/critical-reminders.md +16 -0
  222. package/src/agents/researcher/api-researcher/identity.md +7 -7
  223. package/src/agents/researcher/cli-researcher/critical-reminders.md +50 -0
  224. package/src/agents/researcher/cli-researcher/critical-requirements.md +36 -0
  225. package/src/agents/researcher/cli-researcher/identity.md +87 -0
  226. package/src/agents/researcher/cli-researcher/metadata.yaml +10 -0
  227. package/src/agents/researcher/cli-researcher/output.md +343 -0
  228. package/src/agents/researcher/cli-researcher/playbook.md +370 -0
  229. package/src/agents/researcher/web-researcher/identity.md +5 -6
  230. package/src/agents/reviewer/reviewer/critical-reminders.md +29 -0
  231. package/src/agents/reviewer/reviewer/critical-requirements.md +31 -0
  232. package/src/agents/reviewer/reviewer/identity.md +41 -0
  233. package/src/agents/reviewer/reviewer/metadata.yaml +12 -0
  234. package/src/agents/reviewer/reviewer/output.md +202 -0
  235. package/src/agents/reviewer/reviewer/playbook.md +141 -0
  236. package/src/agents/tester/ai-tester/critical-reminders.md +48 -0
  237. package/src/agents/tester/ai-tester/critical-requirements.md +49 -0
  238. package/src/agents/tester/ai-tester/identity.md +62 -0
  239. package/src/agents/tester/ai-tester/metadata.yaml +12 -0
  240. package/src/agents/tester/ai-tester/output.md +375 -0
  241. package/src/agents/tester/ai-tester/playbook.md +789 -0
  242. package/src/agents/tester/api-tester/identity.md +3 -3
  243. package/src/agents/tester/cli-tester/critical-reminders.md +3 -3
  244. package/src/agents/tester/cli-tester/critical-requirements.md +2 -2
  245. package/src/agents/tester/cli-tester/identity.md +3 -3
  246. package/src/agents/tester/cli-tester/output.md +4 -4
  247. package/src/agents/tester/cli-tester/playbook.md +3 -3
  248. package/src/agents/tester/web-tester/identity.md +3 -3
  249. package/src/schemas/metadata.schema.json +31 -2
  250. package/src/schemas/project-config.schema.json +61 -15
  251. package/src/schemas/project-source-config.schema.json +0 -47
  252. package/dist/chunk-5GUOIJSG.js.map +0 -1
  253. package/dist/chunk-5UWKOOIS.js.map +0 -1
  254. package/dist/chunk-76ADG7LQ.js.map +0 -1
  255. package/dist/chunk-BNSRA6HL.js.map +0 -1
  256. package/dist/chunk-E5X6RJ4E.js.map +0 -1
  257. package/dist/chunk-EEPELKOM.js +0 -5938
  258. package/dist/chunk-EEPELKOM.js.map +0 -1
  259. package/dist/chunk-F7T5AFFN.js +0 -20
  260. package/dist/chunk-F7T5AFFN.js.map +0 -1
  261. package/dist/chunk-FVDKAVOL.js.map +0 -1
  262. package/dist/chunk-KFB5CRXZ.js +0 -377
  263. package/dist/chunk-KFB5CRXZ.js.map +0 -1
  264. package/dist/chunk-KR65TPKC.js +0 -664
  265. package/dist/chunk-KR65TPKC.js.map +0 -1
  266. package/dist/chunk-LASI35KT.js.map +0 -1
  267. package/dist/chunk-LDP5ASDM.js.map +0 -1
  268. package/dist/chunk-LZ52XEPR.js.map +0 -1
  269. package/dist/chunk-M7HO7NBK.js +0 -88
  270. package/dist/chunk-M7HO7NBK.js.map +0 -1
  271. package/dist/chunk-MWG4VU64.js.map +0 -1
  272. package/dist/chunk-ODNDXQH2.js +0 -77
  273. package/dist/chunk-ODNDXQH2.js.map +0 -1
  274. package/dist/chunk-P44SXVH3.js +0 -80
  275. package/dist/chunk-P44SXVH3.js.map +0 -1
  276. package/dist/chunk-PMM2MYMA.js.map +0 -1
  277. package/dist/chunk-PZIZNMHK.js.map +0 -1
  278. package/dist/chunk-Q45ZU6HD.js +0 -37
  279. package/dist/chunk-Q45ZU6HD.js.map +0 -1
  280. package/dist/chunk-QRDTLVXG.js.map +0 -1
  281. package/dist/chunk-QZZJFYUQ.js.map +0 -1
  282. package/dist/chunk-R5NOI2LP.js +0 -170
  283. package/dist/chunk-R5NOI2LP.js.map +0 -1
  284. package/dist/chunk-RNJWAKMO.js.map +0 -1
  285. package/dist/chunk-SBHBBZKF.js.map +0 -1
  286. package/dist/chunk-SKQWRUPX.js.map +0 -1
  287. package/dist/chunk-STMHDOZD.js.map +0 -1
  288. package/dist/chunk-SX5H6TSC.js.map +0 -1
  289. package/dist/chunk-TUPYW2IQ.js.map +0 -1
  290. package/dist/chunk-UBEDZ4FD.js +0 -4198
  291. package/dist/chunk-UBEDZ4FD.js.map +0 -1
  292. package/dist/chunk-VY6MNOXL.js +0 -20
  293. package/dist/chunk-VY6MNOXL.js.map +0 -1
  294. package/dist/chunk-WBCPLH66.js +0 -42
  295. package/dist/chunk-WBCPLH66.js.map +0 -1
  296. package/dist/chunk-WKTHWQKM.js.map +0 -1
  297. package/dist/chunk-XHUODHZ4.js.map +0 -1
  298. package/dist/chunk-ZPPHXXAP.js +0 -252
  299. package/dist/chunk-ZPPHXXAP.js.map +0 -1
  300. package/dist/commands/import/skill.js +0 -344
  301. package/dist/commands/import/skill.js.map +0 -1
  302. package/dist/commands/new/agent.js +0 -300
  303. package/dist/commands/new/agent.js.map +0 -1
  304. package/dist/commands/new/marketplace.js +0 -310
  305. package/dist/commands/new/marketplace.js.map +0 -1
  306. package/dist/commands/new/skill.js +0 -26
  307. package/dist/commands/validate.js +0 -575
  308. package/dist/commands/validate.js.map +0 -1
  309. package/dist/components/wizard/search-modal.js +0 -13
  310. package/dist/components/wizard/selection-card.js +0 -9
  311. package/dist/components/wizard/step-settings.js +0 -18
  312. package/dist/copy-local-skills-6EMVN7RB.js +0 -14
  313. package/dist/load-agent-defs-BWOUVEAR.js +0 -15
  314. package/dist/load-agent-defs-BWOUVEAR.js.map +0 -1
  315. package/dist/loader-5JP4S7CJ.js.map +0 -1
  316. package/dist/recompile-project-agents-6DL45TDI.js +0 -19
  317. package/dist/recompile-project-agents-6DL45TDI.js.map +0 -1
  318. package/dist/source-loader-MZYCPL2S.js.map +0 -1
  319. package/dist/src/agents/developer/web-architecture/critical-reminders.md +0 -48
  320. package/dist/src/agents/developer/web-architecture/critical-requirements.md +0 -65
  321. package/dist/src/agents/developer/web-architecture/identity.md +0 -64
  322. package/dist/src/agents/developer/web-architecture/metadata.yaml +0 -12
  323. package/dist/src/agents/developer/web-architecture/output.md +0 -449
  324. package/dist/src/agents/developer/web-architecture/playbook.md +0 -481
  325. package/dist/src/agents/pattern/pattern-scout/critical-reminders.md +0 -71
  326. package/dist/src/agents/pattern/pattern-scout/critical-requirements.md +0 -31
  327. package/dist/src/agents/pattern/pattern-scout/identity.md +0 -25
  328. package/dist/src/agents/pattern/pattern-scout/metadata.yaml +0 -10
  329. package/dist/src/agents/pattern/pattern-scout/output.md +0 -290
  330. package/dist/src/agents/pattern/pattern-scout/playbook.md +0 -1806
  331. package/dist/src/agents/pattern/web-pattern-critique/critical-reminders.md +0 -30
  332. package/dist/src/agents/pattern/web-pattern-critique/critical-requirements.md +0 -28
  333. package/dist/src/agents/pattern/web-pattern-critique/identity.md +0 -41
  334. package/dist/src/agents/pattern/web-pattern-critique/metadata.yaml +0 -12
  335. package/dist/src/agents/pattern/web-pattern-critique/output.md +0 -314
  336. package/dist/src/agents/pattern/web-pattern-critique/playbook.md +0 -572
  337. package/dist/src/agents/planning/api-pm/critical-reminders.md +0 -48
  338. package/dist/src/agents/planning/api-pm/critical-requirements.md +0 -41
  339. package/dist/src/agents/planning/api-pm/identity.md +0 -39
  340. package/dist/src/agents/planning/api-pm/metadata.yaml +0 -12
  341. package/dist/src/agents/planning/api-pm/output.md +0 -475
  342. package/dist/src/agents/planning/api-pm/playbook.md +0 -129
  343. package/dist/src/agents/planning/web-pm/identity.md +0 -26
  344. package/dist/src/agents/planning/web-pm/metadata.yaml +0 -12
  345. package/dist/src/agents/planning/web-pm/playbook.md +0 -318
  346. package/dist/src/agents/reviewer/ai-reviewer/critical-reminders.md +0 -40
  347. package/dist/src/agents/reviewer/ai-reviewer/critical-requirements.md +0 -37
  348. package/dist/src/agents/reviewer/ai-reviewer/identity.md +0 -51
  349. package/dist/src/agents/reviewer/ai-reviewer/metadata.yaml +0 -10
  350. package/dist/src/agents/reviewer/ai-reviewer/output.md +0 -395
  351. package/dist/src/agents/reviewer/ai-reviewer/playbook.md +0 -90
  352. package/dist/src/agents/reviewer/api-reviewer/critical-reminders.md +0 -31
  353. package/dist/src/agents/reviewer/api-reviewer/critical-requirements.md +0 -27
  354. package/dist/src/agents/reviewer/api-reviewer/identity.md +0 -51
  355. package/dist/src/agents/reviewer/api-reviewer/metadata.yaml +0 -12
  356. package/dist/src/agents/reviewer/api-reviewer/output.md +0 -343
  357. package/dist/src/agents/reviewer/api-reviewer/playbook.md +0 -288
  358. package/dist/src/agents/reviewer/cli-reviewer/critical-reminders.md +0 -33
  359. package/dist/src/agents/reviewer/cli-reviewer/critical-requirements.md +0 -30
  360. package/dist/src/agents/reviewer/cli-reviewer/identity.md +0 -44
  361. package/dist/src/agents/reviewer/cli-reviewer/metadata.yaml +0 -12
  362. package/dist/src/agents/reviewer/cli-reviewer/output.md +0 -414
  363. package/dist/src/agents/reviewer/cli-reviewer/playbook.md +0 -218
  364. package/dist/src/agents/reviewer/infra-reviewer/critical-reminders.md +0 -38
  365. package/dist/src/agents/reviewer/infra-reviewer/critical-requirements.md +0 -38
  366. package/dist/src/agents/reviewer/infra-reviewer/identity.md +0 -53
  367. package/dist/src/agents/reviewer/infra-reviewer/metadata.yaml +0 -10
  368. package/dist/src/agents/reviewer/infra-reviewer/output.md +0 -364
  369. package/dist/src/agents/reviewer/infra-reviewer/playbook.md +0 -161
  370. package/dist/src/agents/reviewer/web-reviewer/critical-reminders.md +0 -31
  371. package/dist/src/agents/reviewer/web-reviewer/critical-requirements.md +0 -26
  372. package/dist/src/agents/reviewer/web-reviewer/identity.md +0 -40
  373. package/dist/src/agents/reviewer/web-reviewer/metadata.yaml +0 -12
  374. package/dist/src/agents/reviewer/web-reviewer/output.md +0 -333
  375. package/dist/src/agents/reviewer/web-reviewer/playbook.md +0 -156
  376. package/src/agents/developer/web-architecture/critical-reminders.md +0 -48
  377. package/src/agents/developer/web-architecture/critical-requirements.md +0 -65
  378. package/src/agents/developer/web-architecture/identity.md +0 -64
  379. package/src/agents/developer/web-architecture/metadata.yaml +0 -12
  380. package/src/agents/developer/web-architecture/output.md +0 -449
  381. package/src/agents/developer/web-architecture/playbook.md +0 -481
  382. package/src/agents/pattern/pattern-scout/critical-reminders.md +0 -71
  383. package/src/agents/pattern/pattern-scout/critical-requirements.md +0 -31
  384. package/src/agents/pattern/pattern-scout/identity.md +0 -25
  385. package/src/agents/pattern/pattern-scout/metadata.yaml +0 -10
  386. package/src/agents/pattern/pattern-scout/output.md +0 -290
  387. package/src/agents/pattern/pattern-scout/playbook.md +0 -1806
  388. package/src/agents/pattern/web-pattern-critique/critical-reminders.md +0 -30
  389. package/src/agents/pattern/web-pattern-critique/critical-requirements.md +0 -28
  390. package/src/agents/pattern/web-pattern-critique/identity.md +0 -41
  391. package/src/agents/pattern/web-pattern-critique/metadata.yaml +0 -12
  392. package/src/agents/pattern/web-pattern-critique/output.md +0 -314
  393. package/src/agents/pattern/web-pattern-critique/playbook.md +0 -572
  394. package/src/agents/planning/api-pm/critical-reminders.md +0 -48
  395. package/src/agents/planning/api-pm/critical-requirements.md +0 -41
  396. package/src/agents/planning/api-pm/identity.md +0 -39
  397. package/src/agents/planning/api-pm/metadata.yaml +0 -12
  398. package/src/agents/planning/api-pm/output.md +0 -475
  399. package/src/agents/planning/api-pm/playbook.md +0 -129
  400. package/src/agents/planning/web-pm/identity.md +0 -26
  401. package/src/agents/planning/web-pm/metadata.yaml +0 -12
  402. package/src/agents/planning/web-pm/playbook.md +0 -318
  403. package/src/agents/reviewer/ai-reviewer/critical-reminders.md +0 -40
  404. package/src/agents/reviewer/ai-reviewer/critical-requirements.md +0 -37
  405. package/src/agents/reviewer/ai-reviewer/identity.md +0 -51
  406. package/src/agents/reviewer/ai-reviewer/metadata.yaml +0 -10
  407. package/src/agents/reviewer/ai-reviewer/output.md +0 -395
  408. package/src/agents/reviewer/ai-reviewer/playbook.md +0 -90
  409. package/src/agents/reviewer/api-reviewer/critical-reminders.md +0 -31
  410. package/src/agents/reviewer/api-reviewer/critical-requirements.md +0 -27
  411. package/src/agents/reviewer/api-reviewer/identity.md +0 -51
  412. package/src/agents/reviewer/api-reviewer/metadata.yaml +0 -12
  413. package/src/agents/reviewer/api-reviewer/output.md +0 -343
  414. package/src/agents/reviewer/api-reviewer/playbook.md +0 -288
  415. package/src/agents/reviewer/cli-reviewer/critical-reminders.md +0 -33
  416. package/src/agents/reviewer/cli-reviewer/critical-requirements.md +0 -30
  417. package/src/agents/reviewer/cli-reviewer/identity.md +0 -44
  418. package/src/agents/reviewer/cli-reviewer/metadata.yaml +0 -12
  419. package/src/agents/reviewer/cli-reviewer/output.md +0 -414
  420. package/src/agents/reviewer/cli-reviewer/playbook.md +0 -218
  421. package/src/agents/reviewer/infra-reviewer/critical-reminders.md +0 -38
  422. package/src/agents/reviewer/infra-reviewer/critical-requirements.md +0 -38
  423. package/src/agents/reviewer/infra-reviewer/identity.md +0 -53
  424. package/src/agents/reviewer/infra-reviewer/metadata.yaml +0 -10
  425. package/src/agents/reviewer/infra-reviewer/output.md +0 -364
  426. package/src/agents/reviewer/infra-reviewer/playbook.md +0 -161
  427. package/src/agents/reviewer/web-reviewer/critical-reminders.md +0 -31
  428. package/src/agents/reviewer/web-reviewer/critical-requirements.md +0 -26
  429. package/src/agents/reviewer/web-reviewer/identity.md +0 -40
  430. package/src/agents/reviewer/web-reviewer/metadata.yaml +0 -12
  431. package/src/agents/reviewer/web-reviewer/output.md +0 -333
  432. package/src/agents/reviewer/web-reviewer/playbook.md +0 -156
  433. /package/dist/{chunk-ZL7PFNHN.js.map → chunk-K3O3YQYG.js.map} +0 -0
  434. /package/dist/{chunk-IHUY4M22.js.map → chunk-NXGMM5YN.js.map} +0 -0
  435. /package/dist/{chunk-DTSG5XZB.js.map → chunk-V3ENMW7G.js.map} +0 -0
  436. /package/dist/{commands/new/skill.js.map → copy-local-skills-KF2RAVD3.js.map} +0 -0
  437. /package/dist/{components/wizard/search-modal.js.map → load-agent-defs-DGXGBU3Q.js.map} +0 -0
  438. /package/dist/{components/wizard/selection-card.js.map → loader-4U7UCE2Y.js.map} +0 -0
  439. /package/dist/{components/wizard/step-settings.js.map → recompile-project-agents-CJVBAWDJ.js.map} +0 -0
  440. /package/dist/{copy-local-skills-6EMVN7RB.js.map → source-loader-ZNSYJJCI.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cli/lib/loading/loader.ts","../src/cli/utils/errors.ts","../src/cli/utils/frontmatter.ts","../src/cli/utils/fs.ts","../src/cli/lib/config-gate/gate-token.ts","../src/cli/utils/logger.ts","../src/cli/lib/schemas.ts","../src/cli/lib/schema-validator.ts","../src/cli/types/generated/source-types.ts","../src/cli/types/matrix.ts"],"sourcesContent":["import { parse as parseYaml } from \"yaml\";\nimport path from \"path\";\nimport { unique } from \"remeda\";\nimport { getErrorMessage } from \"../../utils/errors\";\nimport { extractFrontmatter } from \"../../utils/frontmatter\";\nimport { glob, readFile, directoryExists, fileExists } from \"../../utils/fs\";\nimport { verbose, warn } from \"../../utils/logger\";\nimport { CLAUDE_SRC_DIR, DIRS, STANDARD_DIRS, STANDARD_FILES, PROJECT_ROOT } from \"../../consts\";\nimport type {\n AgentDefinition,\n AgentName,\n SkillDefinition,\n SkillDefinitionMap,\n SkillFrontmatter,\n SkillId,\n} from \"../../types\";\nimport { formatZodIssues, skillFrontmatterLoaderSchema, agentYamlConfigSchema } from \"../schemas\";\nimport { typedKeys } from \"../../utils/typed-object\";\n\nexport function parseFrontmatter(content: string, filePath?: string): SkillFrontmatter | null {\n const rawFrontmatter = extractFrontmatter(content);\n if (rawFrontmatter === null) return null;\n\n const parsed = skillFrontmatterLoaderSchema.safeParse(rawFrontmatter);\n\n if (!parsed.success) {\n const location = filePath ?? \"unknown file\";\n warn(`Invalid SKILL.md frontmatter in '${location}': ${formatZodIssues(parsed.error.issues)}`);\n return null;\n }\n return parsed.data;\n}\n\ntype LoadAgentsFromDirOptions = {\n /** Relative base recorded on each definition (project agents live under .claude-src/agents). */\n agentBaseDir?: string;\n /** Propagate the `custom: true` metadata flag (source/CLI agents only). */\n includeCustomFlag?: boolean;\n /** Label for the per-agent verbose line. */\n verboseLabel: string;\n};\n\n// Boundary cast: agent keys come from agentYamlConfigSchema which types config.id as AgentName;\n// custom agents (not in the union) are accepted by the schema's z.string() base\nasync function loadAgentsFromDir(\n agentsDir: string,\n sourceRoot: string,\n options: LoadAgentsFromDirOptions,\n): Promise<Record<AgentName, AgentDefinition>> {\n const agents: Record<string, AgentDefinition> = {};\n const files = await glob(`**/${STANDARD_FILES.AGENT_METADATA_YAML}`, agentsDir);\n\n for (const file of files) {\n const fullPath = path.join(agentsDir, file);\n try {\n const content = await readFile(fullPath);\n const config = agentYamlConfigSchema.parse(parseYaml(content));\n\n agents[config.id] = {\n title: config.title,\n description: config.description,\n model: config.model,\n tools: config.tools,\n path: path.dirname(file),\n sourceRoot,\n ...(options.agentBaseDir ? { agentBaseDir: options.agentBaseDir } : {}),\n ...(config.domain ? { domain: config.domain } : {}),\n ...(options.includeCustomFlag && config.custom === true ? { custom: true } : {}),\n };\n\n verbose(`Loaded ${options.verboseLabel}: ${config.id} from ${file}`);\n } catch (error) {\n warn(`Skipping invalid metadata.yaml at '${fullPath}': ${getErrorMessage(error)}`);\n }\n }\n\n return agents;\n}\n\nexport async function loadAllAgents(\n projectRoot: string,\n): Promise<Record<AgentName, AgentDefinition>> {\n return loadAgentsFromDir(path.join(projectRoot, DIRS.agents), projectRoot, {\n includeCustomFlag: true,\n verboseLabel: \"agent\",\n });\n}\n\n/**\n * Loads agent definitions from the CLI repo and a skills source in parallel,\n * merged so source definitions take precedence on name collisions.\n */\nexport async function loadMergedAgents(\n sourcePath: string,\n): Promise<Record<AgentName, AgentDefinition>> {\n const [cliAgents, sourceAgents] = await Promise.all([\n loadAllAgents(PROJECT_ROOT),\n loadAllAgents(sourcePath),\n ]);\n return { ...cliAgents, ...sourceAgents };\n}\n\nexport async function loadProjectAgents(\n projectRoot: string,\n): Promise<Record<AgentName, AgentDefinition>> {\n const projectAgentsDir = path.join(projectRoot, CLAUDE_SRC_DIR, STANDARD_DIRS.AGENTS);\n\n if (!(await directoryExists(projectAgentsDir))) {\n verbose(`No project agents directory at ${projectAgentsDir}`);\n const noAgents: Record<string, AgentDefinition> = {};\n return noAgents;\n }\n\n return loadAgentsFromDir(projectAgentsDir, projectRoot, {\n // Project agents are in .claude-src/agents/\n agentBaseDir: `${CLAUDE_SRC_DIR}/agents`,\n verboseLabel: \"project agent\",\n });\n}\n\nasync function buildIdToDirectoryPathMap(\n skillsDir: string,\n): Promise<Partial<Record<SkillId, string>>> {\n const files = await glob(`**/${STANDARD_FILES.SKILL_MD}`, skillsDir);\n const parsed = await Promise.all(\n files.map(async (file) => {\n const fullPath = path.join(skillsDir, file);\n return { file, frontmatter: parseFrontmatter(await readFile(fullPath), fullPath) };\n }),\n );\n\n // Each skill is reachable by its frontmatter name AND its directory path\n return Object.fromEntries(\n parsed\n .filter((entry): entry is { file: string; frontmatter: SkillFrontmatter } =>\n Boolean(entry.frontmatter?.name),\n )\n .flatMap(({ file, frontmatter }) => {\n const directoryPath = file.replace(`/${STANDARD_FILES.SKILL_MD}`, \"\");\n return [\n [frontmatter.name, directoryPath],\n [directoryPath, directoryPath],\n ];\n }),\n );\n}\n\nexport async function loadSkillsByIds(\n skillIds: Array<{ id: SkillId }>,\n projectRoot: string,\n): Promise<SkillDefinitionMap> {\n const skills: SkillDefinitionMap = {};\n const skillsDir = path.join(projectRoot, DIRS.skills);\n\n const idToDirectoryPath = await buildIdToDirectoryPathMap(skillsDir);\n\n /** A directory reference expands to every skill under it; warns when nothing matches. */\n const expandDirectoryRef = (skillId: SkillId): SkillId[] => {\n const childSkills = typedKeys(idToDirectoryPath).filter((id) =>\n idToDirectoryPath[id]?.startsWith(`${skillId}/`),\n );\n if (childSkills.length === 0) {\n warn(`Unknown skill reference '${skillId}'`);\n return [];\n }\n verbose(`Expanded directory '${skillId}' to ${childSkills.length} skills`);\n return childSkills;\n };\n\n const uniqueSkillIds = unique(\n skillIds.flatMap(({ id }) => (idToDirectoryPath[id] ? [id] : expandDirectoryRef(id))),\n );\n\n for (const skillId of uniqueSkillIds) {\n const directoryPath = idToDirectoryPath[skillId];\n if (!directoryPath) {\n warn(`Could not find skill '${skillId}': no matching skill found`);\n continue;\n }\n\n const skillPath = path.join(skillsDir, directoryPath);\n const skillMdPath = path.join(skillPath, STANDARD_FILES.SKILL_MD);\n\n try {\n const content = await readFile(skillMdPath);\n const frontmatter = parseFrontmatter(content, skillMdPath);\n\n if (!frontmatter) {\n warn(`Skipping '${skillId}': missing or invalid frontmatter`);\n continue;\n }\n\n const canonicalId = frontmatter.name;\n const skillDef: SkillDefinition = {\n id: canonicalId,\n path: `${DIRS.skills}/${directoryPath}/`,\n description: frontmatter.description,\n };\n\n skills[canonicalId] = skillDef;\n\n verbose(`Loaded skill: ${canonicalId} (from ${directoryPath})`);\n } catch (error) {\n warn(`Could not load skill '${skillId}': ${error}`);\n }\n }\n\n return skills;\n}\n\nexport type LoadSkillsFromDirOptions = {\n /** Path prefix recorded on each skill's `path` (e.g. LOCAL_SKILLS_PATH or \"skills\"). */\n pathPrefix?: string;\n /**\n * When true, a SKILL.md without a sibling metadata.yaml is skipped with a warning\n * (local-skill registration rule). Plugin discovery passes false — plugin skills\n * carry no metadata.yaml.\n */\n requireMetadata?: boolean;\n};\n\n/**\n * Loads SKILL.md files from a directory, parsing frontmatter for skill metadata.\n * Returns a map of skillId -> SkillDefinition. Missing/invalid frontmatter and\n * per-file read errors are logged and skipped, never thrown.\n */\nexport async function loadSkillsFromDir(\n skillsDir: string,\n options: LoadSkillsFromDirOptions = {},\n): Promise<SkillDefinitionMap> {\n const { pathPrefix = \"\", requireMetadata = false } = options;\n const skills: SkillDefinitionMap = {};\n\n if (!(await directoryExists(skillsDir))) {\n return skills;\n }\n\n const skillFiles = await glob(`**/${STANDARD_FILES.SKILL_MD}`, skillsDir);\n\n for (const skillFile of skillFiles) {\n const skillPath = path.join(skillsDir, skillFile);\n const skillDir = path.dirname(skillPath);\n const relativePath = path.relative(skillsDir, skillDir);\n const skillDirName = path.basename(skillDir);\n const displayPath = pathPrefix ? `${pathPrefix}/${relativePath}/` : `${relativePath}/`;\n\n if (requireMetadata) {\n const metadataPath = path.join(skillDir, STANDARD_FILES.METADATA_YAML);\n if (!(await fileExists(metadataPath))) {\n warn(\n `Skill '${skillDirName}' in '${displayPath}' is missing ${STANDARD_FILES.METADATA_YAML} — skipped. Add ${STANDARD_FILES.METADATA_YAML} to register it with the CLI.`,\n );\n continue;\n }\n }\n\n try {\n const content = await readFile(skillPath);\n const frontmatter = parseFrontmatter(content, skillPath);\n\n if (!frontmatter?.name) {\n warn(`Skipping skill in '${skillDirName}': missing or invalid frontmatter name`);\n continue;\n }\n\n const canonicalId = frontmatter.name;\n skills[canonicalId] = {\n id: canonicalId,\n path: displayPath,\n description: frontmatter.description || \"\",\n };\n\n verbose(` Loaded skill: ${canonicalId}`);\n } catch (error) {\n verbose(` Failed to load skill: ${skillFile} - ${error}`);\n }\n }\n\n return skills;\n}\n\n/**\n * Loads skills from a plugin's `skills/` subdirectory. Plugin skills carry no\n * metadata.yaml, so metadata is not required here.\n */\nexport async function loadPluginSkills(pluginDir: string): Promise<SkillDefinitionMap> {\n return loadSkillsFromDir(path.join(pluginDir, \"skills\"), {\n pathPrefix: \"skills\",\n requireMetadata: false,\n });\n}\n","/** Extract a human-readable message from an unknown error value. */\nexport function getErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n","import { parse as parseYaml } from \"yaml\";\n\nexport function extractFrontmatter(content: string): unknown | null {\n const frontmatterRegex = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---/;\n const match = content.match(frontmatterRegex);\n\n if (!match || !match[1]) {\n return null;\n }\n\n try {\n return parseYaml(match[1]);\n } catch {\n return null;\n }\n}\n","import fs from \"fs-extra\";\nimport fg from \"fast-glob\";\nimport os from \"os\";\nimport path from \"path\";\nimport { CLAUDE_SRC_DIR, STANDARD_FILES } from \"../consts\";\n// The gate's private token module, imported here by exception (eslint records\n// it): this file is the write choke point every pair write funnels through, and\n// `gate-token.ts` is a dependency-free leaf, so the import cannot cycle.\nimport { assertGateToken } from \"../lib/config-gate/gate-token.js\";\n\n/**\n * True when `child` resolves to `parent` or inside it. Purely lexical\n * (no symlink resolution) — the caller decides throw-vs-warn policy.\n */\nexport function isPathWithin(child: string, parent: string): boolean {\n const resolvedChild = path.resolve(child);\n const resolvedParent = path.resolve(parent);\n return resolvedChild === resolvedParent || resolvedChild.startsWith(resolvedParent + path.sep);\n}\n\nexport async function readFile(filePath: string): Promise<string> {\n return fs.readFile(filePath, \"utf-8\");\n}\n\n/**\n * Reads a file with a size limit check before reading content.\n * Throws if the file exceeds maxSizeBytes. Prevents DoS from oversized files.\n */\nexport async function readFileSafe(filePath: string, maxSizeBytes: number): Promise<string> {\n const stats = await fs.stat(filePath);\n if (stats.size > maxSizeBytes) {\n throw new Error(\n `File too large: '${filePath}' is ${stats.size} bytes (limit: ${maxSizeBytes} bytes)`,\n );\n }\n return fs.readFile(filePath, \"utf-8\");\n}\n\nexport async function readFileOptional(filePath: string, fallback = \"\"): Promise<string> {\n try {\n return await fs.readFile(filePath, \"utf-8\");\n } catch {\n return fallback;\n }\n}\n\nexport async function fileExists(filePath: string): Promise<boolean> {\n return fs.pathExists(filePath);\n}\n\nexport async function directoryExists(dirPath: string): Promise<boolean> {\n try {\n const stat = await fs.stat(dirPath);\n return stat.isDirectory();\n } catch {\n return false;\n }\n}\n\nexport async function listDirectories(dirPath: string): Promise<string[]> {\n try {\n const entries = await fs.readdir(dirPath, { withFileTypes: true });\n return entries.filter((e) => e.isDirectory()).map((e) => e.name);\n } catch {\n return [];\n }\n}\n\nexport async function glob(pattern: string, cwd: string): Promise<string[]> {\n return fg(pattern, { cwd, onlyFiles: true });\n}\n\n/**\n * True when `resolvedPath` is one of the two halves of the global config pair.\n *\n * Compares resolved paths rather than matching on the filename, so it holds\n * against every way of naming the same file — a concatenated path, a relative\n * one, a fragment assembled at runtime — which is exactly what a static check\n * cannot do.\n */\nfunction isGlobalPairPath(resolvedPath: string): boolean {\n const globalConfigDir = path.join(os.homedir(), CLAUDE_SRC_DIR);\n return (\n resolvedPath === path.join(globalConfigDir, STANDARD_FILES.CONFIG_TS) ||\n resolvedPath === path.join(globalConfigDir, STANDARD_FILES.CONFIG_TYPES_TS)\n );\n}\n\nexport async function writeFile(filePath: string, content: string): Promise<void> {\n // Runtime tripwire: every write in the CLI funnels through here, so a pair\n // write attempted without the gate's token dies at its first execution\n // whatever route it took to get here. Costs one path compare per write.\n const resolvedPath = path.resolve(filePath);\n if (isGlobalPairPath(resolvedPath)) assertGateToken(resolvedPath);\n\n await fs.ensureDir(path.dirname(filePath));\n await fs.writeFile(filePath, content, \"utf-8\");\n}\n\nexport async function ensureDir(dirPath: string): Promise<void> {\n await fs.ensureDir(dirPath);\n}\n\nexport async function remove(filePath: string): Promise<void> {\n await fs.remove(filePath);\n}\n\nexport async function copy(src: string, dest: string): Promise<void> {\n await fs.copy(src, dest);\n}\n","import { AsyncLocalStorage } from \"node:async_hooks\";\n\n/**\n * The write privilege for the global config pair (`~/.claude-src/config.ts` and\n * its `config-types.ts` sibling).\n *\n * AsyncLocalStorage rather than a module-level boolean: pair writes are async\n * and interleave, so a flag one write clears while another is still in flight\n * revokes a privilege that is still held. The store is scoped to the call tree\n * that opened it, which is exactly the grant being modelled.\n */\nconst gateToken = new AsyncLocalStorage<true>();\n\n/**\n * Thrown when the global pair is written from outside the gate. Names the\n * offending path and the only supported entry point, because every occurrence\n * is a code path that must be moved rather than a user-recoverable condition.\n */\nexport class GlobalPairWriteViolation extends Error {\n constructor(targetPath: string) {\n super(\n `${targetPath} may only be written through config-gate — see src/cli/lib/config-gate/index.ts`,\n );\n this.name = \"GlobalPairWriteViolation\";\n }\n}\n\n/** Runs `fn` holding the pair-write privilege. */\nexport function withGateToken<T>(fn: () => Promise<T>): Promise<T> {\n return gateToken.run(true, fn);\n}\n\n/** True while the current async call tree holds the pair-write privilege. */\nexport function hasGateToken(): boolean {\n return gateToken.getStore() === true;\n}\n\n/** Throws unless the caller holds the pair-write privilege. */\nexport function assertGateToken(targetPath: string): void {\n if (hasGateToken()) return;\n throw new GlobalPairWriteViolation(targetPath);\n}\n","// Logging utility for lib/ modules that don't have access to oclif command context.\n// In oclif commands, prefer using this.log() instead.\n\nlet verboseMode = false;\n\nexport function setVerbose(enabled: boolean): void {\n verboseMode = enabled;\n}\n\nexport function verbose(msg: string): void {\n if (verboseMode) {\n console.log(` ${msg}`);\n }\n}\n\n// Always visible (not gated by verbose mode).\n// Used for user-facing progress output: compilation ticks, summaries, validation results.\nexport function log(msg: string): void {\n console.log(msg);\n}\n\n// --- Startup message buffering ---\n// When buffer mode is enabled (before Ink takes over the terminal), warn() pushes\n// messages into a buffer instead of writing to stderr. The buffer is drained and\n// passed to Ink's <Static> component so messages survive Ink's clearTerminal.\n\nexport type StartupMessage = {\n level: \"info\" | \"warn\" | \"error\";\n text: string;\n};\n\nlet bufferMode = false;\nlet messageBuffer: StartupMessage[] = [];\n\nexport function enableBuffering(): void {\n bufferMode = true;\n messageBuffer = [];\n}\n\nexport function drainBuffer(): StartupMessage[] {\n const messages = [...messageBuffer];\n messageBuffer = [];\n return messages;\n}\n\nexport function disableBuffering(): void {\n bufferMode = false;\n messageBuffer = [];\n}\n\nexport function pushBufferMessage(level: StartupMessage[\"level\"], text: string): void {\n messageBuffer.push({ level, text });\n}\n\n// Always visible (not gated by verbose mode).\n// Used for issues the user should know about, like unresolved references.\n//\n// Error/warning message style guide:\n// - Start with a capital letter (restructure if it would capitalize a function name)\n// - End with a period if it's a complete sentence\n// - End without a period if it's a fragment (e.g., \"Skipping 'foo': missing SKILL.md\")\n// - Wrap dynamic values in single quotes: 'value' (not bare or double-quoted)\n// - Do NOT prefix the message with \"Warning:\" — this function adds it automatically\n// - After a colon, use lowercase (e.g., \"Skipping 'foo': invalid frontmatter\")\n// - Use em dash for supplemental info (e.g., \"Missing category — defaulting to 'local'\")\nexport type WarnOptions = {\n /** When true, suppresses this warning in test environments (VITEST=true). */\n suppressInTest?: boolean;\n};\n\nexport function warn(msg: string, options?: WarnOptions): void {\n if (options?.suppressInTest && process.env.VITEST) {\n return;\n }\n if (bufferMode) {\n messageBuffer.push({ level: \"warn\", text: msg });\n return;\n }\n console.warn(` Warning: ${msg}`);\n}\n","import { z } from \"zod\";\nimport { partition } from \"remeda\";\nimport type { LocalSkillMetadata } from \"./skills/skill-metadata\";\nimport type { LocalRawMetadata } from \"./skills/local-skill-loader\";\nimport { AUTHOR_HANDLE_PATTERN, KEBAB_CASE_PATTERN, LOCAL_PSEUDO_CATEGORY } from \"../consts\";\nimport { formatZodIssue } from \"./schema-validator\";\nimport { warn } from \"../utils/logger\";\nimport { SKILL_SLUGS, CATEGORIES } from \"../types/generated/source-types\";\nimport { EFFORT_NAMES, MODEL_NAMES, PERMISSION_MODES } from \"../types/matrix\";\nimport type {\n AgentHookAction,\n AgentHookDefinition,\n AgentName,\n AgentYamlConfig,\n AlternativeGroup,\n BoundSkill,\n CategoryDefinition,\n CategoryMap,\n CategoryPath,\n CompatibilityGroup,\n ConflictRule,\n DiscourageRule,\n Domain,\n EffortLevel,\n Marketplace,\n MarketplaceMetadata,\n MarketplaceOwner,\n MarketplacePlugin,\n MarketplaceRemoteSource,\n ModelName,\n PermissionMode,\n PluginAuthor,\n PluginManifest,\n Recommendation,\n RelationshipDefinitions,\n RequireRule,\n SkillAssignment,\n SkillId,\n SkillSlug,\n Category,\n} from \"../types\";\n\nexport const boundSkillSchema: z.ZodType<BoundSkill> = z.object({\n id: z.string() as z.ZodType<SkillId>,\n sourceUrl: z.string(),\n sourceName: z.string(),\n boundTo: z.string(),\n description: z.string().optional(),\n});\n\nexport const modelNameSchema = z.enum(MODEL_NAMES) as z.ZodType<ModelName>;\n\nexport const effortLevelSchema = z.enum(EFFORT_NAMES) as z.ZodType<EffortLevel>;\n\nexport const permissionModeSchema = z.enum(PERMISSION_MODES) as z.ZodType<PermissionMode>;\n\nexport const skillSlugSchema = z.enum(SKILL_SLUGS) as z.ZodType<SkillSlug>;\n\n/** Validates category: strict categoryPathSchema by default, any kebab-case string when custom: true */\nfunction validateCategoryField(\n val: { category?: string; custom?: boolean },\n ctx: z.RefinementCtx,\n): void {\n if (!val.category) return;\n\n if (val.custom) {\n if (!KEBAB_CASE_PATTERN.test(val.category)) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"category\"],\n message: \"Custom category must be kebab-case\",\n });\n }\n return;\n }\n\n const result = categoryPathSchema.safeParse(val.category);\n if (!result.success) {\n for (const issue of result.error.issues) {\n ctx.addIssue({ ...issue, path: [\"category\"] });\n }\n }\n}\n\n// Accepts: known category, \"local\", or any kebab-case string (custom categories)\nexport const categoryPathSchema = z.string().refine(\n (val): val is CategoryPath => {\n if (val === LOCAL_PSEUDO_CATEGORY) return true;\n if ((CATEGORIES as readonly string[]).includes(val)) return true;\n // Accept any kebab-case string for custom categories\n return KEBAB_CASE_PATTERN.test(val);\n },\n {\n message: \"Must be a valid category path (e.g., 'web-framework', 'shared-testing', or 'local')\",\n },\n) as z.ZodType<CategoryPath>;\n\nexport const agentHookActionSchema: z.ZodType<AgentHookAction> = z.object({\n type: z.enum([\"command\", \"script\", \"prompt\"]),\n command: z.string().optional(),\n script: z.string().optional(),\n prompt: z.string().optional(),\n});\n\nexport const agentHookDefinitionSchema: z.ZodType<AgentHookDefinition> = z.object({\n matcher: z.string().optional(),\n hooks: z.array(agentHookActionSchema).optional(),\n});\n\nexport const hooksRecordSchema = z.record(z.string(), z.array(agentHookDefinitionSchema));\n\n/** Strict hook definition — hooks array is required and must have at least one action */\nconst strictAgentHookDefinitionSchema = z.object({\n matcher: z.string().optional(),\n hooks: z.array(agentHookActionSchema).min(1),\n});\n\n/** Strict hooks record for validation schemas (requires at least one hook action per definition) */\nexport const strictHooksRecordSchema = z.record(\n z.string(),\n z.array(strictAgentHookDefinitionSchema),\n);\n\nexport const skillAssignmentSchema: z.ZodType<SkillAssignment> = z.object({\n id: z.string() as z.ZodType<SkillId>,\n preloaded: z.boolean().optional(),\n local: z.boolean().optional(),\n path: z.string().optional(),\n});\n\n// Lenient: accepts any string for `name` since local/custom skills may not follow strict SkillId pattern\nexport const skillFrontmatterLoaderSchema = z.object({\n /** Lenient (any string): local/custom skills have non-builtin IDs */\n name: z.string() as z.ZodType<SkillId>,\n description: z.string(),\n model: modelNameSchema.optional(),\n});\n\n// Loader schema: category strictness depends on custom field (see validateCategoryField)\nexport const skillMetadataLoaderSchema = z\n .object({\n // Field accepts any string; cross-field validation in superRefine enforces strict/custom rules\n category: (z.string() as z.ZodType<CategoryPath>).optional(),\n author: z.string().optional(),\n domain: z.string() as z.ZodType<Domain>,\n custom: z.boolean().optional(),\n })\n .passthrough()\n .superRefine(validateCategoryField);\n\n/**\n * Raw metadata.yaml shape read by the matrix loader during skill extraction.\n * DELIBERATE DIFFERENCE from skillMetadataLoaderSchema / localRawMetadataSchema:\n * this schema validates `category` with categoryPathSchema directly and does NOT\n * run the validateCategoryField superRefine, so a `custom: true` category is not\n * cross-checked against the kebab-case rule. Preserved verbatim on the move from\n * matrix-loader.ts — do not add the superRefine without an explicit decision.\n */\nexport const matrixRawMetadataSchema = z.object({\n category: categoryPathSchema,\n author: z.string(),\n displayName: z.string().optional(),\n slug: z.string() as z.ZodType<SkillSlug>,\n cliDescription: z.string().optional(),\n usageGuidance: z.string().optional(),\n // Boundary cast: domain is a string at the YAML parse boundary; narrowed to Domain type\n domain: z.string() as z.ZodType<Domain>,\n custom: z.boolean().optional(),\n});\n\nexport const pluginAuthorSchema: z.ZodType<PluginAuthor> = z.object({\n name: z.string().min(1),\n email: z.string().optional(),\n});\n\n// Shared plugin.json shape — the lenient (strip) and strict variants below differ only in unknown-key policy\nconst pluginManifestObjectSchema = z.object({\n name: z.string(),\n version: z.string().optional(),\n description: z.string().optional(),\n author: pluginAuthorSchema.optional(),\n keywords: z.array(z.string()).optional(),\n commands: z.union([z.string(), z.array(z.string())]).optional(),\n agents: z.union([z.string(), z.array(z.string())]).optional(),\n skills: z.union([z.string(), z.array(z.string())]).optional(),\n hooks: z.union([z.string(), hooksRecordSchema]).optional(),\n});\n\n/** Lenient plugin.json schema (strips unknown keys; used at load boundaries) */\nexport const pluginManifestSchema: z.ZodType<PluginManifest> = pluginManifestObjectSchema;\n\n/** Strict plugin.json schema — rejects unrecognized keys (used by plugin-validator) */\nexport const pluginManifestValidationSchema = pluginManifestObjectSchema.strict();\n\nexport const agentYamlConfigSchema: z.ZodType<AgentYamlConfig> = z.object({\n id: z.string() as z.ZodType<AgentName>,\n title: z.string(),\n description: z.string(),\n model: modelNameSchema.optional(),\n effort: effortLevelSchema.optional(),\n tools: z.array(z.string()),\n disallowedTools: z.array(z.string()).optional(),\n permissionMode: permissionModeSchema.optional(),\n hooks: hooksRecordSchema.optional(),\n outputFormat: z.string().optional(),\n domain: (z.string() as z.ZodType<Domain>).optional(),\n custom: z.boolean().optional(),\n});\n\n// Defined before projectConfigLoaderSchema so it can reference stackAgentConfigSchema\n// Single skill assignment element: either a bare SkillId string or an object { id, preloaded? }\nconst skillAssignmentElementSchema = z.union([\n z.string() as z.ZodType<SkillId>,\n skillAssignmentSchema,\n]);\n\n/**\n * Agent config within a stack: maps category to skill assignment(s).\n * Lenient: accepts bare string, object, or array from YAML.\n * Consumers normalize all values to SkillAssignment[] after parsing.\n */\nexport const stackAgentConfigSchema = z.record(\n z.string(),\n z.union([skillAssignmentElementSchema, z.array(skillAssignmentElementSchema)]),\n);\n\n/**\n * Lenient loader for .claude-src/config.ts (ProjectConfig).\n * name/agents optional since partial configs are valid at load time.\n * Full validation happens in validateProjectConfig().\n */\nexport const projectConfigLoaderSchema = z\n .object({\n /** Project/plugin name in kebab-case */\n name: z.string().optional(),\n description: z.string().optional(),\n /** Per-agent configuration with scope (e.g., [{ name: \"web-developer\", scope: \"project\" }]) */\n agents: z\n .array(\n z.object({\n name: z.string(),\n scope: z.enum([\"project\", \"global\"]),\n /** Per-agent overrides of the agent's own metadata defaults */\n model: modelNameSchema.optional(),\n effort: effortLevelSchema.optional(),\n excluded: z.boolean().optional(),\n }),\n )\n .optional(),\n /** Per-skill configuration with scope and source */\n skills: z\n .array(\n z.object({\n id: z.string() as z.ZodType<SkillId>,\n scope: z.enum([\"project\", \"global\"]),\n source: z.string(),\n excluded: z.boolean().optional(),\n }),\n )\n .optional(),\n\n /** Author handle (e.g., \"@vince\") */\n author: z.string().optional(),\n /** Selected domains from the wizard (persisted for edit mode restoration) */\n domains: z.array(z.string() as z.ZodType<Domain>).optional(),\n /** Selected agents from the wizard (persisted for edit mode restoration) */\n selectedAgents: z.array(z.string()).optional(),\n /** Agent-to-category-to-skill mappings from selected stack (accepts same formats as stacks.ts) */\n stack: z.record(z.string(), stackAgentConfigSchema).optional(),\n /** Skills source path or URL (e.g., \"github:my-org/skills\") */\n source: z.string().optional(),\n /** Marketplace identifier for plugin installation */\n marketplace: z.string().optional(),\n /** Separate source for agents when different from skills source */\n agentsSource: z.string().optional(),\n /** Tracked project installation paths (global config only) */\n projects: z.array(z.string()).optional(),\n })\n .passthrough();\n\nconst categoryDefinitionSchema: z.ZodType<CategoryDefinition> = z.object({\n id: z.string() as z.ZodType<Category>,\n displayName: z.string(),\n description: z.string(),\n domain: (z.string() as z.ZodType<Domain>).optional() as z.ZodType<Domain | undefined>,\n exclusive: z.boolean(),\n required: z.boolean(),\n order: z.number(),\n icon: z.string().optional(),\n});\n\n// Skill references in relationship rules: slugs resolved to canonical IDs by matrix-loader\nconst skillRefInRules = skillSlugSchema;\n\n// Shared shape for conflict/discourage/compatibility rules: 2+ slugs plus a reason\nconst skillGroupRuleSchema = z.object({\n skills: z.array(skillRefInRules).min(2),\n reason: z.string(),\n});\n\nconst conflictRuleSchema: z.ZodType<ConflictRule> = skillGroupRuleSchema;\n\nconst discourageRuleSchema: z.ZodType<DiscourageRule> = skillGroupRuleSchema;\n\nconst recommendationSchema: z.ZodType<Recommendation> = z.object({\n skill: skillRefInRules,\n reason: z.string(),\n});\n\nexport const compatibilityGroupSchema: z.ZodType<CompatibilityGroup> = skillGroupRuleSchema;\n\nconst requireRuleSchema: z.ZodType<RequireRule> = z.object({\n skill: skillRefInRules,\n needs: z.array(skillRefInRules).min(1),\n needsAny: z.boolean().optional(),\n reason: z.string(),\n});\n\nconst alternativeGroupSchema: z.ZodType<AlternativeGroup> = z.object({\n purpose: z.string(),\n skills: z.array(skillRefInRules).min(1),\n});\n\nconst relationshipDefinitionsSchema: z.ZodType<RelationshipDefinitions> = z.object({\n conflicts: z.array(conflictRuleSchema),\n discourages: z.array(discourageRuleSchema),\n recommends: z.array(recommendationSchema),\n requires: z.array(requireRuleSchema),\n alternatives: z.array(alternativeGroupSchema),\n compatibleWith: z.array(compatibilityGroupSchema).optional().default([]),\n});\n\n/**\n * Standalone skill-categories.ts file schema.\n * Top-level object with version string and categories map using existing categoryDefinitionSchema.\n */\nexport const skillCategoriesFileSchema = z.object({\n version: z.string(),\n categories: z.record(z.string(), categoryDefinitionSchema) as z.ZodType<CategoryMap>,\n});\n\n/**\n * Standalone skill-rules.ts file schema.\n * Contains version and aggregate relationship rules between skills.\n */\nexport const skillRulesFileSchema = z.object({\n version: z.string(),\n relationships: relationshipDefinitionsSchema.optional(),\n});\n\n/**\n * Raw metadata from a local skill's metadata.yaml.\n * displayName and category are required — the skill must declare both.\n */\nexport const localRawMetadataSchema = z\n .object({\n /** Short name shown in the wizard grid (e.g., \"my-custom-react\") */\n displayName: z.string(),\n /** Kebab-case short key for alias resolution (e.g., \"react\") */\n slug: z.string() as z.ZodType<SkillSlug>,\n /** One-line description for the wizard */\n cliDescription: z.string().optional(),\n /** Category to place this skill in (e.g., \"web-framework\") */\n // Field accepts any string; cross-field validation in superRefine enforces strict/custom rules\n category: z.string() as z.ZodType<CategoryPath>,\n /** When an AI agent should invoke this skill */\n usageGuidance: z.string().optional(),\n /** Domain this skill belongs to (e.g., \"web\", \"api\", \"cli\") */\n domain: z.string() as z.ZodType<Domain>,\n /** True if this skill was created outside the CLI's built-in vocabulary */\n custom: z.boolean().optional(),\n })\n .passthrough()\n // Passthrough widens the output with an index signature; LocalRawMetadata is the\n // honest declared shape consumers read (same round-1 pattern as localSkillMetadataSchema).\n .superRefine(validateCategoryField) as z.ZodType<LocalRawMetadata>;\n\n/** Metadata for local skills that were forked/copied from a marketplace skill */\nexport const localSkillMetadataSchema = z\n .object({\n forkedFrom: z\n .object({\n /** Original skill ID before forking — lenient (any string) since custom/extra-source skills have non-builtin IDs */\n skillId: z.string() as z.ZodType<SkillId>,\n /** SHA hash of the original content at fork time (for diff detection) */\n contentHash: z.string(),\n /** ISO date when the fork was created */\n date: z.string(),\n /** Source URL the skill was installed from (e.g., \"github:agents-inc/skills\") */\n source: z.string().optional(),\n })\n .optional(),\n })\n // Passthrough widens the output with an index signature; LocalSkillMetadata carries the\n // same index signature, so this is the honest declared shape for parse results.\n .passthrough() as z.ZodType<LocalSkillMetadata>;\n\nconst stackSchema = z.object({\n id: z.string().min(1),\n name: z.string().min(1),\n description: z.string(),\n /** Maps agent IDs to their category-to-skill assignments */\n agents: z.record(z.string(), stackAgentConfigSchema),\n /** High-level philosophy guiding this stack's technology choices */\n philosophy: z.string().optional(),\n});\n\n// Pre-normalization schema: values may be string or string[].\n// loadStacks() normalizes to StacksConfig (all values SkillId[]) after parsing.\nexport const stacksConfigSchema = z.object({\n stacks: z.array(stackSchema).min(1),\n});\n\nconst marketplaceRemoteSourceSchema: z.ZodType<MarketplaceRemoteSource> = z.object({\n source: z.enum([\"github\", \"url\"]),\n repo: z.string().optional(),\n url: z.string().optional(),\n ref: z.string().optional(),\n});\n\nconst marketplacePluginSchema: z.ZodType<MarketplacePlugin> = z.object({\n name: z.string().min(1),\n /** Local directory path (relative to pluginRoot) or remote source config */\n source: z.union([z.string(), marketplaceRemoteSourceSchema]),\n description: z.string().optional(),\n version: z.string().optional(),\n author: pluginAuthorSchema.optional(),\n /** Lenient: external data may have any category string or none at all */\n category: z.string().optional(),\n keywords: z.array(z.string()).optional(),\n});\n\n// MarketplaceOwner aliases PluginAuthor (identical shape, both require name.min(1))\nconst marketplaceOwnerSchema: z.ZodType<MarketplaceOwner> = pluginAuthorSchema;\n\nconst marketplaceMetadataSchema: z.ZodType<MarketplaceMetadata> = z.object({\n /** Base directory for resolving plugin source paths (e.g., \"plugins/\") */\n pluginRoot: z.string().optional(),\n});\n\nexport const marketplaceSchema: z.ZodType<Marketplace> = z.object({\n $schema: z.string().optional(),\n name: z.string().min(1),\n version: z.string().min(1),\n description: z.string().optional(),\n owner: marketplaceOwnerSchema,\n metadata: marketplaceMetadataSchema.optional(),\n plugins: z.array(marketplacePluginSchema).min(1),\n});\n\n/** Tool permission overrides (allow/deny lists for Claude Code tool access) */\nconst permissionConfigSchema = z.object({\n /** Tool names or patterns to explicitly allow */\n allow: z.array(z.string()).optional(),\n /** Tool names or patterns to explicitly deny */\n deny: z.array(z.string()).optional(),\n});\n\n/** Settings file schema (.claude/settings.yaml) for project-level configuration */\nexport const settingsFileSchema = z\n .object({\n permissions: permissionConfigSchema.optional(),\n })\n .passthrough();\n\n/** Parse result of importedSkillMetadataSchema — forkedFrom plus arbitrary passthrough keys */\nexport type ImportedSkillMetadata = {\n forkedFrom?: {\n source: string;\n skillName: string;\n contentHash: string;\n date: string;\n };\n [key: string]: unknown;\n};\n\n/** Metadata for skills imported via `npx agents-inc import skill` (tracks original source for updates) */\nexport const importedSkillMetadataSchema = z\n .object({\n forkedFrom: z\n .object({\n /** Source URL or identifier where the skill was imported from */\n source: z.string(),\n /** Original skill name in the source */\n skillName: z.string(),\n /** SHA hash of the original content at import time */\n contentHash: z.string(),\n /** ISO date when the import was performed */\n date: z.string(),\n })\n .optional(),\n })\n // Passthrough widens the output with an index signature; ImportedSkillMetadata\n // carries the same index signature, so this is the honest declared parse shape.\n .passthrough() as z.ZodType<ImportedSkillMetadata>;\n\n/** Branding overrides for white-labeling the CLI */\nconst brandingConfigSchema = z.object({\n /** Custom CLI name (e.g., \"Acme Dev Tools\") */\n name: z.string().optional(),\n /** Custom tagline shown in wizard header */\n tagline: z.string().optional(),\n});\n\n/**\n * Project source configuration from .claude-src/config.ts.\n * Stores multi-source settings, custom directory overrides, and bound skills.\n */\nexport const projectSourceConfigSchema = z\n .object({\n /** Primary skills source (path or URL) */\n source: z.string().optional(),\n /** Author handle for this project's config */\n author: z.string().optional(),\n /** Marketplace identifier for plugin installation */\n marketplace: z.string().optional(),\n /** Separate source for agent definitions (when different from skills) */\n agentsSource: z.string().optional(),\n /** Additional skill sources (private marketplaces, custom repos) */\n sources: z\n .array(\n z.object({\n /** Display name for the source (shown in wizard) */\n name: z.string(),\n /** Source URL (e.g., \"github:acme-corp/claude-skills\") */\n url: z.string(),\n description: z.string().optional(),\n /** Git ref (branch/tag/commit) for the source */\n ref: z.string().optional(),\n }),\n )\n .optional(),\n /** Skills explicitly bound to categories via search (from Step Sources) */\n boundSkills: z.array(boundSkillSchema).optional(),\n /** Branding overrides for white-labeling the CLI */\n branding: brandingConfigSchema.optional(),\n /** Custom skills directory override (default: \"src/skills\") */\n skillsDir: z.string().optional(),\n /** Custom agents directory override (default: \"src/agents\") */\n agentsDir: z.string().optional(),\n /** Custom stacks file path override (default: \"config/stacks.ts\") */\n stacksFile: z.string().optional(),\n /** Custom categories file path override (default: \"config/skill-categories.ts\") */\n categoriesFile: z.string().optional(),\n /** Custom rules file path override (default: \"config/skill-rules.ts\") */\n rulesFile: z.string().optional(),\n })\n .passthrough();\n\n// Strict validation schemas enforce all constraints and use .strict() to reject unknown fields,\n// unlike the lenient loader schemas above which use .passthrough() for forward compatibility at parse boundaries\n\n/** Strict schema for compiled agent metadata.yaml output. Lenient id (any string) since marketplace agents may use custom identifiers. */\nexport const agentYamlGenerationSchema = z\n .object({\n $schema: z.string().optional(),\n id: z.string().min(1),\n title: z.string().min(1),\n description: z.string().min(1),\n model: modelNameSchema.optional(),\n effort: effortLevelSchema.optional(),\n tools: z.array(z.string()).min(1),\n disallowedTools: z.array(z.string()).optional(),\n permissionMode: permissionModeSchema.optional(),\n hooks: strictHooksRecordSchema.optional(),\n outputFormat: z.string().optional(),\n domain: (z.string() as z.ZodType<Domain>).optional(),\n custom: z.boolean().optional(),\n })\n .strict();\n\n/** Strict validation for agent AGENT.md frontmatter (used by plugin-validator) */\nexport const agentFrontmatterValidationSchema = z\n .object({\n /** Agent name in kebab-case (becomes the Task tool identifier) */\n name: z.string().regex(KEBAB_CASE_PATTERN).min(1),\n description: z.string().min(1),\n /** Comma-separated list of allowed tools */\n tools: z.string().optional(),\n /** Comma-separated list of denied tools */\n disallowedTools: z.string().optional(),\n model: modelNameSchema.optional(),\n effort: effortLevelSchema.optional(),\n permissionMode: permissionModeSchema.optional(),\n /** Skill names to preload (embed in agent prompt) */\n skills: z.array(z.string().min(1)).optional(),\n hooks: strictHooksRecordSchema.optional(),\n })\n .strict();\n\n/** Strict validation for SKILL.md frontmatter (matches Claude Code plugin spec) */\nexport const skillFrontmatterValidationSchema = z\n .object({\n name: z.string().min(1),\n description: z.string().min(1),\n /** If true, Claude cannot invoke this skill on its own */\n \"disable-model-invocation\": z.boolean().optional(),\n /** If true, user can invoke this skill directly */\n \"user-invocable\": z.boolean().optional(),\n /** Comma-separated list of tools this skill can use */\n \"allowed-tools\": z.string().optional(),\n model: modelNameSchema.optional(),\n /** \"fork\" means skill runs in a forked context (separate conversation) */\n context: z.enum([\"fork\"]).optional(),\n /** Agent name this skill is scoped to */\n agent: z.string().optional(),\n /** Hint text shown when user invokes the skill */\n \"argument-hint\": z.string().optional(),\n })\n .strict();\n\n/**\n * Provenance object shared verbatim by metadataValidationSchema and\n * customMetadataValidationSchema. The forkedFrom variants in\n * localSkillMetadataSchema (no `version`) and importedSkillMetadataSchema\n * (`skillName`/required `source`) are deliberately NOT unified here — their\n * shapes differ, so sharing would change validation behavior.\n */\nconst forkedFromSchema = z.object({\n /** Original skill ID */\n skillId: z.string(),\n /** Version of the original at fork time */\n version: z.number().int().min(1).optional(),\n /** Content hash of the original at fork time */\n contentHash: z.string(),\n /** Source URL or identifier */\n source: z.string().optional(),\n /** ISO date of the fork */\n date: z.string(),\n});\n\n/**\n * Recommended upper bound for cliDescription in published skills. Exceeding it is\n * advisory only — splitMetadataValidationIssues downgrades it to a warning because\n * the runtime schemas accept any length and the value only feeds wizard description\n * text. Empty (min(1)) remains a hard error.\n */\nconst CLI_DESCRIPTION_MAX_LENGTH = 60;\n\n/**\n * Fields shared by metadataValidationSchema (strict, built-in vocabulary) and\n * customMetadataValidationSchema (relaxed). Only `category` and `slug` differ\n * between the two variants — each adds those via .extend().\n */\nconst skillMetadataBaseSchema = z.object({\n /** Author handle — must start with @ (e.g., \"@vince\") */\n author: z.string().regex(AUTHOR_HANDLE_PATTERN),\n /** Short display name for the wizard grid (max 30 chars) */\n displayName: z.string().min(1).max(30),\n /** One-line description for the wizard (max 60 chars recommended; over-length is a validation warning) */\n cliDescription: z.string().min(1).max(CLI_DESCRIPTION_MAX_LENGTH),\n /** When an AI agent should invoke this skill (min 10 chars to ensure usefulness) */\n usageGuidance: z.string().min(10),\n /** 7-char hex SHA of skill content (for change detection) */\n contentHash: z\n .string()\n .regex(/^[a-f0-9]{7}$/)\n .optional(),\n /** ISO date of last update */\n updated: z.string().optional(),\n /** Provenance tracking when skill was forked from another */\n forkedFrom: forkedFromSchema.optional(),\n /** Domain assignment from metadata */\n domain: (z.string() as z.ZodType<Domain>).optional(),\n /** True if this skill was created outside the CLI's built-in vocabulary */\n custom: z.boolean().optional(),\n});\n\n/** Strict validation for metadata.yaml in published skills (enforces author format, enum-validated category/slug) */\nexport const metadataValidationSchema = skillMetadataBaseSchema\n .extend({\n /** Domain-prefixed category — must be a known built-in category */\n category: z.enum(CATEGORIES) as z.ZodType<Category>,\n /** Kebab-case short key — must be a known built-in slug */\n slug: z.enum(SKILL_SLUGS) as z.ZodType<SkillSlug>,\n })\n .strict();\n\n/** Relaxed validation for custom skill metadata.yaml (any category string, kebab-case slug, allows extra fields) */\nexport const customMetadataValidationSchema = skillMetadataBaseSchema.extend({\n /** Any string category — custom skills may define their own categories */\n category: z.string(),\n /** Kebab-case short key for alias resolution, search, and relationship rules */\n slug: z\n .string()\n .regex(/^[a-z][a-z0-9-]*$/)\n .min(1)\n .max(50),\n});\n\nconst stackSkillAssignmentSchema = z\n .object({\n id: z.string().min(1),\n /** If true, skill content is embedded in the compiled agent prompt */\n preloaded: z.boolean().optional(),\n })\n .strict();\n\n/** Strict validation for published stack config.yaml (marketplace stacks) */\nexport const stackConfigValidationSchema = z\n .object({\n /** Unique stack identifier in kebab-case */\n id: z.string().regex(KEBAB_CASE_PATTERN).optional(),\n name: z.string().min(1),\n version: z.string(),\n author: z.string().min(1),\n description: z.string().optional(),\n /** ISO date when this stack was first created */\n created: z.string().optional(),\n /** ISO date of last update */\n updated: z.string().optional(),\n /** Primary framework this stack is designed for (e.g., \"nextjs\", \"remix\") */\n framework: z.string().optional(),\n /** All skills used in this stack (flat list, at least one required) */\n skills: z.array(stackSkillAssignmentSchema).min(1),\n /** Agent IDs this stack compiles (at least one required) */\n agents: z.array(z.string().regex(KEBAB_CASE_PATTERN)).min(1),\n /** Per-agent skill assignments: { agentId: { category: [skillAssignment] } } */\n agentSkills: z\n .record(z.string(), z.record(z.string(), z.array(stackSkillAssignmentSchema)))\n .optional(),\n /** High-level philosophy guiding technology choices */\n philosophy: z.string().optional(),\n /** Guiding principles for agents using this stack */\n principles: z.array(z.string().min(1)).optional(),\n tags: z.array(z.string().regex(KEBAB_CASE_PATTERN)).optional(),\n /** Per-skill overrides: alternative suggestions and lock status */\n overrides: z\n .record(\n z.string(),\n z\n .object({\n /** Suggested alternative skill IDs if this one is swapped */\n alternatives: z.array(z.string().min(1)).optional(),\n /** If true, this skill cannot be swapped by the user */\n locked: z.boolean().optional(),\n })\n .strict(),\n )\n .optional(),\n /** Community metrics for sorting/ranking */\n metrics: z\n .object({\n upvotes: z.number().int().min(0).optional(),\n downloads: z.number().int().min(0).optional(),\n })\n .strict()\n .optional(),\n /** Lifecycle hooks triggered by file changes or commands */\n hooks: strictHooksRecordSchema.optional(),\n })\n .strict();\n\n/** Format Zod validation issues into a human-readable string (e.g., \"path.to.field: Expected string; other: Required\") */\nexport function formatZodIssues(issues: z.ZodIssue[]): string {\n return issues.map(formatZodIssue).join(\"; \");\n}\n\n/**\n * Validates raw skill metadata using the relaxed schema for custom skills and\n * the strict schema for built-ins — the one place the custom-vs-strict\n * selection policy lives.\n */\nexport function validateSkillMetadata(rawMetadata: unknown) {\n const schema = isCustomMetadata(rawMetadata)\n ? customMetadataValidationSchema\n : metadataValidationSchema;\n return schema.safeParse(rawMetadata);\n}\n\nexport type MetadataIssueSplit = {\n /** Hard schema violations — the metadata is broken and must be fixed */\n errors: string[];\n /** Advisory violations (over-length cliDescription) — worth fixing, never fatal */\n warnings: string[];\n};\n\n/** True for the over-length `cliDescription` issue — the only advisory metadata violation. */\nfunction isOverLengthCliDescription(issue: z.ZodIssue): boolean {\n return issue.code === \"too_big\" && issue.path.length === 1 && issue.path[0] === \"cliDescription\";\n}\n\n/** Reads `cliDescription` from raw parsed metadata when it is a string. */\nfunction readCliDescription(raw: unknown): string | undefined {\n if (raw == null || typeof raw !== \"object\") return undefined;\n // Boundary cast: raw comes straight from YAML parsing; the typeof check above narrows to object\n const value = (raw as { cliDescription?: unknown }).cliDescription;\n return typeof value === \"string\" ? value : undefined;\n}\n\n/**\n * Warning text for an over-length `cliDescription`, carrying the actual length.\n * The too_big issue only fires when the value is a string, so the undefined\n * branch is defensive — it falls back to the raw zod issue text.\n */\nfunction formatOverLengthWarning(issue: z.ZodIssue, cliDescription: string | undefined): string {\n if (cliDescription === undefined) return formatZodIssue(issue);\n return `cliDescription is ${cliDescription.length} characters — exceeds the recommended maximum of ${CLI_DESCRIPTION_MAX_LENGTH}`;\n}\n\n/**\n * Splits strict-metadata validation issues into hard errors and advisory warnings.\n *\n * Over-length `cliDescription` (> CLI_DESCRIPTION_MAX_LENGTH chars) is advisory: the\n * runtime schemas accept any length and the value only feeds wizard description text,\n * so validate reports it as a warning carrying the actual length. Empty/missing\n * `cliDescription` and every other issue remain errors.\n */\nexport function splitMetadataValidationIssues(\n error: z.ZodError,\n rawMetadata: unknown,\n): MetadataIssueSplit {\n const [overLength, hardFailures] = partition(error.issues, isOverLengthCliDescription);\n\n const cliDescription = readCliDescription(rawMetadata);\n const warnings = overLength.map((issue) => formatOverLengthWarning(issue, cliDescription));\n\n return { errors: hardFailures.map(formatZodIssue), warnings };\n}\n\n/**\n * Validates that a parsed JSON/YAML value does not exceed a maximum nesting depth.\n * Returns true if the structure is within limits, false if it exceeds maxDepth.\n */\nexport function validateNestingDepth(value: unknown, maxDepth: number): boolean {\n function check(val: unknown, depth: number): boolean {\n if (depth > maxDepth) return false;\n if (Array.isArray(val)) {\n return val.every((item) => check(item, depth + 1));\n }\n if (val !== null && typeof val === \"object\") {\n return Object.values(val).every((v) => check(v, depth + 1));\n }\n return true;\n }\n return check(value, 0);\n}\n\n/**\n * Returns true when raw parsed metadata has `custom: true`.\n * Used to pick between strict (built-in vocabulary) and relaxed (user-authored) validation schemas.\n */\nexport function isCustomMetadata(raw: unknown): boolean {\n if (raw == null || typeof raw !== \"object\") return false;\n if (!(\"custom\" in raw)) return false;\n return (raw as { custom: unknown }).custom === true;\n}\n\n/**\n * Logs warnings for unknown fields in a parsed object compared to a list of expected keys.\n * Used at security-critical parsing boundaries for files this CLI owns (marketplace.json), where\n * `.passthrough()` is kept for forward compatibility but unexpected fields should be surfaced.\n * A file owned by another tool is not such a boundary: an unfamiliar key there is that tool's\n * business, and a complete expected-key list for it cannot be maintained.\n */\nexport function warnUnknownFields(\n parsed: Record<string, unknown>,\n expectedKeys: readonly string[],\n context: string,\n): void {\n const expectedSet = new Set(expectedKeys);\n const unknownKeys = Object.keys(parsed).filter((k) => !expectedSet.has(k));\n if (unknownKeys.length > 0) {\n warn(`Unknown fields in ${context}: ${unknownKeys.join(\", \")}`);\n }\n}\n","import { z } from \"zod\";\n\n/** One place for the path-prefixed issue rendering shared by every Zod reporter. */\nexport function formatZodIssue(issue: z.ZodIssue): string {\n const path = issue.path.join(\".\");\n if (issue.code === \"unrecognized_keys\") {\n return `Unrecognized key: \"${issue.keys.join('\", \"')}\"`;\n }\n return path ? `${path}: ${issue.message}` : issue.message;\n}\n\nexport function formatZodErrors(error: z.ZodError): string[] {\n return error.issues.map(formatZodIssue);\n}\n","// AUTO-GENERATED from skills source and agent metadata — do not edit manually\n// Run: bun run generate:types\n\n// ── Skill Map (slug → ID) ─────────────────────────────────────\n\nexport const SKILL_MAP = {\n \"angular-standalone\": \"web-framework-angular-standalone\",\n \"ant-design\": \"web-ui-ant-design\",\n \"anthropic-sdk\": \"ai-provider-anthropic-sdk\",\n \"api-performance\": \"api-performance-api-performance\",\n \"apollo-server\": \"api-graphql-apollo-server\",\n \"app-links\": \"mobile-deep-linking-app-links\",\n appwrite: \"api-baas-appwrite\",\n astro: \"web-meta-framework-astro\",\n \"auth-security\": \"shared-security-auth-security\",\n \"aws-sdk\": \"infra-platform-aws-sdk\",\n \"axiom-pino-sentry\": \"api-observability-axiom-pino-sentry\",\n \"better-auth-drizzle-hono\": \"api-auth-better-auth-drizzle-hono\",\n biome: \"shared-tooling-biome\",\n \"ble-nfc\": \"mobile-hardware-ble-nfc\",\n bullmq: \"api-queue-bullmq\",\n \"chakra-ui\": \"web-ui-chakra-ui\",\n changesets: \"shared-tooling-changesets\",\n chroma: \"api-vector-db-chroma\",\n clack: \"cli-prompts-clack\",\n \"claude-vision\": \"ai-provider-claude-vision\",\n clerk: \"api-auth-clerk\",\n \"cli-commander\": \"cli-framework-cli-commander\",\n \"cli-reviewing\": \"meta-reviewing-cli-reviewing\",\n \"cloudflare-workers\": \"infra-platform-cloudflare-workers\",\n cockroachdb: \"api-database-cockroachdb\",\n \"cohere-sdk\": \"ai-provider-cohere-sdk\",\n \"css-animations\": \"web-animation-css-animations\",\n cva: \"web-styling-cva\",\n \"cypress-e2e\": \"web-testing-cypress-e2e\",\n d3: \"web-dataviz-d3\",\n \"date-fns\": \"web-utilities-date-fns\",\n detox: \"mobile-testing-detox\",\n \"dnd-kit\": \"web-dnd-dnd-kit\",\n docker: \"infra-ci-cd-docker\",\n docusaurus: \"web-meta-framework-docusaurus\",\n drizzle: \"api-database-drizzle\",\n eas: \"mobile-deployment-eas\",\n edgedb: \"api-database-edgedb\",\n elasticsearch: \"api-search-elasticsearch\",\n electron: \"desktop-framework-electron\",\n \"electron-forge\": \"desktop-packaging-electron-forge\",\n \"electron-ipc\": \"desktop-ipc-electron\",\n \"electron-multiwindow\": \"desktop-multiwindow-electron\",\n \"electron-security\": \"desktop-security-electron\",\n \"electron-storage\": \"desktop-storage-electron\",\n \"electron-testing\": \"desktop-testing-electron\",\n \"electron-ui\": \"desktop-ui-electron\",\n \"electron-updater\": \"desktop-updates-electron-updater\",\n elevenlabs: \"ai-provider-elevenlabs\",\n elysia: \"api-framework-elysia\",\n \"error-boundaries\": \"web-error-handling-error-boundaries\",\n \"eslint-prettier\": \"shared-tooling-eslint-prettier\",\n expo: \"mobile-framework-expo\",\n \"expo-router\": \"mobile-navigation-expo-router\",\n express: \"api-framework-express\",\n \"expressive-typescript\": \"meta-design-expressive-typescript\",\n fastify: \"api-framework-fastify\",\n \"file-upload-patterns\": \"web-files-file-upload-patterns\",\n firebase: \"api-baas-firebase\",\n \"framer-motion\": \"web-animation-framer-motion\",\n \"gesture-handler\": \"mobile-animation-gesture-handler\",\n \"git-hooks\": \"shared-tooling-git-hooks\",\n \"github-actions\": \"infra-ci-cd-github-actions\",\n \"google-gemini-sdk\": \"ai-provider-google-gemini-sdk\",\n \"graphql-apollo\": \"web-data-fetching-graphql-apollo\",\n \"graphql-urql\": \"web-data-fetching-graphql-urql\",\n \"headless-ui\": \"web-ui-headless-ui\",\n hono: \"api-framework-hono\",\n \"huggingface-inference\": \"ai-infrastructure-huggingface-inference\",\n \"image-handling\": \"web-files-image-handling\",\n jotai: \"web-state-jotai\",\n knex: \"api-database-knex\",\n kubernetes: \"infra-containers-kubernetes\",\n langchain: \"ai-orchestration-langchain\",\n langfuse: \"ai-observability-langfuse\",\n leaflet: \"web-maps-leaflet\",\n lexical: \"web-editor-lexical\",\n litellm: \"ai-infrastructure-litellm\",\n llamaindex: \"ai-orchestration-llamaindex\",\n maestro: \"mobile-testing-maestro\",\n mantine: \"web-ui-mantine\",\n mapbox: \"web-maps-mapbox\",\n meilisearch: \"api-search-meilisearch\",\n mercurius: \"api-graphql-mercurius\",\n \"mistral-sdk\": \"ai-provider-mistral-sdk\",\n mmkv: \"mobile-storage-mmkv\",\n mobx: \"web-state-mobx\",\n modal: \"ai-infrastructure-modal\",\n mongodb: \"api-database-mongodb\",\n mongoose: \"api-database-mongoose\",\n msw: \"web-mocks-msw\",\n mui: \"web-ui-mui\",\n mysql: \"api-database-mysql\",\n \"native-js\": \"web-utilities-native-js\",\n nativewind: \"mobile-styling-nativewind\",\n neon: \"api-baas-neon\",\n nestjs: \"api-framework-nestjs\",\n netlify: \"infra-platform-netlify\",\n \"next-intl\": \"web-i18n-next-intl\",\n nextauth: \"api-auth-nextauth\",\n nextjs: \"web-meta-framework-nextjs\",\n \"ngrx-signalstore\": \"web-state-ngrx-signalstore\",\n nuxt: \"web-meta-framework-nuxt\",\n nx: \"shared-monorepo-nx\",\n \"oclif-ink\": \"cli-framework-oclif-ink\",\n \"offline-first\": \"web-pwa-offline-first\",\n ollama: \"ai-infrastructure-ollama\",\n \"openai-sdk\": \"ai-provider-openai-sdk\",\n \"openai-whisper\": \"ai-provider-openai-whisper\",\n openapi: \"api-specs-openapi\",\n payload: \"api-cms-payload\",\n pinecone: \"api-vector-db-pinecone\",\n pinia: \"web-state-pinia\",\n planetscale: \"api-baas-planetscale\",\n \"playwright-e2e\": \"web-testing-playwright-e2e\",\n \"pnpm-workspaces\": \"shared-monorepo-pnpm-workspaces\",\n postgresql: \"api-database-postgresql\",\n \"posthog-analytics\": \"api-analytics-posthog-analytics\",\n \"posthog-flags\": \"api-flags-posthog-flags\",\n prisma: \"api-database-prisma\",\n promptfoo: \"ai-observability-promptfoo\",\n pulumi: \"infra-iac-pulumi\",\n push: \"mobile-notifications-push\",\n qdrant: \"api-vector-db-qdrant\",\n qwik: \"web-meta-framework-qwik\",\n \"radix-ui\": \"web-ui-radix-ui\",\n react: \"web-framework-react\",\n \"react-hook-form\": \"web-forms-react-hook-form\",\n \"react-intl\": \"web-i18n-react-intl\",\n \"react-native\": \"mobile-framework-react-native\",\n \"react-native-paper\": \"mobile-ui-components-react-native-paper\",\n \"react-native-performance\": \"mobile-performance-react-native\",\n \"react-native-security\": \"mobile-security-react-native\",\n \"react-navigation\": \"mobile-navigation-react-navigation\",\n \"react-query\": \"web-server-state-react-query\",\n \"react-router\": \"web-routing-react-router\",\n \"react-testing-library\": \"web-testing-react-testing-library\",\n \"react-three-fiber\": \"web-3d-react-three-fiber\",\n reanimated: \"mobile-animation-reanimated\",\n recharts: \"web-dataviz-recharts\",\n redis: \"api-database-redis\",\n \"redux-toolkit\": \"web-state-redux-toolkit\",\n remix: \"web-meta-framework-remix\",\n replicate: \"ai-infrastructure-replicate\",\n \"research-methodology\": \"meta-methodology-research-methodology\",\n \"resend-react-email\": \"api-email-resend-react-email\",\n \"result-types\": \"web-error-handling-result-types\",\n reviewing: \"meta-reviewing-reviewing\",\n rxjs: \"web-utilities-rxjs\",\n sanity: \"api-cms-sanity\",\n \"scss-modules\": \"web-styling-scss-modules\",\n sequelize: \"api-database-sequelize\",\n \"service-workers\": \"web-pwa-service-workers\",\n \"setup-axiom-pino-sentry\": \"api-observability-setup-axiom-pino-sentry\",\n \"setup-env\": \"infra-config-setup-env\",\n \"setup-posthog\": \"api-analytics-setup-posthog\",\n \"setup-resend\": \"api-email-setup-resend\",\n \"shadcn-ui\": \"web-ui-shadcn-ui\",\n skia: \"mobile-animation-skia\",\n \"socket-io\": \"web-realtime-socket-io\",\n solidjs: \"web-framework-solidjs\",\n \"sqlite-powersync\": \"mobile-storage-sqlite-powersync\",\n sse: \"web-realtime-sse\",\n sst: \"infra-iac-sst\",\n storybook: \"web-tooling-storybook\",\n strapi: \"api-cms-strapi\",\n strategies: \"api-caching-strategies\",\n stripe: \"api-commerce-stripe\",\n supabase: \"api-baas-supabase\",\n surrealdb: \"api-database-surrealdb\",\n svelte: \"web-framework-svelte\",\n sveltekit: \"web-meta-framework-sveltekit\",\n swr: \"web-data-fetching-swr\",\n tailwind: \"web-styling-tailwind\",\n tamagui: \"mobile-ui-components-tamagui\",\n \"tanstack-form\": \"web-forms-tanstack-form\",\n \"tanstack-router\": \"web-routing-tanstack-router\",\n \"tanstack-table\": \"web-ui-tanstack-table\",\n tasks: \"mobile-background-tasks\",\n tauri: \"desktop-framework-tauri\",\n \"tauri-backend\": \"desktop-backend-tauri\",\n \"tauri-bundling\": \"desktop-packaging-tauri\",\n \"tauri-mobile\": \"desktop-mobile-tauri\",\n \"tauri-multiwindow\": \"desktop-multiwindow-tauri\",\n \"tauri-plugins\": \"desktop-plugins-tauri\",\n \"tauri-security\": \"desktop-security-tauri\",\n terraform: \"infra-iac-terraform\",\n tiptap: \"web-editor-tiptap\",\n \"together-ai\": \"ai-infrastructure-together-ai\",\n \"tool-use-patterns\": \"ai-patterns-tool-use-patterns\",\n trpc: \"web-data-fetching-trpc\",\n turborepo: \"shared-monorepo-turborepo\",\n \"turborepo-ci\": \"infra-ci-cd-turborepo-ci\",\n turso: \"api-baas-turso\",\n typeorm: \"api-database-typeorm\",\n \"typescript-config\": \"shared-tooling-typescript-config\",\n unistyles: \"mobile-styling-unistyles\",\n upstash: \"api-database-upstash\",\n \"vee-validate\": \"web-forms-vee-validate\",\n vercel: \"infra-platform-vercel\",\n \"vercel-ai-sdk\": \"ai-orchestration-vercel-ai-sdk\",\n \"vercel-kv\": \"api-database-vercel-kv\",\n \"vercel-postgres\": \"api-database-vercel-postgres\",\n \"view-transitions\": \"web-animation-view-transitions\",\n \"vision-camera\": \"mobile-camera-vision-camera\",\n vite: \"web-tooling-vite\",\n vitepress: \"web-meta-framework-vitepress\",\n vitest: \"web-testing-vitest\",\n \"vue-composition-api\": \"web-framework-vue-composition-api\",\n \"vue-i18n\": \"web-i18n-vue-i18n\",\n \"vue-test-utils\": \"web-testing-vue-test-utils\",\n vuetify: \"web-ui-vuetify\",\n vueuse: \"web-utilities-vueuse\",\n watermelondb: \"mobile-storage-watermelondb\",\n weaviate: \"api-vector-db-weaviate\",\n \"web-accessibility\": \"web-accessibility-web-accessibility\",\n \"web-performance\": \"web-performance-web-performance\",\n webhooks: \"api-messaging-webhooks\",\n websockets: \"web-realtime-websockets\",\n yoga: \"api-graphql-yoga\",\n \"zod-validation\": \"web-forms-zod-validation\",\n zustand: \"web-state-zustand\",\n} as const;\n\nexport type SkillSlug = keyof typeof SKILL_MAP;\nexport type SkillId = (typeof SKILL_MAP)[SkillSlug];\n\n// Derived arrays for Zod enum compatibility\n// (z.enum() requires a readonly tuple, not Object.keys/values)\nexport const SKILL_SLUGS = [\n \"angular-standalone\",\n \"ant-design\",\n \"anthropic-sdk\",\n \"api-performance\",\n \"apollo-server\",\n \"app-links\",\n \"appwrite\",\n \"astro\",\n \"auth-security\",\n \"aws-sdk\",\n \"axiom-pino-sentry\",\n \"better-auth-drizzle-hono\",\n \"biome\",\n \"ble-nfc\",\n \"bullmq\",\n \"chakra-ui\",\n \"changesets\",\n \"chroma\",\n \"clack\",\n \"claude-vision\",\n \"clerk\",\n \"cli-commander\",\n \"cli-reviewing\",\n \"cloudflare-workers\",\n \"cockroachdb\",\n \"cohere-sdk\",\n \"css-animations\",\n \"cva\",\n \"cypress-e2e\",\n \"d3\",\n \"date-fns\",\n \"detox\",\n \"dnd-kit\",\n \"docker\",\n \"docusaurus\",\n \"drizzle\",\n \"eas\",\n \"edgedb\",\n \"elasticsearch\",\n \"electron\",\n \"electron-forge\",\n \"electron-ipc\",\n \"electron-multiwindow\",\n \"electron-security\",\n \"electron-storage\",\n \"electron-testing\",\n \"electron-ui\",\n \"electron-updater\",\n \"elevenlabs\",\n \"elysia\",\n \"error-boundaries\",\n \"eslint-prettier\",\n \"expo\",\n \"expo-router\",\n \"express\",\n \"expressive-typescript\",\n \"fastify\",\n \"file-upload-patterns\",\n \"firebase\",\n \"framer-motion\",\n \"gesture-handler\",\n \"git-hooks\",\n \"github-actions\",\n \"google-gemini-sdk\",\n \"graphql-apollo\",\n \"graphql-urql\",\n \"headless-ui\",\n \"hono\",\n \"huggingface-inference\",\n \"image-handling\",\n \"jotai\",\n \"knex\",\n \"kubernetes\",\n \"langchain\",\n \"langfuse\",\n \"leaflet\",\n \"lexical\",\n \"litellm\",\n \"llamaindex\",\n \"maestro\",\n \"mantine\",\n \"mapbox\",\n \"meilisearch\",\n \"mercurius\",\n \"mistral-sdk\",\n \"mmkv\",\n \"mobx\",\n \"modal\",\n \"mongodb\",\n \"mongoose\",\n \"msw\",\n \"mui\",\n \"mysql\",\n \"native-js\",\n \"nativewind\",\n \"neon\",\n \"nestjs\",\n \"netlify\",\n \"next-intl\",\n \"nextauth\",\n \"nextjs\",\n \"ngrx-signalstore\",\n \"nuxt\",\n \"nx\",\n \"oclif-ink\",\n \"offline-first\",\n \"ollama\",\n \"openai-sdk\",\n \"openai-whisper\",\n \"openapi\",\n \"payload\",\n \"pinecone\",\n \"pinia\",\n \"planetscale\",\n \"playwright-e2e\",\n \"pnpm-workspaces\",\n \"postgresql\",\n \"posthog-analytics\",\n \"posthog-flags\",\n \"prisma\",\n \"promptfoo\",\n \"pulumi\",\n \"push\",\n \"qdrant\",\n \"qwik\",\n \"radix-ui\",\n \"react\",\n \"react-hook-form\",\n \"react-intl\",\n \"react-native\",\n \"react-native-paper\",\n \"react-native-performance\",\n \"react-native-security\",\n \"react-navigation\",\n \"react-query\",\n \"react-router\",\n \"react-testing-library\",\n \"react-three-fiber\",\n \"reanimated\",\n \"recharts\",\n \"redis\",\n \"redux-toolkit\",\n \"remix\",\n \"replicate\",\n \"research-methodology\",\n \"resend-react-email\",\n \"result-types\",\n \"reviewing\",\n \"rxjs\",\n \"sanity\",\n \"scss-modules\",\n \"sequelize\",\n \"service-workers\",\n \"setup-axiom-pino-sentry\",\n \"setup-env\",\n \"setup-posthog\",\n \"setup-resend\",\n \"shadcn-ui\",\n \"skia\",\n \"socket-io\",\n \"solidjs\",\n \"sqlite-powersync\",\n \"sse\",\n \"sst\",\n \"storybook\",\n \"strapi\",\n \"strategies\",\n \"stripe\",\n \"supabase\",\n \"surrealdb\",\n \"svelte\",\n \"sveltekit\",\n \"swr\",\n \"tailwind\",\n \"tamagui\",\n \"tanstack-form\",\n \"tanstack-router\",\n \"tanstack-table\",\n \"tasks\",\n \"tauri\",\n \"tauri-backend\",\n \"tauri-bundling\",\n \"tauri-mobile\",\n \"tauri-multiwindow\",\n \"tauri-plugins\",\n \"tauri-security\",\n \"terraform\",\n \"tiptap\",\n \"together-ai\",\n \"tool-use-patterns\",\n \"trpc\",\n \"turborepo\",\n \"turborepo-ci\",\n \"turso\",\n \"typeorm\",\n \"typescript-config\",\n \"unistyles\",\n \"upstash\",\n \"vee-validate\",\n \"vercel\",\n \"vercel-ai-sdk\",\n \"vercel-kv\",\n \"vercel-postgres\",\n \"view-transitions\",\n \"vision-camera\",\n \"vite\",\n \"vitepress\",\n \"vitest\",\n \"vue-composition-api\",\n \"vue-i18n\",\n \"vue-test-utils\",\n \"vuetify\",\n \"vueuse\",\n \"watermelondb\",\n \"weaviate\",\n \"web-accessibility\",\n \"web-performance\",\n \"webhooks\",\n \"websockets\",\n \"yoga\",\n \"zod-validation\",\n \"zustand\",\n] as const satisfies readonly SkillSlug[];\n\nexport const SKILL_IDS = [\n \"ai-infrastructure-huggingface-inference\",\n \"ai-infrastructure-litellm\",\n \"ai-infrastructure-modal\",\n \"ai-infrastructure-ollama\",\n \"ai-infrastructure-replicate\",\n \"ai-infrastructure-together-ai\",\n \"ai-observability-langfuse\",\n \"ai-observability-promptfoo\",\n \"ai-orchestration-langchain\",\n \"ai-orchestration-llamaindex\",\n \"ai-orchestration-vercel-ai-sdk\",\n \"ai-patterns-tool-use-patterns\",\n \"ai-provider-anthropic-sdk\",\n \"ai-provider-claude-vision\",\n \"ai-provider-cohere-sdk\",\n \"ai-provider-elevenlabs\",\n \"ai-provider-google-gemini-sdk\",\n \"ai-provider-mistral-sdk\",\n \"ai-provider-openai-sdk\",\n \"ai-provider-openai-whisper\",\n \"api-analytics-posthog-analytics\",\n \"api-analytics-setup-posthog\",\n \"api-auth-better-auth-drizzle-hono\",\n \"api-auth-clerk\",\n \"api-auth-nextauth\",\n \"api-baas-appwrite\",\n \"api-baas-firebase\",\n \"api-baas-neon\",\n \"api-baas-planetscale\",\n \"api-baas-supabase\",\n \"api-baas-turso\",\n \"api-caching-strategies\",\n \"api-cms-payload\",\n \"api-cms-sanity\",\n \"api-cms-strapi\",\n \"api-commerce-stripe\",\n \"api-database-cockroachdb\",\n \"api-database-drizzle\",\n \"api-database-edgedb\",\n \"api-database-knex\",\n \"api-database-mongodb\",\n \"api-database-mongoose\",\n \"api-database-mysql\",\n \"api-database-postgresql\",\n \"api-database-prisma\",\n \"api-database-redis\",\n \"api-database-sequelize\",\n \"api-database-surrealdb\",\n \"api-database-typeorm\",\n \"api-database-upstash\",\n \"api-database-vercel-kv\",\n \"api-database-vercel-postgres\",\n \"api-email-resend-react-email\",\n \"api-email-setup-resend\",\n \"api-flags-posthog-flags\",\n \"api-framework-elysia\",\n \"api-framework-express\",\n \"api-framework-fastify\",\n \"api-framework-hono\",\n \"api-framework-nestjs\",\n \"api-graphql-apollo-server\",\n \"api-graphql-mercurius\",\n \"api-graphql-yoga\",\n \"api-messaging-webhooks\",\n \"api-observability-axiom-pino-sentry\",\n \"api-observability-setup-axiom-pino-sentry\",\n \"api-performance-api-performance\",\n \"api-queue-bullmq\",\n \"api-search-elasticsearch\",\n \"api-search-meilisearch\",\n \"api-specs-openapi\",\n \"api-vector-db-chroma\",\n \"api-vector-db-pinecone\",\n \"api-vector-db-qdrant\",\n \"api-vector-db-weaviate\",\n \"cli-framework-cli-commander\",\n \"cli-framework-oclif-ink\",\n \"cli-prompts-clack\",\n \"desktop-backend-tauri\",\n \"desktop-framework-electron\",\n \"desktop-framework-tauri\",\n \"desktop-ipc-electron\",\n \"desktop-mobile-tauri\",\n \"desktop-multiwindow-electron\",\n \"desktop-multiwindow-tauri\",\n \"desktop-packaging-electron-forge\",\n \"desktop-packaging-tauri\",\n \"desktop-plugins-tauri\",\n \"desktop-security-electron\",\n \"desktop-security-tauri\",\n \"desktop-storage-electron\",\n \"desktop-testing-electron\",\n \"desktop-ui-electron\",\n \"desktop-updates-electron-updater\",\n \"infra-ci-cd-docker\",\n \"infra-ci-cd-github-actions\",\n \"infra-ci-cd-turborepo-ci\",\n \"infra-config-setup-env\",\n \"infra-containers-kubernetes\",\n \"infra-iac-pulumi\",\n \"infra-iac-sst\",\n \"infra-iac-terraform\",\n \"infra-platform-aws-sdk\",\n \"infra-platform-cloudflare-workers\",\n \"infra-platform-netlify\",\n \"infra-platform-vercel\",\n \"meta-design-expressive-typescript\",\n \"meta-methodology-research-methodology\",\n \"meta-reviewing-cli-reviewing\",\n \"meta-reviewing-reviewing\",\n \"mobile-animation-gesture-handler\",\n \"mobile-animation-reanimated\",\n \"mobile-animation-skia\",\n \"mobile-background-tasks\",\n \"mobile-camera-vision-camera\",\n \"mobile-deep-linking-app-links\",\n \"mobile-deployment-eas\",\n \"mobile-framework-expo\",\n \"mobile-framework-react-native\",\n \"mobile-hardware-ble-nfc\",\n \"mobile-navigation-expo-router\",\n \"mobile-navigation-react-navigation\",\n \"mobile-notifications-push\",\n \"mobile-performance-react-native\",\n \"mobile-security-react-native\",\n \"mobile-storage-mmkv\",\n \"mobile-storage-sqlite-powersync\",\n \"mobile-storage-watermelondb\",\n \"mobile-styling-nativewind\",\n \"mobile-styling-unistyles\",\n \"mobile-testing-detox\",\n \"mobile-testing-maestro\",\n \"mobile-ui-components-react-native-paper\",\n \"mobile-ui-components-tamagui\",\n \"shared-monorepo-nx\",\n \"shared-monorepo-pnpm-workspaces\",\n \"shared-monorepo-turborepo\",\n \"shared-security-auth-security\",\n \"shared-tooling-biome\",\n \"shared-tooling-changesets\",\n \"shared-tooling-eslint-prettier\",\n \"shared-tooling-git-hooks\",\n \"shared-tooling-typescript-config\",\n \"web-3d-react-three-fiber\",\n \"web-accessibility-web-accessibility\",\n \"web-animation-css-animations\",\n \"web-animation-framer-motion\",\n \"web-animation-view-transitions\",\n \"web-data-fetching-graphql-apollo\",\n \"web-data-fetching-graphql-urql\",\n \"web-data-fetching-swr\",\n \"web-data-fetching-trpc\",\n \"web-dataviz-d3\",\n \"web-dataviz-recharts\",\n \"web-dnd-dnd-kit\",\n \"web-editor-lexical\",\n \"web-editor-tiptap\",\n \"web-error-handling-error-boundaries\",\n \"web-error-handling-result-types\",\n \"web-files-file-upload-patterns\",\n \"web-files-image-handling\",\n \"web-forms-react-hook-form\",\n \"web-forms-tanstack-form\",\n \"web-forms-vee-validate\",\n \"web-forms-zod-validation\",\n \"web-framework-angular-standalone\",\n \"web-framework-react\",\n \"web-framework-solidjs\",\n \"web-framework-svelte\",\n \"web-framework-vue-composition-api\",\n \"web-i18n-next-intl\",\n \"web-i18n-react-intl\",\n \"web-i18n-vue-i18n\",\n \"web-maps-leaflet\",\n \"web-maps-mapbox\",\n \"web-meta-framework-astro\",\n \"web-meta-framework-docusaurus\",\n \"web-meta-framework-nextjs\",\n \"web-meta-framework-nuxt\",\n \"web-meta-framework-qwik\",\n \"web-meta-framework-remix\",\n \"web-meta-framework-sveltekit\",\n \"web-meta-framework-vitepress\",\n \"web-mocks-msw\",\n \"web-performance-web-performance\",\n \"web-pwa-offline-first\",\n \"web-pwa-service-workers\",\n \"web-realtime-socket-io\",\n \"web-realtime-sse\",\n \"web-realtime-websockets\",\n \"web-routing-react-router\",\n \"web-routing-tanstack-router\",\n \"web-server-state-react-query\",\n \"web-state-jotai\",\n \"web-state-mobx\",\n \"web-state-ngrx-signalstore\",\n \"web-state-pinia\",\n \"web-state-redux-toolkit\",\n \"web-state-zustand\",\n \"web-styling-cva\",\n \"web-styling-scss-modules\",\n \"web-styling-tailwind\",\n \"web-testing-cypress-e2e\",\n \"web-testing-playwright-e2e\",\n \"web-testing-react-testing-library\",\n \"web-testing-vitest\",\n \"web-testing-vue-test-utils\",\n \"web-tooling-storybook\",\n \"web-tooling-vite\",\n \"web-ui-ant-design\",\n \"web-ui-chakra-ui\",\n \"web-ui-headless-ui\",\n \"web-ui-mantine\",\n \"web-ui-mui\",\n \"web-ui-radix-ui\",\n \"web-ui-shadcn-ui\",\n \"web-ui-tanstack-table\",\n \"web-ui-vuetify\",\n \"web-utilities-date-fns\",\n \"web-utilities-native-js\",\n \"web-utilities-rxjs\",\n \"web-utilities-vueuse\",\n] as const satisfies readonly SkillId[];\n\n// ── Categories ─────────────────────────────────────────────────\n\nexport const CATEGORIES = [\n \"ai-infrastructure\",\n \"ai-observability\",\n \"ai-orchestration\",\n \"ai-patterns\",\n \"ai-provider\",\n \"api-analytics\",\n \"api-api\",\n \"api-auth\",\n \"api-baas\",\n \"api-caching\",\n \"api-cms\",\n \"api-commerce\",\n \"api-database\",\n \"api-email\",\n \"api-framework\",\n \"api-graphql\",\n \"api-messaging\",\n \"api-observability\",\n \"api-performance\",\n \"api-queue\",\n \"api-search\",\n \"api-specs\",\n \"api-vector-db\",\n \"cli-framework\",\n \"cli-prompts\",\n \"desktop-backend\",\n \"desktop-framework\",\n \"desktop-ipc\",\n \"desktop-mobile\",\n \"desktop-multiwindow\",\n \"desktop-packaging\",\n \"desktop-plugins\",\n \"desktop-security\",\n \"desktop-storage\",\n \"desktop-testing\",\n \"desktop-ui\",\n \"desktop-updates\",\n \"infra-ci-cd\",\n \"infra-config\",\n \"infra-containers\",\n \"infra-iac\",\n \"infra-platform\",\n \"meta-design\",\n \"meta-methodology\",\n \"meta-reviewing\",\n \"mobile-animation\",\n \"mobile-background\",\n \"mobile-camera\",\n \"mobile-deep-linking\",\n \"mobile-deployment\",\n \"mobile-framework\",\n \"mobile-hardware\",\n \"mobile-navigation\",\n \"mobile-notifications\",\n \"mobile-performance\",\n \"mobile-security\",\n \"mobile-storage\",\n \"mobile-styling\",\n \"mobile-testing\",\n \"mobile-ui-components\",\n \"shared-monorepo\",\n \"shared-security\",\n \"shared-tooling\",\n \"web-3d\",\n \"web-accessibility\",\n \"web-animation\",\n \"web-client-state\",\n \"web-dataviz\",\n \"web-dnd\",\n \"web-editor\",\n \"web-error-handling\",\n \"web-file-upload\",\n \"web-files\",\n \"web-forms\",\n \"web-framework\",\n \"web-i18n\",\n \"web-maps\",\n \"web-meta-framework\",\n \"web-mocking\",\n \"web-performance\",\n \"web-pwa\",\n \"web-realtime\",\n \"web-routing\",\n \"web-server-state\",\n \"web-styling\",\n \"web-testing\",\n \"web-tooling\",\n \"web-ui-components\",\n \"web-utilities\",\n] as const;\n\nexport type Category = (typeof CATEGORIES)[number];\n\n// ── Domains ────────────────────────────────────────────────────\n\nexport const DOMAINS = [\n \"ai\",\n \"api\",\n \"cli\",\n \"desktop\",\n \"infra\",\n \"meta\",\n \"mobile\",\n \"shared\",\n \"web\",\n] as const;\n\nexport type Domain = (typeof DOMAINS)[number];\n\n// ── Agent Names ────────────────────────────────────────────────\n\nexport const AGENT_NAMES = [\n \"agent-summoner\",\n \"ai-developer\",\n \"ai-reviewer\",\n \"api-developer\",\n \"api-pm\",\n \"api-researcher\",\n \"api-reviewer\",\n \"api-tester\",\n \"cli-developer\",\n \"cli-reviewer\",\n \"cli-tester\",\n \"codex-keeper\",\n \"convention-keeper\",\n \"infra-reviewer\",\n \"pattern-scout\",\n \"skill-summoner\",\n \"web-architecture\",\n \"web-developer\",\n \"web-pattern-critique\",\n \"web-pm\",\n \"web-researcher\",\n \"web-reviewer\",\n \"web-tester\",\n] as const;\n\nexport type AgentName = (typeof AGENT_NAMES)[number];\n","import type { CategoryPath, SkillSlug, SkillId } from \"./skills\";\nimport type { AgentName } from \"./agents\";\n\nexport type { Category, Domain } from \"./generated/source-types\";\nexport { CATEGORIES, DOMAINS } from \"./generated/source-types\";\n\n// Import locally for use within this file\nimport type { Category, Domain } from \"./generated/source-types\";\n\n/** Claude model selectors for agent configuration */\nexport const MODEL_NAMES = [\"sonnet\", \"opus\", \"haiku\", \"fable\", \"inherit\"] as const;\nexport type ModelName = (typeof MODEL_NAMES)[number];\n\n/** Reasoning effort levels for agent configuration */\nexport const EFFORT_NAMES = [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const;\nexport type EffortLevel = (typeof EFFORT_NAMES)[number];\n\n/** Agent permission modes for Claude Code tool access */\nexport const PERMISSION_MODES = [\n \"default\",\n \"acceptEdits\",\n \"dontAsk\",\n \"bypassPermissions\",\n \"plan\",\n \"delegate\",\n] as const;\nexport type PermissionMode = (typeof PERMISSION_MODES)[number];\n\n/**\n * Category definitions indexed by category ID.\n * Partial because not every Category has a category definition (e.g., a marketplace\n * may only define a subset of all possible categories).\n */\nexport type CategoryMap = Partial<Record<Category, CategoryDefinition>>;\n\n/**\n * Full domain selections used throughout the wizard pipeline (store, components, result).\n *\n * Structure: `{ domain: { category: [skillId, ...] } }`\n *\n * - Outer Partial: not all domains need selections (user may skip \"mobile\" entirely)\n * - Inner Partial: within a domain, only some categories may have selections\n * - SkillId[]: a category can have multiple skills unless `CategoryDefinition.exclusive` is true\n */\nexport type DomainSelections = Partial<Record<Domain, Partial<Record<Category, SkillId[]>>>>;\n\n/** Single category definition from skill-categories.ts */\nexport type CategoryDefinition = {\n id: Category;\n displayName: string;\n description: string;\n /** Domain for wizard domain filtering */\n domain?: Domain;\n /** If true, only one skill can be selected in this category (radio behavior). @default true */\n exclusive: boolean;\n /** If true, the user must select at least one skill before proceeding. @default false */\n required: boolean;\n /** Display order within domain (lower = earlier) */\n order: number;\n icon?: string;\n};\n\n/** Relationship rules between skills from skill-rules.ts */\nexport type RelationshipDefinitions = {\n /** Selecting one disables the others */\n conflicts: ConflictRule[];\n /** Selecting one shows warning for others but doesn't disable */\n discourages: DiscourageRule[];\n /** Flat opinionated picks — skills we actively recommend */\n recommends: Recommendation[];\n /** Skill A requires skill B to be selected first */\n requires: RequireRule[];\n /** Groups of interchangeable skills for the same purpose */\n alternatives: AlternativeGroup[];\n /** Symmetric compatibility groups — all skills in each group work together */\n compatibleWith?: CompatibilityGroup[];\n};\n\n/** Base shape for skill-group rules: a set of related slugs plus a reason */\nexport type SkillGroupRule = {\n /** Skill slugs (resolved to canonical IDs by matrix-loader) */\n skills: SkillSlug[];\n reason: string;\n};\n\n/** Mutual exclusion rule - selecting any one skill disables ALL others */\nexport type ConflictRule = SkillGroupRule;\n\n/** Soft conflict rule - selecting any one shows a warning for ALL others */\nexport type DiscourageRule = SkillGroupRule;\n\n/** Flat opinionated pick — skills we actively recommend */\nexport type Recommendation = {\n skill: SkillSlug;\n reason: string;\n};\n\n/** Symmetric compatibility group — all skills in the group work together */\nexport type CompatibilityGroup = SkillGroupRule;\n\n/** Dependency rule - skill A requires skill B to be selected first */\nexport type RequireRule = {\n skill: SkillSlug;\n /** Skill slugs that must be selected before this one */\n needs: SkillSlug[];\n /**\n * If true, only ONE of the `needs` skills is required (OR logic).\n * If false/undefined, ALL are required (AND logic).\n * @default false\n */\n needsAny?: boolean;\n reason: string;\n};\n\n/** Group of interchangeable skills serving the same purpose */\nexport type AlternativeGroup = {\n purpose: string;\n skills: SkillSlug[];\n};\n\n/** Parsed configuration from skill-rules.ts */\nexport type SkillRulesConfig = {\n version: string;\n /** Aggregate relationship rules between skills */\n relationships: RelationshipDefinitions;\n};\n\n/** Bidirectional slug <-> skill ID mapping. Partial because only extracted skills are present. */\nexport type SkillSlugMap = {\n /** Forward: slug -> canonical skill ID */\n slugToId: Partial<Record<SkillSlug, SkillId>>;\n /** Reverse: canonical skill ID -> slug */\n idToSlug: Partial<Record<SkillId, SkillSlug>>;\n};\n\n/**\n * Output of mergeMatrixWithSkills() combining skill-categories.ts + skill-rules.ts with extracted metadata.\n * This is the primary read model consumed by the wizard and CLI commands.\n */\nexport type MergedSkillsMatrix = {\n version: string;\n categories: CategoryMap;\n /** Indexed by full skill ID for O(1) lookup */\n skills: Partial<Record<SkillId, ResolvedSkill>>;\n /** Stacks with all skill aliases resolved to canonical IDs */\n suggestedStacks: ResolvedStack[];\n /** Bidirectional slug <-> ID mapping */\n slugMap: SkillSlugMap;\n /** Explicit domain definitions from agent metadata files */\n agentDefinedDomains?: Partial<Record<AgentName, Domain>>;\n /** ISO timestamp of when this matrix was generated */\n generatedAt: string;\n};\n\n/**\n * Identity/description fields shared by ExtractedSkillMetadata (pre-merge) and\n * ResolvedSkill (post-merge). Both types are `SkillCore & { extras }`; extracting\n * the common shape keeps the two skill surfaces in sync. Purely structural — no\n * runtime change (the intersection is equivalent to the flattened object).\n */\nexport type SkillCore = {\n id: SkillId;\n /** Kebab-case short key for alias resolution, search, and relationship rules (e.g., \"react\") */\n slug: SkillSlug;\n /** Title-cased label for UI display (e.g., \"React\", \"Apollo Client\") */\n displayName: string;\n description: string;\n /** When an AI agent should invoke this skill (decision criteria) */\n usageGuidance?: string;\n /** Matches key in matrix.categories; determines which wizard category grid this skill appears in */\n category: CategoryPath;\n /** Author handle (e.g., \"@vince\") from metadata.yaml */\n author: string;\n /** Relative path from src/ to the skill directory */\n path: string;\n /** True if from .claude/skills/ (user-defined local skill) */\n local?: boolean;\n /** Absolute path to local skill directory */\n localPath?: string;\n /** True if this skill was created outside the CLI's built-in vocabulary */\n custom?: boolean;\n};\n\n/**\n * Single skill with all computed relationships resolved for CLI rendering.\n * Produced by mergeMatrixWithSkills() after resolving aliases, relationships, and sources.\n */\nexport type ResolvedSkill = SkillCore & {\n /** Selecting this skill disables these others (hard exclusion) */\n conflictsWith: SkillRelation[];\n /** True if this skill is in the flat recommends list (opinionated pick) */\n isRecommended: boolean;\n /** Reason from the flat recommends entry (e.g., \"Recommended client state management\") */\n recommendedReason?: string;\n /** Skills that THIS skill requires (must select first) */\n requires: SkillRequirement[];\n /** Other skills that serve the same purpose (informational, not enforced) */\n alternatives: SkillAlternative[];\n /** Selecting this skill shows a warning for these others (soft conflict) */\n discourages: SkillRelation[];\n /**\n * Framework skill IDs this skill is compatible with.\n * Used for framework-first filtering in the Build step: if a framework is selected,\n * only skills listing that framework in compatibleWith (or with an empty list) are shown.\n */\n compatibleWith: SkillId[];\n /** All known sources that provide this skill (populated by multi-source-loader) */\n availableSources?: SkillSource[];\n /** Currently active/installed source (if any) */\n activeSource?: SkillSource;\n};\n\n/** Skill-to-skill relationship with reason */\nexport type SkillRelation = {\n skillId: SkillId;\n reason: string;\n};\n\n/** Resolved skill dependency with AND/OR logic */\nexport type SkillRequirement = {\n skillIds: SkillId[];\n /**\n * If true, only ONE of skillIds is needed (OR).\n * If false, ALL are needed (AND).\n * @default false\n */\n needsAny: boolean;\n reason: string;\n};\n\n/** Alternative skill that serves the same purpose */\nexport type SkillAlternative = {\n skillId: SkillId;\n purpose: string;\n};\n\n/** Stack with resolved skill IDs and agent mappings */\nexport type ResolvedStack = {\n id: string;\n name: string;\n description: string;\n /** Skill selections with resolved full skill IDs by category */\n skills: Partial<Record<AgentName, Partial<Record<Category, SkillId[]>>>>;\n /** Flat list of all skill IDs in this stack */\n allSkillIds: SkillId[];\n philosophy: string;\n /** UI grouping label for the stack selection screen (e.g., \"React\", \"CLI\") */\n group?: string;\n};\n\n/** Short alias used for category-level search (e.g., \"react\", \"zustand\") */\nexport type SkillAlias = string;\n\n/** Source type classification for skill provenance (where the skill comes from) */\nexport const SKILL_SOURCE_TYPES = [\"public\", \"private\", \"local\"] as const;\nexport type SkillSourceType = (typeof SKILL_SOURCE_TYPES)[number];\n\n/**\n * How a project's skills are installed: fully ejected, fully plugin-based, or a\n * mix of both. Derived at runtime from SkillConfig.source (see deriveInstallMode).\n */\nexport type InstallMode = \"eject\" | \"plugin\" | \"mixed\";\n\n/** A single source from which a skill can be obtained */\nexport type SkillSource = {\n /** Source identifier: \"public\", marketplace name, \"local\" */\n name: string;\n type: SkillSourceType;\n /** Source URL for remote sources (e.g., \"github:acme-corp/claude-skills\") */\n url?: string;\n /** Whether this source's version is currently installed on disk */\n installed: boolean;\n /** How the skill was installed on disk (separate from provenance) — a single skill is never \"mixed\" */\n installMode?: Exclude<InstallMode, \"mixed\">;\n /** True for the primary marketplace source (scoped or default public). Set by multi-source-loader. */\n primary?: boolean;\n};\n\n/** A foreign skill explicitly bound to a category via search */\nexport type BoundSkill = {\n /** The foreign skill's actual ID */\n id: SkillId;\n /** Source URL (e.g., \"github:awesome-dev/skills\") */\n sourceUrl: string;\n /** Display name of the source (e.g., \"awesome-dev\") */\n sourceName: string;\n /** Category alias this skill is bound to (e.g., \"react\") */\n boundTo: SkillAlias;\n /** Skill description from the source */\n description?: string;\n};\n\n/** Search result candidate before being bound to a category */\nexport type BoundSkillCandidate = Omit<BoundSkill, \"boundTo\"> & {\n /** Skill alias / display name from the source */\n alias: SkillAlias;\n};\n\n/** Advisory visual state for a skill option in the wizard UI */\nexport type OptionState =\n | { status: \"normal\" }\n | { status: \"recommended\"; reason: string }\n | { status: \"discouraged\"; reason: string }\n | { status: \"incompatible\"; reason: string };\n\n/**\n * Skill option as displayed in the wizard, computed based on current selections.\n * Recomputed by matrix-resolver on every selection change.\n */\nexport type SkillOption = {\n id: SkillId;\n /** Advisory state computed from matrix relationships (incompatible > discouraged > recommended > normal) */\n advisoryState: OptionState;\n /** True if this skill is currently selected by the user */\n selected: boolean;\n /** True when this skill is selected but has unmet dependency requirements */\n hasUnmetRequirements: boolean;\n /** Explains which requirements are unmet (only set when hasUnmetRequirements is true) */\n unmetRequirementsReason?: string;\n /** Other skills that serve the same purpose (for \"or try X\" hints) */\n alternatives: SkillId[];\n};\n\n/** Result of validating the current skill selections */\nexport type SelectionValidation = {\n valid: boolean;\n errors: ValidationError[];\n warnings: ValidationWarning[];\n};\n\n/** Advisory validation error (non-blocking) */\nexport type ValidationError = {\n type: \"conflict\" | \"missingRequirement\" | \"categoryExclusive\";\n message: string;\n skills: SkillId[];\n};\n\n/** Non-blocking validation warning for user awareness */\nexport type ValidationWarning = {\n type: \"missing_recommendation\";\n message: string;\n skills: SkillId[];\n};\n\n/**\n * Skill metadata extracted from SKILL.md frontmatter + metadata.yaml before matrix merge.\n *\n * Relationship fields (compatibleWith, conflictsWith, requires, etc.) are resolved from\n * centralized group-based declarations in skill-rules.ts — not from individual skill metadata.\n */\nexport type ExtractedSkillMetadata = SkillCore & {\n /** Directory path for filesystem access, e.g. \"web/framework/react\" */\n directoryPath: string;\n /** Domain this skill belongs to (e.g., \"web\", \"api\", \"cli\") */\n domain: Domain;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,SAASA,kBAAiB;AACnC,OAAOC,WAAU;AACjB,SAAS,cAAc;;;ACDhB,SAAS,gBAAgB,OAAwB;AACtD,SAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D;;;ACHA,SAAS,SAAS,iBAAiB;AAE5B,SAAS,mBAAmB,SAAiC;AAClE,QAAM,mBAAmB;AACzB,QAAM,QAAQ,QAAQ,MAAM,gBAAgB;AAE5C,MAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG;AACvB,WAAO;AAAA,EACT;AAEA,MAAI;AACF,WAAO,UAAU,MAAM,CAAC,CAAC;AAAA,EAC3B,QAAQ;AACN,WAAO;AAAA,EACT;AACF;;;ACfA,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,UAAU;;;ACHjB,SAAS,yBAAyB;AAWlC,IAAM,YAAY,IAAI,kBAAwB;AAOvC,IAAM,2BAAN,cAAuC,MAAM;AAAA,EAClD,YAAY,YAAoB;AAC9B;AAAA,MACE,GAAG,UAAU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EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAqOO,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAC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AK,KAAK,UAAU,eAAe,aAAa;AACrE,UAAI,CAAE,MAAM,WAAW,YAAY,GAAI;AACrC;AAAA,UACE,UAAU,YAAY,SAAS,WAAW,gBAAgB,eAAe,aAAa,wBAAmB,eAAe,aAAa;AAAA,QACvI;AACA;AAAA,MACF;AAAA,IACF;AAEA,QAAI;AACF,YAAM,UAAU,MAAM,SAAS,SAAS;AACxC,YAAM,cAAc,iBAAiB,SAAS,SAAS;AAEvD,UAAI,CAAC,aAAa,MAAM;AACtB,aAAK,sBAAsB,YAAY,wCAAwC;AAC/E;AAAA,MACF;AAEA,YAAM,cAAc,YAAY;AAChC,aAAO,WAAW,IAAI;AAAA,QACpB,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,aAAa,YAAY,eAAe;AAAA,MAC1C;AAEA,cAAQ,mBAAmB,WAAW,EAAE;AAAA,IAC1C,SAAS,OAAO;AACd,cAAQ,2BAA2B,SAAS,MAAM,KAAK,EAAE;AAAA,IAC3D;AAAA,EACF;AAEA,SAAO;AACT;AAMA,eAAsB,iBAAiB,WAAgD;AACrF,SAAO,kBAAkBA,MAAK,KAAK,WAAW,QAAQ,GAAG;AAAA,IACvD,YAAY;AAAA,IACZ,iBAAiB;AAAA,EACnB,CAAC;AACH;","names":["parseYaml","path","path","path","parseYaml"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cli/commands/init.tsx","../src/cli/lib/seed/seed-schema.ts","../src/cli/lib/seed/fetch-seed.ts","../src/cli/lib/seed/seed-to-wizard.ts","../src/cli/lib/permission-checker.tsx"],"sourcesContent":["import os from \"os\";\nimport React from \"react\";\n\nimport { Flags, type Interfaces } from \"@oclif/core\";\nimport { Box, Text, useApp } from \"ink\";\nimport { render } from \"../components/render.js\";\n\nimport { BaseCommand, type SourceRefreshFlags } from \"../base-command.js\";\nimport { type WizardResultV2 } from \"../components/wizard/wizard.js\";\nimport { runWizardSession } from \"../components/wizard/run-wizard-session.js\";\nimport { useTerminalDimensions } from \"../components/hooks/use-terminal-dimensions.js\";\nimport { type SourceLoadResult } from \"../lib/loading/index.js\";\nimport {\n loadSource,\n loadAgentDefs,\n copyLocalSkills,\n installPluginSkills,\n pluginInstallFailureError,\n writeProjectConfig,\n compileAgentsAllScopes,\n type CompilationResult,\n type SkillCopyResult,\n discoverInstalledSkills,\n} from \"../lib/operations/index.js\";\nimport type { GateReport } from \"../lib/config-gate/index.js\";\nimport { fetchSeedConfig } from \"../lib/seed/fetch-seed.js\";\nimport { seedToWizardResult } from \"../lib/seed/seed-to-wizard.js\";\nimport { getInstallationInfo } from \"../lib/plugins/plugin-info.js\";\nimport {\n loadProjectConfig,\n loadProjectConfigFromDir,\n} from \"../lib/configuration/project-config.js\";\nimport {\n type InstallMode,\n detectInstallation,\n detectGlobalInstallation,\n deriveInstallMode,\n resolveInstallPaths,\n buildAgentScopeMap,\n isHomeDirectory,\n INSTALL_MODE_LABELS,\n} from \"../lib/installation/index.js\";\nimport { checkPermissions } from \"../lib/permission-checker.js\";\nimport {\n ASCII_LOGO,\n CLAUDE_SRC_DIR,\n CLI_INVOKE_COMMAND,\n DEFAULT_BRANDING,\n EDIT_PROJECT_SETUP_FLAG,\n EJECT_SOURCE,\n STANDARD_FILES,\n} from \"../consts.js\";\nimport { clearTerminalScreen } from \"../utils/terminal.js\";\nimport { SelectList, type SelectListItem } from \"../components/common/select-list.js\";\nimport { promptValue } from \"../components/common/prompt-confirm.js\";\nimport { Spinner } from \"../components/common/spinner.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport type { AgentName, ProjectConfig, SkillScope } from \"../types/index.js\";\nimport { type StartupMessage } from \"../utils/logger.js\";\nimport { SUCCESS_MESSAGES, STATUS_MESSAGES } from \"../utils/messages.js\";\n\nconst DASHBOARD_OPTIONS = [\n { label: \"Edit\", value: \"edit\" },\n { label: \"Compile\", value: \"compile\" },\n { label: \"Doctor\", value: \"doctor\" },\n { label: \"List\", value: \"list\" },\n] as const satisfies readonly SelectListItem<string>[];\n\n/** The commands offered by the project dashboard (single source: DASHBOARD_OPTIONS). */\nexport type DashboardCommand = (typeof DASHBOARD_OPTIONS)[number][\"value\"];\n\ntype DashboardProps = {\n onSelect: (command: DashboardCommand) => void;\n onCancel: () => void;\n};\n\nconst Dashboard: React.FC<DashboardProps> = ({ onSelect, onCancel }) => {\n const { exit } = useApp();\n const { rows: terminalHeight } = useTerminalDimensions();\n\n return (\n <Box flexDirection=\"column\" height={terminalHeight}>\n <Box marginBottom={1}>\n <Text>{ASCII_LOGO}</Text>\n </Box>\n <SelectList\n items={DASHBOARD_OPTIONS}\n onSelect={(command) => {\n onSelect(command);\n exit();\n }}\n onCancel={() => {\n onCancel();\n exit();\n }}\n />\n </Box>\n );\n};\n\n/** Formats the dashboard summary as plain text lines (for non-interactive/test output). */\nexport function formatDashboardText(data: DashboardData): string {\n const modeLabel = INSTALL_MODE_LABELS[data.mode];\n const lines = [\n DEFAULT_BRANDING.NAME,\n \"\",\n ` Skills: ${data.skillCount} installed`,\n ` Agents: ${data.agentCount} compiled`,\n ` Mode: ${modeLabel}`,\n ];\n if (data.source) {\n lines.push(` Source: ${data.source}`);\n }\n lines.push(\"\");\n lines.push(` [Edit] [Compile] [Doctor] [List]`);\n return lines.join(\"\\n\");\n}\n\n/**\n * Shows the project dashboard and returns the selected command (or null if cancelled).\n * In non-interactive environments (no TTY), prints the summary text and returns null.\n */\nexport async function showDashboard(\n projectDir: string,\n log?: (message: string) => void,\n): Promise<DashboardCommand | null> {\n const data = await getDashboardData(projectDir);\n\n // Non-interactive: print text summary and exit (CI, piped, tests)\n if (!process.stdin.isTTY) {\n const output = log ?? console.log;\n output(formatDashboardText(data));\n return null;\n }\n\n // First-wins resolution via promptValue; clearOnResolve repaints a clean\n // terminal before unmount (dashboard occupies the full height).\n const selectedCommand = await promptValue<DashboardCommand | null>(\n (resolve) => (\n <Dashboard onSelect={(command) => resolve(command)} onCancel={() => resolve(null)} />\n ),\n { onExit: null, clearOnResolve: true },\n );\n\n clearTerminalScreen();\n\n return selectedCommand;\n}\n\n/**\n * Why the dashboard is on screen.\n *\n * `\"init\"` — the user ran `cc init` in an already-installed directory. That is a request\n * to set this project up, so choosing Edit continues the setup: it must materialise the\n * project even if the wizard changes nothing.\n *\n * `\"standalone\"` — the bare `cc` dashboard. Edit is just an editor there; a pass with no\n * changes is an inspection and must leave the filesystem untouched.\n */\nexport type DashboardOrigin = \"init\" | \"standalone\";\n\n/** The extra argv a dashboard selection needs to carry its origin into the command. */\nfunction dashboardCommandArgv(command: DashboardCommand, origin: DashboardOrigin): string[] {\n if (command !== \"edit\" || origin !== \"init\") return [];\n return [`--${EDIT_PROJECT_SETUP_FLAG}`];\n}\n\n/**\n * Shared dashboard entry: when the project is already initialized, shows the\n * dashboard and runs the chosen command. Returns true when the project was\n * initialized (dashboard shown), false otherwise. Never exits the process —\n * callers decide (the init hook exits SUCCESS at its own call site).\n */\nexport async function runDashboardFlow(\n projectDir: string,\n config: Interfaces.Config,\n origin: DashboardOrigin,\n log?: (message: string) => void,\n): Promise<boolean> {\n const installation = await detectInstallation(projectDir);\n if (!installation) return false;\n\n const selectedCommand = await showDashboard(projectDir, log);\n if (selectedCommand) {\n await config.runCommand(selectedCommand, dashboardCommandArgv(selectedCommand, origin));\n }\n return true;\n}\n\n/**\n * What `init` decided to install, and the little each producer knows that the shared spine does\n * not. Keeping these on the value rather than branching on a flag downstream is what stops the\n * two paths growing separate copies of the install sequence.\n */\ntype Selection = {\n result: WizardResultV2;\n sourceResult: SourceLoadResult;\n /** Whether a person is at the terminal, so the permission notice may wait for them. */\n interactive: boolean;\n /** What to say if the selection turns out to be empty — only the producer knows why it is. */\n emptyMessage: string;\n};\n\nexport default class Init extends BaseCommand {\n static summary = `Initialize ${DEFAULT_BRANDING.NAME} in this project`;\n static description =\n \"Interactive wizard to set up skills and agents. Supports Plugin Mode (native install) and Eject Mode (copy to .claude/).\";\n\n static examples = [\n {\n description: \"Start the setup wizard\",\n command: \"<%= config.bin %> <%= command.id %>\",\n },\n {\n description: \"Initialize from a custom marketplace\",\n command: \"<%= config.bin %> <%= command.id %> --source github:org/marketplace\",\n },\n {\n description: \"Force refresh skills from remote\",\n command: \"<%= config.bin %> <%= command.id %> --refresh\",\n },\n ];\n\n static flags = {\n ...BaseCommand.baseFlags,\n refresh: Flags.boolean({\n description: \"Force refresh from remote source\",\n default: false,\n }),\n from: Flags.string({\n description: \"Install a configuration shared from agentsinc.sh by its id, without the wizard\",\n helpValue: \"<id>\",\n }),\n };\n\n /**\n * One spine, two producers. The wizard and a shared id differ only in *where the selection\n * comes from* — everything after it (the empty guard, the install pipeline) is identical, so it\n * lives here once rather than being written twice and drifting.\n */\n async run(): Promise<void> {\n const { flags } = await this.parse(Init);\n const projectDir = process.cwd();\n\n // Only a bare `init` is diverted to the dashboard. An id is an explicit instruction to install\n // *that* configuration, so it overrides an existing installation instead.\n if (!flags.from && (await this.showDashboardIfInitialized(projectDir))) return;\n\n const selection = flags.from\n ? await this.selectionFromSharedConfig(flags.from, flags)\n : await this.selectionFromWizard(flags, projectDir);\n\n if (!selection) this.exit(EXIT_CODES.CANCELLED);\n\n // A sub-agent is installable on its own — it has front-matter, a prompt and a compiled file\n // without owning a single skill — so only a selection with neither is nothing to install.\n if (selection.result.skills.length === 0 && selection.result.selectedAgents.length === 0) {\n // The producer supplies the wording because only it knows why empty means what it means:\n // nothing chosen, versus a payload this catalog cannot install.\n this.error(selection.emptyMessage, { exit: EXIT_CODES.ERROR });\n }\n\n await this.handleInstallation(\n selection.result,\n selection.sourceResult,\n flags,\n selection.interactive,\n );\n }\n\n /** The interactive producer: load the source, run the wizard, return what was chosen. */\n private async selectionFromWizard(\n flags: SourceRefreshFlags,\n projectDir: string,\n ): Promise<Selection | null> {\n // The blank global config is created by writeProjectConfig() once the\n // wizard succeeds, never before it renders: a cancelled init must leave no\n // artifact that the next run could mistake for an existing installation.\n const isGlobalRoot = isHomeDirectory(projectDir);\n\n const { unmount, clear: clearSpinner } = render(\n <Spinner label={STATUS_MESSAGES.LOADING_SKILLS} />,\n );\n const [{ sourceResult, startupMessages }, globalConfig] = await Promise.all([\n this.loadSourceOrFail(flags),\n this.loadGlobalConfigIfExists(),\n ]);\n clearSpinner();\n unmount();\n\n const result = await this.runWizard(\n sourceResult,\n startupMessages,\n projectDir,\n globalConfig,\n isGlobalRoot,\n );\n if (!result) return null;\n\n return {\n result,\n sourceResult,\n // A person is already at the terminal, so the permission notice can wait for them.\n interactive: true,\n emptyMessage: \"No skills selected\",\n };\n }\n\n /**\n * The `--from <id>` producer: fetch and map, no wizard. Nothing here may assume a TTY — running\n * headless is most of why the flag exists.\n */\n private async selectionFromSharedConfig(\n id: string,\n flags: SourceRefreshFlags,\n ): Promise<Selection> {\n this.log(`Fetching configuration ${id}...`);\n const fetched = await fetchSeedConfig(id);\n if (!fetched.ok) {\n this.error(fetched.error, { exit: EXIT_CODES.ERROR });\n }\n\n const { sourceResult } = await this.loadSourceOrFail(flags);\n const { result, skippedSkillIds, skippedAgentNames } = seedToWizardResult(\n fetched.payload,\n sourceResult.matrix,\n );\n\n // Named, not counted. \"3 skills were skipped\" cannot be acted on; the ids can, and this is the\n // one moment the user can tell whether what they shared is what they are getting.\n if (skippedSkillIds.length > 0) {\n this.warn(\n `Skipped ${skippedSkillIds.length} skill(s) this catalog does not know: ${skippedSkillIds.join(\", \")}`,\n );\n }\n if (skippedAgentNames.length > 0) {\n this.warn(\n `Skipped ${skippedAgentNames.length} unknown sub-agent(s): ${skippedAgentNames.join(\", \")}`,\n );\n }\n\n if (result.skills.length > 0) {\n this.log(\n `Installing ${result.skills.length} skill(s) across ${result.selectedAgents.length} sub-agent(s)\\n`,\n );\n }\n\n return {\n result,\n sourceResult,\n interactive: false,\n emptyMessage: `Configuration '${id}' contains no skills this catalog can install.`,\n };\n }\n\n private async showDashboardIfInitialized(projectDir: string): Promise<boolean> {\n return runDashboardFlow(projectDir, this.config, \"init\", (msg) => this.log(msg));\n }\n\n private async loadGlobalConfigIfExists(): Promise<ProjectConfig | null> {\n const globalInstall = await detectGlobalInstallation();\n if (!globalInstall) return null;\n const loaded = await loadProjectConfigFromDir(os.homedir());\n return loaded?.config ?? null;\n }\n\n private async loadSourceOrFail(flags: {\n source?: string;\n refresh: boolean;\n }): Promise<{ sourceResult: SourceLoadResult; startupMessages: StartupMessage[] }> {\n try {\n const loaded = await loadSource({\n sourceFlag: flags.source,\n projectDir: process.cwd(),\n forceRefresh: flags.refresh,\n captureStartupMessages: true,\n });\n return { sourceResult: loaded.sourceResult, startupMessages: loaded.startupMessages };\n } catch (error) {\n this.error(getErrorMessage(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n }\n\n private async runWizard(\n sourceResult: SourceLoadResult,\n startupMessages: StartupMessage[],\n projectDir: string,\n globalConfig: ProjectConfig | null,\n isGlobalRoot: boolean,\n ): Promise<WizardResultV2 | null> {\n return runWizardSession({\n hydrate: {\n initialAgents: globalConfig?.selectedAgents,\n installedSkillIds: globalConfig?.skills?.map((s) => s.id),\n installedSkillConfigs: globalConfig?.skills,\n installedAgentConfigs: globalConfig?.agents,\n isEditingFromGlobalScope: isGlobalRoot,\n },\n props: {\n version: this.config.version,\n logo: ASCII_LOGO,\n initialAgents: globalConfig?.selectedAgents,\n installedSkillIds: globalConfig?.skills?.map((s) => s.id),\n projectDir,\n startupMessages,\n },\n onCancel: () => this.log(\"Setup cancelled\"),\n clearTerminal: () => this.clearTerminal(),\n });\n }\n\n private async handleInstallation(\n result: WizardResultV2,\n sourceResult: SourceLoadResult,\n flags: SourceRefreshFlags,\n /**\n * Whether the caller can hold the terminal. The permission notice is an Ink app with no exit\n * of its own, so `waitUntilExit()` only ever resolves because a person is there to end it —\n * which is fine after the wizard and a hang everywhere else. `--from` sets this false: it has\n * to complete over a pipe and in CI.\n */\n interactive = true,\n ): Promise<void> {\n const projectDir = process.cwd();\n const activeSkills = result.skills.filter((s) => !s.excluded);\n const installMode = deriveInstallMode(activeSkills);\n const ejectedSkills = activeSkills.filter((s) => s.source === EJECT_SOURCE);\n const pluginSkills = activeSkills.filter((s) => s.source !== EJECT_SOURCE);\n\n this.logInstallPlan(installMode, ejectedSkills, pluginSkills);\n\n // Resolve marketplace up front — BEFORE any filesystem mutation. If\n // resolution fails in mixed mode, the hard-error must fire before\n // `copyEjectSkillsStep` copies anything to `.claude/skills/`, otherwise\n // we leave an orphaned half-install with no config.ts to recognise it.\n const resolvedMarketplace =\n pluginSkills.length > 0\n ? await this.requireMarketplaceOrExit(\n sourceResult,\n \"install plugin skills\",\n (marketplace) => this.log(`Registering marketplace \"${marketplace}\"...`),\n )\n : null;\n\n const copyResult =\n installMode === \"eject\" || installMode === \"mixed\"\n ? await this.copyEjectSkillsStep(ejectedSkills, projectDir, sourceResult, installMode)\n : null;\n\n if (resolvedMarketplace !== null) {\n await this.installPluginsStep(pluginSkills, resolvedMarketplace, projectDir);\n }\n // installPluginsStep hard-errors on any failure, so reaching here with a\n // resolved marketplace means plugin mode fully succeeded.\n const pluginModeSucceeded = resolvedMarketplace !== null;\n\n try {\n const { configResult, compileResult, agentScopeMap } = await this.writeConfigAndCompile(\n result,\n sourceResult,\n flags,\n );\n this.reportSuccess(\n configResult,\n compileResult,\n agentScopeMap,\n installMode,\n pluginModeSucceeded,\n copyResult,\n );\n\n const permissionWarning = await checkPermissions(projectDir);\n if (permissionWarning) {\n if (interactive) {\n const { waitUntilExit } = render(permissionWarning);\n await waitUntilExit();\n } else {\n // Render one frame and let go. The notice is information, not a prompt — there is\n // nothing to answer, so nothing to wait for.\n const { unmount } = render(permissionWarning);\n unmount();\n }\n }\n } catch (error) {\n this.handleError(error);\n }\n }\n\n private logInstallPlan(\n installMode: InstallMode,\n ejectedSkills: WizardResultV2[\"skills\"],\n pluginSkills: WizardResultV2[\"skills\"],\n ): void {\n this.log(\"\\n\");\n this.log(`Selected ${ejectedSkills.length + pluginSkills.length} skills`);\n this.log(\n `Install mode: ${\n installMode === \"plugin\"\n ? `${INSTALL_MODE_LABELS.plugin} (native install)`\n : installMode === \"mixed\"\n ? `${INSTALL_MODE_LABELS.mixed} (${ejectedSkills.length} eject, ${pluginSkills.length} plugin)`\n : `${INSTALL_MODE_LABELS.eject} (copy to .claude/skills/)`\n }`,\n );\n }\n\n private async copyEjectSkillsStep(\n localSkills: WizardResultV2[\"skills\"],\n projectDir: string,\n sourceResult: SourceLoadResult,\n installMode: InstallMode,\n ): Promise<SkillCopyResult> {\n this.log(\"Copying skills to local directory...\");\n const copyResult = await copyLocalSkills(localSkills, projectDir, sourceResult);\n\n if (installMode === \"mixed\") {\n if (copyResult.projectCopied.length > 0 && copyResult.globalCopied.length > 0) {\n this.log(\n `Copied ${copyResult.totalCopied} local skills (${copyResult.projectCopied.length} project, ${copyResult.globalCopied.length} global)`,\n );\n } else if (copyResult.globalCopied.length > 0) {\n this.log(`Copied ${copyResult.globalCopied.length} local skills to ~/.claude/skills/`);\n } else {\n this.log(`Copied ${copyResult.projectCopied.length} local skills to .claude/skills/`);\n }\n } else {\n this.log(`Copied ${copyResult.totalCopied} skills to .claude/skills/\\n`);\n }\n\n return copyResult;\n }\n\n private async installPluginsStep(\n pluginSkills: WizardResultV2[\"skills\"],\n marketplace: string,\n projectDir: string,\n ): Promise<void> {\n this.log(\"Installing skill plugins...\");\n const pluginResult = await installPluginSkills(pluginSkills, marketplace, projectDir);\n\n for (const item of pluginResult.installed) {\n this.log(` Installed ${item.ref}`);\n }\n for (const item of pluginResult.failed) {\n this.warn(`Failed to install plugin ${item.id}: ${item.error}`);\n }\n\n // Plugin install intent is inviolable — if any skill failed to install, hard-error\n // BEFORE `writeConfigAndCompile` writes config.ts with orphan entries claiming\n // the skill is installed. Matches the no-plugin-to-eject-fallback rule.\n if (pluginResult.failed.length > 0) {\n this.error(pluginInstallFailureError(pluginResult.failed.length), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n this.log(`Installed ${pluginResult.installed.length} skill plugins\\n`);\n }\n\n private async writeConfigAndCompile(\n result: WizardResultV2,\n sourceResult: SourceLoadResult,\n flags: SourceRefreshFlags,\n ): Promise<{\n configResult: Awaited<ReturnType<typeof writeProjectConfig>>;\n compileResult: CompilationResult;\n agentScopeMap: Map<AgentName, SkillScope>;\n }> {\n this.log(\"Generating configuration...\");\n const configResult = await writeProjectConfig({\n wizardResult: result,\n sourceResult,\n projectDir: process.cwd(),\n sourceFlag: flags.source,\n });\n\n if (configResult.wasMerged) {\n this.log(`Merged with existing config at ${configResult.existingConfigPath}`);\n }\n\n this.log(`Configuration saved (${configResult.config.agents.length} agents)\\n`);\n\n this.log(STATUS_MESSAGES.COMPILING_AGENTS);\n const cwd = process.cwd();\n const agentDefs = await loadAgentDefs();\n const { allSkills } = await discoverInstalledSkills(cwd);\n const agentScopeMap = buildAgentScopeMap(configResult.config);\n const compileResult = await compileAgentsAllScopes({\n projectDir: cwd,\n sourcePath: agentDefs.sourcePath,\n skills: allSkills,\n agentScopeMap,\n });\n this.log(`Compiled ${compileResult.compiled.length} agents\\n`);\n\n this.reportPropagatedRecompile(configResult.propagation);\n\n return { configResult, compileResult, agentScopeMap };\n }\n\n /**\n * Renders the recompile the gated write already performed on every OTHER\n * registered project this run's global change was propagated into.\n */\n private reportPropagatedRecompile(propagation: GateReport): void {\n if (propagation.propagated.updated.length === 0) return;\n\n const { recompiledCount, failedCount, warnings } = propagation.recompile;\n for (const warning of warnings) {\n this.warn(warning);\n }\n\n const failureSuffix = failedCount > 0 ? ` (${failedCount} failed)` : \"\";\n this.log(`Recompiled agents in ${recompiledCount} registered projects${failureSuffix}\\n`);\n }\n\n private reportSuccess(\n configResult: Awaited<ReturnType<typeof writeProjectConfig>>,\n compileResult: CompilationResult,\n agentScopeMap: Map<AgentName, SkillScope>,\n installMode: InstallMode,\n pluginModeSucceeded: boolean,\n copyResult: SkillCopyResult | null,\n ): void {\n this.log(`${SUCCESS_MESSAGES.INIT_SUCCESS}\\n`);\n\n const isEjectOutput =\n installMode === \"eject\" || (installMode === \"mixed\" && !pluginModeSucceeded);\n if (isEjectOutput && copyResult && copyResult.totalCopied > 0) {\n this.reportSkillsCopied(copyResult);\n }\n this.reportAgentsCompiled(compileResult.compiled, agentScopeMap);\n this.log(\"Configuration:\");\n this.log(` ${configResult.configPath}`);\n this.log(\"\");\n this.log(\"To customize agent-skill assignments:\");\n this.log(` 1. Edit ${CLAUDE_SRC_DIR}/${STANDARD_FILES.CONFIG_TS}`);\n this.log(` 2. Run '${CLI_INVOKE_COMMAND} compile' to regenerate agents`);\n this.log(\"\");\n }\n\n /**\n * Reports where the skills actually landed. `copyLocalSkills` splits by scope,\n * so a default install driven from a project directory writes every skill\n * under HOME — reporting the project path there names a directory that was\n * never written.\n *\n * This block is a filesystem listing, so the entries are the on-disk directory\n * names — skill ids, not display names. `copySkillsToLocalFlattened` names each\n * destination directory after `skill.id`, so a user can copy any line and `cd`\n * into it.\n */\n private reportSkillsCopied(copyResult: SkillCopyResult): void {\n const cwd = process.cwd();\n const groups = isHomeDirectory(cwd)\n ? [\n {\n dir: resolveInstallPaths(cwd, \"project\").skillsDir,\n copied: [...copyResult.globalCopied, ...copyResult.projectCopied],\n },\n ]\n : [\n { dir: resolveInstallPaths(cwd, \"global\").skillsDir, copied: copyResult.globalCopied },\n { dir: resolveInstallPaths(cwd, \"project\").skillsDir, copied: copyResult.projectCopied },\n ].filter((group) => group.copied.length > 0);\n\n for (const group of groups) {\n this.log(\"Skills copied to:\");\n this.log(` ${group.dir}`);\n for (const copied of group.copied) {\n this.log(` ${copied.skillId}/`);\n }\n this.log(\"\");\n }\n }\n\n /**\n * Reports where the agents actually landed, mirroring the scope split\n * `compileAgentsAllScopes` performs: one pass at the home root, otherwise a\n * global pass under HOME and a project pass under the project directory.\n */\n private reportAgentsCompiled(\n compiled: AgentName[],\n agentScopeMap: Map<AgentName, SkillScope>,\n ): void {\n const cwd = process.cwd();\n const groups = isHomeDirectory(cwd)\n ? [{ dir: resolveInstallPaths(cwd, \"project\").agentsDir, agents: compiled }]\n : [\n {\n dir: resolveInstallPaths(cwd, \"global\").agentsDir,\n agents: compiled.filter((name) => agentScopeMap.get(name) === \"global\"),\n },\n {\n dir: resolveInstallPaths(cwd, \"project\").agentsDir,\n agents: compiled.filter((name) => agentScopeMap.get(name) !== \"global\"),\n },\n ].filter((group) => group.agents.length > 0);\n\n for (const group of groups) {\n this.log(\"Agents compiled to:\");\n this.log(` ${group.dir}`);\n for (const agentName of group.agents) {\n this.log(` ${agentName}.md`);\n }\n this.log(\"\");\n }\n }\n}\n\nexport type DashboardData = {\n skillCount: number;\n agentCount: number;\n mode: InstallMode;\n source?: string;\n};\n\n/**\n * Gathers dashboard data from the installation and project config.\n *\n * Both counts come from the same scope-aware installation so the summary cannot\n * mix a project-only figure with a global one — a default install driven from a\n * project directory puts every skill and agent under HOME.\n */\nexport async function getDashboardData(projectDir: string): Promise<DashboardData> {\n const [info, loaded] = await Promise.all([getInstallationInfo(), loadProjectConfig(projectDir)]);\n\n const activeSkills = loaded?.config?.skills?.filter((s) => !s.excluded);\n const skillCount = info?.skillCount ?? 0;\n const agentCount = info?.agentCount ?? 0;\n const mode = info?.mode ?? (activeSkills ? deriveInstallMode(activeSkills) : \"eject\");\n const source = loaded?.config?.source;\n\n return { skillCount, agentCount, mode, source };\n}\n","import { z } from \"zod\";\n\n/**\n * VENDORED from `packages/matrix/src/seed.ts` — keep in sync.\n *\n * The wire contract for configs shared from agentsinc.sh. The web app POSTs a payload to the\n * config store and gets a short id back; `npx agents-inc init --from <id>` fetches that id and\n * validates it with this same schema.\n *\n * The reason for copying rather than depending has expired. It was that a shared package spanning\n * two repositories would need publishing and a release step for forty lines of Zod that no consumer\n * had exercised. The repositories merged on 2026-08-03, so `packages/matrix` is now a workspace\n * sibling: `@workspace/matrix` could be depended on directly, with no publish and no versioning.\n *\n * What keeps the copy is inertia, not that argument — nothing has re-examined it since the merge,\n * and this package deliberately ships to npm while `@workspace/matrix` is private, so a dependency\n * would have to be bundled rather than declared. De-duplicating is D-239's job, and D-239's premise\n * changed with the merge too.\n */\n\n/**\n * Bump when the payload shape changes. Only the current version is accepted: pre-1.0 policy is to\n * fail a stale id loudly rather than migrate it, so what installs is always what was shared.\n *\n * v3 gave the sub-agent its own scope. An additive-optional field would not normally need a\n * version, but this schema strips what it does not declare — so the version is what tells a\n * sharing app the field actually survives the trip.\n */\nexport const SEED_VERSION = 3;\n\nexport const seedModelSchema = z.enum([\"opus\", \"fable\", \"sonnet\", \"haiku\"]);\nexport const seedEffortSchema = z.enum([\"low\", \"medium\", \"high\", \"xhigh\", \"max\"]);\nexport const seedLoadStateSchema = z.enum([\"lazy\", \"preloaded\"]);\n\nexport const seedSkillSchema = z.object({\n install: z.enum([\"plugin\", \"eject\"]),\n scope: z.enum([\"project\", \"global\"]),\n /** Sub-agent id -> load state; presence is assignment. */\n assignments: z.record(z.string(), seedLoadStateSchema),\n});\n\n/**\n * What a shared configuration says about one sub-agent. Every field is optional because each says\n * something different on its own: `on: true` is the only way a sub-agent with no skills of its own\n * can travel, while model/effort are overrides for an agent an assignment already selects.\n */\nexport const seedAgentSchema = z.object({\n /** Explicitly switched on (bare) or off. Absent means \"whatever the assignments imply\". */\n on: z.boolean().optional(),\n model: seedModelSchema.optional(),\n effort: seedEffortSchema.optional(),\n /**\n * Which `.claude/agents` directory this sub-agent's front-matter is written to. Absent means\n * `project` — the CLI's own default, so a resting choice never has to travel.\n */\n scope: z.enum([\"project\", \"global\"]).optional(),\n});\n\n/**\n * Ids are full catalog slugs, never positional indices, so a payload survives catalog churn:\n * consumers warn and skip unknown ids rather than failing the whole decode.\n */\nexport const seedPayloadSchema = z.object({\n v: z.literal(SEED_VERSION),\n /**\n * Diagnostics only. A mismatch with this CLI's matrix must never fail a decode — it explains\n * why some ids were skipped, it does not decide whether to try.\n */\n matrixVersion: z.string(),\n stackId: z.string().nullable(),\n /** Sparse — presence is selection. `remembered` never leaves the browser. */\n skills: z.record(z.string(), seedSkillSchema),\n /** Sparse — an agent with nothing to say has no entry. */\n agents: z.record(z.string(), seedAgentSchema),\n});\n\nexport type SeedModel = z.infer<typeof seedModelSchema>;\nexport type SeedEffort = z.infer<typeof seedEffortSchema>;\nexport type SeedLoadState = z.infer<typeof seedLoadStateSchema>;\nexport type SeedSkill = z.infer<typeof seedSkillSchema>;\nexport type SeedAgent = z.infer<typeof seedAgentSchema>;\nexport type SeedPayload = z.infer<typeof seedPayloadSchema>;\n","import { seedPayloadSchema, type SeedPayload } from \"./seed-schema.js\";\n\n/** The config store behind agentsinc.sh. Overridable so tests never touch the network. */\nexport const SEED_API_URL = process.env.AGENTS_INC_API_URL ?? \"https://api.agentsinc.sh\";\n\n/**\n * Identifies this fetch as the CLI rather than a browser.\n *\n * `GET /configs/:id` is the only place either side can observe a config being *installed* rather\n * than merely built, and the worker can only separate that from someone opening a share link if\n * we say so. Without this the conversion signal does not exist.\n */\nexport const SEED_USER_AGENT = \"agents-inc-cli\";\n\nexport type FetchSeedResult = { ok: true; payload: SeedPayload } | { ok: false; error: string };\n\n/**\n * Fetches and validates a shared configuration.\n *\n * Every failure is a message rather than a throw: this runs before anything has been written, so\n * there is nothing to roll back and the caller's job is to explain rather than recover.\n */\nexport async function fetchSeedConfig(id: string): Promise<FetchSeedResult> {\n const url = `${SEED_API_URL}/configs/${encodeURIComponent(id)}`;\n\n let response: Response;\n try {\n response = await fetch(url, {\n headers: { accept: \"application/json\", \"user-agent\": SEED_USER_AGENT },\n });\n } catch {\n return { ok: false, error: `Could not reach ${SEED_API_URL} — check your connection.` };\n }\n\n if (response.status === 404) {\n return { ok: false, error: `No configuration found for id '${id}'.` };\n }\n if (!response.ok) {\n return { ok: false, error: `Fetching configuration failed (HTTP ${response.status}).` };\n }\n\n let body: unknown;\n try {\n body = await response.json();\n } catch {\n return { ok: false, error: \"The configuration store returned something that is not JSON.\" };\n }\n\n const parsed = seedPayloadSchema.safeParse(body);\n if (!parsed.success) {\n // Validated on the way in, so a stored payload that no longer parses means the contract moved\n // underneath it — worth saying plainly rather than reporting a generic failure.\n return {\n ok: false,\n error: `Configuration '${id}' does not match the expected format — it may have been created by a newer version.`,\n };\n }\n\n return { ok: true, payload: parsed.data };\n}\n","import { AGENT_NAMES } from \"../../types/agents.js\";\nimport { DEFAULT_PUBLIC_SOURCE_NAME } from \"../../consts.js\";\nimport { getCategoryDomain } from \"../matrix/matrix-provider.js\";\nimport { orderDomains } from \"../wizard/domain-order.js\";\n\nimport type { WizardResultV2 } from \"../../components/wizard/wizard.js\";\nimport type { AgentName } from \"../../types/agents.js\";\nimport type { AgentScopeConfig, SkillConfig } from \"../../types/config.js\";\nimport type {\n Category,\n Domain,\n DomainSelections,\n MergedSkillsMatrix,\n ResolvedSkill,\n} from \"../../types/matrix.js\";\nimport type { SkillAssignment, SkillId } from \"../../types/skills.js\";\nimport type { StackAgentConfig } from \"../../types/stacks.js\";\nimport type { SeedAgent, SeedLoadState, SeedPayload } from \"./seed-schema.js\";\n\nexport type SeedMapping = {\n result: WizardResultV2;\n /** Ids this matrix does not know. Reported, never fatal — see the decode policy. */\n skippedSkillIds: string[];\n skippedAgentNames: string[];\n};\n\nconst KNOWN_AGENTS = new Set<string>(AGENT_NAMES);\n\n/** A skill's primary source, or the default marketplace. Mirrors the wizard's own resolution. */\nfunction sourceForSkill(skill: ResolvedSkill | undefined): string {\n return skill?.availableSources?.find((s) => s.primary)?.name ?? DEFAULT_PUBLIC_SOURCE_NAME;\n}\n\nfunction addToDomainSelections(\n selections: DomainSelections,\n domain: Domain,\n category: Category,\n skillId: SkillId,\n): void {\n const categorySelections = (selections[domain] ??= {});\n const skillList = (categorySelections[category] ??= []);\n if (!skillList.includes(skillId)) skillList.push(skillId);\n}\n\n/**\n * The stack mirror of {@link addToDomainSelections}: one sub-agent's own category lists, appended\n * in payload order. A `(skill, sub-agent)` pair can only occur once — `skills` is keyed by id — so\n * there is nothing to de-duplicate here.\n */\nfunction addToAgentStack(\n stack: Partial<Record<AgentName, StackAgentConfig>>,\n agent: AgentName,\n category: Category,\n assignment: SkillAssignment,\n): void {\n const agentStack = (stack[agent] ??= {});\n const assignments = (agentStack[category] ??= []);\n assignments.push(assignment);\n}\n\n/** A load state is per `(skill, sub-agent)`; `preloaded` is the stack's word for the same thing. */\nfunction toSkillAssignment(skillId: SkillId, load: SeedLoadState): SkillAssignment {\n return { id: skillId, preloaded: load === \"preloaded\" };\n}\n\n/** The payload's `agents` map, split by what this catalog can do with each entry. */\ntype SeedAgentMap = {\n /** Known agents the map has something to say about, keyed by name. */\n known: Map<AgentName, SeedAgent>;\n /** Names explicitly switched off — dropped, and their assignment rows ignored with them. */\n switchedOff: Set<string>;\n /** Names this catalog does not know. Reported, never fatal — same policy as unknown skill ids. */\n unknown: string[];\n};\n\nfunction readAgentMap(agents: SeedPayload[\"agents\"]): SeedAgentMap {\n const known = new Map<AgentName, SeedAgent>();\n const switchedOff = new Set<string>();\n const unknown: string[] = [];\n\n for (const [name, entry] of Object.entries(agents)) {\n if (!KNOWN_AGENTS.has(name)) unknown.push(name);\n else if (entry.on === false) switchedOff.add(name);\n else known.set(name as AgentName, entry);\n }\n\n return { known, switchedOff, unknown };\n}\n\n/**\n * Where a sub-agent's front-matter is written is the payload's to say, per agent and\n * independently of any skill's scope: an entry may send its agent to the user's own ~/.claude,\n * and one that names no scope stays in the project, which is the CLI's default. Model and effort\n * ride along on the same terms — an absent key means \"keep whatever the agent's metadata says\".\n */\nfunction agentScopeConfig(name: AgentName, entry: SeedAgent | undefined): AgentScopeConfig {\n return {\n name,\n scope: entry?.scope ?? \"project\",\n ...(entry?.model !== undefined && { model: entry.model }),\n ...(entry?.effort !== undefined && { effort: entry.effort }),\n };\n}\n\n/**\n * Turns a shared configuration into the shape the install pipeline already consumes, so\n * `init --from` reuses `writeProjectConfig` -> skill install -> `compileAgentsAllScopes`\n * unchanged rather than growing a second path that can drift from the wizard's.\n *\n * Unknown ids are skipped, never fatal. Payloads carry catalog slugs precisely so they survive\n * catalog churn: a config shared before a skill was renamed should still install everything else,\n * and failing the whole decode would make every rename retroactively break every shared id.\n *\n * A sub-agent reaches the roster two ways: named by a surviving skill's assignment, or switched on\n * in the `agents` map. The map is the only place a configuration can say anything about an agent\n * no skill mentions, which is what makes a bare (skill-less) agent shareable at all; it also\n * carries that agent's model and effort onto its `AgentScopeConfig`.\n *\n * The `assignments` map is per `(skill, sub-agent)` and carries a load state, so it decides three\n * things the wizard cannot express separately: which sub-agents are selected, which skills land in\n * each one's stack entry, and which of those preload. That is why the result carries an\n * `assignedStack` — the install pipeline's ownership rules broadcast every scope-compatible skill\n * to every selected agent, which would hand a bare sub-agent someone else's skills.\n */\nexport function seedToWizardResult(payload: SeedPayload, matrix: MergedSkillsMatrix): SeedMapping {\n const domainSelections: DomainSelections = {};\n const assignedStack: Partial<Record<AgentName, StackAgentConfig>> = {};\n const skills: SkillConfig[] = [];\n const skippedSkillIds: string[] = [];\n const agentNames = new Set<AgentName>();\n const agentMap = readAgentMap(payload.agents);\n const skippedAgentNames = new Set<string>(agentMap.unknown);\n\n for (const [skillId, entry] of Object.entries(payload.skills)) {\n const skill = matrix.skills[skillId as SkillId];\n const domain = skill?.category ? getCategoryDomain(skill.category) : undefined;\n\n if (!skill?.category || !domain) {\n skippedSkillIds.push(skillId);\n continue;\n }\n\n // Past the guard the matrix knows this id, and its category is a real one: the `local`\n // pseudo-category has no domain, so it left with the skips.\n const id = skillId as SkillId;\n const category = skill.category as Category;\n\n addToDomainSelections(domainSelections, domain, category, id);\n\n skills.push({\n id,\n scope: entry.scope,\n // \"eject\" is a source in its own right; anything else names the marketplace it came from.\n source: entry.install === \"eject\" ? \"eject\" : sourceForSkill(skill),\n });\n\n // Only assignments on skills that survived — an agent should not be switched on by a skill\n // this catalog cannot install.\n for (const [agentName, load] of Object.entries(entry.assignments)) {\n if (agentMap.switchedOff.has(agentName)) continue;\n if (!KNOWN_AGENTS.has(agentName)) {\n skippedAgentNames.add(agentName);\n continue;\n }\n\n const agent = agentName as AgentName;\n agentNames.add(agent);\n // The assignment is the curation: this sub-agent holds this skill, at this load state, and\n // no sub-agent the payload did not name holds it at all.\n addToAgentStack(assignedStack, agent, category, toSkillAssignment(id, load));\n }\n }\n\n // Bare agents: switched on by the map alone, with no skill to carry them in.\n for (const [name, entry] of agentMap.known) {\n if (entry.on === true) agentNames.add(name);\n }\n\n const selectedAgents = [...agentNames];\n\n return {\n result: {\n skills,\n selectedAgents,\n agentConfigs: selectedAgents.map((name) => agentScopeConfig(name, agentMap.known.get(name))),\n assignedStack,\n selectedStackId: payload.stackId,\n domainSelections,\n selectedDomains: orderDomains(Object.keys(domainSelections) as Domain[]),\n // Nothing was dropped from a *saved config* — the skipped ids came off the wire and are\n // reported to the user directly, so there is no existing entry to preserve.\n unresolvableSkillIds: [],\n cancelled: false,\n // A shared configuration was already validated by the app that built it; this path has no\n // interactive step in which a validation warning could be acted on.\n validation: { valid: true, errors: [], warnings: [] },\n },\n skippedSkillIds,\n skippedAgentNames: [...skippedAgentNames],\n };\n}\n","import React from \"react\";\nimport { z } from \"zod\";\n\nimport { Text, Box } from \"ink\";\nimport path from \"path\";\n\nimport { CLAUDE_DIR, CLI_COLORS, MAX_CONFIG_FILE_SIZE, STANDARD_FILES } from \"../consts\";\nimport { fileExists, readFileSafe } from \"../utils/fs\";\nimport { warn } from \"../utils/logger\";\nimport { settingsFileSchema } from \"./schemas\";\n\ntype SettingsFile = z.infer<typeof settingsFileSchema>;\ntype PermissionConfig = NonNullable<SettingsFile[\"permissions\"]>;\n\n/**\n * Reads one settings file's permissions block; undefined when absent, malformed, or empty.\n *\n * settings.json belongs to Claude Code, which adds keys on its own release schedule. This CLI\n * consumes `permissions` and owns nothing else in the file, so it stays silent about every other\n * field rather than warning about settings it has no standing to judge (D-304).\n */\nasync function readSettingsPermissions(filePath: string): Promise<PermissionConfig | undefined> {\n if (!(await fileExists(filePath))) return undefined;\n try {\n const content = await readFileSafe(filePath, MAX_CONFIG_FILE_SIZE);\n const raw = JSON.parse(content);\n const result = settingsFileSchema.safeParse(raw);\n const parsed: SettingsFile = result.success ? result.data : {};\n return parsed.permissions;\n } catch {\n warn(`Malformed settings file at '${filePath}' — skipping`);\n return undefined;\n }\n}\n\n/** Permissions from the first settings file that defines them — settings.local.json wins. */\nasync function loadPermissions(projectRoot: string): Promise<PermissionConfig | undefined> {\n const settingsPath = path.join(projectRoot, CLAUDE_DIR, STANDARD_FILES.SETTINGS_JSON);\n const localSettingsPath = path.join(projectRoot, CLAUDE_DIR, STANDARD_FILES.SETTINGS_LOCAL_JSON);\n\n for (const filePath of [localSettingsPath, settingsPath]) {\n const permissions = await readSettingsPermissions(filePath);\n if (permissions) return permissions;\n }\n return undefined;\n}\n\nexport async function checkPermissions(projectRoot: string): Promise<React.ReactElement | null> {\n const permissions = await loadPermissions(projectRoot);\n\n if (!permissions) {\n return (\n <Box flexDirection=\"column\" borderStyle=\"round\" borderColor={CLI_COLORS.WARNING} padding={1}>\n <Text bold color={CLI_COLORS.WARNING}>\n Permission Notice\n </Text>\n <Text>No permissions configured in .claude/settings.json</Text>\n <Text>Agents will prompt for approval on each tool use.</Text>\n <Text> </Text>\n <Text>For autonomous operation, add to .claude/settings.json:</Text>\n <Text> </Text>\n <Text color={CLI_COLORS.DIM}>{\"{\"}</Text>\n <Text color={CLI_COLORS.DIM}>{' \"permissions\": {'}</Text>\n <Text color={CLI_COLORS.DIM}>{' \"allow\": ['}</Text>\n <Text color={CLI_COLORS.DIM}>{' \"Read(*)\",'}</Text>\n <Text color={CLI_COLORS.DIM}>{' \"Bash(git *)\",'}</Text>\n <Text color={CLI_COLORS.DIM}>{' \"Bash(bun *)\"'}</Text>\n <Text color={CLI_COLORS.DIM}>{\" ]\"}</Text>\n <Text color={CLI_COLORS.DIM}>{\" }\"}</Text>\n <Text color={CLI_COLORS.DIM}>{\"}\"}</Text>\n </Box>\n );\n }\n\n const hasRestrictiveBash = permissions.deny?.some(\n (rule) => rule === \"Bash(*)\" || rule === \"Bash\",\n );\n const hasNoAllows = !permissions.allow || permissions.allow.length === 0;\n\n if (hasRestrictiveBash || hasNoAllows) {\n return (\n <Box flexDirection=\"column\" borderStyle=\"round\" borderColor={CLI_COLORS.WARNING} padding={1}>\n <Text bold color={CLI_COLORS.WARNING}>\n Permission Warnings\n </Text>\n {hasRestrictiveBash && (\n <Text>\n ⚠ Bash is denied in permissions. Some agents require Bash for git, testing, and build\n commands.\n </Text>\n )}\n {hasNoAllows && (\n <Text>⚠ No allow rules configured. Agents will prompt for each tool use.</Text>\n )}\n </Box>\n );\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AAGf,SAAS,aAA8B;AACvC,SAAS,OAAAA,MAAK,QAAAC,OAAM,cAAc;;;ACJlC,SAAS,SAAS;AA4BX,IAAM,eAAe;AAErB,IAAM,kBAAkB,EAAE,KAAK,CAAC,QAAQ,SAAS,UAAU,OAAO,CAAC;AACnE,IAAM,mBAAmB,EAAE,KAAK,CAAC,OAAO,UAAU,QAAQ,SAAS,KAAK,CAAC;AACzE,IAAM,sBAAsB,EAAE,KAAK,CAAC,QAAQ,WAAW,CAAC;AAExD,IAAM,kBAAkB,EAAE,OAAO;AAAA,EACtC,SAAS,EAAE,KAAK,CAAC,UAAU,OAAO,CAAC;AAAA,EACnC,OAAO,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC;AAAA;AAAA,EAEnC,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,mBAAmB;AACvD,CAAC;AAOM,IAAM,kBAAkB,EAAE,OAAO;AAAA;AAAA,EAEtC,IAAI,EAAE,QAAQ,EAAE,SAAS;AAAA,EACzB,OAAO,gBAAgB,SAAS;AAAA,EAChC,QAAQ,iBAAiB,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAKlC,OAAO,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC,EAAE,SAAS;AAChD,CAAC;AAMM,IAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,GA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AA,MACxE;AAAA,MACA;AAAA,QACE,KAAK,oBAAoB,KAAK,SAAS,EAAE;AAAA,QACzC,QAAQ,SAAS,OAAO,CAAC,SAAS,cAAc,IAAI,IAAI,MAAM,QAAQ;AAAA,MACxE;AAAA,IACF,EAAE,OAAO,CAAC,UAAU,MAAM,OAAO,SAAS,CAAC;AAE/C,eAAW,SAAS,QAAQ;AAC1B,WAAK,IAAI,qBAAqB;AAC9B,WAAK,IAAI,KAAK,MAAM,GAAG,EAAE;AACzB,iBAAW,aAAa,MAAM,QAAQ;AACpC,aAAK,IAAI,OAAO,SAAS,KAAK;AAAA,MAChC;AACA,WAAK,IAAI,EAAE;AAAA,IACb;AAAA,EACF;AACF;AAgBA,eAAsB,iBAAiB,YAA4C;AACjF,QAAM,CAAC,MAAM,MAAM,IAAI,MAAM,QAAQ,IAAI,CAAC,oBAAoB,GAAG,kBAAkB,UAAU,CAAC,CAAC;AAE/F,QAAM,eAAe,QAAQ,QAAQ,QAAQ,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ;AACtE,QAAM,aAAa,MAAM,cAAc;AACvC,QAAM,aAAa,MAAM,cAAc;AACvC,QAAM,OAAO,MAAM,SAAS,eAAe,kBAAkB,YAAY,IAAI;AAC7E,QAAM,SAAS,QAAQ,QAAQ;AAE/B,SAAO,EAAE,YAAY,YAAY,MAAM,OAAO;AAChD;","names":["Box","Text","jsx","jsxs","Box","Text"]}
@@ -1,37 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- CLI_COLORS,
4
- UI_SYMBOLS
5
- } from "./chunk-76ADG7LQ.js";
6
-
7
- // src/cli/components/wizard/selection-card.tsx
8
- import { Box, Text } from "ink";
9
- import { jsx, jsxs } from "react/jsx-runtime";
10
- var SelectionCard = ({
11
- label,
12
- description,
13
- isFocused,
14
- marginBottom
15
- }) => {
16
- const descriptionLines = Array.isArray(description) ? description : [description];
17
- return /* @__PURE__ */ jsx(
18
- Box,
19
- {
20
- borderStyle: "round",
21
- borderColor: isFocused ? CLI_COLORS.PRIMARY : CLI_COLORS.NEUTRAL,
22
- paddingX: 2,
23
- paddingY: 1,
24
- marginBottom,
25
- width: "100%",
26
- children: /* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, children: [
27
- /* @__PURE__ */ jsx(Text, { color: isFocused ? CLI_COLORS.PRIMARY : void 0, bold: isFocused, children: isFocused ? `${UI_SYMBOLS.CHEVRON} ${label}` : label }),
28
- descriptionLines.map((line, index) => /* @__PURE__ */ jsx(Text, { dimColor: true, children: line }, index))
29
- ] })
30
- }
31
- );
32
- };
33
-
34
- export {
35
- SelectionCard
36
- };
37
- //# sourceMappingURL=chunk-Q45ZU6HD.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cli/components/wizard/selection-card.tsx"],"sourcesContent":["import { Box, Text } from \"ink\";\nimport React from \"react\";\nimport { CLI_COLORS, UI_SYMBOLS } from \"../../consts.js\";\n\ntype SelectionCardProps = {\n label: string;\n description: string | string[];\n isFocused: boolean;\n marginBottom?: number;\n};\n\nexport const SelectionCard: React.FC<SelectionCardProps> = ({\n label,\n description,\n isFocused,\n marginBottom,\n}) => {\n const descriptionLines = Array.isArray(description) ? description : [description];\n\n return (\n <Box\n borderStyle=\"round\"\n borderColor={isFocused ? CLI_COLORS.PRIMARY : CLI_COLORS.NEUTRAL}\n paddingX={2}\n paddingY={1}\n marginBottom={marginBottom}\n width=\"100%\"\n >\n <Box flexDirection=\"column\" gap={1}>\n <Text color={isFocused ? CLI_COLORS.PRIMARY : undefined} bold={isFocused}>\n {isFocused ? `${UI_SYMBOLS.CHEVRON} ${label}` : label}\n </Text>\n {descriptionLines.map((line, index) => (\n <Text key={index} dimColor>\n {line}\n </Text>\n ))}\n </Box>\n </Box>\n );\n};\n"],"mappings":";;;;;;;AAAA,SAAS,KAAK,YAAY;AA4BpB,SACE,KADF;AAjBC,IAAM,gBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,mBAAmB,MAAM,QAAQ,WAAW,IAAI,cAAc,CAAC,WAAW;AAEhF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAY;AAAA,MACZ,aAAa,YAAY,WAAW,UAAU,WAAW;AAAA,MACzD,UAAU;AAAA,MACV,UAAU;AAAA,MACV;AAAA,MACA,OAAM;AAAA,MAEN,+BAAC,OAAI,eAAc,UAAS,KAAK,GAC/B;AAAA,4BAAC,QAAK,OAAO,YAAY,WAAW,UAAU,QAAW,MAAM,WAC5D,sBAAY,GAAG,WAAW,OAAO,IAAI,KAAK,KAAK,OAClD;AAAA,QACC,iBAAiB,IAAI,CAAC,MAAM,UAC3B,oBAAC,QAAiB,UAAQ,MACvB,kBADQ,KAEX,CACD;AAAA,SACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cli/components/wizard/category-grid.tsx","../src/cli/components/hooks/use-category-grid-input.ts"],"sourcesContent":["import React, { useCallback, useEffect } from \"react\";\n\nimport { Box, Text } from \"ink\";\n\nimport { CLI_COLORS } from \"../../consts.js\";\nimport { getSkillById } from \"../../lib/matrix/matrix-provider.js\";\nimport type { Category, OptionState, SkillId, SkillScope } from \"../../types/index.js\";\nimport { useCategoryGridInput } from \"../hooks/use-category-grid-input.js\";\nimport { useFocusedListItem } from \"../hooks/use-focused-list-item.js\";\nimport { useSectionScroll } from \"../hooks/use-section-scroll.js\";\n\nexport type CategoryOption = {\n id: SkillId;\n state: OptionState;\n selected: boolean;\n local?: boolean;\n installed?: boolean;\n scope?: SkillScope;\n /** Secondary scope badge shown alongside primary (e.g. after G->P toggle, excluded tombstone) */\n secondaryScope?: SkillScope;\n source?: string;\n /** True when selected but has unmet dependency requirements (shown dimmed) */\n hasUnmetRequirements?: boolean;\n /** Explains unmet requirements (shown in label when D pressed) */\n unmetRequirementsReason?: string;\n /** Display name of the skill that requires this one (e.g. \"Next.js\") */\n requiredBy?: string;\n};\n\nexport type CategoryRow = {\n id: Category;\n displayName: string;\n required: boolean;\n exclusive: boolean;\n options: CategoryOption[];\n};\n\nexport type CategoryGridProps = {\n categories: CategoryRow[];\n /** Available height in terminal lines for the scrollable viewport. 0 = no constraint. */\n availableHeight?: number;\n showLabels: boolean;\n onToggle: (categoryId: Category, technologyId: SkillId) => void;\n onToggleLabels: () => void;\n onToggleFilterIncompatible?: () => void;\n /** Optional initial focus row (default: 0). Use with React `key` to reset. */\n defaultFocusedRow?: number;\n /** Optional initial focus col (default: 0). Use with React `key` to reset. */\n defaultFocusedCol?: number;\n /** Optional callback fired whenever the focused position changes */\n onFocusChange?: (row: number, col: number) => void;\n /** Optional callback fired with the resolved SkillId of the focused cell */\n onFocusedSkillChange?: (skillId: SkillId | null) => void;\n};\n\nconst SYMBOL_REQUIRED = \"*\";\n\n/** Next option index stepping cyclically from `currentIndex`; empty rows stay put. */\nconst wrapOptionIndex = (length: number, currentIndex: number, direction: 1 | -1): number => {\n if (length === 0) return currentIndex;\n return (currentIndex + direction + length) % length;\n};\n\ntype SkillTagProps = {\n option: CategoryOption;\n isFocused: boolean;\n showLabels: boolean;\n};\n\nconst getCompatibilityLabel = (option: CategoryOption): string | null => {\n if (option.selected && option.hasUnmetRequirements && option.unmetRequirementsReason) {\n return `(${option.unmetRequirementsReason})`;\n }\n if (option.selected) return null;\n if (option.requiredBy) return `(required by ${option.requiredBy})`;\n if (option.state.status === \"incompatible\") return \"(incompatible)\";\n if (option.state.status === \"recommended\") return \"(recommended)\";\n if (option.state.status === \"discouraged\") return \"(discouraged)\";\n return null;\n};\n\nconst STATUS_COLORS: Partial<Record<OptionState[\"status\"], string>> = {\n incompatible: CLI_COLORS.ERROR,\n recommended: CLI_COLORS.GRAY_1,\n discouraged: CLI_COLORS.WARNING,\n};\n\n/** Selected wins, then advisory status; `fallback` covers the plain \"normal\" state. */\nfunction resolveTagColor(option: CategoryOption, fallback: string): string {\n if (option.selected) return CLI_COLORS.PRIMARY;\n return STATUS_COLORS[option.state.status] ?? fallback;\n}\n\nconst SkillTag: React.FC<SkillTagProps> = ({ option, isFocused, showLabels }) => {\n const textColor = resolveTagColor(option, CLI_COLORS.DIM);\n const hasRequiredBy = option.selected && !!option.requiredBy;\n const hasUnmetDeps = option.selected && !!option.hasUnmetRequirements;\n const isDimmed = hasUnmetDeps || hasRequiredBy;\n const showCompatibility = hasRequiredBy || hasUnmetDeps || (showLabels && isFocused);\n const compatibilityLabel = showCompatibility ? getCompatibilityLabel(option) : null;\n\n return (\n <Box\n marginRight={1}\n borderColor={isFocused ? resolveTagColor(option, CLI_COLORS.UNFOCUSED) : textColor}\n borderDimColor={!isFocused}\n borderStyle=\"single\"\n flexShrink={0}\n paddingLeft={1}\n flexDirection=\"row\"\n >\n <>\n {option.scope && (\n <>\n {[option.scope, option.secondaryScope].filter(Boolean).map((badgeScope, i) => (\n <Text key={i} color={CLI_COLORS.WARNING} backgroundColor={CLI_COLORS.LABEL_BG}>\n {badgeScope === \"global\" ? \" G \" : \" P \"}\n </Text>\n ))}\n <Text> </Text>\n </>\n )}\n <Text color={textColor} bold dimColor={isDimmed}>\n {getSkillById(option.id).displayName}{\" \"}\n </Text>\n {compatibilityLabel && (\n <Text color={textColor} dimColor>\n {compatibilityLabel}{\" \"}\n </Text>\n )}\n </>\n </Box>\n );\n};\n\ntype CategorySectionProps = {\n isFirst: boolean;\n category: CategoryRow;\n isFocused: boolean;\n focusedOptionIndex: number;\n showLabels: boolean;\n};\n\nconst CategorySection: React.FC<CategorySectionProps> = ({\n isFirst,\n category,\n isFocused,\n focusedOptionIndex,\n showLabels,\n}) => {\n const { options } = category;\n const selectedCount = options.filter((o) => o.selected).length;\n\n const selectionCounter = category.exclusive ? `(${selectedCount} of 1)` : null;\n\n return (\n <Box flexDirection=\"column\" marginTop={isFirst ? 0 : 1}>\n <Box flexDirection=\"row\">\n {isFocused ? (\n <Text color={CLI_COLORS.WHITE} backgroundColor={CLI_COLORS.LABEL_BG}>\n {` ${category.displayName}${category.required ? ` ${SYMBOL_REQUIRED}` : \"\"}${selectionCounter ? ` ${selectionCounter}` : \"\"} `}\n </Text>\n ) : (\n <>\n <Text color={CLI_COLORS.NEUTRAL}>{category.displayName}</Text>\n {category.required && <Text color={CLI_COLORS.NEUTRAL}> {SYMBOL_REQUIRED}</Text>}\n {selectionCounter && <Text dimColor> {selectionCounter}</Text>}\n </>\n )}\n </Box>\n\n <Box flexDirection=\"row\" flexWrap=\"wrap\" marginTop={0}>\n {options.map((option, index) => (\n <SkillTag\n key={option.id}\n option={option}\n isFocused={isFocused && index === focusedOptionIndex}\n showLabels={showLabels}\n />\n ))}\n </Box>\n </Box>\n );\n};\n\nexport const CategoryGrid: React.FC<CategoryGridProps> = ({\n categories,\n availableHeight = 0,\n showLabels,\n onToggle,\n onToggleLabels,\n onToggleFilterIncompatible,\n defaultFocusedRow = 0,\n defaultFocusedCol = 0,\n onFocusChange,\n onFocusedSkillChange,\n}) => {\n const getColCount = useCallback(\n (row: number): number => categories[row]?.options.length ?? 0,\n [categories],\n );\n\n const findValidCol = useCallback(\n (row: number, currentCol: number, direction: 1 | -1): number =>\n wrapOptionIndex(categories[row]?.options.length ?? 0, currentCol, direction),\n [categories],\n );\n\n const handleFocusChange = useCallback(\n (row: number, col: number) => {\n if (showLabels) onToggleLabels();\n onFocusChange?.(row, col);\n },\n [showLabels, onToggleLabels, onFocusChange],\n );\n\n const { focusedRow, focusedCol, setFocused, moveFocus } = useFocusedListItem(\n categories.length,\n getColCount,\n {\n wrap: true,\n findValidCol,\n onChange: handleFocusChange,\n initialRow: defaultFocusedRow,\n initialCol: defaultFocusedCol,\n },\n );\n\n useCategoryGridInput({\n categories,\n focusedRow,\n focusedCol,\n setFocused,\n moveFocus,\n onToggle,\n onToggleLabels,\n onToggleFilterIncompatible,\n });\n\n // Report the focused cell's skill on mount and whenever it changes — including\n // category reshapes that shift the cell without a navigation event. useFocusedListItem\n // only fires onChange during navigation, so the initially highlighted cell would\n // otherwise never reach the store, leaving focusedSkillId out of sync with the visual\n // focus and making the `s` scope hotkey no-op until the first arrow key.\n const focusedSkillId = categories[focusedRow]?.options[focusedCol]?.id ?? null;\n useEffect(() => {\n onFocusedSkillChange?.(focusedSkillId);\n }, [focusedSkillId, onFocusedSkillChange]);\n\n // `hiddenAbove` / `hiddenBelow` are discarded ON PURPOSE — the build grid has\n // no `ScrollAffordance` and is not getting one (owner decision). On a grid\n // this dense a half-cut card already says \"there is more\"; a counted hint\n // would be noise, and it would cost the viewport a row to say what the\n // clipped card says for free. Do not add one on the strength of the counts\n // merely being available here.\n const { setSectionRef, scrollEnabled, scrollTopPx } = useSectionScroll({\n sectionCount: categories.length,\n focusedIndex: focusedRow,\n availableHeight,\n });\n\n if (categories.length === 0) {\n return (\n <Box flexDirection=\"column\">\n <Text dimColor>No categories to display.</Text>\n </Box>\n );\n }\n\n const noShrink = scrollEnabled ? { flexShrink: 0 } : {};\n\n const sectionElements = categories.map((category, index) => (\n <Box key={category.id} ref={(el) => setSectionRef(index, el)} {...noShrink}>\n <CategorySection\n category={category}\n isFocused={index === focusedRow}\n focusedOptionIndex={focusedCol}\n showLabels={showLabels}\n isFirst={index === 0}\n />\n </Box>\n ));\n\n return (\n <Box\n flexDirection=\"column\"\n {...(scrollEnabled\n ? { height: availableHeight, overflow: \"hidden\" as const }\n : { flexGrow: 1 })}\n >\n <Box flexDirection=\"column\" marginTop={scrollTopPx > 0 ? -scrollTopPx : 0} {...noShrink}>\n {sectionElements}\n </Box>\n </Box>\n );\n};\n","import { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport { useInput, type Key } from \"ink\";\n\nimport type { Category, SkillId } from \"../../types/index.js\";\nimport { FEATURE_FLAGS } from \"../../lib/feature-flags.js\";\nimport type { CategoryRow } from \"../wizard/category-grid.js\";\nimport type { Direction } from \"./use-focused-list-item.js\";\nimport {\n HOTKEY_FILTER_INCOMPATIBLE,\n HOTKEY_TOGGLE_LABELS,\n KEY_SPACE,\n isHotkey,\n} from \"../wizard/hotkeys.js\";\n\n/** Find next section index (wrapping forward) */\nconst findNextIndex = (items: { length: number }, currentIndex: number): number => {\n const length = items.length;\n if (length === 0) return currentIndex;\n return (currentIndex + 1) % length;\n};\n\ntype UseCategoryGridInputOptions = {\n categories: CategoryRow[];\n focusedRow: number;\n focusedCol: number;\n setFocused: (row: number, col: number) => void;\n moveFocus: (direction: Direction) => void;\n onToggle: (categoryId: Category, technologyId: SkillId) => void;\n onToggleLabels: () => void;\n onToggleFilterIncompatible?: () => void;\n};\n\nexport function useCategoryGridInput({\n categories,\n focusedRow,\n focusedCol,\n setFocused,\n moveFocus,\n onToggle,\n onToggleLabels,\n onToggleFilterIncompatible,\n}: UseCategoryGridInputOptions): void {\n const currentRow = categories[focusedRow];\n // Memoised so the effect below keys on the row actually changing — the `[]`\n // fallback used to be a fresh array every render, re-running the effect for\n // nothing whenever no row was focused.\n const currentOptions = useMemo(() => currentRow?.options ?? [], [currentRow]);\n\n // Adjust column when current row's options change externally (e.g. option becomes disabled)\n useEffect(() => {\n if (!currentRow) return;\n\n const maxCol = currentOptions.length - 1;\n if (focusedCol > maxCol) {\n const newCol = Math.max(0, maxCol);\n setFocused(focusedRow, newCol);\n }\n }, [focusedRow, currentOptions, focusedCol, setFocused, currentRow]);\n\n // Store the latest handler in a ref so that the useInput effect never needs to\n // re-register on the event emitter. This avoids a stale-closure race condition\n // where, after a domain switch (CategoryGrid remount via key={activeDomain}),\n // the useInput effect may not yet have re-registered the updated handler when\n // the first keypress arrives — causing the first space press to be silently lost.\n const handlerRef = useRef<((input: string, key: Key) => void) | null>(null);\n handlerRef.current = (input: string, key: Key) => {\n if (key.tab && key.shift) {\n onToggleLabels();\n return;\n }\n\n if (key.tab && !key.shift) {\n const nextSection = findNextIndex(categories, focusedRow);\n if (nextSection !== focusedRow) {\n setFocused(nextSection, 0);\n }\n return;\n }\n\n if (isHotkey(input, HOTKEY_TOGGLE_LABELS)) {\n onToggleLabels();\n return;\n }\n\n // Gated behind FEATURE_FLAGS.FILTER_INCOMPATIBLE (default off): pressing F is a\n // no-op until the flag is flipped back on. The store action stays intact for re-enable.\n if (\n FEATURE_FLAGS.FILTER_INCOMPATIBLE &&\n isHotkey(input, HOTKEY_FILTER_INCOMPATIBLE) &&\n onToggleFilterIncompatible\n ) {\n onToggleFilterIncompatible();\n return;\n }\n\n if (input === KEY_SPACE) {\n const currentOption = currentOptions[focusedCol];\n if (currentOption) {\n onToggle(currentRow.id, currentOption.id);\n }\n return;\n }\n\n const isLeft = key.leftArrow || input === \"h\";\n const isRight = key.rightArrow || input === \"l\";\n const isUp = key.upArrow || input === \"k\";\n const isDown = key.downArrow || input === \"j\";\n\n if (isLeft) {\n moveFocus(\"left\");\n } else if (isRight) {\n moveFocus(\"right\");\n } else if (isUp) {\n moveFocus(\"up\");\n } else if (isDown) {\n moveFocus(\"down\");\n }\n };\n\n // Stable handler reference — never changes, so useInput's effect registers once\n const stableHandler = useCallback((input: string, key: Key) => {\n handlerRef.current?.(input, key);\n }, []);\n\n useInput(stableHandler);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,eAAAA,cAAa,aAAAC,kBAAiB;AAE9C,SAAS,KAAK,YAAY;;;ACF1B,SAAS,aAAa,WAAW,SAAS,cAAc;AACxD,SAAS,gBAA0B;AAcnC,IAAM,gBAAgB,CAAC,OAA2B,iBAAiC;AACjF,QAAM,SAAS,MAAM;AACrB,MAAI,WAAW,EAAG,QAAO;AACzB,UAAQ,eAAe,KAAK;AAC9B;AAaO,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAsC;AACpC,QAAM,aAAa,WAAW,UAAU;AAIxC,QAAM,iBAAiB,QAAQ,MAAM,YAAY,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;AAG5E,YAAU,MAAM;AACd,QAAI,CAAC,WAAY;AAEjB,UAAM,SAAS,eAAe,SAAS;AACvC,QA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,MAAM;AAC1E,EAAAC,WAAU,MAAM;AACd,2BAAuB,cAAc;AAAA,EACvC,GAAG,CAAC,gBAAgB,oBAAoB,CAAC;AAQzC,QAAM,EAAE,eAAe,eAAe,YAAY,IAAI,iBAAiB;AAAA,IACrE,cAAc,WAAW;AAAA,IACzB,cAAc;AAAA,IACd;AAAA,EACF,CAAC;AAED,MAAI,WAAW,WAAW,GAAG;AAC3B,WACE,oBAAC,OAAI,eAAc,UACjB,8BAAC,QAAK,UAAQ,MAAC,uCAAyB,GAC1C;AAAA,EAEJ;AAEA,QAAM,WAAW,gBAAgB,EAAE,YAAY,EAAE,IAAI,CAAC;AAEtD,QAAM,kBAAkB,WAAW,IAAI,CAAC,UAAU,UAChD,oBAAC,OAAsB,KAAK,CAAC,OAAO,cAAc,OAAO,EAAE,GAAI,GAAG,UAChE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,UAAU;AAAA,MACrB,oBAAoB;AAAA,MACpB;AAAA,MACA,SAAS,UAAU;AAAA;AAAA,EACrB,KAPQ,SAAS,EAQnB,CACD;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAc;AAAA,MACb,GAAI,gBACD,EAAE,QAAQ,iBAAiB,UAAU,SAAkB,IACvD,EAAE,UAAU,EAAE;AAAA,MAElB,8BAAC,OAAI,eAAc,UAAS,WAAW,cAAc,IAAI,CAAC,cAAc,GAAI,GAAG,UAC5E,2BACH;AAAA;AAAA,EACF;AAEJ;","names":["useCallback","useEffect","useCallback","useEffect"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cli/lib/operations/project/load-agent-defs.ts"],"sourcesContent":["import { getAgentDefinitions } from \"../../agents/index.js\";\nimport { loadMergedAgents } from \"../../loading/index.js\";\nimport type { AgentDefinition, AgentName, AgentSourcePaths } from \"../../../types/index.js\";\n\nexport type AgentDefs = {\n /** Merged agent definitions (CLI defaults + source overrides). Source takes precedence. */\n agents: Record<AgentName, AgentDefinition>;\n /** The sourcePath used to load agent partials (for compilation). */\n sourcePath: string;\n /** Full agent source paths (agentsDir, templatesDir, sourcePath). */\n agentSourcePaths: AgentSourcePaths;\n};\n\n/**\n * Loads agent definitions from the CLI and optionally from a remote source.\n *\n * Merges CLI built-in agents with source repository agents (source overrides CLI).\n * Returns the merged definitions plus the source path for compilation.\n */\nexport async function loadAgentDefs(options?: {\n projectDir?: string;\n forceRefresh?: boolean;\n}): Promise<AgentDefs> {\n const agentSourcePaths = await getAgentDefinitions(undefined, options);\n const agents = await loadMergedAgents(agentSourcePaths.sourcePath);\n\n return {\n agents,\n sourcePath: agentSourcePaths.sourcePath,\n agentSourcePaths,\n };\n}\n"],"mappings":";;;;;;;;;AAmBA,eAAsB,cAAc,SAGb;AACrB,QAAM,mBAAmB,MAAM,oBAAoB,QAAW,OAAO;AACrE,QAAM,SAAS,MAAM,iBAAiB,iBAAiB,UAAU;AAEjE,SAAO;AAAA,IACL;AAAA,IACA,YAAY,iBAAiB;AAAA,IAC7B;AAAA,EACF;AACF;","names":[]}