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,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