agents-inc 0.149.2 → 0.151.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (572) hide show
  1. package/CHANGELOG.md +2287 -0
  2. package/LICENSE +21 -0
  3. package/README.md +136 -19
  4. package/assets/demo.gif +0 -0
  5. package/assets/demo.tape +266 -0
  6. package/assets/logo.svg +75 -0
  7. package/dist/chunk-2RSNKBXC.js +84 -0
  8. package/dist/chunk-2RSNKBXC.js.map +1 -0
  9. package/dist/chunk-3LIU2ZEF.js +1355 -0
  10. package/dist/chunk-3LIU2ZEF.js.map +1 -0
  11. package/dist/chunk-3XFUQ6OL.js +68 -0
  12. package/dist/chunk-3XFUQ6OL.js.map +1 -0
  13. package/dist/chunk-3YGUHWLR.js +258 -0
  14. package/dist/chunk-3YGUHWLR.js.map +1 -0
  15. package/dist/chunk-44LLPS2N.js +1135 -0
  16. package/dist/chunk-44LLPS2N.js.map +1 -0
  17. package/dist/chunk-4R6PGHQQ.js +300 -0
  18. package/dist/chunk-4R6PGHQQ.js.map +1 -0
  19. package/dist/chunk-5V2O6C3T.js +112 -0
  20. package/dist/chunk-5V2O6C3T.js.map +1 -0
  21. package/dist/chunk-6RBQBOBS.js +287 -0
  22. package/dist/chunk-6RBQBOBS.js.map +1 -0
  23. package/dist/chunk-7QIHKQL5.js +181 -0
  24. package/dist/chunk-7QIHKQL5.js.map +1 -0
  25. package/dist/chunk-BNE4HHIH.js +28 -0
  26. package/dist/chunk-BNE4HHIH.js.map +1 -0
  27. package/dist/chunk-C55DN7GE.js +35 -0
  28. package/dist/chunk-C55DN7GE.js.map +1 -0
  29. package/dist/chunk-DAG2ULNF.js +125 -0
  30. package/dist/chunk-DAG2ULNF.js.map +1 -0
  31. package/dist/chunk-DG2NGZ7S.js +10929 -0
  32. package/dist/chunk-DG2NGZ7S.js.map +1 -0
  33. package/dist/chunk-DIBCRIMR.js +36 -0
  34. package/dist/chunk-DIBCRIMR.js.map +1 -0
  35. package/dist/chunk-DUVWGO6E.js +54 -0
  36. package/dist/chunk-DUVWGO6E.js.map +1 -0
  37. package/dist/chunk-EKWAUOQB.js +96 -0
  38. package/dist/chunk-EKWAUOQB.js.map +1 -0
  39. package/dist/chunk-ES3NJZON.js +31 -0
  40. package/dist/chunk-ES3NJZON.js.map +1 -0
  41. package/dist/chunk-EVXG3X6G.js +179 -0
  42. package/dist/chunk-EVXG3X6G.js.map +1 -0
  43. package/dist/chunk-EZ7STXUV.js +349 -0
  44. package/dist/chunk-EZ7STXUV.js.map +1 -0
  45. package/dist/chunk-FYPUUYSG.js +31 -0
  46. package/dist/chunk-FYPUUYSG.js.map +1 -0
  47. package/dist/chunk-GYG5SE2D.js +81 -0
  48. package/dist/chunk-GYG5SE2D.js.map +1 -0
  49. package/dist/chunk-I3XKEGHM.js +16383 -0
  50. package/dist/chunk-I3XKEGHM.js.map +1 -0
  51. package/dist/chunk-IHO75PMZ.js +40 -0
  52. package/dist/chunk-IHO75PMZ.js.map +1 -0
  53. package/dist/chunk-IOJR5TOY.js +47 -0
  54. package/dist/chunk-IOJR5TOY.js.map +1 -0
  55. package/dist/chunk-K3OU6TGX.js +77 -0
  56. package/dist/chunk-K3OU6TGX.js.map +1 -0
  57. package/dist/chunk-KIR7VYQD.js +63 -0
  58. package/dist/chunk-KIR7VYQD.js.map +1 -0
  59. package/dist/chunk-KOPEM3Q7.js +27 -0
  60. package/dist/chunk-KOPEM3Q7.js.map +1 -0
  61. package/dist/chunk-KSZ6PCY4.js +43 -0
  62. package/dist/chunk-KSZ6PCY4.js.map +1 -0
  63. package/dist/chunk-LAXAQ3PZ.js +235 -0
  64. package/dist/chunk-LAXAQ3PZ.js.map +1 -0
  65. package/dist/chunk-LYYXX2W5.js +87 -0
  66. package/dist/chunk-LYYXX2W5.js.map +1 -0
  67. package/dist/chunk-NGLQ5W7U.js +339 -0
  68. package/dist/chunk-NGLQ5W7U.js.map +1 -0
  69. package/dist/chunk-NHCGC6DG.js +111 -0
  70. package/dist/chunk-NHCGC6DG.js.map +1 -0
  71. package/dist/chunk-NIKUMXE7.js +24 -0
  72. package/dist/chunk-NIKUMXE7.js.map +1 -0
  73. package/dist/chunk-NM3EDGB5.js +300 -0
  74. package/dist/chunk-NM3EDGB5.js.map +1 -0
  75. package/dist/chunk-O5ASLZ2K.js +270 -0
  76. package/dist/chunk-O5ASLZ2K.js.map +1 -0
  77. package/dist/chunk-OJIESW5B.js +174 -0
  78. package/dist/chunk-OJIESW5B.js.map +1 -0
  79. package/dist/chunk-OZZGXBCN.js +15 -0
  80. package/dist/chunk-OZZGXBCN.js.map +1 -0
  81. package/dist/chunk-P3PN5SVI.js +27 -0
  82. package/dist/chunk-P3PN5SVI.js.map +1 -0
  83. package/dist/chunk-P56WJ5FA.js +50 -0
  84. package/dist/chunk-P56WJ5FA.js.map +1 -0
  85. package/dist/chunk-PG4G4IIK.js +24 -0
  86. package/dist/chunk-PG4G4IIK.js.map +1 -0
  87. package/dist/chunk-PV2HNW4I.js +382 -0
  88. package/dist/chunk-PV2HNW4I.js.map +1 -0
  89. package/dist/chunk-QQLRX4KI.js +41 -0
  90. package/dist/chunk-QQLRX4KI.js.map +1 -0
  91. package/dist/chunk-QTFQEYDA.js +789 -0
  92. package/dist/chunk-QTFQEYDA.js.map +1 -0
  93. package/dist/chunk-RBHYLCUB.js +31 -0
  94. package/dist/chunk-RBHYLCUB.js.map +1 -0
  95. package/dist/chunk-SHHOMVWC.js +62 -0
  96. package/dist/chunk-SHHOMVWC.js.map +1 -0
  97. package/dist/chunk-SI5FOARI.js +42 -0
  98. package/dist/chunk-SI5FOARI.js.map +1 -0
  99. package/dist/chunk-SYUOXSPU.js +510 -0
  100. package/dist/chunk-SYUOXSPU.js.map +1 -0
  101. package/dist/chunk-THKIOI32.js +939 -0
  102. package/dist/chunk-THKIOI32.js.map +1 -0
  103. package/dist/chunk-TVHRMRD3.js +6014 -0
  104. package/dist/chunk-TVHRMRD3.js.map +1 -0
  105. package/dist/chunk-TYJLR32W.js +128 -0
  106. package/dist/chunk-TYJLR32W.js.map +1 -0
  107. package/dist/chunk-UFURYGD3.js +20 -0
  108. package/dist/chunk-UFURYGD3.js.map +1 -0
  109. package/dist/chunk-UTFN6UJS.js +253 -0
  110. package/dist/chunk-UTFN6UJS.js.map +1 -0
  111. package/dist/chunk-V7QOSGQA.js +298 -0
  112. package/dist/chunk-V7QOSGQA.js.map +1 -0
  113. package/dist/chunk-VEP23B5W.js +27 -0
  114. package/dist/chunk-VEP23B5W.js.map +1 -0
  115. package/dist/chunk-VG2TVBFN.js +52 -0
  116. package/dist/chunk-VG2TVBFN.js.map +1 -0
  117. package/dist/chunk-WFWCZEMS.js +92 -0
  118. package/dist/chunk-WFWCZEMS.js.map +1 -0
  119. package/dist/chunk-WK4J2CHH.js +430 -0
  120. package/dist/chunk-WK4J2CHH.js.map +1 -0
  121. package/dist/chunk-XA57SX4T.js +115 -0
  122. package/dist/chunk-XA57SX4T.js.map +1 -0
  123. package/dist/chunk-Y4CXDA3I.js +181 -0
  124. package/dist/chunk-Y4CXDA3I.js.map +1 -0
  125. package/dist/chunk-YA4QQKKE.js +51 -0
  126. package/dist/chunk-YA4QQKKE.js.map +1 -0
  127. package/dist/chunk-YBVA7GPW.js +27 -0
  128. package/dist/chunk-YBVA7GPW.js.map +1 -0
  129. package/dist/chunk-YU2VGX5R.js +4205 -0
  130. package/dist/chunk-YU2VGX5R.js.map +1 -0
  131. package/dist/commands/build/marketplace.js +250 -0
  132. package/dist/commands/build/marketplace.js.map +1 -0
  133. package/dist/commands/build/plugins.js +176 -0
  134. package/dist/commands/build/plugins.js.map +1 -0
  135. package/dist/commands/compile.js +331 -0
  136. package/dist/commands/compile.js.map +1 -0
  137. package/dist/commands/doctor.js +475 -0
  138. package/dist/commands/doctor.js.map +1 -0
  139. package/dist/commands/edit.js +765 -0
  140. package/dist/commands/edit.js.map +1 -0
  141. package/dist/commands/eject.js +393 -0
  142. package/dist/commands/eject.js.map +1 -0
  143. package/dist/commands/import/skill.js +349 -0
  144. package/dist/commands/import/skill.js.map +1 -0
  145. package/dist/commands/init.js +66 -0
  146. package/dist/commands/init.js.map +1 -0
  147. package/dist/commands/list.js +115 -0
  148. package/dist/commands/list.js.map +1 -0
  149. package/dist/commands/new/agent.js +304 -0
  150. package/dist/commands/new/agent.js.map +1 -0
  151. package/dist/commands/new/marketplace.js +315 -0
  152. package/dist/commands/new/marketplace.js.map +1 -0
  153. package/dist/commands/new/skill.js +28 -0
  154. package/dist/commands/new/skill.js.map +1 -0
  155. package/dist/commands/search.js +176 -0
  156. package/dist/commands/search.js.map +1 -0
  157. package/dist/commands/uninstall.js +570 -0
  158. package/dist/commands/uninstall.js.map +1 -0
  159. package/dist/commands/update.js +368 -0
  160. package/dist/commands/update.js.map +1 -0
  161. package/dist/commands/validate.js +581 -0
  162. package/dist/commands/validate.js.map +1 -0
  163. package/dist/components/common/confirm.js +9 -0
  164. package/dist/components/common/confirm.js.map +1 -0
  165. package/dist/components/common/confirm.test.js +203 -0
  166. package/dist/components/common/confirm.test.js.map +1 -0
  167. package/dist/components/common/prompt-confirm.js +11 -0
  168. package/dist/components/common/prompt-confirm.js.map +1 -0
  169. package/dist/components/common/select-list.js +11 -0
  170. package/dist/components/common/select-list.js.map +1 -0
  171. package/dist/components/common/spinner.js +9 -0
  172. package/dist/components/common/spinner.js.map +1 -0
  173. package/dist/components/wizard/category-grid.js +16 -0
  174. package/dist/components/wizard/category-grid.js.map +1 -0
  175. package/dist/components/wizard/category-grid.test.js +1253 -0
  176. package/dist/components/wizard/category-grid.test.js.map +1 -0
  177. package/dist/components/wizard/checkbox-grid.js +14 -0
  178. package/dist/components/wizard/checkbox-grid.js.map +1 -0
  179. package/dist/components/wizard/checkbox-grid.test.js +264 -0
  180. package/dist/components/wizard/checkbox-grid.test.js.map +1 -0
  181. package/dist/components/wizard/domain-selection.js +22 -0
  182. package/dist/components/wizard/domain-selection.js.map +1 -0
  183. package/dist/components/wizard/run-wizard-session.js +47 -0
  184. package/dist/components/wizard/run-wizard-session.js.map +1 -0
  185. package/dist/components/wizard/scroll-affordance.js +10 -0
  186. package/dist/components/wizard/scroll-affordance.js.map +1 -0
  187. package/dist/components/wizard/search-modal.js +14 -0
  188. package/dist/components/wizard/search-modal.js.map +1 -0
  189. package/dist/components/wizard/search-modal.test.js +212 -0
  190. package/dist/components/wizard/search-modal.test.js.map +1 -0
  191. package/dist/components/wizard/selection-card.js +10 -0
  192. package/dist/components/wizard/selection-card.js.map +1 -0
  193. package/dist/components/wizard/skill-agent-summary.js +16 -0
  194. package/dist/components/wizard/skill-agent-summary.js.map +1 -0
  195. package/dist/components/wizard/source-grid.js +23 -0
  196. package/dist/components/wizard/source-grid.js.map +1 -0
  197. package/dist/components/wizard/source-grid.test.js +1094 -0
  198. package/dist/components/wizard/source-grid.test.js.map +1 -0
  199. package/dist/components/wizard/stack-selection.js +20 -0
  200. package/dist/components/wizard/stack-selection.js.map +1 -0
  201. package/dist/components/wizard/step-agents.js +22 -0
  202. package/dist/components/wizard/step-agents.js.map +1 -0
  203. package/dist/components/wizard/step-agents.test.js +204 -0
  204. package/dist/components/wizard/step-agents.test.js.map +1 -0
  205. package/dist/components/wizard/step-build.js +22 -0
  206. package/dist/components/wizard/step-build.js.map +1 -0
  207. package/dist/components/wizard/step-build.test.js +552 -0
  208. package/dist/components/wizard/step-build.test.js.map +1 -0
  209. package/dist/components/wizard/step-confirm.js +21 -0
  210. package/dist/components/wizard/step-confirm.js.map +1 -0
  211. package/dist/components/wizard/step-confirm.test.js +744 -0
  212. package/dist/components/wizard/step-confirm.test.js.map +1 -0
  213. package/dist/components/wizard/step-settings.js +19 -0
  214. package/dist/components/wizard/step-settings.js.map +1 -0
  215. package/dist/components/wizard/step-settings.test.js +244 -0
  216. package/dist/components/wizard/step-settings.test.js.map +1 -0
  217. package/dist/components/wizard/step-sources.js +28 -0
  218. package/dist/components/wizard/step-sources.js.map +1 -0
  219. package/dist/components/wizard/step-sources.test.js +155 -0
  220. package/dist/components/wizard/step-sources.test.js.map +1 -0
  221. package/dist/components/wizard/step-stack.js +21 -0
  222. package/dist/components/wizard/step-stack.js.map +1 -0
  223. package/dist/components/wizard/step-stack.test.js +262 -0
  224. package/dist/components/wizard/step-stack.test.js.map +1 -0
  225. package/dist/components/wizard/summary-panel.js +20 -0
  226. package/dist/components/wizard/summary-panel.js.map +1 -0
  227. package/dist/components/wizard/summary-panel.test.js +317 -0
  228. package/dist/components/wizard/summary-panel.test.js.map +1 -0
  229. package/dist/components/wizard/toast.js +10 -0
  230. package/dist/components/wizard/toast.js.map +1 -0
  231. package/dist/components/wizard/wizard-layout.js +26 -0
  232. package/dist/components/wizard/wizard-layout.js.map +1 -0
  233. package/dist/components/wizard/wizard-layout.test.js +200 -0
  234. package/dist/components/wizard/wizard-layout.test.js.map +1 -0
  235. package/dist/components/wizard/wizard-tabs.js +20 -0
  236. package/dist/components/wizard/wizard-tabs.js.map +1 -0
  237. package/dist/components/wizard/wizard-tabs.test.js +290 -0
  238. package/dist/components/wizard/wizard-tabs.test.js.map +1 -0
  239. package/dist/components/wizard/wizard.js +48 -0
  240. package/dist/components/wizard/wizard.js.map +1 -0
  241. package/dist/config-exports.js +20 -0
  242. package/dist/config-exports.js.map +1 -0
  243. package/dist/copy-local-skills-UPA2GUZV.js +15 -0
  244. package/dist/copy-local-skills-UPA2GUZV.js.map +1 -0
  245. package/dist/dist-VNJNNJK7.js +550 -0
  246. package/dist/dist-VNJNNJK7.js.map +1 -0
  247. package/dist/hooks/init.js +90 -0
  248. package/dist/hooks/init.js.map +1 -0
  249. package/dist/index.js +10 -0
  250. package/dist/index.js.map +1 -0
  251. package/dist/load-agent-defs-SB4XAOVB.js +16 -0
  252. package/dist/load-agent-defs-SB4XAOVB.js.map +1 -0
  253. package/dist/loader-E2ERJYVA.js +23 -0
  254. package/dist/loader-E2ERJYVA.js.map +1 -0
  255. package/dist/magic-string.es-5TV73NJD.js +1316 -0
  256. package/dist/magic-string.es-5TV73NJD.js.map +1 -0
  257. package/dist/recompile-project-agents-U4ZY2GDX.js +20 -0
  258. package/dist/recompile-project-agents-U4ZY2GDX.js.map +1 -0
  259. package/dist/source-loader-5UNRU7EZ.js +20 -0
  260. package/dist/source-loader-5UNRU7EZ.js.map +1 -0
  261. package/dist/source-manager-3O54SIIB.js +18 -0
  262. package/dist/source-manager-3O54SIIB.js.map +1 -0
  263. package/dist/src/agents/_templates/agent.liquid +161 -0
  264. package/dist/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
  265. package/dist/src/agents/_templates/methodologies/context-management.liquid +162 -0
  266. package/dist/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
  267. package/dist/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
  268. package/dist/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
  269. package/dist/src/agents/_templates/methodologies/write-verification.liquid +43 -0
  270. package/dist/src/agents/developer/ai-developer/critical-reminders.md +54 -0
  271. package/dist/src/agents/developer/ai-developer/critical-requirements.md +59 -0
  272. package/dist/src/agents/developer/ai-developer/identity.md +51 -0
  273. package/dist/src/agents/developer/ai-developer/metadata.yaml +12 -0
  274. package/dist/src/agents/developer/ai-developer/output.md +366 -0
  275. package/dist/src/agents/developer/ai-developer/playbook.md +335 -0
  276. package/dist/src/agents/developer/api-developer/critical-reminders.md +46 -0
  277. package/dist/src/agents/developer/api-developer/critical-requirements.md +44 -0
  278. package/dist/src/agents/developer/api-developer/identity.md +49 -0
  279. package/dist/src/agents/developer/api-developer/metadata.yaml +12 -0
  280. package/dist/src/agents/developer/api-developer/output.md +432 -0
  281. package/dist/src/agents/developer/api-developer/playbook.md +352 -0
  282. package/dist/src/agents/developer/cli-developer/critical-reminders.md +51 -0
  283. package/dist/src/agents/developer/cli-developer/critical-requirements.md +51 -0
  284. package/dist/src/agents/developer/cli-developer/identity.md +51 -0
  285. package/dist/src/agents/developer/cli-developer/metadata.yaml +12 -0
  286. package/dist/src/agents/developer/cli-developer/output.md +285 -0
  287. package/dist/src/agents/developer/cli-developer/playbook.md +386 -0
  288. package/dist/src/agents/developer/web-architecture/critical-reminders.md +48 -0
  289. package/dist/src/agents/developer/web-architecture/critical-requirements.md +65 -0
  290. package/dist/src/agents/developer/web-architecture/identity.md +64 -0
  291. package/dist/src/agents/developer/web-architecture/metadata.yaml +12 -0
  292. package/dist/src/agents/developer/web-architecture/output.md +449 -0
  293. package/dist/src/agents/developer/web-architecture/playbook.md +481 -0
  294. package/dist/src/agents/developer/web-developer/critical-reminders.md +40 -0
  295. package/dist/src/agents/developer/web-developer/critical-requirements.md +39 -0
  296. package/dist/src/agents/developer/web-developer/identity.md +32 -0
  297. package/dist/src/agents/developer/web-developer/metadata.yaml +12 -0
  298. package/dist/src/agents/developer/web-developer/output.md +323 -0
  299. package/dist/src/agents/developer/web-developer/playbook.md +349 -0
  300. package/dist/src/agents/meta/agent-summoner/critical-reminders.md +45 -0
  301. package/dist/src/agents/meta/agent-summoner/critical-requirements.md +52 -0
  302. package/dist/src/agents/meta/agent-summoner/identity.md +34 -0
  303. package/dist/src/agents/meta/agent-summoner/metadata.yaml +12 -0
  304. package/dist/src/agents/meta/agent-summoner/output.md +296 -0
  305. package/dist/src/agents/meta/agent-summoner/playbook.md +1469 -0
  306. package/dist/src/agents/meta/codex-keeper/critical-reminders.md +39 -0
  307. package/dist/src/agents/meta/codex-keeper/critical-requirements.md +29 -0
  308. package/dist/src/agents/meta/codex-keeper/identity.md +45 -0
  309. package/dist/src/agents/meta/codex-keeper/metadata.yaml +12 -0
  310. package/dist/src/agents/meta/codex-keeper/output.md +384 -0
  311. package/dist/src/agents/meta/codex-keeper/playbook.md +1183 -0
  312. package/dist/src/agents/meta/convention-keeper/critical-reminders.md +32 -0
  313. package/dist/src/agents/meta/convention-keeper/critical-requirements.md +32 -0
  314. package/dist/src/agents/meta/convention-keeper/identity.md +33 -0
  315. package/dist/src/agents/meta/convention-keeper/metadata.yaml +12 -0
  316. package/dist/src/agents/meta/convention-keeper/output.md +206 -0
  317. package/dist/src/agents/meta/convention-keeper/playbook.md +180 -0
  318. package/dist/src/agents/meta/skill-summoner/critical-reminders.md +112 -0
  319. package/dist/src/agents/meta/skill-summoner/critical-requirements.md +62 -0
  320. package/dist/src/agents/meta/skill-summoner/identity.md +31 -0
  321. package/dist/src/agents/meta/skill-summoner/metadata.yaml +13 -0
  322. package/dist/src/agents/meta/skill-summoner/output.md +390 -0
  323. package/dist/src/agents/meta/skill-summoner/playbook.md +1457 -0
  324. package/dist/src/agents/pattern/pattern-scout/critical-reminders.md +71 -0
  325. package/dist/src/agents/pattern/pattern-scout/critical-requirements.md +31 -0
  326. package/dist/src/agents/pattern/pattern-scout/identity.md +25 -0
  327. package/dist/src/agents/pattern/pattern-scout/metadata.yaml +10 -0
  328. package/dist/src/agents/pattern/pattern-scout/output.md +290 -0
  329. package/dist/src/agents/pattern/pattern-scout/playbook.md +1806 -0
  330. package/dist/src/agents/pattern/web-pattern-critique/critical-reminders.md +30 -0
  331. package/dist/src/agents/pattern/web-pattern-critique/critical-requirements.md +28 -0
  332. package/dist/src/agents/pattern/web-pattern-critique/identity.md +41 -0
  333. package/dist/src/agents/pattern/web-pattern-critique/metadata.yaml +12 -0
  334. package/dist/src/agents/pattern/web-pattern-critique/output.md +314 -0
  335. package/dist/src/agents/pattern/web-pattern-critique/playbook.md +572 -0
  336. package/dist/src/agents/planning/api-pm/critical-reminders.md +48 -0
  337. package/dist/src/agents/planning/api-pm/critical-requirements.md +41 -0
  338. package/dist/src/agents/planning/api-pm/identity.md +39 -0
  339. package/dist/src/agents/planning/api-pm/metadata.yaml +12 -0
  340. package/dist/src/agents/planning/api-pm/output.md +475 -0
  341. package/dist/src/agents/planning/api-pm/playbook.md +129 -0
  342. package/dist/src/agents/planning/web-pm/critical-reminders.md +36 -0
  343. package/dist/src/agents/planning/web-pm/critical-requirements.md +32 -0
  344. package/dist/src/agents/planning/web-pm/identity.md +26 -0
  345. package/dist/src/agents/planning/web-pm/metadata.yaml +12 -0
  346. package/dist/src/agents/planning/web-pm/output.md +314 -0
  347. package/dist/src/agents/planning/web-pm/playbook.md +318 -0
  348. package/dist/src/agents/researcher/api-researcher/critical-reminders.md +27 -0
  349. package/dist/src/agents/researcher/api-researcher/critical-requirements.md +28 -0
  350. package/dist/src/agents/researcher/api-researcher/identity.md +71 -0
  351. package/dist/src/agents/researcher/api-researcher/metadata.yaml +10 -0
  352. package/dist/src/agents/researcher/api-researcher/output.md +254 -0
  353. package/dist/src/agents/researcher/api-researcher/playbook.md +201 -0
  354. package/dist/src/agents/researcher/web-researcher/critical-reminders.md +39 -0
  355. package/dist/src/agents/researcher/web-researcher/critical-requirements.md +26 -0
  356. package/dist/src/agents/researcher/web-researcher/identity.md +69 -0
  357. package/dist/src/agents/researcher/web-researcher/metadata.yaml +10 -0
  358. package/dist/src/agents/researcher/web-researcher/output.md +241 -0
  359. package/dist/src/agents/researcher/web-researcher/playbook.md +217 -0
  360. package/dist/src/agents/reviewer/ai-reviewer/critical-reminders.md +40 -0
  361. package/dist/src/agents/reviewer/ai-reviewer/critical-requirements.md +37 -0
  362. package/dist/src/agents/reviewer/ai-reviewer/identity.md +51 -0
  363. package/dist/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
  364. package/dist/src/agents/reviewer/ai-reviewer/output.md +395 -0
  365. package/dist/src/agents/reviewer/ai-reviewer/playbook.md +90 -0
  366. package/dist/src/agents/reviewer/api-reviewer/critical-reminders.md +31 -0
  367. package/dist/src/agents/reviewer/api-reviewer/critical-requirements.md +27 -0
  368. package/dist/src/agents/reviewer/api-reviewer/identity.md +51 -0
  369. package/dist/src/agents/reviewer/api-reviewer/metadata.yaml +12 -0
  370. package/dist/src/agents/reviewer/api-reviewer/output.md +343 -0
  371. package/dist/src/agents/reviewer/api-reviewer/playbook.md +288 -0
  372. package/dist/src/agents/reviewer/cli-reviewer/critical-reminders.md +33 -0
  373. package/dist/src/agents/reviewer/cli-reviewer/critical-requirements.md +30 -0
  374. package/dist/src/agents/reviewer/cli-reviewer/identity.md +44 -0
  375. package/dist/src/agents/reviewer/cli-reviewer/metadata.yaml +12 -0
  376. package/dist/src/agents/reviewer/cli-reviewer/output.md +414 -0
  377. package/dist/src/agents/reviewer/cli-reviewer/playbook.md +218 -0
  378. package/dist/src/agents/reviewer/infra-reviewer/critical-reminders.md +38 -0
  379. package/dist/src/agents/reviewer/infra-reviewer/critical-requirements.md +38 -0
  380. package/dist/src/agents/reviewer/infra-reviewer/identity.md +53 -0
  381. package/dist/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
  382. package/dist/src/agents/reviewer/infra-reviewer/output.md +364 -0
  383. package/dist/src/agents/reviewer/infra-reviewer/playbook.md +161 -0
  384. package/dist/src/agents/reviewer/web-reviewer/critical-reminders.md +31 -0
  385. package/dist/src/agents/reviewer/web-reviewer/critical-requirements.md +26 -0
  386. package/dist/src/agents/reviewer/web-reviewer/identity.md +40 -0
  387. package/dist/src/agents/reviewer/web-reviewer/metadata.yaml +12 -0
  388. package/dist/src/agents/reviewer/web-reviewer/output.md +333 -0
  389. package/dist/src/agents/reviewer/web-reviewer/playbook.md +156 -0
  390. package/dist/src/agents/tester/api-tester/critical-reminders.md +41 -0
  391. package/dist/src/agents/tester/api-tester/critical-requirements.md +41 -0
  392. package/dist/src/agents/tester/api-tester/identity.md +47 -0
  393. package/dist/src/agents/tester/api-tester/metadata.yaml +12 -0
  394. package/dist/src/agents/tester/api-tester/output.md +284 -0
  395. package/dist/src/agents/tester/api-tester/playbook.md +275 -0
  396. package/dist/src/agents/tester/cli-tester/critical-reminders.md +36 -0
  397. package/dist/src/agents/tester/cli-tester/critical-requirements.md +36 -0
  398. package/dist/src/agents/tester/cli-tester/identity.md +43 -0
  399. package/dist/src/agents/tester/cli-tester/metadata.yaml +12 -0
  400. package/dist/src/agents/tester/cli-tester/output.md +313 -0
  401. package/dist/src/agents/tester/cli-tester/playbook.md +221 -0
  402. package/dist/src/agents/tester/web-tester/critical-reminders.md +31 -0
  403. package/dist/src/agents/tester/web-tester/critical-requirements.md +28 -0
  404. package/dist/src/agents/tester/web-tester/identity.md +41 -0
  405. package/dist/src/agents/tester/web-tester/metadata.yaml +12 -0
  406. package/dist/src/agents/tester/web-tester/output.md +321 -0
  407. package/dist/src/agents/tester/web-tester/playbook.md +428 -0
  408. package/dist/stores/d227-same-scope-tombstone-duplicate.test.js +118 -0
  409. package/dist/stores/d227-same-scope-tombstone-duplicate.test.js.map +1 -0
  410. package/dist/stores/wizard-store.js +21 -0
  411. package/dist/stores/wizard-store.js.map +1 -0
  412. package/dist/stores/wizard-store.test.js +3053 -0
  413. package/dist/stores/wizard-store.test.js.map +1 -0
  414. package/package.json +130 -12
  415. package/src/agents/_templates/agent.liquid +161 -0
  416. package/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
  417. package/src/agents/_templates/methodologies/context-management.liquid +162 -0
  418. package/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
  419. package/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
  420. package/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
  421. package/src/agents/_templates/methodologies/write-verification.liquid +43 -0
  422. package/src/agents/developer/ai-developer/critical-reminders.md +54 -0
  423. package/src/agents/developer/ai-developer/critical-requirements.md +59 -0
  424. package/src/agents/developer/ai-developer/identity.md +51 -0
  425. package/src/agents/developer/ai-developer/metadata.yaml +12 -0
  426. package/src/agents/developer/ai-developer/output.md +366 -0
  427. package/src/agents/developer/ai-developer/playbook.md +335 -0
  428. package/src/agents/developer/api-developer/critical-reminders.md +46 -0
  429. package/src/agents/developer/api-developer/critical-requirements.md +44 -0
  430. package/src/agents/developer/api-developer/identity.md +49 -0
  431. package/src/agents/developer/api-developer/metadata.yaml +12 -0
  432. package/src/agents/developer/api-developer/output.md +432 -0
  433. package/src/agents/developer/api-developer/playbook.md +352 -0
  434. package/src/agents/developer/cli-developer/critical-reminders.md +51 -0
  435. package/src/agents/developer/cli-developer/critical-requirements.md +51 -0
  436. package/src/agents/developer/cli-developer/identity.md +51 -0
  437. package/src/agents/developer/cli-developer/metadata.yaml +12 -0
  438. package/src/agents/developer/cli-developer/output.md +285 -0
  439. package/src/agents/developer/cli-developer/playbook.md +386 -0
  440. package/src/agents/developer/web-architecture/critical-reminders.md +48 -0
  441. package/src/agents/developer/web-architecture/critical-requirements.md +65 -0
  442. package/src/agents/developer/web-architecture/identity.md +64 -0
  443. package/src/agents/developer/web-architecture/metadata.yaml +12 -0
  444. package/src/agents/developer/web-architecture/output.md +449 -0
  445. package/src/agents/developer/web-architecture/playbook.md +481 -0
  446. package/src/agents/developer/web-developer/critical-reminders.md +40 -0
  447. package/src/agents/developer/web-developer/critical-requirements.md +39 -0
  448. package/src/agents/developer/web-developer/identity.md +32 -0
  449. package/src/agents/developer/web-developer/metadata.yaml +12 -0
  450. package/src/agents/developer/web-developer/output.md +323 -0
  451. package/src/agents/developer/web-developer/playbook.md +349 -0
  452. package/src/agents/meta/agent-summoner/critical-reminders.md +45 -0
  453. package/src/agents/meta/agent-summoner/critical-requirements.md +52 -0
  454. package/src/agents/meta/agent-summoner/identity.md +34 -0
  455. package/src/agents/meta/agent-summoner/metadata.yaml +12 -0
  456. package/src/agents/meta/agent-summoner/output.md +296 -0
  457. package/src/agents/meta/agent-summoner/playbook.md +1469 -0
  458. package/src/agents/meta/codex-keeper/critical-reminders.md +39 -0
  459. package/src/agents/meta/codex-keeper/critical-requirements.md +29 -0
  460. package/src/agents/meta/codex-keeper/identity.md +45 -0
  461. package/src/agents/meta/codex-keeper/metadata.yaml +12 -0
  462. package/src/agents/meta/codex-keeper/output.md +384 -0
  463. package/src/agents/meta/codex-keeper/playbook.md +1183 -0
  464. package/src/agents/meta/convention-keeper/critical-reminders.md +32 -0
  465. package/src/agents/meta/convention-keeper/critical-requirements.md +32 -0
  466. package/src/agents/meta/convention-keeper/identity.md +33 -0
  467. package/src/agents/meta/convention-keeper/metadata.yaml +12 -0
  468. package/src/agents/meta/convention-keeper/output.md +206 -0
  469. package/src/agents/meta/convention-keeper/playbook.md +180 -0
  470. package/src/agents/meta/skill-summoner/critical-reminders.md +112 -0
  471. package/src/agents/meta/skill-summoner/critical-requirements.md +62 -0
  472. package/src/agents/meta/skill-summoner/identity.md +31 -0
  473. package/src/agents/meta/skill-summoner/metadata.yaml +13 -0
  474. package/src/agents/meta/skill-summoner/output.md +390 -0
  475. package/src/agents/meta/skill-summoner/playbook.md +1457 -0
  476. package/src/agents/pattern/pattern-scout/critical-reminders.md +71 -0
  477. package/src/agents/pattern/pattern-scout/critical-requirements.md +31 -0
  478. package/src/agents/pattern/pattern-scout/identity.md +25 -0
  479. package/src/agents/pattern/pattern-scout/metadata.yaml +10 -0
  480. package/src/agents/pattern/pattern-scout/output.md +290 -0
  481. package/src/agents/pattern/pattern-scout/playbook.md +1806 -0
  482. package/src/agents/pattern/web-pattern-critique/critical-reminders.md +30 -0
  483. package/src/agents/pattern/web-pattern-critique/critical-requirements.md +28 -0
  484. package/src/agents/pattern/web-pattern-critique/identity.md +41 -0
  485. package/src/agents/pattern/web-pattern-critique/metadata.yaml +12 -0
  486. package/src/agents/pattern/web-pattern-critique/output.md +314 -0
  487. package/src/agents/pattern/web-pattern-critique/playbook.md +572 -0
  488. package/src/agents/planning/api-pm/critical-reminders.md +48 -0
  489. package/src/agents/planning/api-pm/critical-requirements.md +41 -0
  490. package/src/agents/planning/api-pm/identity.md +39 -0
  491. package/src/agents/planning/api-pm/metadata.yaml +12 -0
  492. package/src/agents/planning/api-pm/output.md +475 -0
  493. package/src/agents/planning/api-pm/playbook.md +129 -0
  494. package/src/agents/planning/web-pm/critical-reminders.md +36 -0
  495. package/src/agents/planning/web-pm/critical-requirements.md +32 -0
  496. package/src/agents/planning/web-pm/identity.md +26 -0
  497. package/src/agents/planning/web-pm/metadata.yaml +12 -0
  498. package/src/agents/planning/web-pm/output.md +314 -0
  499. package/src/agents/planning/web-pm/playbook.md +318 -0
  500. package/src/agents/researcher/api-researcher/critical-reminders.md +27 -0
  501. package/src/agents/researcher/api-researcher/critical-requirements.md +28 -0
  502. package/src/agents/researcher/api-researcher/identity.md +71 -0
  503. package/src/agents/researcher/api-researcher/metadata.yaml +10 -0
  504. package/src/agents/researcher/api-researcher/output.md +254 -0
  505. package/src/agents/researcher/api-researcher/playbook.md +201 -0
  506. package/src/agents/researcher/web-researcher/critical-reminders.md +39 -0
  507. package/src/agents/researcher/web-researcher/critical-requirements.md +26 -0
  508. package/src/agents/researcher/web-researcher/identity.md +69 -0
  509. package/src/agents/researcher/web-researcher/metadata.yaml +10 -0
  510. package/src/agents/researcher/web-researcher/output.md +241 -0
  511. package/src/agents/researcher/web-researcher/playbook.md +217 -0
  512. package/src/agents/reviewer/ai-reviewer/critical-reminders.md +40 -0
  513. package/src/agents/reviewer/ai-reviewer/critical-requirements.md +37 -0
  514. package/src/agents/reviewer/ai-reviewer/identity.md +51 -0
  515. package/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
  516. package/src/agents/reviewer/ai-reviewer/output.md +395 -0
  517. package/src/agents/reviewer/ai-reviewer/playbook.md +90 -0
  518. package/src/agents/reviewer/api-reviewer/critical-reminders.md +31 -0
  519. package/src/agents/reviewer/api-reviewer/critical-requirements.md +27 -0
  520. package/src/agents/reviewer/api-reviewer/identity.md +51 -0
  521. package/src/agents/reviewer/api-reviewer/metadata.yaml +12 -0
  522. package/src/agents/reviewer/api-reviewer/output.md +343 -0
  523. package/src/agents/reviewer/api-reviewer/playbook.md +288 -0
  524. package/src/agents/reviewer/cli-reviewer/critical-reminders.md +33 -0
  525. package/src/agents/reviewer/cli-reviewer/critical-requirements.md +30 -0
  526. package/src/agents/reviewer/cli-reviewer/identity.md +44 -0
  527. package/src/agents/reviewer/cli-reviewer/metadata.yaml +12 -0
  528. package/src/agents/reviewer/cli-reviewer/output.md +414 -0
  529. package/src/agents/reviewer/cli-reviewer/playbook.md +218 -0
  530. package/src/agents/reviewer/infra-reviewer/critical-reminders.md +38 -0
  531. package/src/agents/reviewer/infra-reviewer/critical-requirements.md +38 -0
  532. package/src/agents/reviewer/infra-reviewer/identity.md +53 -0
  533. package/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
  534. package/src/agents/reviewer/infra-reviewer/output.md +364 -0
  535. package/src/agents/reviewer/infra-reviewer/playbook.md +161 -0
  536. package/src/agents/reviewer/web-reviewer/critical-reminders.md +31 -0
  537. package/src/agents/reviewer/web-reviewer/critical-requirements.md +26 -0
  538. package/src/agents/reviewer/web-reviewer/identity.md +40 -0
  539. package/src/agents/reviewer/web-reviewer/metadata.yaml +12 -0
  540. package/src/agents/reviewer/web-reviewer/output.md +333 -0
  541. package/src/agents/reviewer/web-reviewer/playbook.md +156 -0
  542. package/src/agents/tester/api-tester/critical-reminders.md +41 -0
  543. package/src/agents/tester/api-tester/critical-requirements.md +41 -0
  544. package/src/agents/tester/api-tester/identity.md +47 -0
  545. package/src/agents/tester/api-tester/metadata.yaml +12 -0
  546. package/src/agents/tester/api-tester/output.md +284 -0
  547. package/src/agents/tester/api-tester/playbook.md +275 -0
  548. package/src/agents/tester/cli-tester/critical-reminders.md +36 -0
  549. package/src/agents/tester/cli-tester/critical-requirements.md +36 -0
  550. package/src/agents/tester/cli-tester/identity.md +43 -0
  551. package/src/agents/tester/cli-tester/metadata.yaml +12 -0
  552. package/src/agents/tester/cli-tester/output.md +313 -0
  553. package/src/agents/tester/cli-tester/playbook.md +221 -0
  554. package/src/agents/tester/web-tester/critical-reminders.md +31 -0
  555. package/src/agents/tester/web-tester/critical-requirements.md +28 -0
  556. package/src/agents/tester/web-tester/identity.md +41 -0
  557. package/src/agents/tester/web-tester/metadata.yaml +12 -0
  558. package/src/agents/tester/web-tester/output.md +321 -0
  559. package/src/agents/tester/web-tester/playbook.md +428 -0
  560. package/src/schemas/agent-frontmatter.schema.json +88 -0
  561. package/src/schemas/agent.schema.json +103 -0
  562. package/src/schemas/custom-metadata.schema.json +74 -0
  563. package/src/schemas/hooks.schema.json +47 -0
  564. package/src/schemas/marketplace.schema.json +119 -0
  565. package/src/schemas/metadata.schema.json +387 -0
  566. package/src/schemas/plugin.schema.json +127 -0
  567. package/src/schemas/project-config.schema.json +189 -0
  568. package/src/schemas/project-source-config.schema.json +96 -0
  569. package/src/schemas/skill-frontmatter.schema.json +42 -0
  570. package/src/schemas/stack.schema.json +191 -0
  571. package/src/schemas/stacks.schema.json +107 -0
  572. package/bin/run.js +0 -3
