specialist-agent 2.13.0 → 3.2.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 (323) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +33 -207
  3. package/dist/catalog.json +15529 -0
  4. package/dist/hw-worker.mjs +254 -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-BIyqZkro.css +1 -0
  16. package/dist/interface/assets/index-zAegy908.js +13 -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 +63 -0
  35. package/dist/specialist-agent.mjs +6919 -0
  36. package/dist/usage-worker.mjs +174 -0
  37. package/package.json +32 -57
  38. package/.claude-plugin/marketplace.json +0 -52
  39. package/.claude-plugin/plugin.json +0 -37
  40. package/.codex/INSTALL.md +0 -145
  41. package/.cursor-plugin/marketplace.json +0 -52
  42. package/.cursor-plugin/plugin.json +0 -37
  43. package/.opencode/INSTALL.md +0 -127
  44. package/.opencode/opencode.json +0 -186
  45. package/agents/analyst-lite.md +0 -48
  46. package/agents/analyst.md +0 -396
  47. package/agents/api-lite.md +0 -43
  48. package/agents/api.md +0 -427
  49. package/agents/architect-lite.md +0 -104
  50. package/agents/architect.md +0 -571
  51. package/agents/autopilot-lite.md +0 -46
  52. package/agents/autopilot.md +0 -196
  53. package/agents/cloud-lite.md +0 -75
  54. package/agents/cloud.md +0 -213
  55. package/agents/data-lite.md +0 -67
  56. package/agents/data.md +0 -306
  57. package/agents/debugger-lite.md +0 -46
  58. package/agents/debugger.md +0 -410
  59. package/agents/deps-lite.md +0 -41
  60. package/agents/deps.md +0 -363
  61. package/agents/designer-lite.md +0 -67
  62. package/agents/designer.md +0 -195
  63. package/agents/devops-lite.md +0 -67
  64. package/agents/devops.md +0 -205
  65. package/agents/docs-lite.md +0 -42
  66. package/agents/docs.md +0 -454
  67. package/agents/executor-lite.md +0 -61
  68. package/agents/executor.md +0 -695
  69. package/agents/explorer-lite.md +0 -55
  70. package/agents/explorer.md +0 -152
  71. package/agents/finance-lite.md +0 -66
  72. package/agents/finance.md +0 -255
  73. package/agents/i18n-lite.md +0 -44
  74. package/agents/i18n.md +0 -594
  75. package/agents/legal-lite.md +0 -113
  76. package/agents/legal.md +0 -302
  77. package/agents/marketing-lite.md +0 -25
  78. package/agents/marketing.md +0 -188
  79. package/agents/memory.md +0 -166
  80. package/agents/orchestrator-lite.md +0 -40
  81. package/agents/orchestrator.md +0 -512
  82. package/agents/pair-lite.md +0 -38
  83. package/agents/pair.md +0 -310
  84. package/agents/perf-lite.md +0 -42
  85. package/agents/perf.md +0 -320
  86. package/agents/planner-lite.md +0 -59
  87. package/agents/planner.md +0 -272
  88. package/agents/product-lite.md +0 -25
  89. package/agents/product.md +0 -195
  90. package/agents/refactor-lite.md +0 -42
  91. package/agents/refactor.md +0 -467
  92. package/agents/ripple-lite.md +0 -106
  93. package/agents/ripple.md +0 -166
  94. package/agents/scout-lite.md +0 -37
  95. package/agents/scout.md +0 -224
  96. package/agents/security-lite.md +0 -66
  97. package/agents/security.md +0 -252
  98. package/agents/sentry-triage-lite.md +0 -54
  99. package/agents/sentry-triage.md +0 -217
  100. package/agents/starter-lite.md +0 -80
  101. package/agents/starter.md +0 -300
  102. package/agents/support-lite.md +0 -24
  103. package/agents/support.md +0 -191
  104. package/agents/tdd-lite.md +0 -43
  105. package/agents/tdd.md +0 -329
  106. package/agents/tester-lite.md +0 -71
  107. package/agents/tester.md +0 -237
  108. package/cli/architectures.mjs +0 -713
  109. package/cli/detect-architecture.mjs +0 -752
  110. package/cli/generate-architecture.mjs +0 -1096
  111. package/cli/index.mjs +0 -1217
  112. package/cli/recommend-architecture.mjs +0 -870
  113. package/hooks/after-review.mjs +0 -130
  114. package/hooks/after-task.mjs +0 -117
  115. package/hooks/before-plan.mjs +0 -155
  116. package/hooks/before-review.mjs +0 -139
  117. package/hooks/hooks.json +0 -66
  118. package/hooks/lifecycle.json +0 -91
  119. package/hooks/native/auto-dispatch.mjs +0 -207
  120. package/hooks/native/auto-format.mjs +0 -176
  121. package/hooks/native/mcp-discovery.mjs +0 -168
  122. package/hooks/native/security-config.json +0 -38
  123. package/hooks/native/security-guard.mjs +0 -323
  124. package/hooks/native/session-context.mjs +0 -179
  125. package/hooks/native/session-end.mjs +0 -42
  126. package/hooks/native/utils.mjs +0 -62
  127. package/hooks/on-error.mjs +0 -129
  128. package/hooks/session-end.mjs +0 -185
  129. package/hooks/session-start.mjs +0 -154
  130. package/packs/angular/ARCHITECTURE.md +0 -814
  131. package/packs/angular/CLAUDE.md +0 -105
  132. package/packs/angular/agents/builder.md +0 -113
  133. package/packs/angular/agents/doctor.md +0 -187
  134. package/packs/angular/agents/migrator.md +0 -101
  135. package/packs/angular/agents/reviewer.md +0 -252
  136. package/packs/angular/agents-lite/builder.md +0 -65
  137. package/packs/angular/agents-lite/doctor.md +0 -64
  138. package/packs/angular/agents-lite/migrator.md +0 -75
  139. package/packs/angular/agents-lite/reviewer.md +0 -69
  140. package/packs/angular/skills/dev-create-component/SKILL.md +0 -56
  141. package/packs/angular/skills/dev-create-injectable/SKILL.md +0 -60
  142. package/packs/angular/skills/dev-create-module/SKILL.md +0 -49
  143. package/packs/angular/skills/dev-create-service/SKILL.md +0 -34
  144. package/packs/angular/skills/dev-create-test/SKILL.md +0 -78
  145. package/packs/angular/skills/dev-generate-types/SKILL.md +0 -37
  146. package/packs/angular/skills/docs-onboard/SKILL.md +0 -42
  147. package/packs/angular/skills/migration-migrate-component/SKILL.md +0 -42
  148. package/packs/angular/skills/migration-migrate-module/SKILL.md +0 -25
  149. package/packs/angular/skills/review-check-architecture/SKILL.md +0 -67
  150. package/packs/angular/skills/review-fix-violations/SKILL.md +0 -43
  151. package/packs/angular/skills/review-review/SKILL.md +0 -43
  152. package/packs/astro/ARCHITECTURE.md +0 -718
  153. package/packs/astro/CLAUDE.md +0 -106
  154. package/packs/astro/agents/builder.md +0 -123
  155. package/packs/astro/agents/doctor.md +0 -200
  156. package/packs/astro/agents/migrator.md +0 -105
  157. package/packs/astro/agents/reviewer.md +0 -253
  158. package/packs/astro/agents-lite/builder.md +0 -71
  159. package/packs/astro/agents-lite/doctor.md +0 -66
  160. package/packs/astro/agents-lite/migrator.md +0 -71
  161. package/packs/astro/agents-lite/reviewer.md +0 -70
  162. package/packs/astro/skills/dev-create-component/SKILL.md +0 -50
  163. package/packs/astro/skills/dev-create-island/SKILL.md +0 -63
  164. package/packs/astro/skills/dev-create-module/SKILL.md +0 -49
  165. package/packs/astro/skills/dev-create-service/SKILL.md +0 -34
  166. package/packs/astro/skills/dev-create-test/SKILL.md +0 -76
  167. package/packs/astro/skills/dev-generate-types/SKILL.md +0 -37
  168. package/packs/astro/skills/docs-onboard/SKILL.md +0 -51
  169. package/packs/astro/skills/migration-migrate-component/SKILL.md +0 -48
  170. package/packs/astro/skills/migration-migrate-module/SKILL.md +0 -25
  171. package/packs/astro/skills/review-check-architecture/SKILL.md +0 -72
  172. package/packs/astro/skills/review-fix-violations/SKILL.md +0 -43
  173. package/packs/astro/skills/review-review/SKILL.md +0 -45
  174. package/packs/nextjs/ARCHITECTURE.md +0 -1033
  175. package/packs/nextjs/CLAUDE.md +0 -106
  176. package/packs/nextjs/agents/builder.md +0 -132
  177. package/packs/nextjs/agents/doctor.md +0 -226
  178. package/packs/nextjs/agents/migrator.md +0 -101
  179. package/packs/nextjs/agents/reviewer.md +0 -243
  180. package/packs/nextjs/agents-lite/builder.md +0 -74
  181. package/packs/nextjs/agents-lite/doctor.md +0 -74
  182. package/packs/nextjs/agents-lite/migrator.md +0 -75
  183. package/packs/nextjs/agents-lite/reviewer.md +0 -73
  184. package/packs/nextjs/skills/dev-create-component/SKILL.md +0 -82
  185. package/packs/nextjs/skills/dev-create-hook/SKILL.md +0 -90
  186. package/packs/nextjs/skills/dev-create-module/SKILL.md +0 -63
  187. package/packs/nextjs/skills/dev-create-service/SKILL.md +0 -35
  188. package/packs/nextjs/skills/dev-create-test/SKILL.md +0 -106
  189. package/packs/nextjs/skills/dev-generate-types/SKILL.md +0 -37
  190. package/packs/nextjs/skills/docs-onboard/SKILL.md +0 -55
  191. package/packs/nextjs/skills/migration-migrate-component/SKILL.md +0 -58
  192. package/packs/nextjs/skills/migration-migrate-module/SKILL.md +0 -25
  193. package/packs/nextjs/skills/review-check-architecture/SKILL.md +0 -101
  194. package/packs/nextjs/skills/review-fix-violations/SKILL.md +0 -48
  195. package/packs/nextjs/skills/review-review/SKILL.md +0 -47
  196. package/packs/nuxt/ARCHITECTURE.md +0 -831
  197. package/packs/nuxt/CLAUDE.md +0 -111
  198. package/packs/nuxt/agents/builder.md +0 -120
  199. package/packs/nuxt/agents/doctor.md +0 -198
  200. package/packs/nuxt/agents/migrator.md +0 -101
  201. package/packs/nuxt/agents/reviewer.md +0 -255
  202. package/packs/nuxt/agents-lite/builder.md +0 -67
  203. package/packs/nuxt/agents-lite/doctor.md +0 -67
  204. package/packs/nuxt/agents-lite/migrator.md +0 -80
  205. package/packs/nuxt/agents-lite/reviewer.md +0 -71
  206. package/packs/nuxt/skills/dev-create-component/SKILL.md +0 -60
  207. package/packs/nuxt/skills/dev-create-composable/SKILL.md +0 -33
  208. package/packs/nuxt/skills/dev-create-module/SKILL.md +0 -49
  209. package/packs/nuxt/skills/dev-create-service/SKILL.md +0 -34
  210. package/packs/nuxt/skills/dev-create-test/SKILL.md +0 -61
  211. package/packs/nuxt/skills/dev-generate-types/SKILL.md +0 -37
  212. package/packs/nuxt/skills/docs-onboard/SKILL.md +0 -49
  213. package/packs/nuxt/skills/migration-migrate-component/SKILL.md +0 -48
  214. package/packs/nuxt/skills/migration-migrate-module/SKILL.md +0 -25
  215. package/packs/nuxt/skills/review-check-architecture/SKILL.md +0 -71
  216. package/packs/nuxt/skills/review-fix-violations/SKILL.md +0 -43
  217. package/packs/nuxt/skills/review-review/SKILL.md +0 -45
  218. package/packs/react/ARCHITECTURE.md +0 -991
  219. package/packs/react/CLAUDE.md +0 -102
  220. package/packs/react/agents/builder.md +0 -113
  221. package/packs/react/agents/doctor.md +0 -203
  222. package/packs/react/agents/migrator.md +0 -101
  223. package/packs/react/agents/reviewer.md +0 -252
  224. package/packs/react/agents-lite/builder.md +0 -65
  225. package/packs/react/agents-lite/doctor.md +0 -64
  226. package/packs/react/agents-lite/migrator.md +0 -74
  227. package/packs/react/agents-lite/reviewer.md +0 -69
  228. package/packs/react/skills/dev-create-component/SKILL.md +0 -53
  229. package/packs/react/skills/dev-create-hook/SKILL.md +0 -78
  230. package/packs/react/skills/dev-create-module/SKILL.md +0 -51
  231. package/packs/react/skills/dev-create-service/SKILL.md +0 -34
  232. package/packs/react/skills/dev-create-test/SKILL.md +0 -92
  233. package/packs/react/skills/dev-generate-types/SKILL.md +0 -37
  234. package/packs/react/skills/docs-onboard/SKILL.md +0 -42
  235. package/packs/react/skills/migration-migrate-component/SKILL.md +0 -44
  236. package/packs/react/skills/migration-migrate-module/SKILL.md +0 -25
  237. package/packs/react/skills/review-check-architecture/SKILL.md +0 -73
  238. package/packs/react/skills/review-fix-violations/SKILL.md +0 -45
  239. package/packs/react/skills/review-review/SKILL.md +0 -44
  240. package/packs/svelte/ARCHITECTURE.md +0 -975
  241. package/packs/svelte/CLAUDE.md +0 -102
  242. package/packs/svelte/agents/builder.md +0 -114
  243. package/packs/svelte/agents/doctor.md +0 -174
  244. package/packs/svelte/agents/migrator.md +0 -101
  245. package/packs/svelte/agents/reviewer.md +0 -238
  246. package/packs/svelte/agents-lite/builder.md +0 -66
  247. package/packs/svelte/agents-lite/doctor.md +0 -67
  248. package/packs/svelte/agents-lite/migrator.md +0 -82
  249. package/packs/svelte/agents-lite/reviewer.md +0 -70
  250. package/packs/svelte/skills/dev-create-component/SKILL.md +0 -77
  251. package/packs/svelte/skills/dev-create-module/SKILL.md +0 -59
  252. package/packs/svelte/skills/dev-create-service/SKILL.md +0 -35
  253. package/packs/svelte/skills/dev-create-store/SKILL.md +0 -94
  254. package/packs/svelte/skills/dev-create-test/SKILL.md +0 -98
  255. package/packs/svelte/skills/dev-generate-types/SKILL.md +0 -37
  256. package/packs/svelte/skills/docs-onboard/SKILL.md +0 -47
  257. package/packs/svelte/skills/migration-migrate-component/SKILL.md +0 -51
  258. package/packs/svelte/skills/migration-migrate-module/SKILL.md +0 -25
  259. package/packs/svelte/skills/review-check-architecture/SKILL.md +0 -79
  260. package/packs/svelte/skills/review-fix-violations/SKILL.md +0 -47
  261. package/packs/svelte/skills/review-review/SKILL.md +0 -45
  262. package/packs/vue/ARCHITECTURE.md +0 -798
  263. package/packs/vue/CLAUDE.md +0 -102
  264. package/packs/vue/agents/builder.md +0 -112
  265. package/packs/vue/agents/doctor.md +0 -185
  266. package/packs/vue/agents/migrator.md +0 -101
  267. package/packs/vue/agents/reviewer.md +0 -249
  268. package/packs/vue/agents-lite/builder.md +0 -65
  269. package/packs/vue/agents-lite/doctor.md +0 -63
  270. package/packs/vue/agents-lite/migrator.md +0 -73
  271. package/packs/vue/agents-lite/reviewer.md +0 -68
  272. package/packs/vue/skills/dev-create-component/SKILL.md +0 -58
  273. package/packs/vue/skills/dev-create-composable/SKILL.md +0 -31
  274. package/packs/vue/skills/dev-create-module/SKILL.md +0 -50
  275. package/packs/vue/skills/dev-create-service/SKILL.md +0 -34
  276. package/packs/vue/skills/dev-create-test/SKILL.md +0 -62
  277. package/packs/vue/skills/dev-generate-types/SKILL.md +0 -37
  278. package/packs/vue/skills/docs-onboard/SKILL.md +0 -42
  279. package/packs/vue/skills/migration-migrate-component/SKILL.md +0 -41
  280. package/packs/vue/skills/migration-migrate-module/SKILL.md +0 -25
  281. package/packs/vue/skills/review-check-architecture/SKILL.md +0 -73
  282. package/packs/vue/skills/review-fix-violations/SKILL.md +0 -42
  283. package/packs/vue/skills/review-review/SKILL.md +0 -43
  284. package/skills/audit/SKILL.md +0 -231
  285. package/skills/autofix/SKILL.md +0 -166
  286. package/skills/autopilot/SKILL.md +0 -286
  287. package/skills/brainstorm/SKILL.md +0 -298
  288. package/skills/checkpoint/SKILL.md +0 -217
  289. package/skills/codereview/SKILL.md +0 -268
  290. package/skills/commit/SKILL.md +0 -150
  291. package/skills/copywriting/SKILL.md +0 -218
  292. package/skills/cro/SKILL.md +0 -234
  293. package/skills/debug/SKILL.md +0 -210
  294. package/skills/design-review/SKILL.md +0 -217
  295. package/skills/discovery/SKILL.md +0 -218
  296. package/skills/estimate/SKILL.md +0 -154
  297. package/skills/finish/SKILL.md +0 -220
  298. package/skills/grill/SKILL.md +0 -270
  299. package/skills/health/SKILL.md +0 -251
  300. package/skills/improve-architecture/SKILL.md +0 -205
  301. package/skills/learn/SKILL.md +0 -260
  302. package/skills/lint/SKILL.md +0 -126
  303. package/skills/migrate-architecture/SKILL.md +0 -242
  304. package/skills/migrate-framework/SKILL.md +0 -172
  305. package/skills/onboard/SKILL.md +0 -168
  306. package/skills/plan/SKILL.md +0 -141
  307. package/skills/prd/SKILL.md +0 -241
  308. package/skills/recall/SKILL.md +0 -112
  309. package/skills/remember/SKILL.md +0 -108
  310. package/skills/seo-audit/SKILL.md +0 -240
  311. package/skills/tdd/SKILL.md +0 -201
  312. package/skills/tutorial/SKILL.md +0 -346
  313. package/skills/verify/SKILL.md +0 -168
  314. package/skills/worktree/SKILL.md +0 -168
  315. package/skills/write-skill/SKILL.md +0 -225
  316. package/templates/autopilot/PROMPT.md +0 -39
  317. package/templates/autopilot/README.md +0 -122
  318. package/templates/autopilot/devcontainer.json +0 -21
  319. package/templates/industry/ecommerce.md +0 -127
  320. package/templates/industry/fintech.md +0 -161
  321. package/templates/industry/saas.md +0 -134
  322. package/templates/session-memory.json +0 -48
  323. package/templates/skill-template/SKILL.md +0 -90
