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,1806 +0,0 @@
1
- ## Pattern Scouting Scope Requirements
2
-
3
- <scope_requirements>
4
- **CRITICAL: Production monorepos document 10-15 major categories beyond code patterns.**
5
-
6
- Your extraction MUST cover AT LEAST:
7
-
8
- 1. **Code Conventions** (component patterns, types, naming)
9
- 2. **Package Architecture** (workspace organization, dependencies)
10
- 3. **State Management** (server vs client, React Query, Zustand)
11
- 4. **Testing Standards** (unit, integration, E2E, coverage)
12
- 5. **Design System** (3-tier tokens, accessibility)
13
- 6. **Build & Tooling** (Turborepo, linting, pre-commit)
14
- 7. **CI/CD Standards** (pipelines, affected detection)
15
- 8. **Environment Management** (variables, secrets, configs)
16
- 9. **Architecture Decisions** (ADRs capturing WHY)
17
- 10. **AI Optimization** (AGENTS.md, CLAUDE.md, llms.txt)
18
-
19
- **Why this matters:**
20
-
21
- Production monorepos from Google, Vercel, Shopify document far more than code patterns. Without comprehensive coverage, you'll miss critical standards that prevent:
22
-
23
- - Dependency chaos (package architecture)
24
- - Inconsistent testing (testing standards)
25
- - AI agents violating conventions (AGENTS.md)
26
- - Performance issues (state management separation)
27
- - Design system drift (token structure)
28
-
29
- **This is non-negotiable for pattern scouting agents.**
30
- </scope_requirements>
31
-
32
- ---
33
-
34
- ## Pattern Scouting Investigation Protocol
35
-
36
- <extraction_investigation>
37
- **Reference the 10+ major categories defined in Pattern Scouting Scope Requirements above.**
38
-
39
- Your extraction MUST systematically investigate:
40
-
41
- ### Required Investigation Steps
42
-
43
- **Phase 1: Monorepo Structure**
44
-
45
- ```bash
46
- # Understand workspace organization
47
- cat package.json | grep -A 10 "workspaces"
48
- cat turbo.json || cat nx.json || echo "No monorepo tool config"
49
- ls -la packages/ apps/ || echo "Non-standard structure"
50
- find . -name "package.json" -type f | head -20
51
-
52
- # Package dependencies
53
- grep -r "workspace:" --include="package.json" | head -10
54
- grep -r "@repo/" --include="*.tsx" --include="*.ts" | wc -l
55
- ```
56
-
57
- **Phase 2: Code Patterns**
58
-
59
- ```bash
60
- # State management
61
- grep -r "useQuery" --include="*.tsx" | wc -l
62
- grep -r "QueryClient" --include="*.ts" | head -5
63
- grep -r "create(" --include="*.ts" | grep -i store | head -5
64
- grep -r "useContext\|createContext" --include="*.tsx" | wc -l
65
-
66
- # Next.js patterns
67
- find . -name "page.tsx" -o -name "layout.tsx" | head -10
68
- grep -r "getServerSideProps\|getStaticProps" --include="*.tsx" | wc -l
69
-
70
- # Component architecture
71
- find . -name "*.tsx" -type f | head -20
72
- grep -r "interface.*Props" --include="*.tsx" | head -10
73
- ```
74
-
75
- **Phase 3: Design System**
76
-
77
- ```bash
78
- # CSS variables and tokens
79
- grep -r "var(--" --include="*.css" --include="*.scss" | head -20
80
- find . -name "*token*" -o -name "*theme*" | head -10
81
- grep -r "--base-\|--semantic-\|--component-" --include="*.css" | wc -l
82
-
83
- # Accessibility
84
- grep -r "aria-\|role=" --include="*.tsx" | wc -l
85
- find . -name "*a11y*" -o -name "*accessibility*"
86
- ```
87
-
88
- **Phase 4: Testing Infrastructure**
89
-
90
- ```bash
91
- # Test files and patterns
92
- find . -name "*.test.ts*" -o -name "*.spec.ts*" | wc -l
93
- cat jest.config.js || cat vitest.config.ts || echo "No test config found"
94
- find . -name "playwright.config.ts" -o -name "cypress.config.ts"
95
- grep -r "describe\|it\|test" --include="*.test.ts*" | head -10
96
-
97
- # Coverage
98
- cat package.json | grep -A 5 "coverage"
99
- ```
100
-
101
- **Phase 5: Build & Tooling**
102
-
103
- ```bash
104
- # Build configuration
105
- cat turbo.json | head -50 || echo "No Turborepo"
106
- cat .eslintrc* || cat eslint.config.js || cat biome.json || echo "No linter config"
107
- cat .prettierrc* || echo "No Prettier config"
108
- cat .husky/pre-commit || echo "No pre-commit hooks"
109
-
110
- # Environment handling
111
- find . -name ".env*" | head -10
112
- grep -r "process.env" --include="*.ts" --include="*.tsx" | wc -l
113
- ```
114
-
115
- **Phase 6: Documentation & Standards**
116
-
117
- ```bash
118
- # Existing documentation
119
- find . -name "AGENTS.md" -o -name "CLAUDE.md" -o -name "llms.txt"
120
- find . -name "ADR*" -o -name "decisions/" -type d
121
- cat CONTRIBUTING.md || cat docs/CONTRIBUTING.md || echo "No contribution guide"
122
- ls -la .github/workflows/ | head -10
123
- ```
124
-
125
- **Phase 7: Extract Concrete Examples**
126
-
127
- - Read 5-10 key files per category
128
- - Note line numbers for examples
129
- - Document variations and edge cases
130
- - Identify anti-patterns
131
- - Count pattern frequency (3+ instances minimum)
132
-
133
- **Never document patterns based on assumptions. Always verify with actual code.**
134
- </extraction_investigation>
135
-
136
- ## Comprehensive Extraction Focus Areas
137
-
138
- Production monorepos from Google, Vercel, Shopify document far more than code patterns. Extract ALL of these categories.
139
-
140
- ### 1. Package Architecture & Workspace Organization
141
-
142
- <extraction_focus area="package-architecture">
143
- **CRITICAL IMPORTANCE:** Without documented package boundaries, monorepos become tangled dependency graphs.
144
-
145
- **What to extract:**
146
-
147
- - Workspace structure (packages/, apps/, tools/)
148
- - Package naming conventions (@repo/package-name, @app/name)
149
- - Package classification system (type:feature, type:ui, type:data-access, type:util)
150
- - Dependency constraints and boundaries
151
- - Internal package imports (workspace protocol vs path aliases)
152
- - Versioning strategy (Changesets, Lerna, manual)
153
- - Package.json conventions across workspace
154
-
155
- **Red flags to document:**
156
-
157
- - Circular dependencies between packages
158
- - Apps depending on other apps
159
- - Inconsistent naming (@repo vs @company vs no prefix)
160
- - Path aliases (@/) used instead of package names
161
- - Missing dependency constraints allowing any-imports-any
162
-
163
- **Example investigation:**
164
-
165
- ```bash
166
- # Find workspace protocol usage
167
- grep -r '"workspace:\*"' --include="package.json"
168
-
169
- # Check for path alias abuse
170
- grep -r '@/' --include="*.ts*" | wc -l
171
-
172
- # Dependency analysis
173
- npx dependency-cruiser packages/
174
- ```
175
-
176
- </extraction_focus>
177
-
178
- ---
179
-
180
- ### 2. Testing Standards (Unit, Integration, E2E)
181
-
182
- <extraction_focus area="testing">
183
- **CRITICAL IMPORTANCE:** "Write tests" is useless. Document WHAT to test, HOW to structure, and coverage requirements.
184
-
185
- **What to extract:**
186
-
187
- - Test file naming conventions (_.test.ts vs _.spec.ts)
188
- - Test organization (tests/ vs **tests** vs co-located)
189
- - What requires unit tests (business logic, pure functions, hooks)
190
- - What doesn't need tests (types, simple components, mocks)
191
- - Integration test patterns
192
- - E2E test structure (Playwright/Cypress)
193
- - Mock data location and conventions
194
- - Test configuration inheritance (base configs)
195
- - Coverage requirements per package
196
- - Test running commands (single file vs full suite)
197
-
198
- **Red flags to document:**
199
-
200
- - No tests for critical business logic
201
- - Testing implementation details instead of behavior
202
- - Brittle tests that break on refactors
203
- - E2E tests without proper waits/assertions
204
- - Mock data that doesn't match API contracts
205
-
206
- **Example investigation:**
207
-
208
- ```bash
209
- # Test coverage
210
- find . -name "*.test.ts*" -o -name "*.spec.ts*" | wc -l
211
-
212
- # Test patterns
213
- grep -r "describe\|it\|test" --include="*.test.ts" | head -20
214
-
215
- # E2E setup
216
- cat playwright.config.ts || cat cypress.config.ts
217
- ```
218
-
219
- </extraction_focus>
220
-
221
- ---
222
-
223
- ### 3. State Management Separation
224
-
225
- <extraction_focus area="state-management">
226
- **CRITICAL IMPORTANCE:** Mixing server state (React Query) with client state (Zustand) without guidelines creates performance issues.
227
-
228
- **What to extract:**
229
-
230
- - Server state patterns (React Query, SWR, Apollo)
231
- - Client state patterns (Zustand, Context, Jotai, Valtio)
232
- - Query key structure and factories
233
- - Cache invalidation strategies
234
- - Optimistic update patterns
235
- - State persistence approaches
236
- - SSR/hydration handling
237
- - When to use which state solution
238
-
239
- **Red flags to document:**
240
-
241
- - Server data stored in Zustand/Context
242
- - UI state fetched via useQuery
243
- - Inconsistent query key formats
244
- - Missing cache invalidation after mutations
245
- - Race conditions in mutations
246
-
247
- **Example investigation:**
248
-
249
- ```bash
250
- # React Query usage
251
- grep -r "queryKey:" --include="*.ts*" | head -20
252
-
253
- # Zustand stores
254
- grep -r "create<" --include="*.ts" | grep -i store
255
-
256
- # Cache invalidation
257
- grep -r "invalidateQueries\|refetchQueries" --include="*.ts*"
258
- ```
259
-
260
- </extraction_focus>
261
-
262
- ---
263
-
264
- ### 4. Design System Token Structure
265
-
266
- <extraction_focus area="design-system">
267
- **CRITICAL IMPORTANCE:** Flat CSS variables become unmaintainable. Production teams use 3-tier token systems.
268
-
269
- **What to extract:**
270
-
271
- - Token architecture (base → semantic → component tiers)
272
- - Naming conventions (GitHub Primer, Shopify Polaris patterns)
273
- - Color system (primitives, semantic, component-specific)
274
- - Spacing system (8px grid, t-shirt sizes, golden ratio)
275
- - Typography scale (sizes, weights, line heights)
276
- - Theme implementation (light/dark mode)
277
- - Component token patterns
278
- - When to create new tokens vs use existing
279
-
280
- **Red flags to document:**
281
-
282
- - Hardcoded colors/spacing in components
283
- - Flat token structure without semantic layer
284
- - Inconsistent naming patterns
285
- - Missing fallback values
286
- - Theme switching breaking components
287
-
288
- **Example investigation:**
289
-
290
- ```bash
291
- # Token structure
292
- grep -r "--base-\|--semantic-\|--component-" --include="*.css"
293
-
294
- # Hardcoded values
295
- grep -r "color: #\|margin: [0-9]" --include="*.tsx"
296
-
297
- # Theme implementation
298
- find . -name "*theme*" -o -name "*tokens*"
299
- ```
300
-
301
- </extraction_focus>
302
-
303
- ---
304
-
305
- ### 5. Accessibility Standards
306
-
307
- <extraction_focus area="accessibility">
308
- **CRITICAL IMPORTANCE:** WCAG compliance requires specific, documented patterns per component type.
309
-
310
- **What to extract:**
311
-
312
- - Keyboard navigation patterns
313
- - ARIA patterns per component type
314
- - Focus management strategies
315
- - Screen reader testing approach
316
- - Color contrast requirements (4.5:1 text, 3:1 UI)
317
- - Touch target sizes (44x44px minimum)
318
- - Testing tools and automation (axe, jest-axe)
319
- - Accessible name calculation
320
- - Skip links and landmarks
321
-
322
- **Red flags to document:**
323
-
324
- - Interactive elements without keyboard support
325
- - Missing ARIA labels on icon buttons
326
- - Insufficient color contrast
327
- - Focus indicators removed with CSS
328
- - Inaccessible custom controls
329
-
330
- **Example investigation:**
331
-
332
- ```bash
333
- # ARIA usage
334
- grep -r "aria-\|role=" --include="*.tsx" | wc -l
335
-
336
- # Accessibility testing
337
- grep -r "toHaveNoViolations\|axe" --include="*.test.ts*"
338
-
339
- # Focus management
340
- grep -r "focus\|tabIndex" --include="*.tsx" | head -20
341
- ```
342
-
343
- </extraction_focus>
344
-
345
- ---
346
-
347
- ### 6. Build System & Tooling Configuration
348
-
349
- <extraction_focus area="build-tooling">
350
- **CRITICAL IMPORTANCE:** Turborepo/Nx won't optimize without proper configuration documentation.
351
-
352
- **What to extract:**
353
-
354
- - Task pipeline configuration (dependsOn, outputs, inputs)
355
- - Caching strategies (what gets cached, cache keys)
356
- - Environment variable handling (env, passThroughEnv, globalEnv)
357
- - Build tool choice and rationale (Turborepo, Nx, Lerna)
358
- - Linting setup (ESLint, Biome)
359
- - Formatting configuration (Prettier, Biome)
360
- - Pre-commit hooks (Husky, lint-staged)
361
- - Performance targets (build times, cache hit ratios)
362
- - Remote caching configuration
363
-
364
- **Red flags to document:**
365
-
366
- - Missing task dependencies causing build failures
367
- - Incorrect cache inputs missing source files
368
- - Environment variables not declared properly
369
- - Slow builds that could be parallelized
370
- - Inconsistent linting across packages
371
-
372
- **Example investigation:**
373
-
374
- ```bash
375
- # Turborepo/Nx config
376
- cat turbo.json || cat nx.json
377
-
378
- # Linting
379
- cat .eslintrc* || cat biome.json
380
-
381
- # Pre-commit
382
- cat .husky/pre-commit || cat .git/hooks/pre-commit
383
- ```
384
-
385
- </extraction_focus>
386
-
387
- ---
388
-
389
- ### 7. CI/CD Pipeline Standards
390
-
391
- <extraction_focus area="cicd">
392
- **CRITICAL IMPORTANCE:** Inefficient CI wastes minutes and dollars. Document optimization strategies.
393
-
394
- **What to extract:**
395
-
396
- - Pipeline configuration (GitHub Actions, GitLab CI, CircleCI)
397
- - Affected project detection strategies
398
- - Parallel job execution patterns
399
- - Remote caching setup
400
- - Secrets management
401
- - Branch deployment strategies
402
- - Quality gates and coverage requirements
403
- - Pipeline performance metrics
404
- - Deployment workflows
405
-
406
- **Red flags to document:**
407
-
408
- - Building entire monorepo on every change
409
- - Missing affected detection
410
- - Sequential jobs that could run parallel
411
- - Secrets hardcoded in workflows
412
- - No quality gates before merging
413
-
414
- **Example investigation:**
415
-
416
- ```bash
417
- # CI configuration
418
- ls -la .github/workflows/ || ls -la .gitlab-ci.yml
419
-
420
- # Affected detection
421
- grep -r "filter=\|--affected" .github/workflows/
422
-
423
- # Remote caching
424
- grep -r "TURBO_TOKEN\|NX_CLOUD_AUTH_TOKEN" .github/workflows/
425
- ```
426
-
427
- </extraction_focus>
428
-
429
- ---
430
-
431
- ### 8. Environment Variable Management
432
-
433
- <extraction_focus area="environment">
434
- **CRITICAL IMPORTANCE:** Environment variables are #1 source of "works on my machine" problems.
435
-
436
- **What to extract:**
437
-
438
- - File hierarchy (.env.defaults, .env, .env.local, .env.production)
439
- - Naming conventions (NEXT*PUBLIC*, VITE*, PUBLIC*)
440
- - Variable organization by package
441
- - Which variables affect cache keys
442
- - Security classification (public vs secret)
443
- - Loading order and precedence
444
- - Secrets management approach
445
- - How to add new variables
446
-
447
- **Red flags to document:**
448
-
449
- - Secrets committed to repository
450
- - Inconsistent naming patterns
451
- - Environment variables not in template
452
- - Missing .env.defaults causing failures
453
- - Unclear which variables affect which packages
454
-
455
- **Example investigation:**
456
-
457
- ```bash
458
- # Environment files
459
- find . -name ".env*" | head -10
460
-
461
- # Environment usage
462
- grep -r "process.env\|import.meta.env" --include="*.ts*" | head -20
463
-
464
- # Turborepo env config
465
- cat turbo.json | grep -A 10 "env\|globalEnv"
466
- ```
467
-
468
- </extraction_focus>
469
-
470
- ---
471
-
472
- ### 9. Architecture Decision Records (ADRs)
473
-
474
- <extraction_focus area="adrs">
475
- **CRITICAL IMPORTANCE:** Without ADRs, no one remembers WHY decisions were made 6 months later.
476
-
477
- **What to extract:**
478
-
479
- - ADR template (MADR is 2025 standard)
480
- - ADR file organization (docs/decisions/, adr/)
481
- - Numbering convention (0001-title.md, YYYYMMDD-title.md)
482
- - Decision types worth recording
483
- - Review and approval process
484
- - How to supersede old decisions
485
- - Tooling (adr-tools, adr-log)
486
-
487
- **Decisions worth recording:**
488
-
489
- - Technology choices (Turborepo vs Nx vs Lerna)
490
- - Package organization patterns
491
- - Testing framework selection
492
- - State management approach
493
- - Build tool choices
494
- - Deployment strategies
495
- - Breaking API changes
496
- - Security decisions
497
-
498
- **Example investigation:**
499
-
500
- ```bash
501
- # Find ADRs
502
- find . -name "ADR*" -o -name "adr-*" -o -path "*/decisions/*"
503
-
504
- # ADR structure
505
- cat docs/decisions/0001-* || echo "No ADRs found"
506
- ```
507
-
508
- </extraction_focus>
509
-
510
- ---
511
-
512
- ### 10. AI Agent Optimization (AGENTS.md)
513
-
514
- <extraction_focus area="ai-optimization">
515
- **CRITICAL IMPORTANCE:** AI agents need explicit instructions. Without AGENTS.md, they violate conventions.
516
-
517
- **What to extract:**
518
-
519
- - AGENTS.md structure and content
520
- - CLAUDE.md for Claude Code memory
521
- - llms.txt for AI navigation
522
- - Tech stack summary
523
- - Do's and Don'ts for AI generation
524
- - Safe commands (file-scoped, fast feedback)
525
- - Commands requiring confirmation
526
- - Common pitfalls to avoid
527
- - Project-specific patterns
528
-
529
- **AGENTS.md sections:**
530
-
531
- - Tech stack summary
532
- - Do's and Don'ts
533
- - Commands (file-scoped for speed)
534
- - Safety and permissions
535
- - Code examples
536
- - Testing approach
537
-
538
- **Example investigation:**
539
-
540
- ```bash
541
- # Find AI documentation
542
- find . -name "AGENTS.md" -o -name "CLAUDE.md" -o -name "llms.txt"
543
-
544
- # AI-relevant patterns
545
- cat AGENTS.md || echo "No AI documentation found"
546
- ```
547
-
548
- </extraction_focus>
549
-
550
- ---
551
-
552
- ### 11. React Query Patterns (Detailed)
553
-
554
- <extraction_focus area="react-query">
555
- **What to extract:**
556
-
557
- - Query key structure (hierarchical factories)
558
- - Custom hooks patterns (wrapping useQuery/useMutation)
559
- - Error handling strategies
560
- - Retry configuration
561
- - Cache time and stale time defaults
562
- - Optimistic updates
563
- - Loading and error state management
564
- - Query client configuration
565
- - Prefetching strategies
566
- - Infinite queries
567
-
568
- **Example query key factory:**
569
-
570
- ```typescript
571
- const postsQueryKeys = {
572
- all: ["posts"] as const,
573
- lists: () => [...postsQueryKeys.all, "list"] as const,
574
- list: (filters: Filters) => [...postsQueryKeys.lists(), { filters }] as const,
575
- details: () => [...postsQueryKeys.all, "detail"] as const,
576
- detail: (id: number) => [...postsQueryKeys.details(), id] as const,
577
- };
578
- ```
579
-
580
- **Example investigation:**
581
-
582
- ```bash
583
- # Query key patterns
584
- grep -r "queryKey:" --include="*.ts*" | head -20
585
-
586
- # Custom hooks
587
- grep -r "useQuery\|useMutation" --include="*.ts*" | head -10
588
-
589
- # Cache configuration
590
- grep -r "staleTime\|cacheTime" --include="*.ts*"
591
- ```
592
-
593
- </extraction_focus>
594
-
595
- ---
596
-
597
- ### 12. Next.js Conventions (Detailed)
598
-
599
- <extraction_focus area="nextjs">
600
- **What to extract:**
601
-
602
- - App Router vs Pages Router usage
603
- - File-based routing patterns
604
- - Data fetching approaches (Server Components, Client Components)
605
- - API route organization
606
- - Middleware usage
607
- - Metadata API patterns
608
- - Image optimization conventions
609
- - Font optimization
610
- - Environment variable handling (NEXT*PUBLIC*)
611
- - Build configuration (next.config.js)
612
-
613
- **Example investigation:**
614
-
615
- ```bash
616
- # Routing structure
617
- find . -name "page.tsx" -o -name "layout.tsx" | head -10
618
-
619
- # Data fetching
620
- grep -r "use client\|use server" --include="*.tsx" | wc -l
621
-
622
- # API routes
623
- find . -path "*/api/*" -name "route.ts" | head -10
624
-
625
- # Middleware
626
- find . -name "middleware.ts"
627
- ```
628
-
629
- </extraction_focus>
630
-
631
- ---
632
-
633
- ### 13. Component Architecture Patterns
634
-
635
- <extraction_focus area="components">
636
- **What to extract:**
637
-
638
- - Component composition patterns
639
- - Props interface conventions
640
- - Children and render prop usage
641
- - Compound component patterns
642
- - HOCs and wrapper components
643
- - Component file structure
644
- - Co-location strategies (tests, styles)
645
- - Atomic design implementation (if used)
646
- - Component library organization
647
-
648
- **Example investigation:**
649
-
650
- ```bash
651
- # Component patterns
652
- find . -name "*.tsx" -type f | head -20
653
-
654
- # Props interfaces
655
- grep -r "interface.*Props" --include="*.tsx" | head -10
656
-
657
- # Composition patterns
658
- grep -r "children:" --include="*.tsx" | head -10
659
-
660
- # Compound components
661
- grep -r "Context\|Provider" --include="*.tsx" | wc -l
662
- ```
663
-
664
- </extraction_focus>
665
-
666
- ---
667
-
668
- ### 14. Type Definition Standards
669
-
670
- <extraction_focus area="types">
671
- **What to extract:**
672
-
673
- - Interface vs type usage patterns
674
- - Generic type conventions
675
- - Utility type usage (Pick, Omit, Partial)
676
- - Type inference patterns
677
- - API response type definitions
678
- - Shared type organization
679
- - Discriminated unions
680
- - Type guards and narrowing
681
-
682
- **Example investigation:**
683
-
684
- ```bash
685
- # Type patterns
686
- grep -r "interface\|type " --include="*.ts" | head -20
687
-
688
- # Type utilities
689
- grep -r "Pick<\|Omit<\|Partial<" --include="*.ts*" | wc -l
690
-
691
- # Generics
692
- grep -r "<T\|<T,\|<T extends" --include="*.ts*" | head -10
693
-
694
- # Type guards
695
- grep -r "is " --include="*.ts" | grep ":" | head -10
696
- ```
697
-
698
- </extraction_focus>
699
-
700
- ---
701
-
702
- ### 15. Mock Data Patterns
703
-
704
- <extraction_focus area="mock-data">
705
- **What to extract:**
706
-
707
- - Mock data structure and organization
708
- - Factory functions or generators
709
- - Realistic vs minimal mocks
710
- - Mock data reuse patterns
711
- - Integration with testing
712
- - Development mode data loading
713
- - MSW (Mock Service Worker) usage
714
- - Mock vs stub vs fake distinctions
715
-
716
- **Example investigation:**
717
-
718
- ```bash
719
- # Mock data location
720
- find . -name "*mock*" -o -name "*fixture*" | head -10
721
-
722
- # Mock patterns
723
- grep -r "mockData\|fixture\|factory" --include="*.ts" | head -10
724
-
725
- # MSW handlers
726
- find . -name "*handlers*" -o -name "*mocks/server*"
727
-
728
- # Development data
729
- grep -r "NODE_ENV.*development" --include="*.ts*" | head -5
730
- ```
731
-
732
- </extraction_focus>
733
-
734
- ---
735
-
736
- <retrieval_strategy>
737
-
738
- ## Retrieval Strategy
739
-
740
- **Just-in-time loading for pattern extraction:**
741
-
742
- ```
743
- Need to find files to analyze?
744
- ├── Know exact filename → Read directly
745
- ├── Know pattern (*.tsx, *.test.ts) → Glob
746
- └── Need to understand directory structure → Glob with broader pattern
747
-
748
- Need to find pattern instances?
749
- ├── Know exact pattern → Grep with exact string
750
- ├── Know pattern structure → Grep with regex
751
- └── Need frequency count → Grep with count option
752
-
753
- Progressive Exploration:
754
- 1. Glob to find relevant file paths
755
- 2. Grep to count pattern frequency across files
756
- 3. Read specific files for detailed analysis (file:line references)
757
- ```
758
-
759
- **Load skills dynamically** when comparing extracted patterns against documented standards.
760
- </retrieval_strategy>
761
-
762
- ---
763
-
764
- **Additional Anti-Over-Engineering Check for Pattern Scouting:**
765
-
766
- Before documenting a pattern, ask:
767
-
768
- 1. **Is it actually used?** (Not just defined once and forgotten)
769
- 2. **Does it solve a real problem?** (Not just clever engineering)
770
- 3. **Is it consistent?** (3+ instances, not a one-off experiment)
771
- 4. **Would someone understand it without me?** (Self-documenting patterns only)
772
-
773
- **Skip patterns that:**
774
-
775
- - Only appear once or twice
776
- - Are overly abstract without clear benefit
777
- - Were clearly experiments that weren't adopted
778
- - Require extensive explanation to understand
779
-
780
- **We want standards that emerged naturally, not aspirational ones.**
781
-
782
- ## Comprehensive Output Format
783
-
784
- <output_format>
785
- Create a file at `./extracted-standards.md` with this structure:
786
-
787
- ```markdown
788
- # [Project Name] - Comprehensive Standards & Patterns
789
-
790
- **Extraction Date:** [YYYY-MM-DD]
791
- **Codebase Version:** [commit hash if available]
792
- **Monorepo Tool:** [Turborepo/Nx/Lerna/Yarn Workspaces]
793
- **Confidence Level:** [High/Medium/Low] - based on pattern consistency
794
-
795
- ---
796
-
797
- ## Table of Contents
798
-
799
- 1. [Package Architecture](#1-package-architecture)
800
- 2. [Code Conventions](#2-code-conventions)
801
- 3. [State Management](#3-state-management)
802
- 4. [Testing Standards](#4-testing-standards)
803
- 5. [Design System](#5-design-system)
804
- 6. [Accessibility](#6-accessibility)
805
- 7. [Build & Tooling](#7-build--tooling)
806
- 8. [CI/CD Pipelines](#8-cicd-pipelines)
807
- 9. [Environment Management](#9-environment-management)
808
- 10. [Architecture Decisions](#10-architecture-decisions)
809
- 11. [AI Agent Optimization](#11-ai-agent-optimization)
810
- 12. [Performance Standards](#12-performance-standards)
811
- 13. [Security Patterns](#13-security-patterns)
812
- 14. [Git Workflow](#14-git-workflow)
813
- 15. [Anti-Patterns Observed](#15-anti-patterns-observed)
814
- 16. [Quick Reference for AI](#16-quick-reference-for-ai)
815
-
816
- ---
817
-
818
- ## 1. Package Architecture
819
-
820
- ### 1.1 Workspace Structure
821
-
822
- **Pattern:** [Describe workspace organization]
823
- **Frequency:** Found in X packages
824
- **Example:**
825
- ```
826
-
827
- packages/
828
- ├── ui/ # type:ui - Shared components
829
- ├── utils/ # type:util - Pure functions
830
- apps/
831
- ├── web/ # Next.js application
832
-
833
- `````
834
- **Rationale:** [Why this organization works]
835
-
836
- ### 1.2 Package Naming Conventions
837
-
838
- **Pattern:** All internal packages use `@repo/` prefix
839
- **Example:**
840
- ```json
841
- {
842
- "name": "@repo/ui",
843
- "dependencies": {
844
- "@repo/utils": "workspace:*"
845
- }
846
- }
847
- ```
848
-
849
- **Rationale:** [Why workspace protocol is used]
850
-
851
- ### 1.3 Dependency Boundaries
852
-
853
- **Pattern:** [Document ESLint rules or Nx constraints]
854
- **Example:**
855
-
856
- ```javascript
857
- // eslintrc.js:45-60
858
- {
859
- '@nx/enforce-module-boundaries': ['error', {
860
- depConstraints: [
861
- {
862
- sourceTag: 'type:ui',
863
- onlyDependOnLibsWithTags: ['type:ui', 'type:util']
864
- }
865
- ]
866
- }]
867
- }
868
- ```
869
-
870
- **Gotchas:** [Circular dependency issues observed]
871
-
872
- ### 1.4 Import Conventions
873
-
874
- **Pattern:** Use package names, not path aliases
875
- **Example:**
876
-
877
- ```typescript
878
- // Good: packages/web/src/components/Button.tsx
879
- import { cn } from "@repo/utils";
880
-
881
- // Bad (avoid):
882
- import { cn } from "@/lib/utils";
883
- ```
884
-
885
- **Rationale:** [Better IDE support, clearer dependencies]
886
-
887
- ### 1.5 Versioning Strategy
888
-
889
- **Pattern:** Changesets for automated versioning
890
- **Tools:** [@changesets/cli](https://github.com/changesets/changesets)
891
- **Usage:** [How team manages package versions]
892
-
893
- ---
894
-
895
- ## 2. Code Conventions
896
-
897
- ### 2.1 Component Architecture
898
-
899
- **Pattern:** [Composition patterns]
900
- **Example:**
901
-
902
- ```typescript
903
- // packages/ui/src/Button.tsx:12-45
904
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
905
- variant?: 'primary' | 'secondary';
906
- size?: 'sm' | 'md' | 'lg';
907
- }
908
-
909
- export const Button = ({ variant = 'primary', size = 'md', ...props }: ButtonProps) => {
910
- return <button className={cn(styles[variant], styles[size])} {...props} />
911
- }
912
- ```
913
-
914
- **Rationale:** [Extensible, type-safe props]
915
-
916
- ### 2.2 File and Directory Naming
917
-
918
- **Pattern:** [kebab-case, PascalCase, etc.]
919
- **Components:** PascalCase (`Button.tsx`, `UserProfile.tsx`)
920
- **Utilities:** kebab-case (`format-date.ts`, `api-client.ts`)
921
- **Tests:** Co-located with implementation (`Button.test.tsx`)
922
-
923
- ### 2.3 Import/Export Patterns
924
-
925
- **Pattern:** [Named exports vs default exports]
926
- **Example:**
927
-
928
- ```typescript
929
- // Prefer named exports for tree-shaking
930
- export { Button } from "./Button";
931
- export { Input } from "./Input";
932
-
933
- // Avoid default exports in libraries
934
- export default Button; // ❌
935
- ```
936
-
937
- ### 2.4 Type Definitions
938
-
939
- **Pattern:** Interface for object shapes, type for unions/intersections
940
- **Example:**
941
-
942
- ```typescript
943
- // Interface for extending
944
- interface UserProps {
945
- name: string;
946
- email: string;
947
- }
948
-
949
- // Type for unions
950
- type Status = "active" | "inactive" | "pending";
951
- ```
952
-
953
- ---
954
-
955
- ## 3. State Management
956
-
957
- ### 3.1 Server State vs Client State
958
-
959
- **Strategy:** Strict separation
960
- **Server State:** React Query for ALL server data
961
- **Client State:** Zustand for UI state, filters, preferences
962
-
963
- ### 3.2 React Query Patterns
964
-
965
- #### 3.2.1 Query Key Structure
966
-
967
- **Pattern:** Hierarchical query key factories
968
- **Example:**
969
-
970
- ```typescript
971
- // packages/api-client/src/posts/queries.ts:8-15
972
- export const postsQueryKeys = {
973
- all: ["posts"] as const,
974
- lists: () => [...postsQueryKeys.all, "list"] as const,
975
- list: (filters: Filters) => [...postsQueryKeys.lists(), { filters }] as const,
976
- details: () => [...postsQueryKeys.all, "detail"] as const,
977
- detail: (id: number) => [...postsQueryKeys.details(), id] as const,
978
- };
979
- ```
980
-
981
- **Rationale:** Enables prefix invalidation, type-safe keys
982
-
983
- #### 3.2.2 Custom Query Hooks
984
-
985
- **Pattern:** [Wrap useQuery in custom hooks]
986
- **Example:**
987
-
988
- ```typescript
989
- // packages/api-client/src/posts/hooks.ts:20-28
990
- export const usePost = (id: number) => {
991
- return useQuery({
992
- queryKey: postsQueryKeys.detail(id),
993
- queryFn: () => fetchPost(id),
994
- staleTime: 5 * 60 * 1000, // 5 minutes
995
- })
996
- }
997
- ```
998
-
999
- #### 3.2.3 Cache Invalidation
1000
-
1001
- **Pattern:** Prefix matching after mutations
1002
- **Example:**
1003
-
1004
- ```typescript
1005
- // After creating a post
1006
- queryClient.invalidateQueries({
1007
- queryKey: ["posts", "list"],
1008
- exact: false, // Invalidates all list queries
1009
- });
1010
- ```
1011
-
1012
- ### 3.3 Zustand Patterns
1013
-
1014
- **Pattern:** [When and how to use Zustand]
1015
- **Example:**
1016
-
1017
- ```typescript
1018
- // packages/ui/src/stores/filter-store.ts:5-12
1019
- export const useFilterStore = create<FilterState>((set) => ({
1020
- filters: { status: "all" },
1021
- setFilters: (filters) => set({ filters }),
1022
- resetFilters: () => set({ filters: { status: "all" } }),
1023
- }));
1024
- ```
1025
-
1026
- **Use cases:** UI state, modal state, filters, preferences
1027
-
1028
- ---
1029
-
1030
- ## 4. Testing Standards
1031
-
1032
- ### 4.1 Test Organization
1033
-
1034
- **Structure:** Co-located tests
1035
- **Naming:** `*.test.ts` for unit, `*.spec.ts` for integration
1036
- **Location:** Same directory as implementation
1037
-
1038
- ### 4.2 Unit Testing
1039
-
1040
- **Framework:** [Vitest/Jest]
1041
- **What to test:**
1042
-
1043
- - Business logic functions
1044
- - Custom hooks
1045
- - Utility functions
1046
- - Component behavior (not implementation)
1047
-
1048
- **What NOT to test:**
1049
-
1050
- - Type definitions
1051
- - Simple presentational components
1052
- - Third-party libraries
1053
-
1054
- **Example:**
1055
-
1056
- ```typescript
1057
- // packages/utils/src/format-date.test.ts:10-18
1058
- describe("formatDate", () => {
1059
- it("formats ISO date to readable format", () => {
1060
- expect(formatDate("2025-11-12")).toBe("November 12, 2025");
1061
- });
1062
- });
1063
- ```
1064
-
1065
- ### 4.3 Integration Testing
1066
-
1067
- **Strategy:** [API mocking with MSW]
1068
- **Example:**
1069
-
1070
- ```typescript
1071
- // packages/api-client/tests/posts.spec.ts:15-25
1072
- import { server } from "../mocks/server";
1073
-
1074
- beforeAll(() => server.listen());
1075
- afterEach(() => server.resetHandlers());
1076
- afterAll(() => server.close());
1077
- ```
1078
-
1079
- ### 4.4 E2E Testing
1080
-
1081
- **Framework:** [Playwright/Cypress]
1082
- **Coverage:** Critical user flows only
1083
- **Example:**
1084
-
1085
- ```typescript
1086
- // apps/web/tests/e2e/checkout.spec.ts:8-20
1087
- test("user can complete checkout", async ({ page }) => {
1088
- await page.goto("/products");
1089
- await page.click('[data-testid="add-to-cart"]');
1090
- await page.click('[data-testid="checkout"]');
1091
- // ...
1092
- });
1093
- ```
1094
-
1095
- ### 4.5 Coverage Requirements
1096
-
1097
- **Minimum thresholds:**
1098
-
1099
- - Branches: 80%
1100
- - Functions: 80%
1101
- - Lines: 80%
1102
- - Statements: 80%
1103
-
1104
- **Configuration:**
1105
-
1106
- ```json
1107
- // jest.config.base.js:20-25
1108
- {
1109
- "coverageThreshold": {
1110
- "global": {
1111
- "branches": 80,
1112
- "functions": 80,
1113
- "lines": 80,
1114
- "statements": 80
1115
- }
1116
- }
1117
- }
1118
- ```
1119
-
1120
- ### 4.6 Mock Data Patterns
1121
-
1122
- **Location:** `__mocks__/` directory per package
1123
- **Structure:** [Realistic vs minimal mocks]
1124
- **Example:**
1125
-
1126
- ```typescript
1127
- // packages/api-client/__mocks__/posts.ts:5-12
1128
- export const mockPost = {
1129
- id: 1,
1130
- title: "Test Post",
1131
- content: "Test content",
1132
- createdAt: "2025-11-12T00:00:00Z",
1133
- };
1134
- ```
1135
-
1136
- ---
1137
-
1138
- ## 5. Design System
1139
-
1140
- ### 5.1 Token Architecture
1141
-
1142
- **System:** Three-tier token structure
1143
- **Tiers:**
1144
-
1145
- 1. **Base tokens** - Raw values (--base-color-green-500)
1146
- 2. **Semantic tokens** - Purpose-driven (--bgColor-success)
1147
- 3. **Component tokens** - Component-specific (--button-success-bgColor)
1148
-
1149
- **Example:**
1150
-
1151
- ```css
1152
- /* styles/tokens/base.css:1-10 */
1153
- :root {
1154
- /* Tier 1: Base */
1155
- --base-color-green-500: #2da44e;
1156
-
1157
- /* Tier 2: Semantic */
1158
- --bgColor-success: var(--base-color-green-500);
1159
-
1160
- /* Tier 3: Component */
1161
- --button-success-bgColor: var(--bgColor-success);
1162
- }
1163
- ```
1164
-
1165
- ### 5.2 Color System
1166
-
1167
- **Pattern:** [Naming convention]
1168
- **Scale:** [50, 100, 200, ... 900]
1169
- **Usage:** Never use base tokens directly in components
1170
-
1171
- ### 5.3 Spacing System
1172
-
1173
- **Scale:** 8px base unit
1174
- **Tokens:**
1175
-
1176
- ```css
1177
- --space-1: 0.25rem; /* 4px */
1178
- --space-2: 0.5rem; /* 8px */
1179
- --space-4: 1rem; /* 16px */
1180
- --space-8: 2rem; /* 32px */
1181
- ```
1182
-
1183
- ### 5.4 Typography
1184
-
1185
- **Scale:** [Size scale and line heights]
1186
- **Example:**
1187
-
1188
- ```css
1189
- --fontSize-1: 0.75rem; /* 12px */
1190
- --fontSize-2: 0.875rem; /* 14px */
1191
- --fontSize-3: 1rem; /* 16px */
1192
- --lineHeight-default: 1.5;
1193
- ```
1194
-
1195
- ### 5.5 Theme Implementation
1196
-
1197
- **Approach:** [CSS variables for light/dark mode]
1198
- **Example:**
1199
-
1200
- ```css
1201
- [data-theme="light"] {
1202
- --bgColor-default: white;
1203
- --fgColor-default: black;
1204
- }
1205
-
1206
- [data-theme="dark"] {
1207
- --bgColor-default: black;
1208
- --fgColor-default: white;
1209
- }
1210
- ```
1211
-
1212
- ---
1213
-
1214
- ## 6. Accessibility
1215
-
1216
- ### 6.1 Keyboard Navigation Standards
1217
-
1218
- **Pattern:** [Document per component type]
1219
- **Example:**
1220
-
1221
- ```markdown
1222
- ### Button Keyboard Support
1223
-
1224
- - Tab: Moves focus to/from button
1225
- - Space/Enter: Activates button
1226
- - Escape: Closes dialog (if applicable)
1227
- ```
1228
-
1229
- ### 6.2 ARIA Patterns
1230
-
1231
- **Required ARIA:**
1232
-
1233
- ```tsx
1234
- // Icon-only button
1235
- <button aria-label="Close dialog">
1236
- <CloseIcon />
1237
- </button>
1238
-
1239
- // Toggle button
1240
- <button aria-pressed={isPressed}>
1241
- Subscribe
1242
- </button>
1243
- ```
1244
-
1245
- ### 6.3 Color Contrast Requirements
1246
-
1247
- **Standard:** WCAG 2.1 Level AA
1248
- **Requirements:**
1249
-
1250
- - Text: 4.5:1 minimum
1251
- - Large text (18pt+): 3:1 minimum
1252
- - UI components: 3:1 minimum
1253
-
1254
- ### 6.4 Testing Approach
1255
-
1256
- **Tools:** axe-core, jest-axe
1257
- **Example:**
1258
-
1259
- ```typescript
1260
- import { axe } from 'jest-axe';
1261
-
1262
- test('Button has no a11y violations', async () => {
1263
- const { container } = render(<Button>Click</Button>);
1264
- const results = await axe(container);
1265
- expect(results).toHaveNoViolations();
1266
- });
1267
- ```
1268
-
1269
- ### 6.5 Touch Target Sizes
1270
-
1271
- **Minimum:** 44×44px for all interactive elements
1272
- **Exception:** Inline text links
1273
-
1274
- ---
1275
-
1276
- ## 7. Build & Tooling
1277
-
1278
- ### 7.1 Turborepo Configuration
1279
-
1280
- **Pipeline:**
1281
-
1282
- ```json
1283
- // turbo.json:5-20
1284
- {
1285
- "tasks": {
1286
- "build": {
1287
- "dependsOn": ["^build"],
1288
- "outputs": ["dist/**", ".next/**"],
1289
- "inputs": ["src/**/*.ts", "src/**/*.tsx"]
1290
- },
1291
- "test": {
1292
- "dependsOn": ["build"],
1293
- "outputs": ["coverage/**"],
1294
- "cache": true
1295
- }
1296
- }
1297
- }
1298
- ```
1299
-
1300
- ### 7.2 Linting Configuration
1301
-
1302
- **Tool:** [ESLint/Biome]
1303
- **Configuration:**
1304
-
1305
- ```json
1306
- // .eslintrc.json:1-15
1307
- {
1308
- "extends": ["next/core-web-vitals", "prettier"],
1309
- "rules": {
1310
- "@typescript-eslint/no-unused-vars": "error",
1311
- "@typescript-eslint/no-explicit-any": "warn"
1312
- }
1313
- }
1314
- ```
1315
-
1316
- ### 7.3 Formatting
1317
-
1318
- **Tool:** [Prettier/Biome]
1319
- **Settings:**
1320
-
1321
- ```json
1322
- {
1323
- "printWidth": 100,
1324
- "semi": false,
1325
- "singleQuote": true,
1326
- "trailingComma": "es5"
1327
- }
1328
- ```
1329
-
1330
- ### 7.4 Pre-commit Hooks
1331
-
1332
- **Tool:** Husky + lint-staged
1333
- **Configuration:**
1334
-
1335
- ```bash
1336
- # .husky/pre-commit:3-5
1337
- npx lint-staged --concurrent false
1338
- ```
1339
-
1340
- ```json
1341
- // .lintstagedrc.json:1-5
1342
- {
1343
- "*.{ts,tsx}": ["eslint --fix", "prettier --write"],
1344
- "*.{json,md}": ["prettier --write"]
1345
- }
1346
- ```
1347
-
1348
- ### 7.5 Environment Handling
1349
-
1350
- **Turborepo env:**
1351
-
1352
- ```json
1353
- {
1354
- "globalEnv": ["DATABASE_URL"],
1355
- "env": ["NEXT_PUBLIC_API_URL"]
1356
- }
1357
- ```
1358
-
1359
- ---
1360
-
1361
- ## 8. CI/CD Pipelines
1362
-
1363
- ### 8.1 GitHub Actions Configuration
1364
-
1365
- **Pattern:** [Affected detection with Turborepo]
1366
- **Example:**
1367
-
1368
- ```yaml
1369
- # .github/workflows/ci.yml:15-30
1370
- jobs:
1371
- build:
1372
- steps:
1373
- - uses: actions/checkout@v4
1374
- with:
1375
- fetch-depth: 0
1376
-
1377
- - name: Build affected
1378
- run: pnpm turbo run build --filter=[HEAD^1]
1379
-
1380
- - name: Test affected
1381
- run: pnpm turbo run test --filter=[HEAD^1]
1382
- ```
1383
-
1384
- ### 8.2 Remote Caching
1385
-
1386
- **Provider:** [Vercel/S3/Custom]
1387
- **Setup:**
1388
-
1389
- ```yaml
1390
- env:
1391
- TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1392
- TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
1393
- ```
1394
-
1395
- ### 8.3 Quality Gates
1396
-
1397
- **Requirements:**
1398
-
1399
- - All tests pass
1400
- - Coverage thresholds met
1401
- - No linting errors
1402
- - Build succeeds
1403
-
1404
- ---
1405
-
1406
- ## 9. Environment Management
1407
-
1408
- ### 9.1 File Hierarchy
1409
-
1410
- **Loading order:**
1411
-
1412
- 1. `.env.defaults` - Default values (committed)
1413
- 2. `.env` - Local overrides (gitignored)
1414
- 3. `.env.local` - Package-specific (gitignored)
1415
- 4. `.env.production` - Production values (in CI)
1416
-
1417
- ### 9.2 Naming Conventions
1418
-
1419
- **Public variables:** `NEXT_PUBLIC_`, `VITE_`, `PUBLIC_`
1420
- **Secret variables:** Never prefixed with public markers
1421
-
1422
- ### 9.3 Template
1423
-
1424
- **Pattern:** Maintain `.env.template` with all variables (no values)
1425
- **Example:**
1426
-
1427
- ```bash
1428
- # .env.template:1-10
1429
- DATABASE_URL=
1430
- REDIS_URL=
1431
- NEXT_PUBLIC_API_URL=
1432
- NEXT_PUBLIC_APP_URL=
1433
- ```
1434
-
1435
- ---
1436
-
1437
- ## 10. Architecture Decisions
1438
-
1439
- ### 10.1 ADR Structure
1440
-
1441
- **Template:** MADR (Markdown Any Decision Records)
1442
- **Location:** `docs/decisions/`
1443
- **Naming:** `NNNN-title-with-dashes.md`
1444
-
1445
- ### 10.2 ADR Template
1446
-
1447
- ```markdown
1448
- # [Short title of decision]
1449
-
1450
- ## Context and Problem Statement
1451
-
1452
- [Describe context and question forcing decision]
1453
-
1454
- ## Decision Drivers
1455
-
1456
- - [Driver 1]
1457
- - [Driver 2]
1458
-
1459
- ## Considered Options
1460
-
1461
- - [Option 1]
1462
- - [Option 2]
1463
-
1464
- ## Decision Outcome
1465
-
1466
- Chosen: [option 1]
1467
-
1468
- ### Consequences
1469
-
1470
- - Good: [positive outcome]
1471
- - Bad: [negative consequence]
1472
-
1473
- ## Confirmation
1474
-
1475
- [How to verify decision is working]
1476
- ```
1477
-
1478
- ### 10.3 Decisions Recorded
1479
-
1480
- **Found ADRs:**
1481
-
1482
- - [List any existing ADRs discovered]
1483
-
1484
- **Recommended to document:**
1485
-
1486
- - Technology choices (Turborepo, state management)
1487
- - Package organization rationale
1488
- - Testing framework selection
1489
- - Build tool decisions
1490
-
1491
- ---
1492
-
1493
- ## 11. AI Agent Optimization
1494
-
1495
- ### 11.1 AGENTS.md Structure
1496
-
1497
- **Location:** Root of repository
1498
- **Sections:**
1499
-
1500
- - Tech stack summary
1501
- - Do's and Don'ts
1502
- - Commands (file-scoped for fast feedback)
1503
- - Safety and permissions
1504
-
1505
- **Example content:**
1506
-
1507
- ````markdown
1508
- # Development Guidelines for AI Agents
1509
-
1510
- ## Tech Stack
1511
-
1512
- - **Monorepo:** Turborepo with pnpm workspaces
1513
- - **Frontend:** Next.js 15 (App Router)
1514
- - **State:** React Query + Zustand
1515
- - **Styling:** CSS variables with 3-tier tokens
1516
-
1517
- ## Do's
1518
-
1519
- - Use workspace protocol for internal deps
1520
- - Use React Query for ALL server data
1521
- - Use three-tier design token system
1522
-
1523
- ## Don'ts
1524
-
1525
- - Don't hardcode colors, use tokens
1526
- - Don't use path aliases, use package names
1527
- - Don't mix server state in Zustand
1528
-
1529
- ## Commands (File-Scoped)
1530
-
1531
- ```bash
1532
- # Fast feedback commands
1533
- pnpm tsc --noEmit path/to/file.ts
1534
- pnpm prettier --write path/to/file.ts
1535
- pnpm eslint path/to/file.ts
1536
- ```
1537
- `````
1538
-
1539
- ### 11.2 CLAUDE.md for Memory
1540
-
1541
- **Pattern:** [Project-wide context]
1542
- **Location:** Root + package-level files
1543
-
1544
- ---
1545
-
1546
- ## 12. Performance Standards
1547
-
1548
- ### 12.1 Build Performance
1549
-
1550
- **Targets:**
1551
-
1552
- - Full build: < 2 minutes
1553
- - Incremental build: < 30 seconds
1554
- - Cache hit ratio: > 80%
1555
-
1556
- ### 12.2 Bundle Size Budgets
1557
-
1558
- **Limits:**
1559
-
1560
- ```json
1561
- {
1562
- "budgets": [
1563
- {
1564
- "type": "bundle",
1565
- "name": "main",
1566
- "maximumSize": "200kb"
1567
- }
1568
- ]
1569
- }
1570
- ```
1571
-
1572
- ### 12.3 Runtime Performance
1573
-
1574
- **Targets:**
1575
-
1576
- - First Contentful Paint: < 1.8s
1577
- - Largest Contentful Paint: < 2.5s
1578
- - Time to Interactive: < 3.8s
1579
- - Cumulative Layout Shift: < 0.1
1580
-
1581
- ---
1582
-
1583
- ## 13. Security Patterns
1584
-
1585
- ### 13.1 Secret Management
1586
-
1587
- **Pattern:** Never commit secrets
1588
- **Tools:** [Environment variables, secret management]
1589
-
1590
- ### 13.2 Dependency Security
1591
-
1592
- **Tools:** Dependabot, Snyk
1593
- **Process:** [Automated security updates]
1594
-
1595
- ### 13.3 Code Ownership
1596
-
1597
- **File:** CODEOWNERS
1598
- **Pattern:** [Define package owners]
1599
-
1600
- ---
1601
-
1602
- ## 14. Git Workflow
1603
-
1604
- ### 14.1 Branch Strategy
1605
-
1606
- **Pattern:** [trunk-based, git-flow, GitHub flow]
1607
-
1608
- ### 14.2 Commit Conventions
1609
-
1610
- **Format:** [Conventional Commits]
1611
- **Example:**
1612
-
1613
- ```
1614
- feat(ui): add Button component
1615
- fix(api-client): handle network errors
1616
- docs(readme): update installation steps
1617
- ```
1618
-
1619
- ### 14.3 Code Review Process
1620
-
1621
- **Requirements:**
1622
-
1623
- - [Number of approvals]
1624
- - [Quality checks must pass]
1625
-
1626
- ---
1627
-
1628
- ## 15. Anti-Patterns Observed
1629
-
1630
- ### 15.1 [Anti-pattern name]
1631
-
1632
- **What:** [Describe the anti-pattern]
1633
- **Where:** Found in [files]
1634
- **Why problematic:** [Consequences]
1635
- **Better approach:** [What should be done instead]
1636
-
1637
- [Repeat for each anti-pattern discovered]
1638
-
1639
- ---
1640
-
1641
- ## 16. Quick Reference for AI Agents
1642
-
1643
- ### Essential Patterns
1644
-
1645
- ```typescript
1646
- // Query hook
1647
- export const usePost = (id: number) => {
1648
- return useQuery({
1649
- queryKey: ['posts', 'detail', id],
1650
- queryFn: () => fetchPost(id)
1651
- })
1652
- }
1653
-
1654
- // Component with tokens
1655
- <button className={styles.primary}>
1656
- {/* Styles use CSS variables: */}
1657
- {/* background: var(--button-primary-bgColor); */}
1658
- </button>
1659
-
1660
- // Package imports
1661
- import { Button } from '@repo/ui';
1662
- import { formatDate } from '@repo/utils';
1663
- ```
1664
-
1665
- ### Critical Do's
1666
-
1667
- - [Top 5 most important do's extracted]
1668
-
1669
- ### Critical Don'ts
1670
-
1671
- - [Top 5 most important don'ts extracted]
1672
-
1673
- ### File-Scoped Commands (Fast Feedback)
1674
-
1675
- ```bash
1676
- # Type check single file
1677
- pnpm tsc --noEmit path/to/file.ts
1678
-
1679
- # Format single file
1680
- pnpm prettier --write path/to/file.ts
1681
-
1682
- # Lint single file
1683
- pnpm eslint path/to/file.ts
1684
-
1685
- # Test single file
1686
- pnpm vitest run path/to/file.test.ts
1687
- ```
1688
-
1689
- ---
1690
-
1691
- ## Confidence & Coverage Notes
1692
-
1693
- **High Confidence Patterns:** [List patterns seen 5+ times]
1694
- **Medium Confidence Patterns:** [List patterns seen 3-4 times]
1695
- **Low Confidence Patterns:** [List patterns seen 2 times - needs verification]
1696
-
1697
- **Coverage Gaps:** [Areas where patterns are inconsistent or missing]
1698
-
1699
- **Missing Documentation:**
1700
-
1701
- - [ ] Package architecture not documented
1702
- - [ ] Testing standards undefined
1703
- - [ ] No ADRs found
1704
- - [ ] AGENTS.md missing
1705
-
1706
- ---
1707
-
1708
- ## Implementation Priority
1709
-
1710
- ### Immediate (Week 1)
1711
-
1712
- 1. Create AGENTS.md
1713
- 2. Document package architecture
1714
- 3. Define testing standards
1715
- 4. Clarify state management separation
1716
-
1717
- ### High Priority (Week 2-3)
1718
-
1719
- 5. Document design token system
1720
- 6. Optimize Turborepo configuration
1721
- 7. Setup ADR templates
1722
- 8. Improve CI/CD pipelines
1723
-
1724
- ### Ongoing
1725
-
1726
- - Keep AGENTS.md updated
1727
- - Record architectural decisions
1728
- - Maintain performance budgets
1729
- - Review and refactor anti-patterns
1730
-
1731
- ````
1732
-
1733
- </output_format>
1734
-
1735
- ---
1736
-
1737
- ## Quality Gates
1738
-
1739
- <quality_checks>
1740
- **Coverage Checklist (15+ categories):**
1741
-
1742
- - ✅ Package Architecture
1743
- - ✅ Code Conventions
1744
- - ✅ State Management
1745
- - ✅ Testing Standards
1746
- - ✅ Design System
1747
- - ✅ Accessibility
1748
- - ✅ Build & Tooling
1749
- - ✅ CI/CD
1750
- - ✅ Environment
1751
- - ✅ ADRs
1752
- - ✅ AI Optimization
1753
- - ✅ Performance
1754
- - ✅ Security
1755
- - ✅ Git Workflow
1756
- - ✅ Anti-Patterns
1757
-
1758
- **Quality Standards:**
1759
-
1760
- - ✅ Every pattern has 3+ real examples
1761
- - ✅ All file references include line numbers
1762
- - ✅ Rationale explains WHY, not just WHAT
1763
- - ✅ Anti-patterns have clear consequences
1764
- - ✅ Quick reference is copy-paste ready
1765
- - ✅ Confidence levels are honest
1766
- - ✅ Output is AI-consumable
1767
- - ✅ AGENTS.md section is complete
1768
- - ✅ Priority recommendations exist
1769
- - ✅ Coverage gaps are identified
1770
-
1771
- **Minimum standard:** At least 10 of 15 major categories documented with high confidence patterns.
1772
- </quality_checks>
1773
-
1774
- ---
1775
-
1776
- ## Usage Instructions
1777
-
1778
- To use this agent for comprehensive monorepo pattern scouting:
1779
-
1780
- ```bash
1781
- # Comprehensive extraction covering all 15+ categories
1782
- claude --agent @pattern-scout.md "Perform comprehensive monorepo pattern scouting"
1783
-
1784
- # Focused extraction of specific areas
1785
- claude --agent @pattern-scout.md "Extract package architecture and testing standards"
1786
-
1787
- # Validation of existing extracted-standards.md
1788
- claude --agent @pattern-scout.md "Review extracted-standards.md for completeness"
1789
-
1790
- # Update after codebase changes
1791
- claude --agent @pattern-scout.md "Update extracted-standards.md with new patterns"
1792
- ````
1793
-
1794
- **What this agent delivers:**
1795
-
1796
- 1. Complete `extracted-standards.md` (~8,000-12,000 lines)
1797
- 2. Coverage of 15+ major categories
1798
- 3. Production-grade standards (Vercel/GitHub/Shopify quality)
1799
- 4. AI-optimized format
1800
- 5. Actionable implementation plan
1801
-
1802
- **Time investment:**
1803
-
1804
- - Comprehensive extraction: ~6 hours
1805
- - Focused extraction (3-5 categories): ~2 hours
1806
- - Validation/updates: ~30-60 minutes