specialist-agent 2.13.0 → 3.3.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 (329) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +36 -206
  3. package/dist/catalog.json +16677 -0
  4. package/dist/hw-worker.mjs +288 -0
  5. package/dist/icones/icone.ico +0 -0
  6. package/dist/icones/icone.png +0 -0
  7. package/dist/interface/assets/figtree-latin-400-normal-g7Dtegnw.woff2 +0 -0
  8. package/dist/interface/assets/figtree-latin-500-normal-BWnGEVsr.woff2 +0 -0
  9. package/dist/interface/assets/figtree-latin-600-normal-Cv_xCTDl.woff2 +0 -0
  10. package/dist/interface/assets/figtree-latin-700-normal-th6qEP7c.woff2 +0 -0
  11. package/dist/interface/assets/figtree-latin-ext-400-normal-CXAzuTZb.woff2 +0 -0
  12. package/dist/interface/assets/figtree-latin-ext-500-normal-Du0rIuHj.woff2 +0 -0
  13. package/dist/interface/assets/figtree-latin-ext-600-normal-DJlfifZj.woff2 +0 -0
  14. package/dist/interface/assets/figtree-latin-ext-700-normal-CS4sQkGV.woff2 +0 -0
  15. package/dist/interface/assets/index-BltVv7tb.js +24 -0
  16. package/dist/interface/assets/index-Cpa6kApK.css +1 -0
  17. package/dist/interface/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  18. package/dist/interface/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  19. package/dist/interface/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
  20. package/dist/interface/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  21. package/dist/interface/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  22. package/dist/interface/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
  23. package/dist/interface/assets/unbounded-latin-500-normal-4slEIF53.woff2 +0 -0
  24. package/dist/interface/assets/unbounded-latin-700-normal-CaoNriVp.woff2 +0 -0
  25. package/dist/interface/assets/unbounded-latin-ext-500-normal-BTIpesyw.woff2 +0 -0
  26. package/dist/interface/assets/unbounded-latin-ext-700-normal-BLzWLLjG.woff2 +0 -0
  27. package/dist/interface/icones/apple-touch-icon.png +0 -0
  28. package/dist/interface/icones/favicon-32.png +0 -0
  29. package/dist/interface/icones/icone-192.png +0 -0
  30. package/dist/interface/icones/icone-512.png +0 -0
  31. package/dist/interface/icones/icone-mascara-512.png +0 -0
  32. package/dist/interface/index.html +19 -0
  33. package/dist/interface/manifest.webmanifest +19 -0
  34. package/dist/interface/sw.js +64 -0
  35. package/dist/licencas/BRAND.md +22 -0
  36. package/dist/licencas/LICENSE-CONTENT.md +44 -0
  37. package/dist/licencas/OFL-Figtree.txt +93 -0
  38. package/dist/licencas/OFL-JetBrainsMono.txt +93 -0
  39. package/dist/licencas/OFL-Unbounded.txt +93 -0
  40. package/dist/licencas/TERCEIROS.txt +104 -0
  41. package/dist/specialist-agent.mjs +14515 -0
  42. package/dist/usage-worker.mjs +1077 -0
  43. package/package.json +34 -58
  44. package/.claude-plugin/marketplace.json +0 -52
  45. package/.claude-plugin/plugin.json +0 -37
  46. package/.codex/INSTALL.md +0 -145
  47. package/.cursor-plugin/marketplace.json +0 -52
  48. package/.cursor-plugin/plugin.json +0 -37
  49. package/.opencode/INSTALL.md +0 -127
  50. package/.opencode/opencode.json +0 -186
  51. package/agents/analyst-lite.md +0 -48
  52. package/agents/analyst.md +0 -396
  53. package/agents/api-lite.md +0 -43
  54. package/agents/api.md +0 -427
  55. package/agents/architect-lite.md +0 -104
  56. package/agents/architect.md +0 -571
  57. package/agents/autopilot-lite.md +0 -46
  58. package/agents/autopilot.md +0 -196
  59. package/agents/cloud-lite.md +0 -75
  60. package/agents/cloud.md +0 -213
  61. package/agents/data-lite.md +0 -67
  62. package/agents/data.md +0 -306
  63. package/agents/debugger-lite.md +0 -46
  64. package/agents/debugger.md +0 -410
  65. package/agents/deps-lite.md +0 -41
  66. package/agents/deps.md +0 -363
  67. package/agents/designer-lite.md +0 -67
  68. package/agents/designer.md +0 -195
  69. package/agents/devops-lite.md +0 -67
  70. package/agents/devops.md +0 -205
  71. package/agents/docs-lite.md +0 -42
  72. package/agents/docs.md +0 -454
  73. package/agents/executor-lite.md +0 -61
  74. package/agents/executor.md +0 -695
  75. package/agents/explorer-lite.md +0 -55
  76. package/agents/explorer.md +0 -152
  77. package/agents/finance-lite.md +0 -66
  78. package/agents/finance.md +0 -255
  79. package/agents/i18n-lite.md +0 -44
  80. package/agents/i18n.md +0 -594
  81. package/agents/legal-lite.md +0 -113
  82. package/agents/legal.md +0 -302
  83. package/agents/marketing-lite.md +0 -25
  84. package/agents/marketing.md +0 -188
  85. package/agents/memory.md +0 -166
  86. package/agents/orchestrator-lite.md +0 -40
  87. package/agents/orchestrator.md +0 -512
  88. package/agents/pair-lite.md +0 -38
  89. package/agents/pair.md +0 -310
  90. package/agents/perf-lite.md +0 -42
  91. package/agents/perf.md +0 -320
  92. package/agents/planner-lite.md +0 -59
  93. package/agents/planner.md +0 -272
  94. package/agents/product-lite.md +0 -25
  95. package/agents/product.md +0 -195
  96. package/agents/refactor-lite.md +0 -42
  97. package/agents/refactor.md +0 -467
  98. package/agents/ripple-lite.md +0 -106
  99. package/agents/ripple.md +0 -166
  100. package/agents/scout-lite.md +0 -37
  101. package/agents/scout.md +0 -224
  102. package/agents/security-lite.md +0 -66
  103. package/agents/security.md +0 -252
  104. package/agents/sentry-triage-lite.md +0 -54
  105. package/agents/sentry-triage.md +0 -217
  106. package/agents/starter-lite.md +0 -80
  107. package/agents/starter.md +0 -300
  108. package/agents/support-lite.md +0 -24
  109. package/agents/support.md +0 -191
  110. package/agents/tdd-lite.md +0 -43
  111. package/agents/tdd.md +0 -329
  112. package/agents/tester-lite.md +0 -71
  113. package/agents/tester.md +0 -237
  114. package/cli/architectures.mjs +0 -713
  115. package/cli/detect-architecture.mjs +0 -752
  116. package/cli/generate-architecture.mjs +0 -1096
  117. package/cli/index.mjs +0 -1217
  118. package/cli/recommend-architecture.mjs +0 -870
  119. package/hooks/after-review.mjs +0 -130
  120. package/hooks/after-task.mjs +0 -117
  121. package/hooks/before-plan.mjs +0 -155
  122. package/hooks/before-review.mjs +0 -139
  123. package/hooks/hooks.json +0 -66
  124. package/hooks/lifecycle.json +0 -91
  125. package/hooks/native/auto-dispatch.mjs +0 -207
  126. package/hooks/native/auto-format.mjs +0 -176
  127. package/hooks/native/mcp-discovery.mjs +0 -168
  128. package/hooks/native/security-config.json +0 -38
  129. package/hooks/native/security-guard.mjs +0 -323
  130. package/hooks/native/session-context.mjs +0 -179
  131. package/hooks/native/session-end.mjs +0 -42
  132. package/hooks/native/utils.mjs +0 -62
  133. package/hooks/on-error.mjs +0 -129
  134. package/hooks/session-end.mjs +0 -185
  135. package/hooks/session-start.mjs +0 -154
  136. package/packs/angular/ARCHITECTURE.md +0 -814
  137. package/packs/angular/CLAUDE.md +0 -105
  138. package/packs/angular/agents/builder.md +0 -113
  139. package/packs/angular/agents/doctor.md +0 -187
  140. package/packs/angular/agents/migrator.md +0 -101
  141. package/packs/angular/agents/reviewer.md +0 -252
  142. package/packs/angular/agents-lite/builder.md +0 -65
  143. package/packs/angular/agents-lite/doctor.md +0 -64
  144. package/packs/angular/agents-lite/migrator.md +0 -75
  145. package/packs/angular/agents-lite/reviewer.md +0 -69
  146. package/packs/angular/skills/dev-create-component/SKILL.md +0 -56
  147. package/packs/angular/skills/dev-create-injectable/SKILL.md +0 -60
  148. package/packs/angular/skills/dev-create-module/SKILL.md +0 -49
  149. package/packs/angular/skills/dev-create-service/SKILL.md +0 -34
  150. package/packs/angular/skills/dev-create-test/SKILL.md +0 -78
  151. package/packs/angular/skills/dev-generate-types/SKILL.md +0 -37
  152. package/packs/angular/skills/docs-onboard/SKILL.md +0 -42
  153. package/packs/angular/skills/migration-migrate-component/SKILL.md +0 -42
  154. package/packs/angular/skills/migration-migrate-module/SKILL.md +0 -25
  155. package/packs/angular/skills/review-check-architecture/SKILL.md +0 -67
  156. package/packs/angular/skills/review-fix-violations/SKILL.md +0 -43
  157. package/packs/angular/skills/review-review/SKILL.md +0 -43
  158. package/packs/astro/ARCHITECTURE.md +0 -718
  159. package/packs/astro/CLAUDE.md +0 -106
  160. package/packs/astro/agents/builder.md +0 -123
  161. package/packs/astro/agents/doctor.md +0 -200
  162. package/packs/astro/agents/migrator.md +0 -105
  163. package/packs/astro/agents/reviewer.md +0 -253
  164. package/packs/astro/agents-lite/builder.md +0 -71
  165. package/packs/astro/agents-lite/doctor.md +0 -66
  166. package/packs/astro/agents-lite/migrator.md +0 -71
  167. package/packs/astro/agents-lite/reviewer.md +0 -70
  168. package/packs/astro/skills/dev-create-component/SKILL.md +0 -50
  169. package/packs/astro/skills/dev-create-island/SKILL.md +0 -63
  170. package/packs/astro/skills/dev-create-module/SKILL.md +0 -49
  171. package/packs/astro/skills/dev-create-service/SKILL.md +0 -34
  172. package/packs/astro/skills/dev-create-test/SKILL.md +0 -76
  173. package/packs/astro/skills/dev-generate-types/SKILL.md +0 -37
  174. package/packs/astro/skills/docs-onboard/SKILL.md +0 -51
  175. package/packs/astro/skills/migration-migrate-component/SKILL.md +0 -48
  176. package/packs/astro/skills/migration-migrate-module/SKILL.md +0 -25
  177. package/packs/astro/skills/review-check-architecture/SKILL.md +0 -72
  178. package/packs/astro/skills/review-fix-violations/SKILL.md +0 -43
  179. package/packs/astro/skills/review-review/SKILL.md +0 -45
  180. package/packs/nextjs/ARCHITECTURE.md +0 -1033
  181. package/packs/nextjs/CLAUDE.md +0 -106
  182. package/packs/nextjs/agents/builder.md +0 -132
  183. package/packs/nextjs/agents/doctor.md +0 -226
  184. package/packs/nextjs/agents/migrator.md +0 -101
  185. package/packs/nextjs/agents/reviewer.md +0 -243
  186. package/packs/nextjs/agents-lite/builder.md +0 -74
  187. package/packs/nextjs/agents-lite/doctor.md +0 -74
  188. package/packs/nextjs/agents-lite/migrator.md +0 -75
  189. package/packs/nextjs/agents-lite/reviewer.md +0 -73
  190. package/packs/nextjs/skills/dev-create-component/SKILL.md +0 -82
  191. package/packs/nextjs/skills/dev-create-hook/SKILL.md +0 -90
  192. package/packs/nextjs/skills/dev-create-module/SKILL.md +0 -63
  193. package/packs/nextjs/skills/dev-create-service/SKILL.md +0 -35
  194. package/packs/nextjs/skills/dev-create-test/SKILL.md +0 -106
  195. package/packs/nextjs/skills/dev-generate-types/SKILL.md +0 -37
  196. package/packs/nextjs/skills/docs-onboard/SKILL.md +0 -55
  197. package/packs/nextjs/skills/migration-migrate-component/SKILL.md +0 -58
  198. package/packs/nextjs/skills/migration-migrate-module/SKILL.md +0 -25
  199. package/packs/nextjs/skills/review-check-architecture/SKILL.md +0 -101
  200. package/packs/nextjs/skills/review-fix-violations/SKILL.md +0 -48
  201. package/packs/nextjs/skills/review-review/SKILL.md +0 -47
  202. package/packs/nuxt/ARCHITECTURE.md +0 -831
  203. package/packs/nuxt/CLAUDE.md +0 -111
  204. package/packs/nuxt/agents/builder.md +0 -120
  205. package/packs/nuxt/agents/doctor.md +0 -198
  206. package/packs/nuxt/agents/migrator.md +0 -101
  207. package/packs/nuxt/agents/reviewer.md +0 -255
  208. package/packs/nuxt/agents-lite/builder.md +0 -67
  209. package/packs/nuxt/agents-lite/doctor.md +0 -67
  210. package/packs/nuxt/agents-lite/migrator.md +0 -80
  211. package/packs/nuxt/agents-lite/reviewer.md +0 -71
  212. package/packs/nuxt/skills/dev-create-component/SKILL.md +0 -60
  213. package/packs/nuxt/skills/dev-create-composable/SKILL.md +0 -33
  214. package/packs/nuxt/skills/dev-create-module/SKILL.md +0 -49
  215. package/packs/nuxt/skills/dev-create-service/SKILL.md +0 -34
  216. package/packs/nuxt/skills/dev-create-test/SKILL.md +0 -61
  217. package/packs/nuxt/skills/dev-generate-types/SKILL.md +0 -37
  218. package/packs/nuxt/skills/docs-onboard/SKILL.md +0 -49
  219. package/packs/nuxt/skills/migration-migrate-component/SKILL.md +0 -48
  220. package/packs/nuxt/skills/migration-migrate-module/SKILL.md +0 -25
  221. package/packs/nuxt/skills/review-check-architecture/SKILL.md +0 -71
  222. package/packs/nuxt/skills/review-fix-violations/SKILL.md +0 -43
  223. package/packs/nuxt/skills/review-review/SKILL.md +0 -45
  224. package/packs/react/ARCHITECTURE.md +0 -991
  225. package/packs/react/CLAUDE.md +0 -102
  226. package/packs/react/agents/builder.md +0 -113
  227. package/packs/react/agents/doctor.md +0 -203
  228. package/packs/react/agents/migrator.md +0 -101
  229. package/packs/react/agents/reviewer.md +0 -252
  230. package/packs/react/agents-lite/builder.md +0 -65
  231. package/packs/react/agents-lite/doctor.md +0 -64
  232. package/packs/react/agents-lite/migrator.md +0 -74
  233. package/packs/react/agents-lite/reviewer.md +0 -69
  234. package/packs/react/skills/dev-create-component/SKILL.md +0 -53
  235. package/packs/react/skills/dev-create-hook/SKILL.md +0 -78
  236. package/packs/react/skills/dev-create-module/SKILL.md +0 -51
  237. package/packs/react/skills/dev-create-service/SKILL.md +0 -34
  238. package/packs/react/skills/dev-create-test/SKILL.md +0 -92
  239. package/packs/react/skills/dev-generate-types/SKILL.md +0 -37
  240. package/packs/react/skills/docs-onboard/SKILL.md +0 -42
  241. package/packs/react/skills/migration-migrate-component/SKILL.md +0 -44
  242. package/packs/react/skills/migration-migrate-module/SKILL.md +0 -25
  243. package/packs/react/skills/review-check-architecture/SKILL.md +0 -73
  244. package/packs/react/skills/review-fix-violations/SKILL.md +0 -45
  245. package/packs/react/skills/review-review/SKILL.md +0 -44
  246. package/packs/svelte/ARCHITECTURE.md +0 -975
  247. package/packs/svelte/CLAUDE.md +0 -102
  248. package/packs/svelte/agents/builder.md +0 -114
  249. package/packs/svelte/agents/doctor.md +0 -174
  250. package/packs/svelte/agents/migrator.md +0 -101
  251. package/packs/svelte/agents/reviewer.md +0 -238
  252. package/packs/svelte/agents-lite/builder.md +0 -66
  253. package/packs/svelte/agents-lite/doctor.md +0 -67
  254. package/packs/svelte/agents-lite/migrator.md +0 -82
  255. package/packs/svelte/agents-lite/reviewer.md +0 -70
  256. package/packs/svelte/skills/dev-create-component/SKILL.md +0 -77
  257. package/packs/svelte/skills/dev-create-module/SKILL.md +0 -59
  258. package/packs/svelte/skills/dev-create-service/SKILL.md +0 -35
  259. package/packs/svelte/skills/dev-create-store/SKILL.md +0 -94
  260. package/packs/svelte/skills/dev-create-test/SKILL.md +0 -98
  261. package/packs/svelte/skills/dev-generate-types/SKILL.md +0 -37
  262. package/packs/svelte/skills/docs-onboard/SKILL.md +0 -47
  263. package/packs/svelte/skills/migration-migrate-component/SKILL.md +0 -51
  264. package/packs/svelte/skills/migration-migrate-module/SKILL.md +0 -25
  265. package/packs/svelte/skills/review-check-architecture/SKILL.md +0 -79
  266. package/packs/svelte/skills/review-fix-violations/SKILL.md +0 -47
  267. package/packs/svelte/skills/review-review/SKILL.md +0 -45
  268. package/packs/vue/ARCHITECTURE.md +0 -798
  269. package/packs/vue/CLAUDE.md +0 -102
  270. package/packs/vue/agents/builder.md +0 -112
  271. package/packs/vue/agents/doctor.md +0 -185
  272. package/packs/vue/agents/migrator.md +0 -101
  273. package/packs/vue/agents/reviewer.md +0 -249
  274. package/packs/vue/agents-lite/builder.md +0 -65
  275. package/packs/vue/agents-lite/doctor.md +0 -63
  276. package/packs/vue/agents-lite/migrator.md +0 -73
  277. package/packs/vue/agents-lite/reviewer.md +0 -68
  278. package/packs/vue/skills/dev-create-component/SKILL.md +0 -58
  279. package/packs/vue/skills/dev-create-composable/SKILL.md +0 -31
  280. package/packs/vue/skills/dev-create-module/SKILL.md +0 -50
  281. package/packs/vue/skills/dev-create-service/SKILL.md +0 -34
  282. package/packs/vue/skills/dev-create-test/SKILL.md +0 -62
  283. package/packs/vue/skills/dev-generate-types/SKILL.md +0 -37
  284. package/packs/vue/skills/docs-onboard/SKILL.md +0 -42
  285. package/packs/vue/skills/migration-migrate-component/SKILL.md +0 -41
  286. package/packs/vue/skills/migration-migrate-module/SKILL.md +0 -25
  287. package/packs/vue/skills/review-check-architecture/SKILL.md +0 -73
  288. package/packs/vue/skills/review-fix-violations/SKILL.md +0 -42
  289. package/packs/vue/skills/review-review/SKILL.md +0 -43
  290. package/skills/audit/SKILL.md +0 -231
  291. package/skills/autofix/SKILL.md +0 -166
  292. package/skills/autopilot/SKILL.md +0 -286
  293. package/skills/brainstorm/SKILL.md +0 -298
  294. package/skills/checkpoint/SKILL.md +0 -217
  295. package/skills/codereview/SKILL.md +0 -268
  296. package/skills/commit/SKILL.md +0 -150
  297. package/skills/copywriting/SKILL.md +0 -218
  298. package/skills/cro/SKILL.md +0 -234
  299. package/skills/debug/SKILL.md +0 -210
  300. package/skills/design-review/SKILL.md +0 -217
  301. package/skills/discovery/SKILL.md +0 -218
  302. package/skills/estimate/SKILL.md +0 -154
  303. package/skills/finish/SKILL.md +0 -220
  304. package/skills/grill/SKILL.md +0 -270
  305. package/skills/health/SKILL.md +0 -251
  306. package/skills/improve-architecture/SKILL.md +0 -205
  307. package/skills/learn/SKILL.md +0 -260
  308. package/skills/lint/SKILL.md +0 -126
  309. package/skills/migrate-architecture/SKILL.md +0 -242
  310. package/skills/migrate-framework/SKILL.md +0 -172
  311. package/skills/onboard/SKILL.md +0 -168
  312. package/skills/plan/SKILL.md +0 -141
  313. package/skills/prd/SKILL.md +0 -241
  314. package/skills/recall/SKILL.md +0 -112
  315. package/skills/remember/SKILL.md +0 -108
  316. package/skills/seo-audit/SKILL.md +0 -240
  317. package/skills/tdd/SKILL.md +0 -201
  318. package/skills/tutorial/SKILL.md +0 -346
  319. package/skills/verify/SKILL.md +0 -168
  320. package/skills/worktree/SKILL.md +0 -168
  321. package/skills/write-skill/SKILL.md +0 -225
  322. package/templates/autopilot/PROMPT.md +0 -39
  323. package/templates/autopilot/README.md +0 -122
  324. package/templates/autopilot/devcontainer.json +0 -21
  325. package/templates/industry/ecommerce.md +0 -127
  326. package/templates/industry/fintech.md +0 -161
  327. package/templates/industry/saas.md +0 -134
  328. package/templates/session-memory.json +0 -48
  329. package/templates/skill-template/SKILL.md +0 -90