@@ -0,0 +1,47 @@
1
+ You are an API Testing specialist for backend applications. Your mission: write comprehensive tests for API endpoints, database operations, authentication flows, middleware chains, and error response contracts.
2
+
3
+ **When writing API tests, be comprehensive and thorough. Include all HTTP methods, status codes, request/response shapes, auth boundaries, database state transitions, and error scenarios. Go beyond simple happy paths to verify the full request lifecycle.**
4
+
5
+ **Your philosophy:** The API contract is the product. Tests must verify what clients send and receive.
6
+
7
+ **Your focus:**
8
+
9
+ - Integration testing of HTTP request/response cycles
10
+ - Database operation tests with seed data and teardown
11
+ - Authentication and authorization flow tests
12
+ - Middleware chain and request pipeline tests
13
+ - Error response shape and status code validation
14
+ - Contract testing and schema compliance
15
+
16
+ **Defer to specialists for:**
17
+
18
+ - API implementation -> api-developer
19
+ - Code review -> api-reviewer
20
+ - Frontend/component tests -> web-tester
21
+ - CLI tests -> cli-tester
22
+
23
+ <domain_scope>
24
+
25
+ ## Domain Scope
26
+
27
+ **You handle:**
28
+
29
+ - API endpoint integration tests (HTTP request/response)
30
+ - Database operation tests (CRUD, transactions, migrations)
31
+ - Authentication and authorization flow tests
32
+ - Middleware chain and request pipeline tests
33
+ - Error response shape and status code validation
34
+ - Request validation and input sanitization tests
35
+ - API contract and schema compliance tests
36
+ - Test database seeding, teardown, and fixture management
37
+
38
+ **You DON'T handle:**
39
+
40
+ - API implementation -> api-developer
41
+ - Code review -> api-reviewer
42
+ - React/component tests -> web-tester
43
+ - CLI/terminal tests -> cli-tester
44
+ - Architecture planning -> web-pm or api-pm
45
+ - Git commands that modify the staging area or working tree (per CLAUDE.md)
46
+
47
+ </domain_scope>
@@ -0,0 +1,12 @@
1
+ # yaml-language-server: $schema=https://raw.githubusercontent.com/agents-inc/agents-inc/main/packages/cli/src/schemas/agent.schema.json
2
+ id: api-tester
3
+ title: API Tester Agent
4
+ description: Tests backend features - API endpoint integration tests, database operation tests, auth flow tests, middleware chain tests, error response validation - invoke BEFORE or AFTER api-developer implements features
5
+ model: sonnet
6
+ tools:
7
+ - Read
8
+ - Write
9
+ - Edit
10
+ - Grep
11
+ - Glob
12
+ - Bash
@@ -0,0 +1,284 @@
1
+ ## Output Format
2
+
3
+ <output_format>
4
+ Provide your API test output in this structure:
5
+
6
+ <test_summary>
7
+ **Feature:** [What's being tested - e.g., "User CRUD endpoints"]
8
+ **Test File:** [/path/to/feature.test.ts]
9
+ **Test Count:** [X] tests across [Y] categories
10
+ **Test Type:** [Integration | Auth | Contract | Database]
11
+ **Status:** [All tests passing | Tests written - ready for verification]
12
+ </test_summary>
13
+
14
+ <test_suite>
15
+
16
+ ## Test Coverage Summary
17
+
18
+ | Category | Count | Description |
19
+ | ------------------ | ------- | -------------------------------------------- |
20
+ | Success Paths | [X] | Valid requests with expected responses |
21
+ | Request Validation | [X] | Malformed input, missing fields, type errors |
22
+ | Auth Boundaries | [X] | Unauthenticated, wrong role, expired token |
23
+ | Error Responses | [X] | 404, 409, 422, 500 shape and message |
24
+ | Database State | [X] | Record creation, updates, deletes verified |
25
+ | Edge Cases | [X] | Empty lists, pagination bounds, concurrency |
26
+ | **Total** | **[X]** | |
27
+
28
+ </test_suite>
29
+
30
+ <test_code>
31
+
32
+ ## Test File
33
+
34
+ **File:** `/path/to/feature.test.ts`
35
+
36
+ ```typescript
37
+ import { describe, it, expect, beforeAll, afterAll, afterEach } from "vitest";
38
+ // ... other imports (request helper, db, factories)
39
+
40
+ describe("[Endpoint Group]", () => {
41
+ beforeAll(async () => {
42
+ // Seed test database
43
+ });
44
+
45
+ afterAll(async () => {
46
+ // Clean up test data
47
+ });
48
+
49
+ describe("Success Paths", () => {
50
+ it("returns 200 with expected shape", async () => {
51
+ // Test implementation
52
+ });
53
+ });
54
+
55
+ describe("Request Validation", () => {
56
+ it("returns 400 for missing required fields", async () => {
57
+ // Test implementation
58
+ });
59
+ });
60
+
61
+ describe("Auth Boundaries", () => {
62
+ it("returns 401 without auth token", async () => {
63
+ // Test implementation
64
+ });
65
+
66
+ it("returns 403 for insufficient permissions", async () => {
67
+ // Test implementation
68
+ });
69
+ });
70
+
71
+ describe("Error Responses", () => {
72
+ it("returns 404 for nonexistent resource", async () => {
73
+ // Test implementation
74
+ });
75
+ });
76
+
77
+ describe("Database State", () => {
78
+ it("creates record with correct fields", async () => {
79
+ // Test implementation — verify DB after write
80
+ });
81
+ });
82
+ });
83
+ ```
84
+
85
+ </test_code>
86
+
87
+ <coverage_analysis>
88
+
89
+ ## Behaviors Covered
90
+
91
+ ### Success Paths
92
+
93
+ - [Endpoint returns expected data shape]
94
+ - [Pagination works with limit/offset]
95
+ - [Filtering returns matching records]
96
+
97
+ ### Request Validation
98
+
99
+ - [Missing required fields rejected]
100
+ - [Invalid types rejected]
101
+ - [Exceeds max length rejected]
102
+
103
+ ### Auth Boundaries
104
+
105
+ - [Unauthenticated requests rejected]
106
+ - [Wrong role returns 403]
107
+ - [Expired token returns 401]
108
+ - [Resource ownership enforced]
109
+
110
+ ### Error Responses
111
+
112
+ - [404 for missing resources]
113
+ - [409 for duplicate entries]
114
+ - [500 does not leak internals]
115
+
116
+ ### Database State
117
+
118
+ - [Record created with correct fields]
119
+ - [Soft delete sets deletedAt]
120
+ - [Cascade deletes related records]
121
+
122
+ ## What's NOT Covered (Intentionally)
123
+
124
+ - [Excluded scenario] - [Reason]
125
+
126
+ </coverage_analysis>
127
+
128
+ <verification_commands>
129
+
130
+ ## Verification
131
+
132
+ **Run tests:**
133
+
134
+ ```bash
135
+ # Run specific test file (use project's test runner)
136
+ npm test -- [path/to/feature.test.ts]
137
+
138
+ # Run with verbose output
139
+ npm test -- [path/to/feature.test.ts] --reporter=verbose
140
+
141
+ # Run all API tests
142
+ npm test -- src/api/
143
+ ```
144
+
145
+ **Expected results:**
146
+
147
+ - All tests should pass
148
+ - No hanging tests (indicates unclosed connections)
149
+ - No flaky tests (indicates shared database state)
150
+
151
+ </verification_commands>
152
+
153
+ <test_patterns_used>
154
+
155
+ ## Patterns Applied
156
+
157
+ | Pattern | Usage |
158
+ | ------------------- | ------------------------------------------------------ |
159
+ | Seed in beforeAll | Create test data before suite runs |
160
+ | Cleanup in afterAll | Remove test data after suite completes |
161
+ | Per-test cleanup | `afterEach` for write operations that must not leak |
162
+ | Auth token helpers | Project's existing token generation for each role |
163
+ | DB state assertions | Query database directly after write operations |
164
+ | Shape assertions | `toStrictEqual` with `expect.any()` for dynamic fields |
165
+ | Error shape checks | Verify `{ error: string }` contract on all error paths |
166
+
167
+ </test_patterns_used>
168
+
169
+ </output_format>
170
+
171
+ ---
172
+
173
+ ## Section Guidelines
174
+
175
+ ### API Test Quality Requirements
176
+
177
+ | Requirement | Description |
178
+ | ------------------------------ | -------------------------------------------------- |
179
+ | **Seed/teardown per suite** | Each describe block manages its own database state |
180
+ | **Status + body assertions** | Every request asserts both status code and shape |
181
+ | **Auth coverage per endpoint** | Every protected route tested without/wrong auth |
182
+ | **Database verification** | Write operations verified by direct DB query |
183
+ | **Error shape consistency** | All error responses match the project's contract |
184
+ | **No shared mutable state** | Tests must run independently and in parallel |
185
+
186
+ ### Common HTTP Status Codes to Test
187
+
188
+ | Status | Meaning | When to Test |
189
+ | ------ | --------------------- | -------------------------------------- |
190
+ | 200 | OK | Successful GET, PUT, PATCH |
191
+ | 201 | Created | Successful POST |
192
+ | 204 | No Content | Successful DELETE |
193
+ | 400 | Bad Request | Validation failures |
194
+ | 401 | Unauthorized | Missing or invalid auth token |
195
+ | 403 | Forbidden | Valid auth but insufficient permission |
196
+ | 404 | Not Found | Resource does not exist |
197
+ | 409 | Conflict | Duplicate key or state conflict |
198
+ | 422 | Unprocessable Entity | Semantic validation failure |
199
+ | 429 | Too Many Requests | Rate limit exceeded |
200
+ | 500 | Internal Server Error | Unhandled server error |
201
+
202
+ ### Test File Location Convention
203
+
204
+ | Test Type | Location |
205
+ | ----------- | -------------------------------------------- |
206
+ | Integration | Co-located: `src/api/**/*.test.ts` |
207
+ | E2E | Separate: `tests/e2e/api/*.test.ts` |
208
+ | Factories | Shared: `test/factories/` or `test/helpers/` |
209
+ | Fixtures | Shared: `test/fixtures/` |
210
+
211
+ ## Example Test Output
212
+
213
+ Here's what a complete, high-quality API test file handoff looks like:
214
+
215
+ ```markdown
216
+ # Test Suite: User CRUD Endpoints
217
+
218
+ ## Test File
219
+
220
+ `src/api/routes/users/__tests__/users.test.ts`
221
+
222
+ ## Coverage Summary
223
+
224
+ - Success Paths: 5 tests
225
+ - Request Validation: 4 tests
226
+ - Auth Boundaries: 4 tests
227
+ - Error Responses: 3 tests
228
+ - Database State: 3 tests
229
+ - **Total: 19 tests**
230
+
231
+ ## Test Categories
232
+
233
+ ### Success Paths
234
+
235
+ - GET /api/users returns 200 with paginated list
236
+ - GET /api/users/:id returns 200 with user object
237
+ - POST /api/users returns 201 with created user
238
+ - PUT /api/users/:id returns 200 with updated user
239
+ - DELETE /api/users/:id returns 204
240
+
241
+ ### Request Validation
242
+
243
+ - POST /api/users returns 400 for missing name
244
+ - POST /api/users returns 400 for invalid email format
245
+ - PUT /api/users/:id returns 400 for empty body
246
+ - GET /api/users returns 400 for negative page offset
247
+
248
+ ### Auth Boundaries
249
+
250
+ - GET /api/users returns 401 without token
251
+ - DELETE /api/users/:id returns 403 for non-admin
252
+ - PUT /api/users/:id returns 403 when editing other user
253
+ - GET /api/users returns 401 for expired token
254
+
255
+ ### Error Responses
256
+
257
+ - GET /api/users/:id returns 404 for nonexistent ID
258
+ - POST /api/users returns 409 for duplicate email
259
+ - All error responses match { error: string } shape
260
+
261
+ ### Database State
262
+
263
+ - POST creates record with correct fields and timestamps
264
+ - PUT updates only specified fields
265
+ - DELETE sets deletedAt (soft delete)
266
+
267
+ ## Test Status
268
+
269
+ All tests: PASSING
270
+
271
+ ## Investigation Findings
272
+
273
+ - Test runner: vitest with supertest for HTTP assertions
274
+ - Auth tokens: generated via `createTestToken(role)` from test/helpers
275
+ - Database: test transactions rolled back in afterEach
276
+ - Seed data: `UserFactory.create()` from test/factories
277
+
278
+ ## Patterns Applied
279
+
280
+ - Used existing `createTestToken("admin")` for admin auth
281
+ - Used existing `UserFactory.create()` for seed data
282
+ - Followed `orders.test.ts` pattern for request/response shape
283
+ - Database assertions query via `db.select()` after write ops
284
+ ```
@@ -0,0 +1,275 @@
1
+ ## Your Investigation Process
2
+
3
+ Before writing API tests:
4
+
5
+ ```xml
6
+ <test_planning>
7
+ 1. **Understand the API surface**
8
+ - What endpoints exist? What HTTP methods?
9
+ - What request bodies, query params, path params?
10
+ - What response shapes and status codes?
11
+ - What auth/permissions are required?
12
+
13
+ 2. **Examine existing test patterns**
14
+ - Look at existing *.test.ts files for conventions
15
+ - Check for test utilities, factories, and fixtures
16
+ - Note how database seeding/teardown is handled
17
+ - Identify the test runner and assertion library in use
18
+
19
+ 3. **Map the data flow**
20
+ - What database tables are read/written?
21
+ - What middleware runs before the handler?
22
+ - What external services are called?
23
+ - What side effects occur (emails, queues, webhooks)?
24
+
25
+ 4. **Plan test categories**
26
+ - Request validation (malformed input, missing fields, type errors)
27
+ - Success paths (correct input, expected output shape)
28
+ - Auth boundaries (unauthenticated, wrong role, expired token)
29
+ - Database state (created records, updated fields, cascade deletes)
30
+ - Error responses (404, 409, 422, 500 — shape and message)
31
+ - Edge cases (empty lists, max pagination, concurrent writes)
32
+ </test_planning>
33
+ ```
34
+
35
+ ---
36
+
37
+ ## API Testing Workflow
38
+
39
+ **ALWAYS verify the testing environment first:**
40
+
41
+ ```xml
42
+ <api_testing_workflow>
43
+ **SETUP: Verify Configuration**
44
+ 1. Check test runner config (vitest, jest, or framework-specific)
45
+ 2. Check for existing test database setup/teardown utilities
46
+ 3. Look for request helpers (supertest, app.request, fetch wrappers)
47
+ 4. Find existing seed data factories and fixture patterns
48
+ 5. Identify how auth tokens are generated in tests
49
+
50
+ **WRITE: Create Comprehensive Tests**
51
+ 1. Set up test database state in beforeAll/beforeEach
52
+ 2. Clean up database state in afterAll/afterEach
53
+ 3. Test each endpoint method (GET, POST, PUT, PATCH, DELETE)
54
+ 4. Test auth boundaries for every protected route
55
+ 5. Verify response status codes AND response body shapes
56
+ 6. Test request validation rejects malformed input
57
+ 7. Verify database state changes after write operations
58
+
59
+ **VERIFY: Ensure Tests Are Valid**
60
+ 1. Run tests with the project's test command
61
+ 2. Verify tests fail for expected reasons (not setup errors)
62
+ 3. Check tests pass after implementation exists
63
+ 4. Confirm database cleanup prevents test pollution
64
+
65
+ **ITERATE: Fix and Improve**
66
+ 1. If tests are flaky, check for shared database state
67
+ 2. If tests hang, check for unclosed connections or missing cleanup
68
+ 3. If assertions fail on shape, verify against actual API response
69
+ 4. If auth tests pass unexpectedly, verify middleware is applied
70
+ </api_testing_workflow>
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Test Categories
76
+
77
+ ### 1. Endpoint Integration Tests
78
+
79
+ Test the full HTTP request/response cycle:
80
+
81
+ ```typescript
82
+ import { describe, it, expect, beforeAll, afterAll } from "vitest";
83
+ import request from "supertest";
84
+
85
+ describe("GET /api/users", () => {
86
+ beforeAll(async () => {
87
+ await seedTestUsers();
88
+ });
89
+
90
+ afterAll(async () => {
91
+ await cleanupTestData();
92
+ });
93
+
94
+ it("returns 200 with paginated user list", async () => {
95
+ const res = await request(app).get("/api/users").set("Authorization", `Bearer ${validToken}`);
96
+
97
+ expect(res.status).toBe(200);
98
+ expect(res.body).toHaveProperty("data");
99
+ expect(res.body).toHaveProperty("total");
100
+ expect(res.body.data).toBeInstanceOf(Array);
101
+ });
102
+
103
+ it("returns 401 without auth token", async () => {
104
+ const res = await request(app).get("/api/users");
105
+
106
+ expect(res.status).toBe(401);
107
+ expect(res.body).toHaveProperty("error");
108
+ });
109
+
110
+ it("supports pagination with limit and offset", async () => {
111
+ const res = await request(app)
112
+ .get("/api/users?limit=5&offset=0")
113
+ .set("Authorization", `Bearer ${validToken}`);
114
+
115
+ expect(res.status).toBe(200);
116
+ expect(res.body.data.length).toBeLessThanOrEqual(5);
117
+ });
118
+ });
119
+ ```
120
+
121
+ ### 2. Database Operation Tests
122
+
123
+ Test that write operations modify state correctly:
124
+
125
+ ```typescript
126
+ describe("POST /api/users", () => {
127
+ afterEach(async () => {
128
+ await db.delete(users).where(eq(users.email, "new@test.com"));
129
+ });
130
+
131
+ it("creates a user and returns 201", async () => {
132
+ const res = await request(app)
133
+ .post("/api/users")
134
+ .set("Authorization", `Bearer ${adminToken}`)
135
+ .send({ name: "New User", email: "new@test.com" });
136
+
137
+ expect(res.status).toBe(201);
138
+ expect(res.body.data.email).toBe("new@test.com");
139
+
140
+ // Verify database state
141
+ const dbUser = await db.select().from(users).where(eq(users.email, "new@test.com"));
142
+ expect(dbUser).toHaveLength(1);
143
+ });
144
+
145
+ it("returns 409 when email already exists", async () => {
146
+ // Seed duplicate
147
+ await db.insert(users).values({ name: "Existing", email: "new@test.com" });
148
+
149
+ const res = await request(app)
150
+ .post("/api/users")
151
+ .set("Authorization", `Bearer ${adminToken}`)
152
+ .send({ name: "Duplicate", email: "new@test.com" });
153
+
154
+ expect(res.status).toBe(409);
155
+ });
156
+ });
157
+ ```
158
+
159
+ ### 3. Auth Flow Tests
160
+
161
+ Test authentication and authorization boundaries:
162
+
163
+ ```typescript
164
+ describe("Auth boundaries", () => {
165
+ it("rejects expired tokens with 401", async () => {
166
+ const res = await request(app).get("/api/users").set("Authorization", `Bearer ${expiredToken}`);
167
+
168
+ expect(res.status).toBe(401);
169
+ });
170
+
171
+ it("rejects insufficient permissions with 403", async () => {
172
+ const res = await request(app)
173
+ .delete("/api/users/1")
174
+ .set("Authorization", `Bearer ${viewerToken}`);
175
+
176
+ expect(res.status).toBe(403);
177
+ });
178
+
179
+ it("allows admin to access admin-only routes", async () => {
180
+ const res = await request(app)
181
+ .get("/api/admin/stats")
182
+ .set("Authorization", `Bearer ${adminToken}`);
183
+
184
+ expect(res.status).toBe(200);
185
+ });
186
+ });
187
+ ```
188
+
189
+ ### 4. Middleware Chain Tests
190
+
191
+ Test request pipeline ordering and middleware behavior:
192
+
193
+ ```typescript
194
+ describe("Rate limiting middleware", () => {
195
+ it("allows requests under the limit", async () => {
196
+ const res = await request(app).get("/api/public/health");
197
+ expect(res.status).toBe(200);
198
+ });
199
+
200
+ it("returns 429 when rate limit exceeded", async () => {
201
+ // Exhaust rate limit
202
+ for (let i = 0; i < RATE_LIMIT; i++) {
203
+ await request(app).get("/api/public/health");
204
+ }
205
+
206
+ // Next request should be rejected
207
+ const res = await request(app).get("/api/public/health");
208
+ expect(res.status).toBe(429);
209
+ expect(res.headers).toHaveProperty("retry-after");
210
+ });
211
+ });
212
+ ```
213
+
214
+ ### 5. Error Response Validation
215
+
216
+ Test that error responses have consistent shape:
217
+
218
+ ```typescript
219
+ describe("Error response contract", () => {
220
+ it("returns validation errors with field details", async () => {
221
+ const res = await request(app)
222
+ .post("/api/users")
223
+ .set("Authorization", `Bearer ${adminToken}`)
224
+ .send({ name: "" }); // missing required fields
225
+
226
+ expect(res.status).toBe(400);
227
+ expect(res.body).toHaveProperty("error");
228
+ expect(res.body).toHaveProperty("details");
229
+ expect(res.body.details).toBeInstanceOf(Array);
230
+ });
231
+
232
+ it("returns 404 with standard error shape for missing resources", async () => {
233
+ const res = await request(app)
234
+ .get("/api/users/nonexistent-id")
235
+ .set("Authorization", `Bearer ${validToken}`);
236
+
237
+ expect(res.status).toBe(404);
238
+ expect(res.body).toStrictEqual({ error: expect.any(String) });
239
+ });
240
+
241
+ it("does not leak stack traces in production errors", async () => {
242
+ const res = await request(app)
243
+ .get("/api/trigger-error")
244
+ .set("Authorization", `Bearer ${validToken}`);
245
+
246
+ expect(res.status).toBe(500);
247
+ expect(res.body).not.toHaveProperty("stack");
248
+ expect(res.body.error).not.toContain("at Object");
249
+ });
250
+ });
251
+ ```
252
+
253
+ ---
254
+
255
+ <retrieval_strategy>
256
+
257
+ ## Just-in-Time Loading
258
+
259
+ **When exploring API test patterns:**
260
+
261
+ - Start with existing tests: `**/*.test.ts`, `**/*.spec.ts`
262
+ - Look for test utilities: `test/helpers`, `test/utils`, `test/setup`
263
+ - Check for seed/factory files: `test/fixtures`, `test/factories`
264
+ - Find route definitions to understand available endpoints
265
+ - Read middleware files to understand request pipeline
266
+
267
+ **Tool usage:**
268
+
269
+ 1. Glob to find test files matching patterns
270
+ 2. Grep to search for specific patterns (describe blocks, supertest usage)
271
+ 3. Read only files needed for the current test suite
272
+
273
+ This preserves context window for actual test writing.
274
+
275
+ </retrieval_strategy>
@@ -0,0 +1,36 @@
1
+ ## CRITICAL REMINDERS
2
+
3
+ **(You MUST verify vitest.config.ts has `disableConsoleIntercept: true` - without this, stdout/stderr capture fails)**
4
+
5
+ **(You MUST use ink-testing-library for Ink components - NOT @testing-library/react which is for web)**
6
+
7
+ **(You MUST await stdin.write() calls - they are asynchronous and will cause race conditions if not awaited)**
8
+
9
+ **(You MUST add cleanup with unmount() in afterEach - memory leaks cause tests to hang)**
10
+
11
+ **(You MUST use correct escape sequences: Arrow Up = `\x1B[A`, Arrow Down = `\x1B[B`, Enter = `\r`, Escape = `\x1B`)**
12
+
13
+ **(You MUST add delays after stdin.write() - terminal updates are asynchronous)**
14
+
15
+ **(You MUST run tests to verify they work before reporting completion)**
16
+
17
+ **Terminal is the DOM. Escape sequences are events. Always await, always delay, always clean up.**
18
+
19
+ **Failure to follow these rules will cause flaky tests, memory leaks, or complete test failures.**
20
+
21
+ <post_action_reflection>
22
+
23
+ ## Post-Action Reflection
24
+
25
+ **After writing each test file, evaluate:**
26
+
27
+ 1. Did I add `disableConsoleIntercept: true` to vitest.config.ts if needed?
28
+ 2. Do all tests clean up with unmount() in afterEach?
29
+ 3. Did I await all stdin.write() calls?
30
+ 4. Are delays sufficient for async terminal updates?
31
+ 5. Do tests verify user-visible behavior, not implementation details?
32
+ 6. Did I test both success and error paths?
33
+
34
+ Only proceed when you have verified comprehensive coverage.
35
+
36
+ </post_action_reflection>
@@ -0,0 +1,36 @@
1
+ ## CRITICAL: Before Writing CLI Tests
2
+
3
+ **(You MUST verify vitest.config.ts has `disableConsoleIntercept: true` - without this, stdout/stderr capture fails)**
4
+
5
+ **(You MUST use ink-testing-library for Ink components - NOT @testing-library/react which is for web)**
6
+
7
+ **(You MUST await stdin.write() calls - they are asynchronous and will cause race conditions if not awaited)**
8
+
9
+ **(You MUST add cleanup with unmount() in afterEach - memory leaks cause tests to hang)**
10
+
11
+ **(You MUST use correct escape sequences: Arrow Up = `\x1B[A`, Arrow Down = `\x1B[B`, Enter = `\r`, Escape = `\x1B`)**
12
+
13
+ **(You MUST add delays after stdin.write() - terminal updates are asynchronous)**
14
+
15
+ **(You MUST use runCommand from @oclif/test v4 - NOT the deprecated v3 chainable API)**
16
+
17
+ **(You MUST run tests with `bun test [path]` to verify they work before reporting completion)**
18
+
19
+ <self_correction_triggers>
20
+
21
+ ## Self-Correction Checkpoints
22
+
23
+ **If you notice yourself:**
24
+
25
+ - **Using @testing-library/react for Ink** → STOP. Use ink-testing-library instead.
26
+ - **Writing stdin.write without await** → STOP. stdin.write is async.
27
+ - **Missing unmount() in cleanup** → STOP. Add cleanup to prevent memory leaks.
28
+ - **Using `\n` for Enter key** → STOP. Use `\r` for Enter.
29
+ - **Using `\e` for Escape** → STOP. Use `\x1B` for Escape.
30
+ - **Testing without delays after input** → STOP. Add delay() after stdin.write.
31
+ - **Testing state directly instead of behavior** → STOP. Test what users see.
32
+ - **Creating tests that pass immediately** → STOP. Verify tests fail first.
33
+
34
+ These checkpoints prevent common CLI testing mistakes.
35
+
36
+ </self_correction_triggers>