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,205 +0,0 @@
1
- ---
2
- name: improve-architecture
3
- description: "Use when the codebase has architectural issues like high coupling, circular dependencies, or unclear boundaries - but a full migration is not needed."
4
- user-invocable: true
5
- argument-hint: "[module, path, or 'full']"
6
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
- ---
8
-
9
- # /improve-architecture - Incremental Architecture Improvement
10
-
11
- Fix architectural issues incrementally - circular dependencies, high coupling, unclear boundaries, god files - without a full migration. Measure before, fix, measure after.
12
-
13
- **Target:** $ARGUMENTS
14
-
15
- ## When to Use
16
-
17
- - Circular dependencies causing build issues or test instability
18
- - God files (>500 lines) that are hard to maintain
19
- - Cross-module imports violating layer boundaries
20
- - High coupling making changes ripple unpredictably
21
- - Unclear module boundaries after organic growth
22
- - Before adding a major feature to a messy area
23
- - NOT for: full architecture pattern migration (use `/migrate-architecture`)
24
- - NOT for: code-level refactoring without structural issues (use `@refactor`)
25
- - NOT for: greenfield architecture design (use `@architect`)
26
-
27
- ## Workflow
28
-
29
- ### Step 1: Architecture Scan
30
-
31
- 1. **Map current structure:**
32
-
33
- ```bash
34
- # Directory structure overview
35
- find $TARGET -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.vue" -o -name "*.svelte" \) | head -100
36
-
37
- # Count lines per file (find god files >500 lines)
38
- find $TARGET -type f \( -name "*.ts" -o -name "*.tsx" \) -exec wc -l {} + 2>/dev/null | sort -rn | head -20
39
-
40
- # Find circular dependency candidates (mutual imports)
41
- for f in $(find $TARGET -name "*.ts" -not -path "*/node_modules/*" | head -50); do
42
- imports=$(grep -oP "from ['\"]\..*?['\"]" "$f" 2>/dev/null | sed "s/from ['\"]//;s/['\"]//")
43
- for imp in $imports; do
44
- target_file=$(realpath --relative-to=. "$(dirname $f)/$imp" 2>/dev/null)
45
- if [ -f "${target_file}.ts" ] && grep -q "$(basename $f .ts)" "${target_file}.ts" 2>/dev/null; then
46
- echo "CIRCULAR: $f <-> ${target_file}.ts"
47
- fi
48
- done
49
- done 2>/dev/null | head -20
50
- ```
51
-
52
- 2. **Read `docs/ARCHITECTURE.md`** if it exists - compare actual vs intended structure
53
- 3. **Identify pain points** with metrics
54
-
55
- **Output:**
56
- ```markdown
57
- ## Architecture Scan
58
-
59
- | Metric | Value | Threshold | Status |
60
- |--------|-------|-----------|--------|
61
- | God files (>500 lines) | N | 0 | [OK/WARN/FAIL] |
62
- | Circular dependencies | N | 0 | [OK/WARN/FAIL] |
63
- | Cross-boundary imports | N | 0 | [OK/WARN/FAIL] |
64
- | Max file size (lines) | N | 500 | [OK/WARN/FAIL] |
65
- | Avg module cohesion | [H/M/L] | HIGH | [OK/WARN/FAIL] |
66
- ```
67
-
68
- **BLOCKED** until scan produces metrics.
69
-
70
- ### Step 2: Issue Classification
71
-
72
- Classify every issue found:
73
-
74
- | Category | Description | Examples |
75
- |----------|-------------|---------|
76
- | **Circular Dependency** | Module A imports B, B imports A | Service ↔ Utility cycles |
77
- | **Boundary Violation** | Import crosses architectural layer | Component importing from data layer |
78
- | **God File** | Single file with too many responsibilities | 800-line service doing auth + validation + logging |
79
- | **Naming Inconsistency** | Files/modules don't follow project conventions | Mix of camelCase and kebab-case |
80
- | **Missing Abstraction** | Duplicated logic that should be extracted | Same validation in 3 services |
81
- | **Dead Code** | Unreferenced exports, unused files | Old API endpoints, deprecated utils |
82
-
83
- For each issue:
84
- ```markdown
85
- ### Issue [N]: [Title]
86
- - **Category:** [from table above]
87
- - **Location:** [file:line]
88
- - **Impact:** HIGH/MEDIUM/LOW
89
- - **Fix:** [targeted fix description]
90
- ```
91
-
92
- **BLOCKED** until all issues are classified with impact levels.
93
-
94
- ### Step 3: Improvement Plan
95
-
96
- For each issue, define a **targeted fix** (not a rewrite):
97
-
98
- | Issue Type | Fix Strategy |
99
- |-----------|-------------|
100
- | Circular dependency | Extract shared code to a new module, or invert dependency direction |
101
- | Boundary violation | Move import to correct layer, or create a facade |
102
- | God file | Extract responsibilities into separate files with single purpose |
103
- | Naming inconsistency | Rename files/exports to follow established convention |
104
- | Missing abstraction | Extract shared logic into a utility or service |
105
- | Dead code | Remove unreferenced exports and files |
106
-
107
- **Order fixes by dependency** - Fix circular dependencies first (they block other fixes).
108
-
109
- ### Step 4: Incremental Execution
110
-
111
- Execute fixes **one at a time**, verifying between each:
112
-
113
- ```
114
- FOR each fix in improvement plan (ordered by dependency):
115
- 1. Apply the fix (edit files)
116
- 2. Verify TypeScript compiles:
117
- tsc --noEmit 2>&1 | head -20
118
- 3. Run tests:
119
- npm test 2>&1 | tail -20
120
- 4. IF compile or tests fail → REVERT and re-evaluate
121
- 5. IF pass → Mark fix as complete, proceed to next
122
- ```
123
-
124
- **BLOCKED** after each fix until compilation and tests pass.
125
-
126
- ### Step 5: Before/After Metrics
127
-
128
- Generate a comparison report:
129
-
130
- ```bash
131
- # Re-run the same scans from Step 1
132
- # Compare metrics before and after
133
- ```
134
-
135
- **Output:**
136
- ```markdown
137
- ## Before/After
138
-
139
- | Metric | Before | After | Change |
140
- |--------|--------|-------|--------|
141
- | God files | N | N | -N |
142
- | Circular deps | N | N | -N |
143
- | Cross-boundary imports | N | N | -N |
144
- | Max file size | N | N | -N lines |
145
- | Files changed | - | N | - |
146
- | Tests passing | ✓ | ✓ | - |
147
- ```
148
-
149
- ## Verification Protocol
150
-
151
- **Before claiming improvements are complete:**
152
-
153
- 1. Before/after metrics exist with concrete numbers
154
- 2. TypeScript compiles without errors after every fix
155
- 3. All tests pass after every fix
156
- 4. No new circular dependencies were introduced
157
- 5. Each fix addresses exactly one issue (not bundled changes)
158
- 6. Files were not just renamed - structural improvements were made
159
- 7. `docs/ARCHITECTURE.md` was updated if module boundaries changed
160
-
161
- ## Anti-Rationalization
162
-
163
- | Excuse | Reality |
164
- |--------|---------|
165
- | "The architecture is fine, it works" | Working code with high coupling breaks when you add the next feature. Measure coupling. |
166
- | "We need a full rewrite" | 90% of architecture issues can be fixed incrementally. Rewrites fail 70% of the time (IEEE study). |
167
- | "Circular dependencies are harmless" | They cause build failures, test instability, and make modules impossible to extract or test independently. |
168
- | "Refactoring is not a feature" | Technical debt compounds at ~23% per year (Gartner). Every sprint you delay costs more next sprint. |
169
- | "We'll improve it in a dedicated sprint" | Dedicated refactoring sprints never get prioritized. Improve incrementally, every sprint. |
170
- | "Splitting files just creates more files" | More small files with clear names > fewer god files. File count is not complexity. |
171
- | "The tests still pass so it's fine" | Tests passing means behavior is preserved, not that architecture is healthy. Tests don't catch coupling. |
172
-
173
- ## Rules
174
-
175
- 1. **Measure before fixing** - No improvements without baseline metrics
176
- 2. **One fix at a time** - Never bundle multiple structural changes
177
- 3. **Verify after each fix** - TypeScript + tests must pass before proceeding
178
- 4. **Revert on failure** - If a fix breaks something, undo it and re-evaluate
179
- 5. **No feature changes** - Only structural improvements, never change behavior
180
- 6. **Update docs** - If boundaries change, update ARCHITECTURE.md
181
- 7. **Incremental only** - This skill improves, not migrates. Use `/migrate-architecture` for pattern changes
182
- 8. **Dependency order** - Fix circular dependencies before other issues
183
-
184
- ## Output
185
-
186
- ```
187
- ──── /improve-architecture ────
188
- Target: $ARGUMENTS
189
-
190
- Scan Results:
191
- God files: N → N (-N)
192
- Circular deps: N → N (-N)
193
- Boundary violations: N → N (-N)
194
- Max file size: N → N lines
195
-
196
- Fixes Applied: N/N
197
- ✓ [Fix 1 description]
198
- ✓ [Fix 2 description]
199
- ✓ [Fix 3 description]
200
-
201
- Compilation: ✓ passing
202
- Tests: ✓ passing ([N] tests)
203
-
204
- ──── Architecture improved incrementally ────
205
- ```
@@ -1,260 +0,0 @@
1
- ---
2
- name: learn
3
- description: "Use when implementing a feature and want to understand the code as it's built - during onboarding, teaching, or learning a new pattern."
4
- user-invocable: true
5
- argument-hint: "[feature to implement and learn]"
6
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
- ---
8
-
9
- # /learn - Learning Mode Implementation
10
-
11
- Implement features while explaining concepts, patterns, and decisions along the way.
12
-
13
- **Target:** $ARGUMENTS
14
-
15
- ## What Makes This Different
16
-
17
- ```
18
- Normal Implementation:
19
- "Here's the code" → Done
20
-
21
- Learning Mode:
22
- "Here's WHY we do this" → "Here's HOW it works" → "Here's the code" → Done
23
- ```
24
-
25
- ## Workflow
26
-
27
- ### Step 1: Context Setting
28
-
29
- Before writing any code, explain:
30
-
31
- ```markdown
32
- ## What We're Building
33
-
34
- [Feature name] is a [type of thing] that [what it does].
35
-
36
- **Why it matters:**
37
- [Business/technical reason]
38
-
39
- **Where it fits:**
40
- [Location in architecture]
41
-
42
- **Concepts you'll learn:**
43
- - Concept 1
44
- - Concept 2
45
- - Concept 3
46
- ```
47
-
48
- ### Step 2: Architecture Explanation
49
-
50
- ```markdown
51
- ## Architecture Deep Dive
52
-
53
- In this codebase, we follow [pattern name].
54
-
55
- ```
56
- ┌─────────────┐
57
- │ Component │ ← UI layer, handles display
58
- └─────┬───────┘
59
- │ uses
60
- ┌─────▼───────┐
61
- │ Hook │ ← Logic layer, manages state
62
- └─────┬───────┘
63
- │ calls
64
- ┌─────▼───────┐
65
- │ Service │ ← Data layer, API calls
66
- └─────────────┘
67
- ```
68
-
69
- **Why this pattern?**
70
- [Explanation of benefits]
71
- ```
72
-
73
- ### Step 3: Incremental Implementation with Teaching
74
-
75
- For each piece of code:
76
-
77
- ```markdown
78
- ## Step N: [What we're doing]
79
-
80
- **The concept:**
81
- [Explain the pattern/concept being used]
82
-
83
- **Why this approach:**
84
- [Explain the decision]
85
-
86
- **The code:**
87
- ```typescript
88
- // This creates a [thing] that [does what]
89
- // We use [pattern] because [reason]
90
- export const myFunction = () => {
91
- // First, we [action] to [achieve goal]
92
- const result = doSomething();
93
-
94
- // Then we [action] because [reason]
95
- return transform(result);
96
- };
97
- ```
98
-
99
- **What just happened:**
100
- 1. We created [thing]
101
- 2. It does [action]
102
- 3. This enables [capability]
103
-
104
- **Try it yourself:**
105
- - What would happen if we [changed X]?
106
- - How would you add [feature Y]?
107
- ```
108
-
109
- ### Step 4: Common Patterns
110
-
111
- When using a pattern, explain it:
112
-
113
- ```markdown
114
- ## Pattern: [Pattern Name]
115
-
116
- **What it is:**
117
- [One sentence explanation]
118
-
119
- **When to use it:**
120
- - Situation 1
121
- - Situation 2
122
-
123
- **Example in our code:**
124
- ```typescript
125
- // Here's how we apply [pattern]
126
- const example = ...;
127
- ```
128
-
129
- **Alternatives considered:**
130
- - [Alternative] - didn't use because [reason]
131
- ```
132
-
133
- ### Step 5: Gotchas and Best Practices
134
-
135
- ```markdown
136
- ## Watch Out For
137
-
138
- **Common mistake #1:**
139
- ```typescript
140
- // ❌ Don't do this
141
- const bad = wrongApproach();
142
-
143
- // ✓ Do this instead
144
- const good = correctApproach();
145
- ```
146
- Why: [Explanation]
147
-
148
- **Common mistake #2:**
149
- [...]
150
- ```
151
-
152
- ### Step 6: Summary and Next Steps
153
-
154
- ```markdown
155
- ## What You Learned
156
-
157
- 1. **[Concept 1]:** [Brief explanation]
158
- 2. **[Concept 2]:** [Brief explanation]
159
- 3. **[Concept 3]:** [Brief explanation]
160
-
161
- ## Practice Exercises
162
-
163
- 1. Try adding [feature] using the same pattern
164
- 2. What would you change if [scenario]?
165
- 3. How does this connect to [related concept]?
166
-
167
- ## Further Reading
168
-
169
- - [Link or reference 1]
170
- - [Link or reference 2]
171
- ```
172
-
173
- ## Teaching Style Guidelines
174
-
175
- ### Do:
176
- - Explain WHY before HOW
177
- - Use analogies for complex concepts
178
- - Show wrong approaches and why they're wrong
179
- - Build complexity incrementally
180
- - Ask thought-provoking questions
181
- - Connect to broader patterns
182
-
183
- ### Don't:
184
- - Dump code without explanation
185
- - Assume prior knowledge
186
- - Skip over "obvious" concepts
187
- - Use jargon without defining it
188
- - Rush through complex topics
189
-
190
- ## Output Format
191
-
192
- ```
193
- ──── /learn ────
194
- Topic: [feature name]
195
-
196
- ## Concepts Covered
197
- 1. [Concept]
198
- 2. [Concept]
199
- 3. [Concept]
200
-
201
- ## Implementation
202
- [Code with inline teaching]
203
-
204
- ## Key Takeaways
205
- - [Takeaway 1]
206
- - [Takeaway 2]
207
-
208
- ## Practice
209
- - [Exercise 1]
210
- - [Exercise 2]
211
- ```
212
-
213
- ## Example Session
214
-
215
- ```markdown
216
- ──── /learn ────
217
- Topic: Creating a User Service
218
-
219
- ## What We're Building
220
-
221
- A UserService that fetches user data from an API and handles
222
- loading states, errors, and caching.
223
-
224
- **Concepts you'll learn:**
225
- - Service layer pattern
226
- - TypeScript generics
227
- - Error handling strategies
228
-
229
- ## Let's Start
230
-
231
- ### Step 1: The Types
232
-
233
- Before any logic, we define our types. This is called
234
- "types-first development" - we describe the shape of our
235
- data before we write code that uses it.
236
-
237
- ```typescript
238
- // Why interface over type?
239
- // Interfaces are better for object shapes because they:
240
- // 1. Have better error messages
241
- // 2. Can be extended
242
- // 3. Are more familiar to OOP developers
243
-
244
- interface User {
245
- id: string;
246
- name: string;
247
- email: string;
248
- }
249
- ```
250
-
251
- [... continues with teaching ...]
252
- ```
253
-
254
- ## Rules
255
-
256
- 1. **Never skip the "why"** - Every piece needs justification
257
- 2. **Build incrementally** - Complex → Simple steps
258
- 3. **Use visuals** - Diagrams help understanding
259
- 4. **Ask questions** - Engage the learner
260
- 5. **Connect concepts** - Show the bigger picture
@@ -1,126 +0,0 @@
1
- ---
2
- name: lint
3
- description: "Use when you need to lint the codebase and auto-fix issues - detects linter, runs it, and fixes what it can."
4
- user-invocable: true
5
- argument-hint: "[path or --fix]"
6
- allowed-tools: Read, Bash, Glob, Grep
7
- ---
8
-
9
- # /lint - Lint & Auto-Fix
10
-
11
- Detect the project's linter, run it, auto-fix what's possible, and report remaining issues.
12
-
13
- **Target:** $ARGUMENTS
14
-
15
- ## When to Use
16
- - Before committing changes
17
- - After generating code with AI
18
- - When CI fails on lint
19
- - During code cleanup
20
- - NOT for: type checking (use `tsc` directly)
21
-
22
- ## Workflow
23
-
24
- ### Step 1: Detect Linter
25
-
26
- Check for installed linters in order of priority:
27
-
28
- | Check | Linter |
29
- |-------|--------|
30
- | `biome.json` or `biome.jsonc` exists | Biome |
31
- | `.eslintrc.*` or `eslint.config.*` exists | ESLint |
32
- | `deno.json` with `lint` config | Deno lint |
33
- | `package.json` has `lint` script | npm run lint |
34
-
35
- ```bash
36
- # Check for config files
37
- ls biome.json biome.jsonc .eslintrc.* eslint.config.* 2>/dev/null
38
- # Check package.json scripts
39
- cat package.json | grep -A5 '"scripts"' | grep lint
40
- ```
41
-
42
- ### Step 2: Detect Formatter
43
-
44
- | Check | Formatter |
45
- |-------|-----------|
46
- | `.prettierrc*` or `prettier.config.*` exists | Prettier |
47
- | `biome.json` exists (has built-in formatter) | Biome |
48
- | `deno.json` with `fmt` config | Deno fmt |
49
- | `package.json` has `format` script | npm run format |
50
-
51
- ### Step 3: Run Lint
52
-
53
- ```bash
54
- # Based on detected linter:
55
- # Biome
56
- npx biome check $TARGET --write 2>&1
57
-
58
- # ESLint
59
- npx eslint $TARGET --fix 2>&1
60
-
61
- # npm script
62
- npm run lint -- --fix 2>&1
63
-
64
- # Deno
65
- deno lint --fix $TARGET 2>&1
66
- ```
67
-
68
- ### Step 4: Run Formatter (if separate from linter)
69
-
70
- ```bash
71
- # Prettier
72
- npx prettier --write $TARGET 2>&1
73
-
74
- # npm script
75
- npm run format 2>&1
76
- ```
77
-
78
- ### Step 5: Report
79
-
80
- Count fixed vs remaining issues.
81
-
82
- ## Output
83
-
84
- ```
85
- ──── /lint ────
86
- Linter: ESLint
87
- Formatter: Prettier
88
- Target: src/
89
-
90
- Fixed automatically:
91
- - 12 formatting issues (Prettier)
92
- - 5 unused imports (ESLint --fix)
93
- - 3 missing semicolons (ESLint --fix)
94
-
95
- Remaining (manual fix needed):
96
- - src/auth.ts:42 - no-explicit-any: Unexpected any
97
- - src/api.ts:18 - no-unused-vars: 'result' is defined but never used
98
-
99
- Summary: 20 fixed, 2 remaining
100
- ```
101
-
102
- ### Clean Output (no issues):
103
- ```
104
- ──── /lint ────
105
- Linter: Biome
106
- Target: src/
107
-
108
- ✓ No issues found
109
- ```
110
-
111
- ## Anti-Rationalization
112
-
113
- | Excuse | Reality |
114
- |--------|---------|
115
- | "It's just a style warning, not a real issue" | Style inconsistency makes code harder to read for every future developer. Fix it. |
116
- | "I'll fix lint errors when I have time" | Lint errors accumulate. 5 today become 50 next week. Fix them now. |
117
- | "Auto-fix might change behavior" | Lint auto-fixes (formatting, imports) are safe. If unsure, review the diff. |
118
- | "My code works, lint doesn't matter" | Lint catches bugs too (unused vars, implicit any, unreachable code). It matters. |
119
-
120
- ## Rules
121
-
122
- 1. **Always auto-fix first** - Run with --fix/--write before reporting
123
- 2. **Detect, don't assume** - Check which linter is installed
124
- 3. **Format after lint** - Linter first, formatter second (if separate)
125
- 4. **Report remaining** - Only show issues that need manual intervention
126
- 5. **Never install linters** - Use what's already in the project