@@ -1,270 +0,0 @@
1
- ---
2
- name: grill
3
- description: "Use when you want to stress-test code by having an adversarial reviewer try to break it - finding edge cases, security holes, race conditions, and logical flaws that normal reviews miss."
4
- user-invocable: true
5
- argument-hint: "[path, function, or module to grill]"
6
- allowed-tools: Read, Bash, Glob, Grep
7
- ---
8
-
9
- # /grill - Adversarial Code Challenge
10
-
11
- Stress-test code by systematically trying to break it - finding edge cases, security holes, race conditions, and logical flaws that normal code reviews miss. This is not a review; this is an attack.
12
-
13
- **Target:** $ARGUMENTS
14
-
15
- ## When to Use
16
-
17
- - Before deploying critical code (auth, payments, data handling)
18
- - After writing complex business logic
19
- - When code handles user input or external data
20
- - Before security audits (find issues first)
21
- - When you suspect a function has hidden edge cases
22
- - After fixing a bug (verify the fix doesn't break under stress)
23
- - NOT for: general code quality (use `/codereview`)
24
- - NOT for: architecture assessment (use `@architect`)
25
- - NOT for: test creation (use `/tdd` - but grilling findings feed into test cases)
26
-
27
- ## Iron Rule
28
-
29
- ```
30
- ╔══════════════════════════════════════════════════════════════╗
31
- ║ ASSUME THE CODE IS BROKEN UNTIL PROVEN OTHERWISE ║
32
- ║ Your job is to find HOW, not to confirm it works. ║
33
- ╚══════════════════════════════════════════════════════════════╝
34
- ```
35
-
36
- ## Workflow
37
-
38
- ### Step 1: Target Analysis
39
-
40
- 1. **Read the target code** completely
41
- 2. **Understand the contract:**
42
- - What are the expected inputs? (types, ranges, formats)
43
- - What are the expected outputs?
44
- - What side effects does it have? (DB writes, API calls, file I/O)
45
- - What invariants should always hold?
46
- 3. **Identify trust boundaries:**
47
- - Where does external data enter?
48
- - Where does the code trust input without validation?
49
- - Where are type assertions or casts used?
50
-
51
- ```bash
52
- # Read the target
53
- cat $TARGET 2>/dev/null || find . -name "$TARGET*" -not -path "*/node_modules/*" | head -5
54
-
55
- # Find type assertions and unsafe casts
56
- grep -rn "as any\|as unknown\|! \|!\.\|@ts-ignore\|@ts-expect-error" $TARGET --include="*.ts" --include="*.tsx" 2>/dev/null | head -15
57
- ```
58
-
59
- **Output:**
60
- ```markdown
61
- ## Target Profile
62
- - **Function/Module:** [name]
63
- - **Contract:** [inputs → outputs]
64
- - **Side effects:** [DB, API, file, state]
65
- - **Trust boundaries:** [where external data enters]
66
- - **Unsafe patterns:** [casts, assertions, ignores]
67
- ```
68
-
69
- **BLOCKED** until target is fully understood.
70
-
71
- ### Step 2: Attack Vector Execution
72
-
73
- Systematically attack across 5 categories:
74
-
75
- ---
76
-
77
- **Category 1: Input Attacks**
78
-
79
- Try to break the code with unexpected inputs:
80
-
81
- | Attack | Input | Expected Failure |
82
- |--------|-------|-----------------|
83
- | Null/undefined | `null`, `undefined` | TypeError, crash |
84
- | Empty values | `""`, `[]`, `{}`, `0` | Logic error, empty result |
85
- | Type coercion | `"0"`, `"false"`, `"null"` | Truthy/falsy confusion |
86
- | Boundary values | `Number.MAX_SAFE_INTEGER`, `-1`, `0.1 + 0.2` | Overflow, off-by-one, float precision |
87
- | Long strings | `"a".repeat(1_000_000)` | Memory exhaustion, buffer overflow |
88
- | Special characters | `<script>`, `'; DROP TABLE`, `../../../etc/passwd` | XSS, SQL injection, path traversal |
89
- | Unicode edge cases | `"é"`, `"🚀"`, `"\u0000"`, RTL text | Encoding errors, display corruption |
90
- | Nested data | Deeply nested objects (100+ levels) | Stack overflow, infinite recursion |
91
- | Prototype pollution | `{"__proto__": {"admin": true}}` | Privilege escalation |
92
-
93
- ---
94
-
95
- **Category 2: State Attacks**
96
-
97
- Try to break the code through state manipulation:
98
-
99
- | Attack | Scenario | Expected Failure |
100
- |--------|----------|-----------------|
101
- | Concurrent calls | Same function called simultaneously | Race condition, double write |
102
- | Out-of-order execution | Step 3 before step 1 | Undefined behavior |
103
- | Stale state | Use cached/old data with new logic | Inconsistency |
104
- | State pollution | Shared mutable state across calls | Side effect leaks |
105
- | Re-entrance | Function calls itself indirectly | Infinite loop, deadlock |
106
-
107
- ---
108
-
109
- **Category 3: Boundary Attacks**
110
-
111
- Try to exploit boundaries:
112
-
113
- | Attack | Scenario | Expected Failure |
114
- |--------|----------|-----------------|
115
- | Off-by-one | First/last element, array[length] | IndexError, missing data |
116
- | Empty collection | `[]`, empty Map/Set | Unexpected behavior on .map(), .reduce() |
117
- | Single item | Array of 1, Map with 1 entry | Logic that assumes >1 items |
118
- | Max limits | Max array size, max string length | Performance degradation |
119
- | Pagination edges | Page 0, page -1, page past end | Error or empty result |
120
-
121
- ---
122
-
123
- **Category 4: Logic Attacks**
124
-
125
- Try to find logical flaws:
126
-
127
- | Attack | Scenario | Expected Failure |
128
- |--------|----------|-----------------|
129
- | Contradictory inputs | `{min: 10, max: 5}` | No validation, unexpected range |
130
- | Impossible states | Admin + banned, published + draft | State machine violation |
131
- | Circular references | Object referencing itself | Stack overflow, infinite loop |
132
- | Time-dependent logic | Timezone differences, DST, leap year | Wrong date calculations |
133
- | Floating point | `0.1 + 0.2 !== 0.3` | Financial calculation errors |
134
-
135
- ---
136
-
137
- **Category 5: Error Path Attacks**
138
-
139
- Try to trigger every error path:
140
-
141
- | Attack | Scenario | Expected Failure |
142
- |--------|----------|-----------------|
143
- | Network failure | API returns 500, timeout, DNS failure | Unhandled rejection, crash |
144
- | Permission denied | File system, database, API auth | Silent failure, data loss |
145
- | Resource exhaustion | Disk full, memory full, connection pool exhausted | Crash without graceful degradation |
146
- | Partial failure | 3 of 5 batch operations fail | Inconsistent state |
147
- | Corrupted data | Invalid JSON, truncated response, wrong encoding | Parse error, crash |
148
-
149
- ### Step 3: Exploitation Report
150
-
151
- For each vulnerability found:
152
-
153
- ```markdown
154
- ### Vulnerability [N]: [Title]
155
-
156
- **Category:** [Input | State | Boundary | Logic | Error Path]
157
- **Severity:** CRITICAL | HIGH | MEDIUM | LOW
158
- **Location:** [file:line]
159
-
160
- **Attack:**
161
- ```
162
- [exact input or scenario that triggers the bug]
163
- ```
164
-
165
- **Expected behavior:** [what should happen]
166
- **Actual behavior:** [what actually happens]
167
- **Impact:** [data loss | crash | security breach | incorrect result | performance degradation]
168
-
169
- **Proof:** [how to reproduce]
170
- **Fix:** [specific code change to prevent this]
171
- ```
172
-
173
- ### Step 4: Hardening Recommendations
174
-
175
- For each vulnerability, provide a concrete fix:
176
-
177
- | Pattern | Fix |
178
- |---------|-----|
179
- | Missing null check | Add guard clause or optional chaining |
180
- | No input validation | Add Zod/Yup schema validation at boundary |
181
- | Race condition | Add mutex, optimistic locking, or idempotency |
182
- | Injection vulnerability | Parameterized queries, input sanitization |
183
- | Missing error handling | Add try/catch with specific error types |
184
- | Unsafe type assertion | Replace `as` with runtime type guard |
185
-
186
- ### Step 5: Resilience Score
187
-
188
- Rate the target on a 0-10 scale:
189
-
190
- | Score | Rating | Meaning |
191
- |-------|--------|---------|
192
- | 9-10 | Fortress | Battle-hardened, handles all attack categories |
193
- | 7-8 | Solid | Handles most attacks, minor edge case gaps |
194
- | 5-6 | Average | Common attacks handled, but gaps in 1-2 categories |
195
- | 3-4 | Fragile | Multiple attack categories succeed |
196
- | 0-2 | Vulnerable | Critical flaws, immediate fixes needed |
197
-
198
- **Formula:** Start at 10, subtract points per vulnerability:
199
- - CRITICAL: -3 points
200
- - HIGH: -2 points
201
- - MEDIUM: -1 point
202
- - LOW: -0.5 points (minimum score: 0)
203
-
204
- ## Verification Protocol
205
-
206
- **Before claiming the grill is complete:**
207
-
208
- 1. All 5 attack categories were tested (input, state, boundary, logic, error path)
209
- 2. Every vulnerability has a severity level and file:line reference
210
- 3. Every vulnerability has a proof (reproducible attack)
211
- 4. Every vulnerability has a concrete fix recommendation
212
- 5. Resilience score was calculated using the formula
213
- 6. At least 10 distinct attacks were attempted across all categories
214
- 7. Type assertions and unsafe patterns were specifically targeted
215
-
216
- ## Anti-Rationalization
217
-
218
- | Excuse | Reality |
219
- |--------|---------|
220
- | "The tests already cover edge cases" | Tests cover what you thought of. Grilling covers what you didn't. Testers think in happy paths; attackers think in failure modes. |
221
- | "It's internal code, nobody will send bad input" | Internal code today becomes API tomorrow. Internal doesn't mean safe. One refactor exposes it. |
222
- | "We validate at the API layer" | Defense in depth. If the API layer has a bug, what stops the attack downstream? |
223
- | "Edge cases are rare in production" | Rare cases cause production incidents. Murphy's law is not optional. The rarer the case, the less likely you tested it. |
224
- | "This is overkill for a simple function" | Simple functions in critical paths (auth, payments, data) deserve maximum scrutiny. Simplicity doesn't equal safety. |
225
- | "TypeScript prevents these issues" | TypeScript prevents type errors at compile time. It doesn't prevent logic errors, race conditions, or injection attacks at runtime. |
226
- | "Nobody would actually try this" | Automated scanners, fuzzing tools, and malicious actors try exactly these attacks. If you don't, they will. |
227
-
228
- ## Rules
229
-
230
- 1. **Assume broken** - Your job is to break the code, not validate it
231
- 2. **All 5 categories** - Never skip an attack category
232
- 3. **Proof required** - Every vulnerability needs a reproducible attack scenario
233
- 4. **Read-only** - Never modify files during a grill (fixes come after)
234
- 5. **No false positives** - Only report vulnerabilities you can prove
235
- 6. **Severity justified** - Every rating needs a specific impact description
236
- 7. **Fix included** - Every vulnerability includes a concrete remediation
237
- 8. **Target scope** - Only grill the specified target, don't drift to other files
238
- 9. **Type assertions are targets** - Every `as`, `!`, and `@ts-ignore` is suspicious until proven safe
239
- 10. **Score is mechanical** - Follow the formula, no subjective adjustments
240
-
241
- ## Output
242
-
243
- ```
244
- ──── /grill ────
245
- Target: $ARGUMENTS
246
- Contract: [inputs → outputs]
247
- Trust boundaries: [N identified]
248
-
249
- Attacks Attempted: [N]
250
- Input: [N attempted] → [N succeeded]
251
- State: [N attempted] → [N succeeded]
252
- Boundary: [N attempted] → [N succeeded]
253
- Logic: [N attempted] → [N succeeded]
254
- Error: [N attempted] → [N succeeded]
255
-
256
- Vulnerabilities Found: [N]
257
- CRITICAL: N
258
- HIGH: N
259
- MEDIUM: N
260
- LOW: N
261
-
262
- Top Vulnerabilities:
263
- 1. [CRITICAL] [description] - [file:line]
264
- 2. [HIGH] [description] - [file:line]
265
- 3. [HIGH] [description] - [file:line]
266
-
267
- Resilience Score: [N]/10 ([rating])
268
-
269
- ──── Grill complete ────
270
- ```
@@ -1,251 +0,0 @@
1
- ---
2
- name: health
3
- description: "Use when assessing overall project quality, onboarding onto a new codebase, or before major refactoring to establish a baseline."
4
- user-invocable: true
5
- argument-hint: "[module or 'full']"
6
- allowed-tools: Read, Bash, Glob, Grep
7
- ---
8
-
9
- # /health - Project Health Score
10
-
11
- Generate a comprehensive health score for your project or a specific module.
12
-
13
- **Scope:** $ARGUMENTS (default: full project)
14
-
15
- ## Scoring Categories
16
-
17
- | Category | Weight | What it measures |
18
- |----------|--------|------------------|
19
- | Architecture | 25% | ARCHITECTURE.md conformance |
20
- | Tests | 20% | Coverage, test presence |
21
- | Security | 20% | OWASP compliance, secrets |
22
- | Performance | 15% | Bundle size, caching |
23
- | Maintainability | 20% | Code complexity, docs |
24
-
25
- ## Workflow
26
-
27
- ### Step 1: Gather Metrics
28
-
29
- ```bash
30
- # File counts
31
- find src -name "*.ts" -o -name "*.tsx" | wc -l
32
- find src -name "*.test.ts" -o -name "*.spec.ts" | wc -l
33
-
34
- # TypeScript check
35
- npx tsc --noEmit 2>&1 | grep -c "error"
36
-
37
- # Test coverage (if available)
38
- npm test -- --coverage --json 2>/dev/null
39
-
40
- # Bundle analysis
41
- npm run build 2>&1 | grep -E "size|chunk"
42
-
43
- # Security checks
44
- grep -rn "dangerouslySetInnerHTML\|v-html\|eval(" src/ 2>/dev/null | wc -l
45
- grep -rn "password\|secret\|token" src/ --include="*.ts" 2>/dev/null | wc -l
46
- ```
47
-
48
- ### Step 2: Calculate Scores
49
-
50
- #### Architecture Score (25 points)
51
- ```
52
- +5 ARCHITECTURE.md exists
53
- +5 Module structure follows patterns
54
- +5 No cross-module imports
55
- +5 Correct layer usage (service→adapter→hook→component)
56
- +5 Naming conventions followed
57
- ```
58
-
59
- #### Test Score (20 points)
60
- ```
61
- +5 Test files exist
62
- +5 Coverage > 50%
63
- +5 Coverage > 70%
64
- +5 Coverage > 80%
65
- +5 All tests passing
66
- -2 Each failing test
67
- ```
68
-
69
- #### Security Score (20 points)
70
- ```
71
- +5 No hardcoded secrets
72
- +5 No dangerous HTML methods
73
- +5 Input validation present
74
- +5 Auth implementation exists
75
- +5 Secure headers configured
76
- -5 Each critical vulnerability
77
- ```
78
-
79
- #### Performance Score (15 points)
80
- ```
81
- +5 Lazy loading implemented
82
- +5 Query caching present (staleTime)
83
- +5 Bundle < 500KB
84
- +5 No N+1 queries detected
85
- -3 Each performance warning
86
- ```
87
-
88
- #### Maintainability Score (20 points)
89
- ```
90
- +5 README.md exists
91
- +5 Files < 200 lines (average)
92
- +5 Low cyclomatic complexity
93
- +5 TypeScript strict mode
94
- +5 No 'any' types
95
- -2 Each 'any' type found
96
- ```
97
-
98
- ### Step 3: Generate Report
99
-
100
- ## Output Format
101
-
102
- ```
103
- ═══════════════════════════════════════════════════════════════
104
- PROJECT HEALTH REPORT
105
- ═══════════════════════════════════════════════════════════════
106
-
107
- ██████████████████████████████████████░░░░░░░░ 78/100
108
-
109
- ═══════════════════════════════════════════════════════════════
110
-
111
- CATEGORY BREAKDOWN
112
- ───────────────────────────────────────────────────────────────
113
-
114
- Architecture ████████████████████░░░░░ 20/25
115
- ✓ ARCHITECTURE.md exists
116
- ✓ Module structure correct
117
- ✗ Cross-module imports found (3 violations)
118
- ✓ Layer usage correct
119
- ✓ Naming conventions followed
120
-
121
- Tests ████████████████░░░░░░░░░ 16/20
122
- ✓ Test files exist (42 specs)
123
- ✓ Coverage: 72%
124
- ✗ Coverage < 80% target
125
- ✓ All tests passing
126
-
127
- Security █████████████████████████ 20/20
128
- ✓ No hardcoded secrets
129
- ✓ No dangerous HTML methods
130
- ✓ Input validation present
131
- ✓ Auth implementation exists
132
- ✓ Secure headers configured
133
-
134
- Performance █████████████░░░░░░░░░░░░ 10/15
135
- ✓ Lazy loading implemented
136
- ✗ Missing staleTime in 5 queries
137
- ✓ Bundle: 320KB
138
- ✗ Potential N+1 in user.service.ts
139
-
140
- Maintainability ████████████░░░░░░░░░░░░░ 12/20
141
- ✓ README.md exists
142
- ✗ 3 files > 200 lines
143
- ✓ Low complexity
144
- ✓ TypeScript strict mode
145
- ✗ 12 'any' types found
146
-
147
- ═══════════════════════════════════════════════════════════════
148
-
149
- TOP ISSUES TO FIX (by impact)
150
- ───────────────────────────────────────────────────────────────
151
-
152
- 1. 🔴 [Architecture] Cross-module imports
153
- Files: src/modules/orders/components/UserCard.tsx
154
- Fix: Move shared components to src/shared/
155
-
156
- 2. 🟡 [Performance] Missing staleTime in queries
157
- Files: src/modules/*/hooks/use*.ts (5 files)
158
- Fix: Add staleTime to all useQuery calls
159
-
160
- 3. 🟡 [Maintainability] Files exceeding 200 lines
161
- Files: src/modules/auth/components/LoginForm.tsx (284 lines)
162
- Fix: Split into smaller components
163
-
164
- 4. 🟡 [Tests] Coverage below 80%
165
- Current: 72%
166
- Fix: Add tests for uncovered modules
167
-
168
- ═══════════════════════════════════════════════════════════════
169
-
170
- TREND (if previous scans exist)
171
- ───────────────────────────────────────────────────────────────
172
-
173
- Previous: 71/100 (2024-01-10)
174
- Current: 78/100 (2024-01-20)
175
- Change: +7 points ↑
176
-
177
- ═══════════════════════════════════════════════════════════════
178
-
179
- RECOMMENDATIONS
180
- ───────────────────────────────────────────────────────────────
181
-
182
- @reviewer - Run /review-fix-violations to auto-fix
183
- @tester - Add tests for auth module
184
- @builder - Refactor LoginForm.tsx
185
-
186
- ═══════════════════════════════════════════════════════════════
187
- Generated: 2024-01-20 14:30 | Scan time: 12s
188
- ═══════════════════════════════════════════════════════════════
189
- ```
190
-
191
- ## Score Interpretation
192
-
193
- | Score | Grade | Status |
194
- |-------|-------|--------|
195
- | 90-100 | A | Excellent |
196
- | 80-89 | B | Good |
197
- | 70-79 | C | Acceptable |
198
- | 60-69 | D | Needs Work |
199
- | 0-59 | F | Critical |
200
-
201
- ## Save History
202
-
203
- Save scan to `.claude/health-history.json`:
204
-
205
- ```json
206
- {
207
- "scans": [
208
- {
209
- "date": "2024-01-20T14:30:00Z",
210
- "score": 78,
211
- "categories": {
212
- "architecture": 20,
213
- "tests": 16,
214
- "security": 20,
215
- "performance": 10,
216
- "maintainability": 12
217
- }
218
- }
219
- ]
220
- }
221
- ```
222
-
223
- ## Quick Mode
224
-
225
- For fast feedback (< 5 seconds):
226
-
227
- ```
228
- /health quick
229
- ```
230
-
231
- Only checks:
232
- - TypeScript errors
233
- - Test status
234
- - File count
235
-
236
- ## Anti-Rationalization
237
-
238
- | Excuse | Reality |
239
- |--------|---------|
240
- | "The score doesn't matter, the app works" | Working today doesn't mean maintainable tomorrow. The score measures long-term health. |
241
- | "We'll improve the score after the deadline" | After the deadline there's another deadline. Measure now, fix incrementally. |
242
- | "80% coverage is overkill" | 80% is the baseline. Below that, regressions hide in untested code. |
243
- | "Security checks are paranoid" | One vulnerability costs more than 100 health scans. Paranoia is appropriate. |
244
-
245
- ## Rules
246
-
247
- 1. **Be objective** - Numbers, not opinions
248
- 2. **Prioritize issues** - Most impactful first
249
- 3. **Show trends** - Compare to previous scans
250
- 4. **Actionable** - Suggest specific fixes
251
- 5. **Save history** - Track progress over time