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,207 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Auto-Dispatch - UserPromptSubmit Hook
5
- *
6
- * Detects user intent from prompt text and SUGGESTS (never forces)
7
- * the best specialist agent. Respects explicit @agent mentions.
8
- *
9
- * Claude Code event: UserPromptSubmit
10
- * Stdin: { prompt: "..." }
11
- * Output: { "additionalContext": "Consider using @agent..." } or {}
12
- */
13
-
14
- import { resolve } from 'path';
15
- import { fileURLToPath } from 'url';
16
- import { readStdin, outputJson } from './utils.mjs';
17
-
18
- const __filename = fileURLToPath(import.meta.url);
19
-
20
- // ── Intent Map ──────────────────────────────────────────────
21
- // Each agent maps to keyword groups. Multi-word phrases score higher.
22
- // weight: multiplier for match score (more specific = higher)
23
-
24
- const INTENT_MAP = {
25
- // Core agents
26
- starter: { phrases: ['new project', 'from scratch', 'scaffold', 'bootstrap', 'starter'], keywords: ['create app', 'init project'], weight: 1.5 },
27
- builder: { phrases: ['create module', 'build component', 'implement feature', 'add crud'], keywords: ['create', 'build', 'implement', 'add', 'module', 'component', 'service', 'scaffold'], weight: 1 },
28
- reviewer: { phrases: ['code review', 'review code', 'check quality', 'architecture review'], keywords: ['review', 'audit code', 'quality'], weight: 1.2 },
29
- doctor: { phrases: ['not working', 'investigate bug', 'trace error', '500 error', '404 error'], keywords: ['bug', 'error', 'broken', 'crash', 'investigate', 'diagnose', 'failing'], weight: 1.2 },
30
- migrator: { phrases: ['modernize code', 'migrate legacy', 'upgrade framework'], keywords: ['migrate', 'modernize', 'legacy', 'upgrade'], weight: 1.5 },
31
-
32
- // Workflow agents
33
- planner: { phrases: ['plan feature', 'design architecture', 'plan implementation'], keywords: ['plan', 'design', 'architect', 'strategy', 'roadmap'], weight: 1 },
34
- executor: { phrases: ['execute plan', 'run tasks', 'execute all'], keywords: ['execute', 'run plan', 'checkpoint'], weight: 1.5 },
35
- tdd: { phrases: ['test first', 'test driven', 'red green refactor', 'tdd'], keywords: ['tdd', 'failing test', 'test-driven'], weight: 2 },
36
- debugger: { phrases: ['debug issue', 'root cause', 'stack trace', 'step through'], keywords: ['debug', 'trace', 'breakpoint', 'root cause'], weight: 1.2 },
37
- pair: { phrases: ['pair programming', 'pair with me', 'code together'], keywords: ['pair', 'collaborate', 'together'], weight: 1.5 },
38
- analyst: { phrases: ['requirements spec', 'technical spec', 'user story'], keywords: ['requirements', 'spec', 'user story', 'acceptance criteria'], weight: 1.5 },
39
- orchestrator: { phrases: ['coordinate agents', 'multi-agent', 'orchestrate'], keywords: ['orchestrate', 'coordinate', 'multi-agent'], weight: 2 },
40
-
41
- // Specialist agents
42
- api: { phrases: ['api design', 'rest api', 'graphql', 'openapi', 'api endpoint'], keywords: ['api', 'endpoint', 'rest', 'graphql', 'swagger'], weight: 1.2 },
43
- perf: { phrases: ['optimize performance', 'slow page', 'performance audit', 'speed up'], keywords: ['performance', 'optimize', 'slow', 'speed', 'bottleneck', 'lighthouse'], weight: 1.2 },
44
- security: { phrases: ['security audit', 'owasp', 'vulnerability scan', 'auth security'], keywords: ['security', 'vulnerability', 'owasp', 'xss', 'injection', 'auth'], weight: 1.2 },
45
- finance: { phrases: ['payment integration', 'stripe integration', 'billing system', 'subscription'], keywords: ['payment', 'stripe', 'billing', 'subscription', 'invoice'], weight: 1.5 },
46
- cloud: { phrases: ['deploy to aws', 'terraform', 'serverless', 'cloud architecture'], keywords: ['aws', 'gcp', 'azure', 'terraform', 'serverless', 'lambda', 'cloud'], weight: 1.2 },
47
- data: { phrases: ['database design', 'schema design', 'prisma migration', 'data model'], keywords: ['database', 'schema', 'prisma', 'migration', 'sql', 'query', 'orm'], weight: 1.2 },
48
- devops: { phrases: ['docker setup', 'ci/cd pipeline', 'kubernetes', 'deploy pipeline'], keywords: ['docker', 'kubernetes', 'k8s', 'ci/cd', 'pipeline', 'deploy', 'container'], weight: 1.2 },
49
- i18n: { phrases: ['internationalization', 'add translations', 'multi-language'], keywords: ['i18n', 'translate', 'internationalization', 'locale', 'language'], weight: 1.5 },
50
- docs: { phrases: ['generate documentation', 'write docs', 'api docs', 'jsdoc'], keywords: ['documentation', 'docs', 'jsdoc', 'readme'], weight: 1 },
51
- refactor: { phrases: ['refactor code', 'clean up code', 'extract function', 'reduce complexity'], keywords: ['refactor', 'clean up', 'extract', 'simplify', 'complexity'], weight: 1 },
52
- deps: { phrases: ['update dependencies', 'dependency audit', 'outdated packages'], keywords: ['dependency', 'dependencies', 'outdated', 'update packages', 'npm audit'], weight: 1.5 },
53
- legal: { phrases: ['gdpr compliance', 'lgpd', 'ccpa', 'privacy policy', 'data protection'], keywords: ['gdpr', 'lgpd', 'ccpa', 'compliance', 'privacy', 'data protection'], weight: 1.5 },
54
- designer: { phrases: ['design system', 'component library', 'accessibility audit'], keywords: ['design system', 'accessibility', 'a11y', 'ui library', 'theme'], weight: 1.5 },
55
- tester: { phrases: ['test strategy', 'test coverage', 'e2e tests', 'testing plan'], keywords: ['test strategy', 'coverage', 'e2e', 'testing'], weight: 1 },
56
-
57
- // Business agents
58
- marketing: { phrases: ['landing page', 'marketing copy', 'seo optimization', 'growth strategy', 'social media'], keywords: ['marketing', 'seo', 'copy', 'landing', 'growth', 'conversion', 'funnel'], weight: 1.5 },
59
- product: { phrases: ['product strategy', 'user story', 'product roadmap', 'feature prioritization', 'product requirement'], keywords: ['product', 'roadmap', 'prd', 'user story', 'prioritization', 'backlog'], weight: 1.5 },
60
- support: { phrases: ['knowledge base', 'runbook', 'changelog', 'support docs', 'faq'], keywords: ['support', 'runbook', 'changelog', 'faq', 'knowledge base', 'help docs'], weight: 1.5 },
61
-
62
- // Automation agents
63
- 'sentry-triage': { phrases: ['sentry error', 'triage errors', 'sentry issue', 'error triage', 'fix sentry'], keywords: ['sentry', 'triage', 'error tracking', 'alert'], weight: 2 },
64
- autopilot: { phrases: ['autopilot', 'autonomous loop', 'overnight build', 'iterative build', 'batch build loop', 'ralf loop', 'ralph loop'], keywords: ['autopilot', 'autonomous build', 'overnight', 'iterative build', 'ralf', 'ralph'], weight: 2 },
65
-
66
- // Support agents
67
- scout: { phrases: ['analyze project', 'project analysis', 'quick scan'], keywords: ['analyze', 'scan', 'overview', 'analysis'], weight: 1 },
68
- explorer: { phrases: ['explore codebase', 'understand code', 'how does this work'], keywords: ['explore', 'understand', 'codebase', 'how does'], weight: 1 },
69
- memory: { phrases: ['remember this', 'save decision', 'recall decision', 'session memory'], keywords: ['remember', 'recall', 'memory', 'decision log'], weight: 1.5 },
70
- architect: { phrases: ['architecture migration', 'monolith to microservices', 'system redesign', 'clean architecture', 'hexagonal architecture', 'migrate architecture', 'detect architecture', 'change architecture', 'improve architecture', 'modular monolith', 'domain driven design', 'feature sliced design', 'ports and adapters'], keywords: ['architecture', 'hexagonal', 'ddd', 'cqrs', 'modular monolith', 'bounded context', 'strangler fig', 'modular', 'fsd', 'clean arch', 'ports adapters'], weight: 1.5 },
71
- ripple: { phrases: ['impact analysis', 'cascading effects', 'what will break', 'change impact'], keywords: ['impact', 'ripple', 'cascade', 'breaking change', 'downstream'], weight: 1.5 },
72
- };
73
-
74
- // Descriptions for suggestions
75
- const AGENT_DESCRIPTIONS = {
76
- starter: 'creates projects from scratch with best practices',
77
- builder: 'builds modules, components, and services with tests',
78
- reviewer: 'provides unified 3-in-1 review (spec, quality, architecture)',
79
- doctor: 'investigates bugs with systematic 4-phase diagnosis',
80
- migrator: 'modernizes legacy code to current standards',
81
- planner: 'creates adaptive implementation plans by complexity',
82
- executor: 'executes plans with checkpoints and cost tracking',
83
- tdd: 'implements test-driven development (RED → GREEN → REFACTOR)',
84
- debugger: 'performs 4-phase systematic debugging with evidence',
85
- pair: 'provides real-time pair programming assistance',
86
- analyst: 'converts requirements into technical specifications',
87
- orchestrator: 'coordinates multiple agents for complex tasks',
88
- api: 'designs REST/GraphQL APIs with OpenAPI specs',
89
- perf: 'optimizes performance with measurable improvements',
90
- security: 'audits for OWASP vulnerabilities and auth issues',
91
- finance: 'integrates payments, billing, and subscriptions',
92
- cloud: 'architects cloud infrastructure with IaC',
93
- data: 'designs database schemas, migrations, and caching',
94
- devops: 'sets up Docker, K8s, and CI/CD pipelines',
95
- i18n: 'implements internationalization and translations',
96
- docs: 'generates documentation from code',
97
- refactor: 'refactors code for clarity and maintainability',
98
- deps: 'manages dependencies and security updates',
99
- legal: 'ensures GDPR, LGPD, CCPA compliance',
100
- designer: 'creates design systems with accessibility',
101
- tester: 'designs test strategies and improves coverage',
102
- scout: 'provides quick project analysis (~500 tokens)',
103
- explorer: 'performs deep codebase exploration',
104
- memory: 'saves and recalls decisions across sessions',
105
- architect: 'designs and migrates full system architecture (hexagonal, DDD, CQRS, microservices)',
106
- ripple: 'analyzes cascading impact of changes across the codebase',
107
- marketing: 'creates landing pages, marketing copy, SEO optimization, and growth strategies',
108
- product: 'defines product strategy, user stories, roadmaps, and feature prioritization',
109
- support: 'generates knowledge base articles, runbooks, changelogs, and FAQs',
110
- 'sentry-triage': 'triages Sentry errors, prioritizes by impact, and auto-creates fix PRs',
111
- autopilot: 'runs iterative autonomous builds with PRD and progress tracking',
112
- };
113
-
114
- // ── Intent Matching Engine (exported for testing) ───────────
115
-
116
- /**
117
- * Match user prompt against intent map and return best agent suggestion.
118
- * @param {string} prompt - The user's prompt text
119
- * @returns {{ agent: string, score: number, description: string } | null}
120
- */
121
- export function matchIntent(prompt) {
122
- if (!prompt || typeof prompt !== 'string') return null;
123
-
124
- const lower = prompt.toLowerCase().trim();
125
-
126
- // Skip if user already mentions an @agent explicitly
127
- if (/@\w+/.test(lower)) return null;
128
-
129
- // Skip if prompt is too short (likely greeting or simple question)
130
- if (lower.split(/\s+/).length < 3) return null;
131
-
132
- const scores = {};
133
-
134
- for (const [agent, config] of Object.entries(INTENT_MAP)) {
135
- let score = 0;
136
-
137
- // Check phrases first (higher specificity)
138
- for (const phrase of config.phrases || []) {
139
- if (lower.includes(phrase.toLowerCase())) {
140
- score += 2 * config.weight;
141
- }
142
- }
143
-
144
- // Check individual keywords
145
- for (const keyword of config.keywords || []) {
146
- if (lower.includes(keyword.toLowerCase())) {
147
- score += 1 * config.weight;
148
- }
149
- }
150
-
151
- if (score > 0) {
152
- scores[agent] = score;
153
- }
154
- }
155
-
156
- // Find best match
157
- const entries = Object.entries(scores).sort((a, b) => b[1] - a[1]);
158
-
159
- if (entries.length === 0) return null;
160
-
161
- const [bestAgent, bestScore] = entries[0];
162
-
163
- // Minimum threshold: score must be >= 2 to suggest
164
- if (bestScore < 2) return null;
165
-
166
- return {
167
- agent: bestAgent,
168
- score: bestScore,
169
- description: AGENT_DESCRIPTIONS[bestAgent] || '',
170
- };
171
- }
172
-
173
- // ── Main Execution ──────────────────────────────────────────
174
-
175
- async function main() {
176
- const input = await readStdin();
177
-
178
- const prompt = input?.prompt || '';
179
-
180
- if (!prompt) {
181
- process.exit(0);
182
- }
183
-
184
- const match = matchIntent(prompt);
185
-
186
- if (match) {
187
- outputJson({
188
- additionalContext: `AUTO-DISPATCH: Read agents/${match.agent}.md and follow its workflow NOW. Agent @${match.agent} — ${match.description}. Do NOT respond as a generic assistant — the agent file has structured phases, rules, and verification that produce better results.`,
189
- });
190
- } else {
191
- outputJson({
192
- additionalContext: `SPECIALIST AGENT REMINDER: You are NOT a generic assistant. You are a platform of 36+ agents and 32+ skills. Before responding, check if any agent or skill fits this task:
193
- AGENTS: @builder (create), @reviewer (review), @doctor (debug), @planner (plan), @tdd (test-first), @pair (collaborate), @analyst (specs), @architect (architecture), @security (audit), @devops (deploy), @data (database), @api (endpoints), @perf (optimize), @docs (document), @refactor (clean), @deps (dependencies), @marketing (growth), @product (strategy).
194
- SKILLS: /plan (plan feature), /debug (debug issue), /commit (smart commit), /audit (code audit), /codereview (parallel review), /tdd (test-driven), /brainstorm (ideation), /verify (verify work), /health (project score), /estimate (cost), /prd (product requirements), /design-review (UI audit), /seo-audit (SEO), /grill (stress-test), /autopilot (autonomous build).
195
- Read the matching agent file from agents/ or execute the skill. Generic responses when a specialist exists is a FAILURE MODE.`,
196
- });
197
- }
198
-
199
- process.exit(0);
200
- }
201
-
202
- if (process.argv[1] && resolve(process.argv[1]) === resolve(__filename)) {
203
- main().catch(() => {
204
- // Advisory hook - never block on error
205
- process.exit(0);
206
- });
207
- }
@@ -1,176 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Auto-Format - PostToolUse Hook (Write|Edit)
5
- *
6
- * Automatically formats files after Claude writes or edits them.
7
- * Detects available formatters (prettier, eslint, biome) by config presence.
8
- * Never fails - if no formatter found, silently exits.
9
- *
10
- * Claude Code event: PostToolUse (matcher: "Write|Edit")
11
- * Stdin: { tool_input: { file_path: "..." } }
12
- * Output: silent (no additionalContext needed)
13
- */
14
-
15
- import { execFileSync } from 'child_process';
16
- import { existsSync } from 'fs';
17
- import { resolve, extname, join, relative, isAbsolute } from 'path';
18
- import { fileURLToPath } from 'url';
19
- import { readStdin, readJsonFile } from './utils.mjs';
20
-
21
- const __filename = fileURLToPath(import.meta.url);
22
-
23
- // ── Supported Extensions ────────────────────────────────────
24
-
25
- const FORMATTABLE_EXTENSIONS = new Set([
26
- '.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs',
27
- '.vue', '.svelte',
28
- '.css', '.scss', '.less',
29
- '.json',
30
- '.html', '.htm',
31
- '.md', '.mdx',
32
- '.yaml', '.yml',
33
- ]);
34
-
35
- // ── Formatter Detection ─────────────────────────────────────
36
-
37
- const PRETTIER_CONFIGS = [
38
- '.prettierrc',
39
- '.prettierrc.json',
40
- '.prettierrc.js',
41
- '.prettierrc.cjs',
42
- '.prettierrc.mjs',
43
- '.prettierrc.yml',
44
- '.prettierrc.yaml',
45
- '.prettierrc.toml',
46
- 'prettier.config.js',
47
- 'prettier.config.cjs',
48
- 'prettier.config.mjs',
49
- ];
50
-
51
- const BIOME_CONFIGS = [
52
- 'biome.json',
53
- 'biome.jsonc',
54
- ];
55
-
56
- /**
57
- * Detect which formatter is available in the project.
58
- * @param {string} cwd - Project root
59
- * @returns {'prettier' | 'biome' | null}
60
- */
61
- export function detectFormatter(cwd) {
62
- // Check prettier first (most common)
63
- for (const config of PRETTIER_CONFIGS) {
64
- if (existsSync(join(cwd, config))) return 'prettier';
65
- }
66
-
67
- // Check package.json for prettier key
68
- const pkg = readJsonFile(join(cwd, 'package.json'));
69
- if (pkg?.prettier) return 'prettier';
70
-
71
- // Check biome
72
- for (const config of BIOME_CONFIGS) {
73
- if (existsSync(join(cwd, config))) return 'biome';
74
- }
75
-
76
- return null;
77
- }
78
-
79
- /**
80
- * Validate that a file path is within the project directory.
81
- * Prevents path traversal attacks.
82
- * @param {string} filePath - File path to validate
83
- * @param {string} cwd - Project root
84
- * @returns {boolean}
85
- */
86
- export function isWithinProject(filePath, cwd) {
87
- try {
88
- const resolved = resolve(filePath);
89
- const normalizedCwd = resolve(cwd);
90
- // Use path.relative to prevent prefix-matching false positives
91
- // e.g. "/projectsecrets" would pass startsWith("/project") but not this check
92
- const rel = relative(normalizedCwd, resolved);
93
- return !rel.startsWith('..') && !isAbsolute(rel);
94
- } catch {
95
- return false;
96
- }
97
- }
98
-
99
- /**
100
- * Format a file using the detected formatter.
101
- * @param {string} filePath - File to format
102
- * @param {string} formatter - 'prettier' or 'biome'
103
- * @param {string} cwd - Project root
104
- * @returns {boolean} true if formatted successfully
105
- */
106
- export function formatFile(filePath, formatter, cwd) {
107
- try {
108
- // Use execFileSync with argument array to prevent command injection
109
- // filePath is never interpolated into a shell string
110
- if (formatter === 'prettier') {
111
- execFileSync('npx', ['prettier', '--write', filePath], {
112
- cwd,
113
- encoding: 'utf-8',
114
- timeout: 10000,
115
- stdio: ['pipe', 'pipe', 'pipe'],
116
- });
117
- return true;
118
- }
119
-
120
- if (formatter === 'biome') {
121
- execFileSync('npx', ['@biomejs/biome', 'format', '--write', filePath], {
122
- cwd,
123
- encoding: 'utf-8',
124
- timeout: 10000,
125
- stdio: ['pipe', 'pipe', 'pipe'],
126
- });
127
- return true;
128
- }
129
-
130
- return false;
131
- } catch {
132
- return false;
133
- }
134
- }
135
-
136
- // ── Main Execution ──────────────────────────────────────────
137
-
138
- async function main() {
139
- const input = await readStdin();
140
- const filePath = input?.tool_input?.file_path;
141
-
142
- if (!filePath) {
143
- process.exit(0);
144
- }
145
-
146
- // Check extension
147
- const ext = extname(filePath).toLowerCase();
148
- if (!FORMATTABLE_EXTENSIONS.has(ext)) {
149
- process.exit(0);
150
- }
151
-
152
- const cwd = process.cwd();
153
-
154
- // Security: validate path is within project
155
- if (!isWithinProject(filePath, cwd)) {
156
- process.exit(0);
157
- }
158
-
159
- // Detect formatter
160
- const formatter = detectFormatter(cwd);
161
- if (!formatter) {
162
- process.exit(0);
163
- }
164
-
165
- // Format
166
- formatFile(filePath, formatter, cwd);
167
-
168
- // Always exit 0 - formatting is best-effort, never blocking
169
- process.exit(0);
170
- }
171
-
172
- if (process.argv[1] && resolve(process.argv[1]) === resolve(__filename)) {
173
- main().catch(() => {
174
- process.exit(0);
175
- });
176
- }
@@ -1,168 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * MCP Discovery - SessionStart Hook
5
- *
6
- * Detects configured MCP servers and injects availability context
7
- * so agents know which external tools they can leverage.
8
- * All operations are read-only. Errors are silently ignored.
9
- *
10
- * Claude Code event: SessionStart
11
- * Output: { "additionalContext": "MCP availability summary..." }
12
- */
13
-
14
- import { join, resolve } from 'path';
15
- import { fileURLToPath } from 'url';
16
- import { outputJson, readJsonFile } from './utils.mjs';
17
-
18
- const __filename = fileURLToPath(import.meta.url);
19
-
20
- // ── MCP Registry ────────────────────────────────────────────
21
- // Maps MCP server names to the agents/skills that benefit from them.
22
-
23
- const MCP_AGENT_MAP = {
24
- context7: {
25
- description: 'Library documentation lookups',
26
- agents: ['@builder', '@doctor', '@migrator', '@deps'],
27
- skills: ['/tdd', '/debug'],
28
- hint: 'Agents can fetch up-to-date API docs instead of relying on training data.',
29
- },
30
- azion: {
31
- description: 'Edge deployment & configuration',
32
- agents: ['@starter', '@cloud'],
33
- skills: [],
34
- hint: 'Enables edge deploy, Rules Engine config generation, and Terraform resources.',
35
- },
36
- playwright: {
37
- description: 'Browser automation & testing',
38
- agents: ['@tester', '@doctor', '@debugger', '@perf'],
39
- skills: ['/verify', '/debug'],
40
- hint: 'Agents can interact with the browser — take screenshots, run e2e tests, inspect DOM.',
41
- },
42
- github: {
43
- description: 'GitHub issues, PRs & CI',
44
- agents: ['@sentry-triage', '@reviewer', '@ripple', '@deps', '@devops'],
45
- skills: ['/autofix', '/finish', '/codereview'],
46
- hint: 'Agents can create issues/PRs, read CI status, and manage releases.',
47
- },
48
- sentry: {
49
- description: 'Error tracking & triage',
50
- agents: ['@sentry-triage', '@doctor', '@debugger'],
51
- skills: ['/autofix', '/debug'],
52
- hint: 'Agents can fetch Sentry errors directly instead of requiring CLI or curl.',
53
- },
54
- linear: {
55
- description: 'Issue tracking & project management',
56
- agents: ['@planner', '@analyst', '@product', '@orchestrator'],
57
- skills: ['/plan'],
58
- hint: 'Agents can read/create Linear issues and link tasks to code changes.',
59
- },
60
- jira: {
61
- description: 'Issue tracking & project management',
62
- agents: ['@planner', '@analyst', '@product', '@orchestrator'],
63
- skills: ['/plan'],
64
- hint: 'Agents can read/create Jira issues and link tasks to code changes.',
65
- },
66
- supabase: {
67
- description: 'Database & auth management',
68
- agents: ['@data', '@builder', '@security'],
69
- skills: [],
70
- hint: 'Agents can read schemas, manage migrations, and configure auth rules.',
71
- },
72
- postgres: {
73
- description: 'PostgreSQL database access',
74
- agents: ['@data', '@builder'],
75
- skills: [],
76
- hint: 'Agents can read live schemas and validate queries.',
77
- },
78
- slack: {
79
- description: 'Team notifications',
80
- agents: ['@orchestrator', '@support'],
81
- skills: ['/finish'],
82
- hint: 'Agents can send notifications on review completion, deploys, and errors.',
83
- },
84
- filesystem: {
85
- description: 'Extended file system access',
86
- agents: ['@explorer', '@scout'],
87
- skills: ['/onboard'],
88
- hint: 'Extended file system capabilities for deep codebase exploration.',
89
- },
90
- };
91
-
92
- // ── Discovery Logic (exported for testing) ──────────────────
93
-
94
- /**
95
- * Discover configured MCP servers and map them to agent capabilities.
96
- * @param {string} cwd - Project root directory
97
- * @returns {{ configured: string[], agentCapabilities: Record<string, string[]>, suggestions: string[] }}
98
- */
99
- export function discoverMCPs(cwd) {
100
- const mcpConfig = readJsonFile(join(cwd, '.mcp.json'));
101
- const configured = mcpConfig?.mcpServers ? Object.keys(mcpConfig.mcpServers) : [];
102
-
103
- // Map configured MCPs to agent capabilities
104
- const agentCapabilities = {};
105
- for (const mcpName of configured) {
106
- const mapping = MCP_AGENT_MAP[mcpName];
107
- if (!mapping) continue;
108
-
109
- for (const agent of mapping.agents) {
110
- if (!agentCapabilities[agent]) agentCapabilities[agent] = [];
111
- agentCapabilities[agent].push(mcpName);
112
- }
113
- }
114
-
115
- // Suggest MCPs that would benefit current agents but aren't configured
116
- const suggestions = [];
117
- for (const [mcpName, mapping] of Object.entries(MCP_AGENT_MAP)) {
118
- if (configured.includes(mcpName)) continue;
119
- // Only suggest if user has relevant agents installed
120
- suggestions.push(`${mcpName}: ${mapping.description} → benefits ${mapping.agents.join(', ')}`);
121
- }
122
-
123
- return { configured, agentCapabilities, suggestions };
124
- }
125
-
126
- /**
127
- * Build MCP context string for session injection.
128
- * @param {string} cwd - Project root directory
129
- * @returns {string} MCP context or empty string
130
- */
131
- export function buildMCPContext(cwd) {
132
- const { configured, agentCapabilities } = discoverMCPs(cwd);
133
-
134
- if (configured.length === 0) return '';
135
-
136
- const parts = [`MCPs available: ${configured.join(', ')}`];
137
-
138
- // Add agent-specific hints
139
- const enhancedAgents = Object.entries(agentCapabilities)
140
- .map(([agent, mcps]) => `${agent}(+${mcps.join(',')})`)
141
- .join(' ');
142
-
143
- if (enhancedAgents) {
144
- parts.push(`Enhanced agents: ${enhancedAgents}`);
145
- }
146
-
147
- return parts.join(' | ');
148
- }
149
-
150
- // ── Main Execution ──────────────────────────────────────────
151
-
152
- async function main() {
153
- const cwd = process.cwd();
154
- const context = buildMCPContext(cwd);
155
-
156
- if (context) {
157
- outputJson({ additionalContext: `[MCP Discovery] ${context}` });
158
- }
159
-
160
- process.exit(0);
161
- }
162
-
163
- if (process.argv[1] && resolve(process.argv[1]) === resolve(__filename)) {
164
- main().catch(() => {
165
- // Advisory hook - never block on error
166
- process.exit(0);
167
- });
168
- }
@@ -1,38 +0,0 @@
1
- {
2
- "$schema": "https://specialist-agent.dev/schemas/security-hooks-v1.json",
3
- "version": "1.0.0",
4
- "description": "Security rules for the native security-guard hook. Customize per-project.",
5
- "enabled": true,
6
- "rules": {
7
- "catastrophic-rm": { "enabled": true, "severity": "CRITICAL" },
8
- "fork-bomb": { "enabled": true, "severity": "CRITICAL" },
9
- "disk-wipe": { "enabled": true, "severity": "CRITICAL" },
10
- "force-push-protected": { "enabled": true, "severity": "HIGH" },
11
- "hard-reset": { "enabled": true, "severity": "HIGH" },
12
- "sql-destructive": { "enabled": true, "severity": "HIGH" },
13
- "pipe-to-shell": { "enabled": true, "severity": "HIGH" },
14
- "chmod-777": { "enabled": true, "severity": "HIGH" },
15
- "git-branch-force-delete": { "enabled": true, "severity": "HIGH" },
16
- "npm-publish-no-dry-run": { "enabled": true, "severity": "HIGH" },
17
- "docker-system-prune": { "enabled": true, "severity": "HIGH" },
18
- "kubectl-delete-namespace": { "enabled": true, "severity": "HIGH" },
19
- "env-file-read": { "enabled": true, "severity": "MEDIUM" },
20
- "ssh-key-access": { "enabled": true, "severity": "MEDIUM" },
21
- "aws-credentials": { "enabled": true, "severity": "MEDIUM" },
22
- "cloud-credentials": { "enabled": true, "severity": "MEDIUM" },
23
- "env-file-write": { "enabled": true, "severity": "MEDIUM" },
24
- "inline-secrets": { "enabled": true, "severity": "MEDIUM" }
25
- },
26
- "allowlist": [
27
- "rm -rf node_modules",
28
- "rm -rf dist",
29
- "rm -rf build",
30
- "rm -rf .next",
31
- "rm -rf .nuxt",
32
- "rm -rf .svelte-kit",
33
- "rm -rf coverage",
34
- "rm -rf .turbo",
35
- "rm -rf .cache"
36
- ],
37
- "protectedBranches": ["main", "master", "production", "release"]
38
- }