@@ -1,130 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * After Review Hook
5
- *
6
- * Runs after @reviewer completes a code review.
7
- *
8
- * Actions:
9
- * - Records review results in metrics
10
- * - Logs review summary
11
- * - Tracks violations and trends
12
- * - Suggests next actions
13
- */
14
-
15
- import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
16
-
17
- const SESSION_FILE = '.claude/metrics/current-session.json';
18
- const REVIEWS_DIR = '.claude/metrics/reviews';
19
-
20
- // Review data passed via environment or args
21
- const reviewData = {
22
- scope: process.env.REVIEW_SCOPE || process.argv[2] || 'unknown',
23
- verdict: process.env.REVIEW_VERDICT || process.argv[3] || 'unknown',
24
- violations: parseInt(process.env.REVIEW_VIOLATIONS || process.argv[4] || '0', 10),
25
- warnings: parseInt(process.env.REVIEW_WARNINGS || process.argv[5] || '0', 10),
26
- highlights: parseInt(process.env.REVIEW_HIGHLIGHTS || process.argv[6] || '0', 10),
27
- agent: '@reviewer',
28
- timestamp: new Date().toISOString()
29
- };
30
-
31
- async function main() {
32
- console.log(`\n──── Review Complete: ${reviewData.scope} ────`);
33
-
34
- // 1. Log review summary
35
- logSummary();
36
-
37
- // 2. Update session metrics
38
- updateSessionMetrics();
39
-
40
- // 3. Save review record
41
- saveReviewRecord();
42
-
43
- // 4. Suggest next actions
44
- suggestNextActions();
45
- }
46
-
47
- function logSummary() {
48
- const verdictIcon = {
49
- approved: '✓ Approved',
50
- caveats: '⚠ Approved with Caveats',
51
- rejected: '✗ Requires Changes',
52
- unknown: '? Unknown'
53
- };
54
-
55
- console.log(`Verdict: ${verdictIcon[reviewData.verdict] || verdictIcon.unknown}`);
56
-
57
- if (reviewData.violations > 0) {
58
- console.log(`Violations: ${reviewData.violations}`);
59
- }
60
- if (reviewData.warnings > 0) {
61
- console.log(`Warnings: ${reviewData.warnings}`);
62
- }
63
- if (reviewData.highlights > 0) {
64
- console.log(`Highlights: ${reviewData.highlights}`);
65
- }
66
-
67
- // Quality score (simple heuristic)
68
- const score = Math.max(0, 100 - (reviewData.violations * 15) - (reviewData.warnings * 5));
69
- console.log(`Quality score: ${score}/100`);
70
- }
71
-
72
- function updateSessionMetrics() {
73
- if (!existsSync(SESSION_FILE)) {
74
- return;
75
- }
76
-
77
- try {
78
- const session = JSON.parse(readFileSync(SESSION_FILE, 'utf-8'));
79
-
80
- if (!session.reviews) {
81
- session.reviews = [];
82
- }
83
-
84
- session.reviews.push({
85
- scope: reviewData.scope,
86
- verdict: reviewData.verdict,
87
- violations: reviewData.violations,
88
- warnings: reviewData.warnings,
89
- highlights: reviewData.highlights,
90
- timestamp: reviewData.timestamp
91
- });
92
-
93
- writeFileSync(SESSION_FILE, JSON.stringify(session, null, 2));
94
- console.log('\n✓ Metrics updated');
95
- } catch (err) {
96
- console.log(`ℹ Could not update metrics: ${err.message}`);
97
- }
98
- }
99
-
100
- function saveReviewRecord() {
101
- try {
102
- mkdirSync(REVIEWS_DIR, { recursive: true });
103
-
104
- const date = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
105
- const filename = `${REVIEWS_DIR}/review-${date}.json`;
106
-
107
- writeFileSync(filename, JSON.stringify(reviewData, null, 2));
108
- } catch {
109
- // Non-critical, ignore
110
- }
111
- }
112
-
113
- function suggestNextActions() {
114
- console.log('\n──── Suggested Actions ────');
115
-
116
- if (reviewData.verdict === 'rejected' || reviewData.violations > 0) {
117
- console.log(' 1. Fix violations listed in the review');
118
- console.log(' 2. Run /checkpoint create before-fixes');
119
- console.log(' 3. Re-run @reviewer after fixes');
120
- } else if (reviewData.verdict === 'caveats') {
121
- console.log(' 1. Address warnings if time permits');
122
- console.log(' 2. Proceed with merge (caveats are non-blocking)');
123
- } else {
124
- console.log(' 1. Ready to merge');
125
- console.log(' 2. Run /finish to finalize branch');
126
- }
127
- }
128
-
129
- // Run
130
- main().catch(console.error);
@@ -1,117 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * After Task Hook
5
- *
6
- * Runs after each task completes (from @executor or manual work).
7
- *
8
- * Actions:
9
- * - Records task completion in metrics
10
- * - Creates checkpoint if enabled
11
- * - Updates token tracking
12
- * - Logs progress
13
- */
14
-
15
- import { existsSync, readFileSync, writeFileSync } from 'fs';
16
-
17
- const SESSION_FILE = '.claude/metrics/current-session.json';
18
-
19
- // Task data passed via environment or args
20
- const taskData = {
21
- taskId: process.env.TASK_ID || process.argv[2] || 'unknown',
22
- description: process.env.TASK_DESC || process.argv[3] || 'Task completed',
23
- tokens: parseInt(process.env.TASK_TOKENS || process.argv[4] || '0', 10),
24
- duration: process.env.TASK_DURATION || process.argv[5] || '0s',
25
- agent: process.env.TASK_AGENT || process.argv[6] || 'manual',
26
- status: process.env.TASK_STATUS || process.argv[7] || 'completed',
27
- files: {
28
- created: (process.env.FILES_CREATED || '').split(',').filter(Boolean),
29
- modified: (process.env.FILES_MODIFIED || '').split(',').filter(Boolean)
30
- }
31
- };
32
-
33
- async function main() {
34
- console.log(`\n──── Task Complete: ${taskData.taskId} ────`);
35
-
36
- // 1. Update session metrics
37
- updateMetrics(taskData);
38
-
39
- // 2. Log task summary
40
- logTaskSummary(taskData);
41
-
42
- // 3. Show running totals
43
- showRunningTotals();
44
- }
45
-
46
- function updateMetrics(task) {
47
- if (!existsSync(SESSION_FILE)) {
48
- console.log('ℹ No active session');
49
- return;
50
- }
51
-
52
- try {
53
- const session = JSON.parse(readFileSync(SESSION_FILE, 'utf-8'));
54
-
55
- // Add task to list
56
- session.tasks.push({
57
- id: task.taskId,
58
- description: task.description,
59
- agent: task.agent,
60
- status: task.status,
61
- tokens: task.tokens,
62
- duration: task.duration,
63
- completedAt: new Date().toISOString()
64
- });
65
-
66
- // Update token totals
67
- session.tokens.estimated += task.tokens;
68
-
69
- // Update file tracking
70
- session.files.created.push(...task.files.created);
71
- session.files.modified.push(...task.files.modified);
72
-
73
- // Update agent usage
74
- if (task.agent && !session.agents.includes(task.agent)) {
75
- session.agents.push(task.agent);
76
- }
77
-
78
- writeFileSync(SESSION_FILE, JSON.stringify(session, null, 2));
79
- } catch (err) {
80
- console.log('ℹ Could not update metrics:', err.message);
81
- }
82
- }
83
-
84
- function logTaskSummary(task) {
85
- console.log(`Status: ${task.status === 'completed' ? '✓' : '✗'} ${task.status}`);
86
- console.log(`Agent: ${task.agent}`);
87
- console.log(`Tokens: ~${task.tokens.toLocaleString()}`);
88
- console.log(`Duration: ${task.duration}`);
89
-
90
- if (task.files.created.length > 0) {
91
- console.log(`Files created: ${task.files.created.length}`);
92
- }
93
- if (task.files.modified.length > 0) {
94
- console.log(`Files modified: ${task.files.modified.length}`);
95
- }
96
- }
97
-
98
- function showRunningTotals() {
99
- if (!existsSync(SESSION_FILE)) {
100
- return;
101
- }
102
-
103
- try {
104
- const session = JSON.parse(readFileSync(SESSION_FILE, 'utf-8'));
105
-
106
- console.log('\n──── Session Progress ────');
107
- console.log(`Tasks completed: ${session.tasks.length}`);
108
- console.log(`Total tokens: ~${session.tokens.estimated.toLocaleString()}`);
109
- console.log(`Estimated cost: ~$${(session.tokens.estimated * 0.000015).toFixed(2)}`);
110
- console.log(`Agents used: ${session.agents.join(', ') || 'none'}`);
111
- } catch {
112
- // Ignore errors
113
- }
114
- }
115
-
116
- // Run
117
- main().catch(console.error);
@@ -1,155 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Before Plan Hook
5
- *
6
- * Runs before @planner creates an implementation plan.
7
- *
8
- * Actions:
9
- * - Validates project structure
10
- * - Checks for ARCHITECTURE.md
11
- * - Detects uncommitted changes
12
- * - Summarizes project state for planner context
13
- */
14
-
15
- import { execSync } from 'child_process';
16
- import { existsSync, readFileSync } from 'fs';
17
-
18
- const feature = process.env.PLAN_FEATURE || process.argv[2] || '';
19
-
20
- async function main() {
21
- console.log('──── Pre-Plan Checks ────\n');
22
-
23
- // 1. Check architecture file
24
- checkArchitecture();
25
-
26
- // 2. Check git state
27
- checkGitState();
28
-
29
- // 3. Detect framework
30
- detectFramework();
31
-
32
- // 4. Scan project size
33
- scanProjectSize();
34
-
35
- console.log('\n──── Ready for Planning ────');
36
- }
37
-
38
- function checkArchitecture() {
39
- const paths = [
40
- 'docs/ARCHITECTURE.md',
41
- 'ARCHITECTURE.md',
42
- '.claude/ARCHITECTURE.md'
43
- ];
44
-
45
- const found = paths.find(p => existsSync(p));
46
-
47
- if (found) {
48
- console.log(` ✓ Architecture file: ${found}`);
49
-
50
- try {
51
- const content = readFileSync(found, 'utf-8');
52
- const lines = content.split('\n').length;
53
- console.log(` ${lines} lines of architecture patterns`);
54
- } catch {
55
- // Ignore read errors
56
- }
57
- } else {
58
- console.log(' ⚠ No ARCHITECTURE.md found');
59
- console.log(' @planner will use generic patterns');
60
- }
61
- }
62
-
63
- function checkGitState() {
64
- console.log('Checking git state...');
65
- try {
66
- execSync('git rev-parse --git-dir', { stdio: 'pipe' });
67
-
68
- // Current branch
69
- const branch = execSync('git branch --show-current', { encoding: 'utf-8' }).trim();
70
- console.log(` Branch: ${branch}`);
71
-
72
- // Uncommitted changes
73
- const status = execSync('git status --porcelain', { encoding: 'utf-8' }).trim();
74
- const changedFiles = status.split('\n').filter(Boolean);
75
-
76
- if (changedFiles.length > 0) {
77
- console.log(` ⚠ Uncommitted changes: ${changedFiles.length} files`);
78
- console.log(' Consider committing or stashing before planning');
79
- } else {
80
- console.log(' ✓ Working tree clean');
81
- }
82
-
83
- // Recent commits for context
84
- const recentCommits = execSync('git log --oneline -5', { encoding: 'utf-8' }).trim();
85
- if (recentCommits) {
86
- console.log(' Recent commits:');
87
- recentCommits.split('\n').forEach(c => console.log(` ${c}`));
88
- }
89
- } catch {
90
- console.log(' ℹ Not a git repository');
91
- }
92
- }
93
-
94
- function detectFramework() {
95
- console.log('Detecting framework...');
96
-
97
- if (!existsSync('package.json')) {
98
- console.log(' ℹ No package.json found');
99
- return;
100
- }
101
-
102
- try {
103
- const pkg = JSON.parse(readFileSync('package.json', 'utf-8'));
104
- const deps = { ...pkg.dependencies, ...pkg.devDependencies };
105
-
106
- const frameworks = [];
107
- if (deps['next']) frameworks.push(`Next.js ${deps['next']}`);
108
- if (deps['react'] && !deps['next']) frameworks.push(`React ${deps['react']}`);
109
- if (deps['vue']) frameworks.push(`Vue ${deps['vue']}`);
110
- if (deps['svelte'] || deps['@sveltejs/kit']) frameworks.push('SvelteKit');
111
-
112
- if (frameworks.length > 0) {
113
- console.log(` ✓ Framework: ${frameworks.join(', ')}`);
114
- } else {
115
- console.log(' ℹ No recognized framework');
116
- }
117
-
118
- // Check for TypeScript
119
- if (deps['typescript'] || existsSync('tsconfig.json')) {
120
- console.log(' ✓ TypeScript enabled');
121
- }
122
-
123
- // Check for test framework
124
- if (deps['vitest']) console.log(' ✓ Test runner: Vitest');
125
- else if (deps['jest']) console.log(' ✓ Test runner: Jest');
126
- } catch {
127
- console.log(' ℹ Could not parse package.json');
128
- }
129
- }
130
-
131
- function scanProjectSize() {
132
- console.log('Scanning project...');
133
- try {
134
- // Count source files (excluding node_modules, dist, .next, etc.)
135
- const result = execSync(
136
- 'find . -type f \\( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.vue" -o -name "*.svelte" \\) ' +
137
- '-not -path "*/node_modules/*" -not -path "*/.next/*" -not -path "*/dist/*" -not -path "*/.nuxt/*" 2>/dev/null | wc -l',
138
- { encoding: 'utf-8' }
139
- ).trim();
140
-
141
- const fileCount = parseInt(result, 10);
142
- if (fileCount > 0) {
143
- console.log(` Source files: ${fileCount}`);
144
-
145
- if (fileCount < 20) console.log(' Scale: Small project');
146
- else if (fileCount < 100) console.log(' Scale: Medium project');
147
- else console.log(' Scale: Large project');
148
- }
149
- } catch {
150
- console.log(' ℹ Could not scan project');
151
- }
152
- }
153
-
154
- // Run
155
- main().catch(console.error);
@@ -1,139 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Before Review Hook
5
- *
6
- * Runs before @reviewer starts a code review.
7
- *
8
- * Actions:
9
- * - Runs automated checks (lint, types)
10
- * - Identifies files to review
11
- * - Prepares context for reviewer
12
- */
13
-
14
- import { execSync } from 'child_process';
15
- import { existsSync } from 'fs';
16
-
17
- const reviewScope = process.env.REVIEW_SCOPE || process.argv[2] || '.';
18
-
19
- async function main() {
20
- console.log('──── Pre-Review Checks ────\n');
21
-
22
- // 1. Run linter
23
- runLint();
24
-
25
- // 2. Run TypeScript check
26
- runTypeCheck();
27
-
28
- // 3. Identify changed files
29
- identifyChanges();
30
-
31
- // 4. Quick test run (if fast)
32
- runQuickTests();
33
-
34
- console.log('\n──── Ready for Review ────');
35
- }
36
-
37
- function runLint() {
38
- console.log('Running lint...');
39
- try {
40
- execSync('npm run lint 2>&1 || true', { encoding: 'utf-8', stdio: 'pipe' });
41
- console.log(' ✓ Lint passed');
42
- } catch (err) {
43
- const output = err.stdout || err.message;
44
- if (output.includes('error')) {
45
- console.log(' ⚠ Lint warnings/errors found');
46
- console.log(' Run "npm run lint" for details');
47
- } else {
48
- console.log(' ✓ Lint passed');
49
- }
50
- }
51
- }
52
-
53
- function runTypeCheck() {
54
- console.log('Running TypeScript check...');
55
- try {
56
- execSync('npx tsc --noEmit 2>&1', { encoding: 'utf-8', stdio: 'pipe' });
57
- console.log(' ✓ TypeScript passed');
58
- } catch (err) {
59
- const output = err.stdout || err.message;
60
- if (output.includes('error')) {
61
- const errorCount = (output.match(/error TS/g) || []).length;
62
- console.log(` ✗ TypeScript errors: ${errorCount}`);
63
- console.log(' Run "npx tsc --noEmit" for details');
64
- } else {
65
- console.log(' ✓ TypeScript passed');
66
- }
67
- }
68
- }
69
-
70
- function identifyChanges() {
71
- console.log('Identifying changes...');
72
- try {
73
- // Check if in git repo
74
- execSync('git rev-parse --git-dir', { stdio: 'pipe' });
75
-
76
- // Get changed files
77
- const staged = execSync('git diff --cached --name-only', { encoding: 'utf-8' }).trim();
78
- const unstaged = execSync('git diff --name-only', { encoding: 'utf-8' }).trim();
79
-
80
- const stagedFiles = staged.split('\n').filter(Boolean);
81
- const unstagedFiles = unstaged.split('\n').filter(Boolean);
82
-
83
- if (stagedFiles.length > 0) {
84
- console.log(` Staged files: ${stagedFiles.length}`);
85
- stagedFiles.slice(0, 5).forEach(f => console.log(` • ${f}`));
86
- if (stagedFiles.length > 5) {
87
- console.log(` ... and ${stagedFiles.length - 5} more`);
88
- }
89
- }
90
-
91
- if (unstagedFiles.length > 0) {
92
- console.log(` Unstaged files: ${unstagedFiles.length}`);
93
- }
94
-
95
- if (stagedFiles.length === 0 && unstagedFiles.length === 0) {
96
- // Check against main branch
97
- const branchDiff = execSync('git diff main --name-only 2>/dev/null || git diff master --name-only 2>/dev/null || true', {
98
- encoding: 'utf-8'
99
- }).trim();
100
-
101
- const branchFiles = branchDiff.split('\n').filter(Boolean);
102
- if (branchFiles.length > 0) {
103
- console.log(` Files changed vs main: ${branchFiles.length}`);
104
- branchFiles.slice(0, 5).forEach(f => console.log(` • ${f}`));
105
- if (branchFiles.length > 5) {
106
- console.log(` ... and ${branchFiles.length - 5} more`);
107
- }
108
- }
109
- }
110
- } catch {
111
- console.log(' ℹ Not a git repository or no changes');
112
- }
113
- }
114
-
115
- function runQuickTests() {
116
- // Only run if tests are fast (< 30s typically)
117
- if (!existsSync('package.json')) {
118
- return;
119
- }
120
-
121
- console.log('Running quick test check...');
122
- try {
123
- // Just check if tests exist and can start
124
- const result = execSync('npm test -- --listTests 2>&1 || true', {
125
- encoding: 'utf-8',
126
- timeout: 10000
127
- });
128
-
129
- const testCount = (result.match(/test/gi) || []).length;
130
- if (testCount > 0) {
131
- console.log(` ✓ Test suite ready (${testCount} test files)`);
132
- }
133
- } catch {
134
- console.log(' ℹ Tests not configured or timed out');
135
- }
136
- }
137
-
138
- // Run
139
- main().catch(console.error);
package/hooks/hooks.json DELETED
@@ -1,66 +0,0 @@
1
- {
2
- "hooks": {
3
- "PreToolUse": [
4
- {
5
- "matcher": "Bash",
6
- "hooks": [
7
- {
8
- "type": "command",
9
- "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/security-guard.mjs",
10
- "timeout": 5
11
- }
12
- ]
13
- }
14
- ],
15
- "UserPromptSubmit": [
16
- {
17
- "hooks": [
18
- {
19
- "type": "command",
20
- "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/auto-dispatch.mjs",
21
- "timeout": 3
22
- }
23
- ]
24
- }
25
- ],
26
- "SessionStart": [
27
- {
28
- "hooks": [
29
- {
30
- "type": "command",
31
- "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/session-context.mjs",
32
- "timeout": 5
33
- },
34
- {
35
- "type": "command",
36
- "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/mcp-discovery.mjs",
37
- "timeout": 5
38
- }
39
- ]
40
- }
41
- ],
42
- "PostToolUse": [
43
- {
44
- "matcher": "Write|Edit",
45
- "hooks": [
46
- {
47
- "type": "command",
48
- "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/auto-format.mjs",
49
- "timeout": 15
50
- }
51
- ]
52
- }
53
- ],
54
- "Stop": [
55
- {
56
- "hooks": [
57
- {
58
- "type": "command",
59
- "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/session-end.mjs",
60
- "timeout": 5
61
- }
62
- ]
63
- }
64
- ]
65
- }
66
- }
@@ -1,91 +0,0 @@
1
- {
2
- "$schema": "https://specialist-agent.dev/schemas/hooks-v1.json",
3
- "version": "1.0.0",
4
- "description": "Specialist Agent internal lifecycle hooks (used by agents, not by Claude Code plugin system)",
5
- "hooks": {
6
- "session-start": {
7
- "description": "Runs when a new Claude Code session starts",
8
- "scripts": [
9
- "./hooks/session-start.mjs"
10
- ],
11
- "enabled": true
12
- },
13
- "before-plan": {
14
- "description": "Runs before @planner creates a plan",
15
- "scripts": [
16
- "./hooks/before-plan.mjs"
17
- ],
18
- "enabled": true
19
- },
20
- "after-task": {
21
- "description": "Runs after each task completes (from @executor)",
22
- "scripts": [
23
- "./hooks/after-task.mjs"
24
- ],
25
- "enabled": true
26
- },
27
- "on-error": {
28
- "description": "Runs when an agent encounters an error",
29
- "scripts": [
30
- "./hooks/on-error.mjs"
31
- ],
32
- "enabled": true
33
- },
34
- "before-review": {
35
- "description": "Runs before @reviewer starts review",
36
- "scripts": [
37
- "./hooks/before-review.mjs"
38
- ],
39
- "enabled": true
40
- },
41
- "after-review": {
42
- "description": "Runs after @reviewer completes review",
43
- "scripts": [
44
- "./hooks/after-review.mjs"
45
- ],
46
- "enabled": true
47
- },
48
- "session-end": {
49
- "description": "Runs when session ends (if detectable)",
50
- "scripts": [
51
- "./hooks/session-end.mjs"
52
- ],
53
- "enabled": true
54
- },
55
- "before-iteration": {
56
- "description": "Runs before each autopilot iteration starts",
57
- "scripts": [],
58
- "enabled": true
59
- },
60
- "after-iteration": {
61
- "description": "Runs after each autopilot iteration completes",
62
- "scripts": [],
63
- "enabled": true
64
- }
65
- },
66
- "metrics": {
67
- "enabled": true,
68
- "outputDir": ".claude/metrics",
69
- "track": {
70
- "tokens": true,
71
- "duration": true,
72
- "agents": true,
73
- "skills": true,
74
- "files": true,
75
- "checkpoints": true
76
- }
77
- },
78
- "notifications": {
79
- "enabled": false,
80
- "channels": {
81
- "slack": {
82
- "webhook": "",
83
- "events": ["on-error", "session-end"]
84
- },
85
- "discord": {
86
- "webhook": "",
87
- "events": ["on-error"]
88
- }
89
- }
90
- }
91
- }