@maestro-ai/mcp-server 1.0.0 → 1.1.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 (448) hide show
  1. package/README.md +266 -227
  2. package/dist/content/design-system/README.md +231 -231
  3. package/dist/content/design-system/indexes/README.md +211 -211
  4. package/dist/content/design-system/indexes/colors-index.md +156 -156
  5. package/dist/content/design-system/indexes/quick-search.md +111 -111
  6. package/dist/content/design-system/indexes/stacks-index.md +341 -341
  7. package/dist/content/examples/Exemplo de Fluxo Completo com Java e Spring Boot.md +249 -249
  8. package/dist/content/examples/Exemplo de Fluxo Completo com Laravel e Filament.md +277 -277
  9. package/dist/content/examples/Exemplo de Fluxo Completo com Laravel e Livewire.md +260 -260
  10. package/dist/content/examples/Exemplo de Fluxo Completo com Node e NestJS.md +257 -257
  11. package/dist/content/guides/Cat/303/241logo de Stacks para Cloud Moderna.md" +119 -119
  12. package/dist/content/guides/Cat/303/241logo de Stacks para Hospedagem Compartilhada.md" +147 -147
  13. package/dist/content/guides/Checklist Mestre de Entrega.md +68 -68
  14. package/dist/content/guides/Gates de Qualidade.md +209 -209
  15. package/dist/content/guides/Guia de Adi/303/247/303/243o de Novas Funcionalidades.md" +355 -355
  16. package/dist/content/guides/Guia de Chaos Engineering.md +267 -267
  17. package/dist/content/guides/Guia de Debugging com IA.md +135 -135
  18. package/dist/content/guides/Guia de Estrat/303/251gias de Cache.md" +352 -352
  19. package/dist/content/guides/Guia de Migrations Zero-Downtime.md +311 -311
  20. package/dist/content/guides/Guia de Multi-tenancy.md +368 -368
  21. package/dist/content/guides/Guia de Otimiza/303/247/303/243o de Custos Cloud.md" +195 -195
  22. package/dist/content/guides/Guia de Refatora/303/247/303/243o de C/303/263digo Legado com IA.md" +162 -162
  23. package/dist/content/guides/Guia de SLOs e Error Budgets.md +315 -315
  24. package/dist/content/guides/M/303/251tricas de Efici/303/252ncia do Desenvolvimento com IA.md" +93 -93
  25. package/dist/content/guides/Rules base.md +90 -90
  26. package/dist/content/playbook/Playbook de Desenvolvimento com IA.md +364 -364
  27. package/dist/content/prompts/README.md +203 -203
  28. package/dist/content/prompts/acessibilidade/analise-acessibilidade.md +257 -257
  29. package/dist/content/prompts/apis/design-api-rest.md +303 -303
  30. package/dist/content/prompts/apis/idempotencia.md +254 -254
  31. package/dist/content/prompts/apis/versionamento.md +313 -313
  32. package/dist/content/prompts/arquitetura/arquitetura-c4-completo.md +190 -190
  33. package/dist/content/prompts/arquitetura/clean-architecture.md +151 -151
  34. package/dist/content/prompts/arquitetura/ddd-bounded-contexts.md +183 -183
  35. package/dist/content/prompts/arquitetura/ddd-cqrs.md +176 -176
  36. package/dist/content/prompts/arquitetura/modelo-dominio.md +207 -207
  37. package/dist/content/prompts/arquitetura/multi-tenancy.md +235 -235
  38. package/dist/content/prompts/database/migrations-zero-downtime.md +192 -192
  39. package/dist/content/prompts/database/otimizacao-queries.md +296 -296
  40. package/dist/content/prompts/desenvolvimento/code-review.md +301 -301
  41. package/dist/content/prompts/desenvolvimento/gerar-servico.md +271 -271
  42. package/dist/content/prompts/devops/docker-compose.md +336 -336
  43. package/dist/content/prompts/devops/feature-flags.md +374 -374
  44. package/dist/content/prompts/devops/kubernetes-deploy.md +460 -460
  45. package/dist/content/prompts/devops/pipeline-cicd.md +358 -358
  46. package/dist/content/prompts/devops/terraform-iac.md +502 -502
  47. package/dist/content/prompts/escalabilidade/analise-performance.md +240 -240
  48. package/dist/content/prompts/escalabilidade/analise-performance.txt +94 -94
  49. package/dist/content/prompts/escalabilidade/caching.md +255 -255
  50. package/dist/content/prompts/observabilidade/chaos-testing.md +237 -237
  51. package/dist/content/prompts/observabilidade/estrategia-observabilidade.md +263 -263
  52. package/dist/content/prompts/observabilidade/estrategia-observabilidade.txt +134 -134
  53. package/dist/content/prompts/observabilidade/slos.md +215 -215
  54. package/dist/content/prompts/produto/discovery-inicial.md +203 -203
  55. package/dist/content/prompts/produto/discovery-inicial.txt +33 -33
  56. package/dist/content/prompts/requisitos/refinar-requisitos.md +232 -232
  57. package/dist/content/prompts/requisitos/refinar-requisitos.txt +40 -40
  58. package/dist/content/prompts/seguranca/analise-seguranca.md +243 -243
  59. package/dist/content/prompts/seguranca/pentest-checklist.md +333 -333
  60. package/dist/content/prompts/seguranca/rate-limiting.md +356 -356
  61. package/dist/content/prompts/seguranca/revisao-lgpd.md +227 -227
  62. package/dist/content/prompts/seguranca/threat-modeling.md +224 -224
  63. package/dist/content/prompts/testes/contract-testing.md +340 -340
  64. package/dist/content/prompts/testes/gerar-testes-unitarios.md +474 -474
  65. package/dist/content/prompts/testes/testes-e2e.md +460 -460
  66. package/dist/content/prompts/testes/testes-integracao.md +418 -418
  67. package/dist/content/prompts/testes/testes-performance.md +458 -458
  68. package/dist/content/prompts/ux/gerar-ui-stitch.md +151 -151
  69. package/dist/content/rules/RULES.md +835 -835
  70. package/dist/content/rules/adapters/copilot.md +10 -10
  71. package/dist/content/rules/adapters/cursor.md +10 -10
  72. package/dist/content/rules/adapters/gemini.md +13 -13
  73. package/dist/content/rules/adapters/windsurf.md +10 -10
  74. package/dist/content/specialists/Especialista em Acessibilidade.md +266 -266
  75. package/dist/content/specialists/Especialista em An/303/241lise de Testes.md" +434 -434
  76. package/dist/content/specialists/Especialista em Arquitetura Avan/303/247ada.md" +358 -358
  77. package/dist/content/specialists/Especialista em Arquitetura de Software.md +177 -177
  78. package/dist/content/specialists/Especialista em Banco de Dados.md +260 -260
  79. package/dist/content/specialists/Especialista em Contrato de API.md +172 -172
  80. package/dist/content/specialists/Especialista em Dados e Analytics com IA.md +246 -246
  81. package/dist/content/specialists/Especialista em Debugging e Troubleshooting.md +191 -191
  82. package/dist/content/specialists/Especialista em Desenvolvimento Frontend.md +477 -477
  83. package/dist/content/specialists/Especialista em Desenvolvimento Mobile.md +241 -241
  84. package/dist/content/specialists/Especialista em Desenvolvimento e Vibe Coding Estruturado.md +417 -417
  85. package/dist/content/specialists/Especialista em DevOps e Infraestrutura.md +294 -294
  86. package/dist/content/specialists/Especialista em Documenta/303/247/303/243o T/303/251cnica.md" +227 -227
  87. package/dist/content/specialists/Especialista em Engenharia de Requisitos com IA.md +299 -299
  88. package/dist/content/specialists/Especialista em Explora/303/247/303/243o de Codebase.md" +179 -179
  89. package/dist/content/specialists/Especialista em Gest/303/243o de Produto.md" +179 -179
  90. package/dist/content/specialists/Especialista em Migra/303/247/303/243o e Moderniza/303/247/303/243o.md" +410 -410
  91. package/dist/content/specialists/Especialista em Modelagem e Arquitetura de Dom/303/255nio com IA.md" +248 -248
  92. package/dist/content/specialists/Especialista em Observabilidade.md +415 -415
  93. package/dist/content/specialists/Especialista em Performance e Escalabilidade.md +373 -373
  94. package/dist/content/specialists/Especialista em Plano de Execu/303/247/303/243o com IA.md" +341 -341
  95. package/dist/content/specialists/Especialista em Prototipagem R/303/241pida com Google Stitch.md" +419 -419
  96. package/dist/content/specialists/Especialista em Seguran/303/247a da Informa/303/247/303/243o.md" +508 -508
  97. package/dist/content/specialists/Especialista em UX Design.md +453 -453
  98. package/dist/content/specialists/INDEX.md +43 -43
  99. package/dist/content/templates/PRD.md +165 -165
  100. package/dist/content/templates/README.md +65 -65
  101. package/dist/content/templates/adr.md +103 -103
  102. package/dist/content/templates/arquitetura.md +279 -279
  103. package/dist/content/templates/backlog.md +185 -185
  104. package/dist/content/templates/checklist-seguranca.md +180 -180
  105. package/dist/content/templates/contexto.md +120 -120
  106. package/dist/content/templates/criterios-aceite.md +99 -99
  107. package/dist/content/templates/design-banco.md +270 -270
  108. package/dist/content/templates/design-doc.md +240 -240
  109. package/dist/content/templates/feature.md +88 -88
  110. package/dist/content/templates/historia-backend.md +84 -84
  111. package/dist/content/templates/historia-frontend.md +75 -75
  112. package/dist/content/templates/historia-usuario.md +125 -125
  113. package/dist/content/templates/mapa-navegacao.md +133 -133
  114. package/dist/content/templates/matriz-rastreabilidade.md +121 -121
  115. package/dist/content/templates/modelo-dominio.md +219 -219
  116. package/dist/content/templates/plano-testes.md +199 -199
  117. package/dist/content/templates/prototipo-stitch.md +138 -138
  118. package/dist/content/templates/requisitos.md +162 -162
  119. package/dist/content/templates/slo-sli.md +197 -197
  120. package/dist/content/workflows/README-MCP.md +363 -363
  121. package/dist/content/workflows/mcp-debug.md +506 -506
  122. package/dist/content/workflows/mcp-feature.md +385 -385
  123. package/dist/content/workflows/mcp-gate.md +413 -413
  124. package/dist/content/workflows/mcp-next.md +388 -388
  125. package/dist/content/workflows/mcp-refactor.md +600 -600
  126. package/dist/content/workflows/mcp-start.md +304 -304
  127. package/dist/content/workflows/mcp-status.md +400 -400
  128. package/dist/gates/tiers.test.js +14 -14
  129. package/dist/index.js +133 -133
  130. package/dist/resources/index.js +61 -61
  131. package/dist/stdio.js +39 -32
  132. package/dist/stdio.js.map +1 -1
  133. package/dist/tools/analise/performance.js +23 -23
  134. package/dist/tools/analise/qualidade.js +23 -23
  135. package/dist/tools/analise/relatorio.js +24 -24
  136. package/dist/tools/analise/seguranca.js +28 -28
  137. package/dist/tools/aprovar-gate.js +81 -81
  138. package/dist/tools/atualizar-codebase.js +18 -18
  139. package/dist/tools/avaliar-entregavel.js +18 -18
  140. package/dist/tools/carregar-projeto.d.ts.map +1 -1
  141. package/dist/tools/carregar-projeto.js +91 -116
  142. package/dist/tools/carregar-projeto.js.map +1 -1
  143. package/dist/tools/classificar.js +36 -36
  144. package/dist/tools/confirmar-classificacao.js +36 -36
  145. package/dist/tools/confirmar-stitch.js +75 -75
  146. package/dist/tools/contexto.js +56 -56
  147. package/dist/tools/fluxos-alternativos.js +98 -98
  148. package/dist/tools/implementar-historia.js +63 -63
  149. package/dist/tools/iniciar-projeto.d.ts.map +1 -1
  150. package/dist/tools/iniciar-projeto.js +139 -224
  151. package/dist/tools/iniciar-projeto.js.map +1 -1
  152. package/dist/tools/proximo.d.ts.map +1 -1
  153. package/dist/tools/proximo.js +224 -252
  154. package/dist/tools/proximo.js.map +1 -1
  155. package/dist/tools/salvar.js +59 -59
  156. package/dist/tools/status.d.ts.map +1 -1
  157. package/dist/tools/status.js +64 -93
  158. package/dist/tools/status.js.map +1 -1
  159. package/dist/tools/validar-gate.js +35 -35
  160. package/dist/types/response.js +11 -11
  161. package/dist/utils/instructions.js +48 -48
  162. package/dist/utils/prompt-mapper.js +16 -16
  163. package/dist/utils/system-md.js +33 -33
  164. package/package.json +67 -67
  165. package/dist/content/content/design-system/README.md +0 -231
  166. package/dist/content/content/design-system/data/charts.csv +0 -26
  167. package/dist/content/content/design-system/data/colors.csv +0 -97
  168. package/dist/content/content/design-system/data/icons.csv +0 -101
  169. package/dist/content/content/design-system/data/landing.csv +0 -31
  170. package/dist/content/content/design-system/data/products.csv +0 -97
  171. package/dist/content/content/design-system/data/prompts.csv +0 -24
  172. package/dist/content/content/design-system/data/react-performance.csv +0 -45
  173. package/dist/content/content/design-system/data/styles.csv +0 -59
  174. package/dist/content/content/design-system/data/typography.csv +0 -58
  175. package/dist/content/content/design-system/data/ui-reasoning.csv +0 -101
  176. package/dist/content/content/design-system/data/ux-guidelines.csv +0 -100
  177. package/dist/content/content/design-system/data/web-interface.csv +0 -31
  178. package/dist/content/content/design-system/indexes/README.md +0 -211
  179. package/dist/content/content/design-system/indexes/colors-index.md +0 -156
  180. package/dist/content/content/design-system/indexes/quick-search.md +0 -111
  181. package/dist/content/content/design-system/indexes/stacks-index.md +0 -341
  182. package/dist/content/content/design-system/stacks/flutter.csv +0 -53
  183. package/dist/content/content/design-system/stacks/html-tailwind.csv +0 -56
  184. package/dist/content/content/design-system/stacks/jetpack-compose.csv +0 -53
  185. package/dist/content/content/design-system/stacks/nextjs.csv +0 -53
  186. package/dist/content/content/design-system/stacks/nuxt-ui.csv +0 -51
  187. package/dist/content/content/design-system/stacks/nuxtjs.csv +0 -59
  188. package/dist/content/content/design-system/stacks/react-native.csv +0 -52
  189. package/dist/content/content/design-system/stacks/react.csv +0 -54
  190. package/dist/content/content/design-system/stacks/shadcn.csv +0 -61
  191. package/dist/content/content/design-system/stacks/svelte.csv +0 -54
  192. package/dist/content/content/design-system/stacks/swiftui.csv +0 -51
  193. package/dist/content/content/design-system/stacks/vue.csv +0 -50
  194. package/dist/content/content/examples/Exemplo de Fluxo Completo com Java e Spring Boot.md +0 -250
  195. package/dist/content/content/examples/Exemplo de Fluxo Completo com Laravel e Filament.md +0 -278
  196. package/dist/content/content/examples/Exemplo de Fluxo Completo com Laravel e Livewire.md +0 -261
  197. package/dist/content/content/examples/Exemplo de Fluxo Completo com Node e NestJS.md +0 -258
  198. package/dist/content/content/guides/Cat/303/241logo de Stacks para Cloud Moderna.md" +0 -119
  199. package/dist/content/content/guides/Cat/303/241logo de Stacks para Hospedagem Compartilhada.md" +0 -147
  200. package/dist/content/content/guides/Checklist Mestre de Entrega.md +0 -68
  201. package/dist/content/content/guides/Gates de Qualidade.md +0 -209
  202. package/dist/content/content/guides/Guia de Adi/303/247/303/243o de Novas Funcionalidades.md" +0 -355
  203. package/dist/content/content/guides/Guia de Chaos Engineering.md +0 -267
  204. package/dist/content/content/guides/Guia de Debugging com IA.md +0 -135
  205. package/dist/content/content/guides/Guia de Estrat/303/251gias de Cache.md" +0 -352
  206. package/dist/content/content/guides/Guia de Migrations Zero-Downtime.md +0 -311
  207. package/dist/content/content/guides/Guia de Multi-tenancy.md +0 -368
  208. package/dist/content/content/guides/Guia de Otimiza/303/247/303/243o de Custos Cloud.md" +0 -195
  209. package/dist/content/content/guides/Guia de Refatora/303/247/303/243o de C/303/263digo Legado com IA.md" +0 -162
  210. package/dist/content/content/guides/Guia de SLOs e Error Budgets.md +0 -315
  211. package/dist/content/content/guides/M/303/251tricas de Efici/303/252ncia do Desenvolvimento com IA.md" +0 -93
  212. package/dist/content/content/guides/Rules base.md +0 -90
  213. package/dist/content/content/playbook/Playbook de Desenvolvimento com IA.md +0 -364
  214. package/dist/content/content/prompts/README.md +0 -203
  215. package/dist/content/content/prompts/acessibilidade/analise-acessibilidade.md +0 -257
  216. package/dist/content/content/prompts/apis/design-api-rest.md +0 -303
  217. package/dist/content/content/prompts/apis/idempotencia.md +0 -254
  218. package/dist/content/content/prompts/apis/versionamento.md +0 -313
  219. package/dist/content/content/prompts/arquitetura/arquitetura-c4-completo.md +0 -190
  220. package/dist/content/content/prompts/arquitetura/clean-architecture.md +0 -151
  221. package/dist/content/content/prompts/arquitetura/ddd-bounded-contexts.md +0 -183
  222. package/dist/content/content/prompts/arquitetura/ddd-cqrs.md +0 -176
  223. package/dist/content/content/prompts/arquitetura/modelo-dominio.md +0 -207
  224. package/dist/content/content/prompts/arquitetura/multi-tenancy.md +0 -235
  225. package/dist/content/content/prompts/database/migrations-zero-downtime.md +0 -192
  226. package/dist/content/content/prompts/database/otimizacao-queries.md +0 -296
  227. package/dist/content/content/prompts/desenvolvimento/code-review.md +0 -301
  228. package/dist/content/content/prompts/desenvolvimento/gerar-servico.md +0 -271
  229. package/dist/content/content/prompts/devops/docker-compose.md +0 -336
  230. package/dist/content/content/prompts/devops/feature-flags.md +0 -374
  231. package/dist/content/content/prompts/devops/kubernetes-deploy.md +0 -460
  232. package/dist/content/content/prompts/devops/pipeline-cicd.md +0 -358
  233. package/dist/content/content/prompts/devops/terraform-iac.md +0 -502
  234. package/dist/content/content/prompts/escalabilidade/analise-performance.md +0 -240
  235. package/dist/content/content/prompts/escalabilidade/analise-performance.txt +0 -94
  236. package/dist/content/content/prompts/escalabilidade/caching.md +0 -255
  237. package/dist/content/content/prompts/observabilidade/chaos-testing.md +0 -237
  238. package/dist/content/content/prompts/observabilidade/estrategia-observabilidade.md +0 -263
  239. package/dist/content/content/prompts/observabilidade/estrategia-observabilidade.txt +0 -134
  240. package/dist/content/content/prompts/observabilidade/slos.md +0 -215
  241. package/dist/content/content/prompts/produto/discovery-inicial.md +0 -203
  242. package/dist/content/content/prompts/produto/discovery-inicial.txt +0 -33
  243. package/dist/content/content/prompts/requisitos/refinar-requisitos.md +0 -232
  244. package/dist/content/content/prompts/requisitos/refinar-requisitos.txt +0 -40
  245. package/dist/content/content/prompts/seguranca/analise-seguranca.md +0 -243
  246. package/dist/content/content/prompts/seguranca/pentest-checklist.md +0 -333
  247. package/dist/content/content/prompts/seguranca/rate-limiting.md +0 -356
  248. package/dist/content/content/prompts/seguranca/revisao-lgpd.md +0 -227
  249. package/dist/content/content/prompts/seguranca/threat-modeling.md +0 -224
  250. package/dist/content/content/prompts/testes/contract-testing.md +0 -340
  251. package/dist/content/content/prompts/testes/gerar-testes-unitarios.md +0 -474
  252. package/dist/content/content/prompts/testes/testes-e2e.md +0 -460
  253. package/dist/content/content/prompts/testes/testes-integracao.md +0 -418
  254. package/dist/content/content/prompts/testes/testes-performance.md +0 -458
  255. package/dist/content/content/prompts/ux/gerar-ui-stitch.md +0 -151
  256. package/dist/content/content/rules/GEMINI.md +0 -841
  257. package/dist/content/content/rules/RULES.md +0 -835
  258. package/dist/content/content/rules/adapters/copilot.md +0 -10
  259. package/dist/content/content/rules/adapters/cursor.md +0 -10
  260. package/dist/content/content/rules/adapters/gemini.md +0 -13
  261. package/dist/content/content/rules/adapters/windsurf.md +0 -10
  262. package/dist/content/content/skills/api-patterns/SKILL.md +0 -81
  263. package/dist/content/content/skills/api-patterns/api-style.md +0 -42
  264. package/dist/content/content/skills/api-patterns/auth.md +0 -24
  265. package/dist/content/content/skills/api-patterns/documentation.md +0 -26
  266. package/dist/content/content/skills/api-patterns/graphql.md +0 -41
  267. package/dist/content/content/skills/api-patterns/rate-limiting.md +0 -31
  268. package/dist/content/content/skills/api-patterns/response.md +0 -37
  269. package/dist/content/content/skills/api-patterns/rest.md +0 -40
  270. package/dist/content/content/skills/api-patterns/scripts/api_validator.py +0 -211
  271. package/dist/content/content/skills/api-patterns/security-testing.md +0 -122
  272. package/dist/content/content/skills/api-patterns/trpc.md +0 -41
  273. package/dist/content/content/skills/api-patterns/versioning.md +0 -22
  274. package/dist/content/content/skills/app-builder/SKILL.md +0 -75
  275. package/dist/content/content/skills/app-builder/agent-coordination.md +0 -71
  276. package/dist/content/content/skills/app-builder/feature-building.md +0 -53
  277. package/dist/content/content/skills/app-builder/project-detection.md +0 -34
  278. package/dist/content/content/skills/app-builder/scaffolding.md +0 -118
  279. package/dist/content/content/skills/app-builder/tech-stack.md +0 -40
  280. package/dist/content/content/skills/app-builder/templates/SKILL.md +0 -39
  281. package/dist/content/content/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  282. package/dist/content/content/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  283. package/dist/content/content/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  284. package/dist/content/content/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  285. package/dist/content/content/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  286. package/dist/content/content/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  287. package/dist/content/content/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  288. package/dist/content/content/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -82
  289. package/dist/content/content/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -100
  290. package/dist/content/content/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -106
  291. package/dist/content/content/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -101
  292. package/dist/content/content/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  293. package/dist/content/content/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -93
  294. package/dist/content/content/skills/architecture/SKILL.md +0 -55
  295. package/dist/content/content/skills/architecture/context-discovery.md +0 -43
  296. package/dist/content/content/skills/architecture/examples.md +0 -94
  297. package/dist/content/content/skills/architecture/pattern-selection.md +0 -68
  298. package/dist/content/content/skills/architecture/patterns-reference.md +0 -50
  299. package/dist/content/content/skills/architecture/trade-off-analysis.md +0 -77
  300. package/dist/content/content/skills/bash-linux/SKILL.md +0 -199
  301. package/dist/content/content/skills/behavioral-modes/SKILL.md +0 -242
  302. package/dist/content/content/skills/brainstorming/SKILL.md +0 -163
  303. package/dist/content/content/skills/brainstorming/dynamic-questioning.md +0 -350
  304. package/dist/content/content/skills/clean-code/SKILL.md +0 -201
  305. package/dist/content/content/skills/code-review-checklist/SKILL.md +0 -109
  306. package/dist/content/content/skills/database-design/SKILL.md +0 -52
  307. package/dist/content/content/skills/database-design/database-selection.md +0 -43
  308. package/dist/content/content/skills/database-design/indexing.md +0 -39
  309. package/dist/content/content/skills/database-design/migrations.md +0 -48
  310. package/dist/content/content/skills/database-design/optimization.md +0 -36
  311. package/dist/content/content/skills/database-design/orm-selection.md +0 -30
  312. package/dist/content/content/skills/database-design/schema-design.md +0 -56
  313. package/dist/content/content/skills/database-design/scripts/schema_validator.py +0 -172
  314. package/dist/content/content/skills/deployment-procedures/SKILL.md +0 -241
  315. package/dist/content/content/skills/doc.md +0 -177
  316. package/dist/content/content/skills/documentation-templates/SKILL.md +0 -194
  317. package/dist/content/content/skills/frontend-design/SKILL.md +0 -396
  318. package/dist/content/content/skills/frontend-design/animation-guide.md +0 -331
  319. package/dist/content/content/skills/frontend-design/color-system.md +0 -311
  320. package/dist/content/content/skills/frontend-design/decision-trees.md +0 -418
  321. package/dist/content/content/skills/frontend-design/motion-graphics.md +0 -306
  322. package/dist/content/content/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  323. package/dist/content/content/skills/frontend-design/scripts/ux_audit.py +0 -722
  324. package/dist/content/content/skills/frontend-design/typography-system.md +0 -345
  325. package/dist/content/content/skills/frontend-design/ux-psychology.md +0 -541
  326. package/dist/content/content/skills/frontend-design/visual-effects.md +0 -383
  327. package/dist/content/content/skills/game-development/2d-games/SKILL.md +0 -119
  328. package/dist/content/content/skills/game-development/3d-games/SKILL.md +0 -135
  329. package/dist/content/content/skills/game-development/SKILL.md +0 -167
  330. package/dist/content/content/skills/game-development/game-art/SKILL.md +0 -185
  331. package/dist/content/content/skills/game-development/game-audio/SKILL.md +0 -190
  332. package/dist/content/content/skills/game-development/game-design/SKILL.md +0 -129
  333. package/dist/content/content/skills/game-development/mobile-games/SKILL.md +0 -108
  334. package/dist/content/content/skills/game-development/multiplayer/SKILL.md +0 -132
  335. package/dist/content/content/skills/game-development/pc-games/SKILL.md +0 -144
  336. package/dist/content/content/skills/game-development/vr-ar/SKILL.md +0 -123
  337. package/dist/content/content/skills/game-development/web-games/SKILL.md +0 -150
  338. package/dist/content/content/skills/geo-fundamentals/SKILL.md +0 -156
  339. package/dist/content/content/skills/geo-fundamentals/scripts/geo_checker.py +0 -289
  340. package/dist/content/content/skills/i18n-localization/SKILL.md +0 -154
  341. package/dist/content/content/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  342. package/dist/content/content/skills/intelligent-routing/SKILL.md +0 -334
  343. package/dist/content/content/skills/lint-and-validate/SKILL.md +0 -45
  344. package/dist/content/content/skills/lint-and-validate/scripts/lint_runner.py +0 -172
  345. package/dist/content/content/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  346. package/dist/content/content/skills/mcp-builder/SKILL.md +0 -176
  347. package/dist/content/content/skills/mobile-design/SKILL.md +0 -394
  348. package/dist/content/content/skills/mobile-design/decision-trees.md +0 -516
  349. package/dist/content/content/skills/mobile-design/mobile-backend.md +0 -491
  350. package/dist/content/content/skills/mobile-design/mobile-color-system.md +0 -420
  351. package/dist/content/content/skills/mobile-design/mobile-debugging.md +0 -122
  352. package/dist/content/content/skills/mobile-design/mobile-design-thinking.md +0 -357
  353. package/dist/content/content/skills/mobile-design/mobile-navigation.md +0 -458
  354. package/dist/content/content/skills/mobile-design/mobile-performance.md +0 -767
  355. package/dist/content/content/skills/mobile-design/mobile-testing.md +0 -356
  356. package/dist/content/content/skills/mobile-design/mobile-typography.md +0 -433
  357. package/dist/content/content/skills/mobile-design/platform-android.md +0 -666
  358. package/dist/content/content/skills/mobile-design/platform-ios.md +0 -561
  359. package/dist/content/content/skills/mobile-design/scripts/mobile_audit.py +0 -670
  360. package/dist/content/content/skills/mobile-design/touch-psychology.md +0 -537
  361. package/dist/content/content/skills/nextjs-best-practices/SKILL.md +0 -203
  362. package/dist/content/content/skills/nodejs-best-practices/SKILL.md +0 -333
  363. package/dist/content/content/skills/parallel-agents/SKILL.md +0 -175
  364. package/dist/content/content/skills/performance-profiling/SKILL.md +0 -143
  365. package/dist/content/content/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  366. package/dist/content/content/skills/plan-writing/SKILL.md +0 -152
  367. package/dist/content/content/skills/powershell-windows/SKILL.md +0 -167
  368. package/dist/content/content/skills/python-patterns/SKILL.md +0 -441
  369. package/dist/content/content/skills/react-patterns/SKILL.md +0 -198
  370. package/dist/content/content/skills/red-team-tactics/SKILL.md +0 -199
  371. package/dist/content/content/skills/seo-fundamentals/SKILL.md +0 -129
  372. package/dist/content/content/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
  373. package/dist/content/content/skills/server-management/SKILL.md +0 -161
  374. package/dist/content/content/skills/systematic-debugging/SKILL.md +0 -109
  375. package/dist/content/content/skills/tailwind-patterns/SKILL.md +0 -269
  376. package/dist/content/content/skills/tdd-workflow/SKILL.md +0 -149
  377. package/dist/content/content/skills/testing-patterns/SKILL.md +0 -178
  378. package/dist/content/content/skills/testing-patterns/scripts/test_runner.py +0 -219
  379. package/dist/content/content/skills/vulnerability-scanner/SKILL.md +0 -276
  380. package/dist/content/content/skills/vulnerability-scanner/checklists.md +0 -121
  381. package/dist/content/content/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  382. package/dist/content/content/skills/webapp-testing/SKILL.md +0 -187
  383. package/dist/content/content/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  384. package/dist/content/content/specialists/Especialista em Acessibilidade.md +0 -266
  385. package/dist/content/content/specialists/Especialista em An/303/241lise de Testes.md" +0 -434
  386. package/dist/content/content/specialists/Especialista em Arquitetura Avan/303/247ada.md" +0 -358
  387. package/dist/content/content/specialists/Especialista em Arquitetura de Software.md +0 -177
  388. package/dist/content/content/specialists/Especialista em Banco de Dados.md +0 -260
  389. package/dist/content/content/specialists/Especialista em Contrato de API.md +0 -172
  390. package/dist/content/content/specialists/Especialista em Dados e Analytics com IA.md +0 -246
  391. package/dist/content/content/specialists/Especialista em Debugging e Troubleshooting.md +0 -191
  392. package/dist/content/content/specialists/Especialista em Desenvolvimento Frontend.md +0 -477
  393. package/dist/content/content/specialists/Especialista em Desenvolvimento Mobile.md +0 -241
  394. package/dist/content/content/specialists/Especialista em Desenvolvimento e Vibe Coding Estruturado.md +0 -417
  395. package/dist/content/content/specialists/Especialista em DevOps e Infraestrutura.md +0 -294
  396. package/dist/content/content/specialists/Especialista em Documenta/303/247/303/243o T/303/251cnica.md" +0 -227
  397. package/dist/content/content/specialists/Especialista em Engenharia de Requisitos com IA.md +0 -299
  398. package/dist/content/content/specialists/Especialista em Explora/303/247/303/243o de Codebase.md" +0 -179
  399. package/dist/content/content/specialists/Especialista em Gest/303/243o de Produto.md" +0 -179
  400. package/dist/content/content/specialists/Especialista em Migra/303/247/303/243o e Moderniza/303/247/303/243o.md" +0 -410
  401. package/dist/content/content/specialists/Especialista em Modelagem e Arquitetura de Dom/303/255nio com IA.md" +0 -248
  402. package/dist/content/content/specialists/Especialista em Observabilidade.md +0 -415
  403. package/dist/content/content/specialists/Especialista em Performance e Escalabilidade.md +0 -373
  404. package/dist/content/content/specialists/Especialista em Plano de Execu/303/247/303/243o com IA.md" +0 -341
  405. package/dist/content/content/specialists/Especialista em Prototipagem R/303/241pida com Google Stitch.md" +0 -419
  406. package/dist/content/content/specialists/Especialista em Seguran/303/247a da Informa/303/247/303/243o.md" +0 -508
  407. package/dist/content/content/specialists/Especialista em UX Design.md +0 -453
  408. package/dist/content/content/specialists/INDEX.md +0 -43
  409. package/dist/content/content/templates/PRD.md +0 -165
  410. package/dist/content/content/templates/README.md +0 -65
  411. package/dist/content/content/templates/adr.md +0 -103
  412. package/dist/content/content/templates/arquitetura.md +0 -279
  413. package/dist/content/content/templates/backlog.md +0 -185
  414. package/dist/content/content/templates/checklist-seguranca.md +0 -180
  415. package/dist/content/content/templates/contexto.md +0 -120
  416. package/dist/content/content/templates/criterios-aceite.md +0 -99
  417. package/dist/content/content/templates/design-banco.md +0 -270
  418. package/dist/content/content/templates/design-doc.md +0 -240
  419. package/dist/content/content/templates/feature.md +0 -88
  420. package/dist/content/content/templates/historia-backend.md +0 -84
  421. package/dist/content/content/templates/historia-frontend.md +0 -75
  422. package/dist/content/content/templates/historia-usuario.md +0 -125
  423. package/dist/content/content/templates/mapa-navegacao.md +0 -133
  424. package/dist/content/content/templates/matriz-rastreabilidade.md +0 -121
  425. package/dist/content/content/templates/modelo-dominio.md +0 -219
  426. package/dist/content/content/templates/plano-testes.md +0 -199
  427. package/dist/content/content/templates/prototipo-stitch.md +0 -138
  428. package/dist/content/content/templates/requisitos.md +0 -162
  429. package/dist/content/content/templates/slo-sli.md +0 -197
  430. package/dist/content/content/workflows/README-MCP.md +0 -363
  431. package/dist/content/content/workflows/brainstorm.md +0 -113
  432. package/dist/content/content/workflows/create.md +0 -59
  433. package/dist/content/content/workflows/debug.md +0 -103
  434. package/dist/content/content/workflows/deploy.md +0 -176
  435. package/dist/content/content/workflows/enhance.md +0 -63
  436. package/dist/content/content/workflows/mcp-debug.md +0 -506
  437. package/dist/content/content/workflows/mcp-feature.md +0 -385
  438. package/dist/content/content/workflows/mcp-gate.md +0 -413
  439. package/dist/content/content/workflows/mcp-next.md +0 -388
  440. package/dist/content/content/workflows/mcp-refactor.md +0 -600
  441. package/dist/content/content/workflows/mcp-start.md +0 -304
  442. package/dist/content/content/workflows/mcp-status.md +0 -400
  443. package/dist/content/content/workflows/orchestrate.md +0 -237
  444. package/dist/content/content/workflows/plan.md +0 -89
  445. package/dist/content/content/workflows/preview.md +0 -81
  446. package/dist/content/content/workflows/status.md +0 -86
  447. package/dist/content/content/workflows/test.md +0 -144
  448. package/dist/content/content/workflows/ui-ux-pro-max.md +0 -296
@@ -1,722 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- UX Audit Script - Full Frontend Design Coverage
4
-
5
- Analyzes code for compliance with:
6
-
7
- 1. CORE PSYCHOLOGY LAWS:
8
- - Hick's Law (nav items, form complexity)
9
- - Fitts' Law (target sizes, touch targets)
10
- - Miller's Law (chunking, memory limits)
11
- - Von Restorff Effect (primary CTA visibility)
12
- - Serial Position Effect (important items at start/end)
13
-
14
- 2. EMOTIONAL DESIGN (Don Norman):
15
- - Visceral (first impressions, gradients, animations)
16
- - Behavioral (feedback, usability, performance)
17
- - Reflective (brand story, values, identity)
18
-
19
- 3. TRUST BUILDING:
20
- - Security signals (SSL, encryption on forms)
21
- - Social proof (testimonials, reviews, logos)
22
- - Authority indicators (certifications, awards, media)
23
-
24
- 4. COGNITIVE LOAD MANAGEMENT:
25
- - Progressive disclosure (accordion, tabs, "Advanced")
26
- - Visual noise (too many colors/borders)
27
- - Familiar patterns (labels, standard conventions)
28
-
29
- 5. PERSUASIVE DESIGN (Ethical):
30
- - Smart defaults (pre-selected options)
31
- - Anchoring (original vs discount price)
32
- - Social proof (live indicators, numbers)
33
- - Progress indicators (progress bars, steps)
34
-
35
- 6. TYPOGRAPHY SYSTEM (9 sections):
36
- - Font Pairing (max 3 families)
37
- - Line Length (45-75ch)
38
- - Line Height (proper ratios)
39
- - Letter Spacing (uppercase, display text)
40
- - Weight and Emphasis (contrast levels)
41
- - Responsive Typography (clamp())
42
- - Hierarchy (sequential headings)
43
- - Modular Scale (consistent ratios)
44
- - Readability (chunking, subheadings)
45
-
46
- 7. VISUAL EFFECTS (10 sections):
47
- - Glassmorphism (blur + transparency)
48
- - Neomorphism (dual shadows, inset)
49
- - Shadow Hierarchy (elevation levels)
50
- - Gradients (usage, overuse)
51
- - Border Effects (complexity check)
52
- - Glow Effects (text-shadow, box-shadow)
53
- - Overlay Techniques (image text readability)
54
- - GPU Acceleration (transform/opacity vs layout)
55
- - Performance (will-change usage)
56
- - Effect Selection (purpose over decoration)
57
-
58
- 8. COLOR SYSTEM (7 sections):
59
- - PURPLE BAN (Critical Maestro rule - #8B5CF6, #A855F7, etc.)
60
- - 60-30-10 Rule (dominant, secondary, accent)
61
- - Color Scheme Patterns (monochromatic, analogous)
62
- - Dark Mode Compliance (no pure black/white)
63
- - WCAG Contrast (low-contrast detection)
64
- - Color Psychology Context (food + blue = bad)
65
- - HSL-Based Palettes (recommended approach)
66
-
67
- 9. ANIMATION GUIDE (6 sections):
68
- - Duration Appropriateness (50ms minimum, 1s max transitions)
69
- - Easing Functions (ease-out for entry, ease-in for exit)
70
- - Micro-interactions (hover/focus feedback)
71
- - Loading States (skeleton, spinner, progress)
72
- - Page Transitions (fade/slide for routing)
73
- - Scroll Animation Performance (no layout properties)
74
-
75
- 10. MOTION GRAPHICS (7 sections):
76
- - Lottie Animations (reduced motion fallbacks)
77
- - GSAP Memory Leaks (kill/revert on unmount)
78
- - SVG Animation Performance (stroke-dashoffset sparingly)
79
- - 3D Transforms (perspective parent, mobile warning)
80
- - Particle Effects (mobile fallback)
81
- - Scroll-Driven Animations (throttle with rAF)
82
- - Motion Decision Tree (functional vs decorative)
83
-
84
- 11. ACCESSIBILITY:
85
- - Alt text for images
86
- - Reduced motion checks
87
- - Form labels
88
-
89
- Total: 80+ checks across all design principles
90
- """
91
-
92
- import sys
93
- import os
94
- import re
95
- import json
96
- from pathlib import Path
97
-
98
- class UXAuditor:
99
- def __init__(self):
100
- self.issues = []
101
- self.warnings = []
102
- self.passed_count = 0
103
- self.files_checked = 0
104
-
105
- def audit_file(self, filepath: str) -> None:
106
- try:
107
- with open(filepath, 'r', encoding='utf-8', errors='replace') as f:
108
- content = f.read()
109
- except: return
110
-
111
- self.files_checked += 1
112
- filename = os.path.basename(filepath)
113
-
114
- # Pre-calculate common flags
115
- has_long_text = bool(re.search(r'<p|<div.*class=.*text|article|<span.*text', content, re.IGNORECASE))
116
- has_form = bool(re.search(r'<form|<input|password|credit|card|payment', content, re.IGNORECASE))
117
- complex_elements = len(re.findall(r'<input|<select|<textarea|<option', content, re.IGNORECASE))
118
-
119
- # --- 1. PSYCHOLOGY LAWS ---
120
- # Hick's Law
121
- nav_items = len(re.findall(r'<NavLink|<Link|<a\s+href|nav-item', content, re.IGNORECASE))
122
- if nav_items > 7:
123
- self.issues.append(f"[Hick's Law] {filename}: {nav_items} nav items (Max 7)")
124
-
125
- # Fitts' Law
126
- if re.search(r'height:\s*([0-3]\d)px', content) or re.search(r'h-[1-9]\b|h-10\b', content):
127
- self.warnings.append(f"[Fitts' Law] {filename}: Small targets (< 44px)")
128
-
129
- # Miller's Law
130
- form_fields = len(re.findall(r'<input|<select|<textarea', content, re.IGNORECASE))
131
- if form_fields > 7 and not re.search(r'step|wizard|stage', content, re.IGNORECASE):
132
- self.warnings.append(f"[Miller's Law] {filename}: Complex form ({form_fields} fields)")
133
-
134
- # Von Restorff
135
- if 'button' in content.lower() and not re.search(r'primary|bg-primary|Button.*primary|variant=["\']primary', content, re.IGNORECASE):
136
- self.warnings.append(f"[Von Restorff] {filename}: No primary CTA")
137
-
138
- # Serial Position Effect - Important items at beginning/end
139
- if nav_items > 3:
140
- # Check if last nav item is important (contact, login, etc.)
141
- nav_content = re.findall(r'<NavLink|<Link|<a\s+href[^>]*>([^<]+)</a>', content, re.IGNORECASE)
142
- if nav_content and len(nav_content) > 2:
143
- last_item = nav_content[-1].lower() if nav_content else ''
144
- if not any(x in last_item for x in ['contact', 'login', 'sign', 'get started', 'cta', 'button']):
145
- self.warnings.append(f"[Serial Position] {filename}: Last nav item may not be important. Place key actions at start/end.")
146
-
147
- # --- 1.5 EMOTIONAL DESIGN (Don Norman) ---
148
-
149
- # Visceral: First impressions (aesthetics, gradients, animations)
150
- has_hero = bool(re.search(r'hero|<h1|banner', content, re.IGNORECASE))
151
- if has_hero:
152
- # Check for visual appeal elements
153
- has_gradient = bool(re.search(r'gradient|linear-gradient|radial-gradient', content))
154
- has_animation = bool(re.search(r'@keyframes|transition:|animate-', content))
155
- has_visual_interest = has_gradient or has_animation
156
-
157
- if not has_visual_interest and not re.search(r'background:|bg-', content):
158
- self.warnings.append(f"[Visceral] {filename}: Hero section lacks visual appeal. Consider gradients or subtle animations.")
159
-
160
- # Behavioral: Instant feedback and usability
161
- if 'onClick' in content or '@click' in content or 'onclick' in content:
162
- has_feedback = re.search(r'transition|animate|hover:|focus:|disabled|loading|spinner', content, re.IGNORECASE)
163
- has_state_change = re.search(r'setState|useState|disabled|loading', content)
164
-
165
- if not has_feedback and not has_state_change:
166
- self.warnings.append(f"[Behavioral] {filename}: Interactive elements lack immediate feedback. Add hover/focus/disabled states.")
167
-
168
- # Reflective: Brand story, values, identity
169
- has_reflective = bool(re.search(r'about|story|mission|values|why we|our journey|testimonials', content, re.IGNORECASE))
170
- if has_long_text and not has_reflective:
171
- self.warnings.append(f"[Reflective] {filename}: Long-form content without brand story/values. Add 'About' or 'Why We Exist' section.")
172
-
173
- # --- 1.6 TRUST BUILDING (Enhanced) ---
174
-
175
- # Security signals
176
- if has_form:
177
- security_signals = re.findall(r'ssl|secure|encrypt|lock|padlock|https', content, re.IGNORECASE)
178
- if len(security_signals) == 0 and not re.search(r'checkout|payment', content, re.IGNORECASE):
179
- self.warnings.append(f"[Trust] {filename}: Form without security indicators. Add 'SSL Secure' or lock icon.")
180
-
181
- # Social proof elements
182
- social_proof = re.findall(r'review|testimonial|rating|star|trust|trusted by|customer|logo', content, re.IGNORECASE)
183
- if len(social_proof) > 0:
184
- self.passed_count += 1
185
- else:
186
- if has_long_text:
187
- self.warnings.append(f"[Trust] {filename}: No social proof detected. Consider adding testimonials, ratings, or 'Trusted by' logos.")
188
-
189
- # Authority indicators
190
- has_footer = bool(re.search(r'footer|<footer', content, re.IGNORECASE))
191
- if has_footer:
192
- authority = re.findall(r'certif|award|media|press|featured|as seen in', content, re.IGNORECASE)
193
- if len(authority) == 0:
194
- self.warnings.append(f"[Trust] {filename}: Footer lacks authority signals. Add certifications, awards, or media mentions.")
195
-
196
- # --- 1.7 COGNITIVE LOAD MANAGEMENT ---
197
-
198
- # Progressive disclosure
199
- if complex_elements > 5:
200
- has_progressive = re.search(r'step|wizard|stage|accordion|collapsible|tab|more\.\.\.|advanced|show more', content, re.IGNORECASE)
201
- if not has_progressive:
202
- self.warnings.append(f"[Cognitive Load] {filename}: Many form elements without progressive disclosure. Consider accordion, tabs, or 'Advanced' toggle.")
203
-
204
- # Visual noise check
205
- has_many_colors = len(re.findall(r'#[0-9a-fA-F]{3,6}|rgb|hsl', content)) > 15
206
- has_many_borders = len(re.findall(r'border:|border-', content)) > 10
207
- if has_many_colors and has_many_borders:
208
- self.warnings.append(f"[Cognitive Load] {filename}: High visual noise detected. Many colors and borders increase cognitive load.")
209
-
210
- # Familiar patterns
211
- if has_form:
212
- has_standard_labels = bool(re.search(r'<label|placeholder|aria-label', content, re.IGNORECASE))
213
- if not has_standard_labels:
214
- self.issues.append(f"[Cognitive Load] {filename}: Form inputs without labels. Use <label> for accessibility and clarity.")
215
-
216
- # --- 1.8 PERSUASIVE DESIGN (Ethical) ---
217
-
218
- # Smart defaults
219
- if has_form:
220
- has_defaults = bool(re.search(r'checked|selected|default|value=["\'].*["\']', content))
221
- radio_inputs = len(re.findall(r'type=["\']radio', content, re.IGNORECASE))
222
- if radio_inputs > 0 and not has_defaults:
223
- self.warnings.append(f"[Persuasion] {filename}: Radio buttons without default selection. Pre-select recommended option.")
224
-
225
- # Anchoring (showing original price)
226
- if re.search(r'price|pricing|cost|\$\d+', content, re.IGNORECASE):
227
- has_anchor = bool(re.search(r'original|was|strike|del|save \d+%', content, re.IGNORECASE))
228
- if not has_anchor:
229
- self.warnings.append(f"[Persuasion] {filename}: Prices without anchoring. Show original price to frame discount value.")
230
-
231
- # Social proof live indicators
232
- has_social = bool(re.search(r'join|subscriber|member|user', content, re.IGNORECASE))
233
- if has_social:
234
- has_count = bool(re.findall(r'\d+[+kmb]|\d+,\d+', content))
235
- if not has_count:
236
- self.warnings.append(f"[Persuasion] {filename}: Social proof without specific numbers. Use 'Join 10,000+' format.")
237
-
238
- # Progress indicators
239
- if has_form:
240
- has_progress = bool(re.search(r'progress|step \d+|complete|%|bar', content, re.IGNORECASE))
241
- if complex_elements > 5 and not has_progress:
242
- self.warnings.append(f"[Persuasion] {filename}: Long form without progress indicator. Add progress bar or 'Step X of Y'.")
243
-
244
- # --- 2. TYPOGRAPHY SYSTEM (Complete Coverage) ---
245
-
246
- # 2.1 Font Pairing - Too many font families
247
- font_families = set()
248
- # Check for @font-face, Google Fonts, font-family declarations
249
- font_faces = re.findall(r'@font-face\s*\{[^}]*family:\s*["\']?([^;"\'\s}]+)', content, re.IGNORECASE)
250
- google_fonts = re.findall(r'fonts\.googleapis\.com[^"\']*family=([^"&]+)', content, re.IGNORECASE)
251
- font_family_css = re.findall(r'font-family:\s*([^;]+)', content, re.IGNORECASE)
252
-
253
- for font in font_faces: font_families.add(font.strip().lower())
254
- for font in google_fonts:
255
- for f in font.replace('+', ' ').split('|'):
256
- font_families.add(f.split(':')[0].strip().lower())
257
- for family in font_family_css:
258
- # Extract first font from stack
259
- first_font = family.split(',')[0].strip().strip('"\'')
260
-
261
- if first_font.lower() not in {'sans-serif', 'serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'inherit', 'arial', 'georgia', 'times new roman', 'courier new', 'verdana', 'helvetica', 'tahoma'}:
262
- font_families.add(first_font.lower())
263
-
264
- if len(font_families) > 3:
265
- self.issues.append(f"[Typography] {filename}: {len(font_families)} font families detected. Limit to 2-3 for cohesion.")
266
-
267
- # 2.2 Line Length - Character-based width
268
- if has_long_text and not re.search(r'max-w-(?:prose|[\[\\]?\d+ch[\]\\]?)|max-width:\s*\d+ch', content):
269
- self.warnings.append(f"[Typography] {filename}: No line length constraint (45-75ch). Use max-w-prose or max-w-[65ch].")
270
-
271
- # 2.3 Line Height - Proper leading ratios
272
- # Check for text without proper line-height
273
- text_elements = len(re.findall(r'<p|<span|<div.*text|<h[1-6]', content, re.IGNORECASE))
274
- if text_elements > 0 and not re.search(r'leading-|line-height:', content):
275
- self.warnings.append(f"[Typography] {filename}: Text elements found without line-height. Body: 1.4-1.6, Headings: 1.1-1.3")
276
-
277
- # Check for heading-specific line height issues
278
- if re.search(r'<h[1-6]|text-(?:xl|2xl|3xl|4xl|5xl|6xl)', content, re.IGNORECASE):
279
- # Extract line-height values
280
- line_heights = re.findall(r'(?:leading-|line-height:\s*)([\d.]+)', content)
281
- for lh in line_heights:
282
- if float(lh) > 1.5:
283
- self.warnings.append(f"[Typography] {filename}: Heading has line-height {lh} (>1.3). Headings should be tighter (1.1-1.3).")
284
-
285
- # 2.4 Letter Spacing (Tracking)
286
- # Uppercase without tracking
287
- if re.search(r'uppercase|text-transform:\s*uppercase', content, re.IGNORECASE):
288
- if not re.search(r'tracking-|letter-spacing:', content):
289
- self.warnings.append(f"[Typography] {filename}: Uppercase text without tracking. ALL CAPS needs +5-10% spacing.")
290
-
291
- # Large text (display/hero) should have negative tracking
292
- if re.search(r'text-(?:4xl|5xl|6xl|7xl|8xl|9xl)|font-size:\s*[3-9]\dpx', content):
293
- if not re.search(r'tracking-tight|letter-spacing:\s*-[0-9]', content):
294
- self.warnings.append(f"[Typography] {filename}: Large display text without tracking-tight. Big text needs -1% to -4% spacing.")
295
-
296
- # 2.5 Weight and Emphasis - Contrast levels
297
- # Check for adjacent weight levels (poor contrast)
298
- weights = re.findall(r'font-weight:\s*(\d+)|font-(?:thin|extralight|light|normal|medium|semibold|bold|extrabold|black)|fw-(\d+)', content, re.IGNORECASE)
299
- weight_values = []
300
- for w in weights:
301
- val = w[0] or w[1]
302
- if val:
303
- # Map named weights to numbers
304
- weight_map = {'thin': '100', 'extralight': '200', 'light': '300', 'normal': '400', 'medium': '500', 'semibold': '600', 'bold': '700', 'extrabold': '800', 'black': '900'}
305
- val = weight_map.get(val.lower(), val)
306
- try:
307
- weight_values.append(int(val))
308
- except: pass
309
-
310
- # Check for adjacent weights (400/500, 500/600, etc.)
311
- for i in range(len(weight_values) - 1):
312
- diff = abs(weight_values[i] - weight_values[i+1])
313
- if diff == 100:
314
- self.warnings.append(f"[Typography] {filename}: Adjacent font weights ({weight_values[i]}/{weight_values[i+1]}). Skip at least 2 levels for contrast.")
315
-
316
- # Too many weight levels
317
- unique_weights = set(weight_values)
318
- if len(unique_weights) > 4:
319
- self.warnings.append(f"[Typography] {filename}: {len(unique_weights)} font weights. Limit to 3-4 per page.")
320
-
321
- # 2.6 Responsive Typography - Fluid sizing with clamp()
322
- has_font_sizes = bool(re.search(r'font-size:|text-(?:xs|sm|base|lg|xl|2xl)', content))
323
- if has_font_sizes and not re.search(r'clamp\(|responsive:', content):
324
- self.warnings.append(f"[Typography] {filename}: Fixed font sizes without clamp(). Consider fluid typography: clamp(MIN, PREFERRED, MAX)")
325
-
326
- # 2.7 Hierarchy - Heading structure
327
- headings = re.findall(r'<(h[1-6])', content, re.IGNORECASE)
328
- if headings:
329
- # Check for skipped levels (h1 -> h3)
330
- for i in range(len(headings) - 1):
331
- curr = int(headings[i][1])
332
- next_h = int(headings[i+1][1])
333
- if next_h > curr + 1:
334
- self.warnings.append(f"[Typography] {filename}: Skipped heading level (h{curr} -> h{next_h}). Maintain sequential hierarchy.")
335
-
336
- # Check if h1 exists for main content
337
- if 'h1' not in [h.lower() for h in headings] and has_long_text:
338
- self.warnings.append(f"[Typography] {filename}: No h1 found. Each page should have one primary heading.")
339
-
340
- # 2.8 Modular Scale - Consistent sizing
341
- # Extract font-size values
342
- font_sizes = re.findall(r'font-size:\s*(\d+(?:\.\d+)?)(px|rem|em)', content)
343
- size_values = []
344
- for size, unit in font_sizes:
345
- if unit == 'rem' or unit == 'em':
346
- size_values.append(float(size))
347
- elif unit == 'px':
348
- size_values.append(float(size) / 16) # Normalize to rem
349
-
350
- if len(size_values) > 2:
351
- # Check if sizes follow a modular scale roughly
352
- sorted_sizes = sorted(set(size_values))
353
- ratios = []
354
- for i in range(1, len(sorted_sizes)):
355
- if sorted_sizes[i-1] > 0:
356
- ratios.append(sorted_sizes[i] / sorted_sizes[i-1])
357
-
358
- # Common scale ratios: 1.067, 1.125, 1.2, 1.25, 1.333, 1.5, 1.618
359
- common_ratios = {1.067, 1.125, 1.2, 1.25, 1.333, 1.5, 1.618}
360
- for ratio in ratios[:3]: # Check first 3 ratios
361
- if not any(abs(ratio - cr) < 0.05 for cr in common_ratios):
362
- self.warnings.append(f"[Typography] {filename}: Font sizes may not follow modular scale (ratio: {ratio:.2f}). Consider consistent ratio like 1.25 (Major Third).")
363
- break
364
-
365
- # 2.9 Readability - Content chunking
366
- # Check for very long paragraphs (>5 lines estimated)
367
- paragraphs = re.findall(r'<p[^>]*>([^<]+)</p>', content, re.IGNORECASE)
368
- for p in paragraphs:
369
- word_count = len(p.split())
370
- if word_count > 100: # ~5-6 lines
371
- self.warnings.append(f"[Typography] {filename}: Long paragraph detected ({word_count} words). Break into 3-4 line chunks for readability.")
372
-
373
- # Check for missing subheadings in long content
374
- if len(paragraphs) > 5:
375
- subheadings = len(re.findall(r'<h[2-6]', content, re.IGNORECASE))
376
- if subheadings == 0:
377
- self.warnings.append(f"[Typography] {filename}: Long content without subheadings. Add h2/h3 to break up text.")
378
-
379
- # --- 3. VISUAL EFFECTS (visual-effects.md) ---
380
-
381
- # Glassmorphism Check
382
- if 'backdrop-filter' in content or 'blur(' in content:
383
- if not re.search(r'background:\s*rgba|bg-opacity|bg-[a-z0-9]+\/\d+', content):
384
- self.warnings.append(f"[Visual] {filename}: Blur used without semi-transparent background (Glassmorphism fail)")
385
-
386
- # GPU Acceleration / Performance
387
- if re.search(r'@keyframes|transition:', content):
388
- expensive_props = re.findall(r'width|height|top|left|right|bottom|margin|padding', content)
389
- if expensive_props:
390
- self.warnings.append(f"[Performance] {filename}: Animating expensive properties ({', '.join(set(expensive_props))}). Use transform/opacity where possible.")
391
-
392
- # Reduced Motion
393
- if not re.search(r'prefers-reduced-motion', content):
394
- self.warnings.append(f"[Accessibility] {filename}: Animations found without prefers-reduced-motion check")
395
-
396
- # Natural Shadows
397
- shadows = re.findall(r'box-shadow:\s*([^;]+)', content)
398
- for shadow in shadows:
399
- # Check if natural (Y > X) or multiple layers
400
- if ',' not in shadow and not re.search(r'\d+px\s+[1-9]\d*px', shadow): # Simple heuristic for Y-offset
401
- self.warnings.append(f"[Visual] {filename}: Simple/Unnatural shadow detected. Consider multiple layers or Y > X offset for realism.")
402
-
403
- # --- 3.1 NEOMORPHISM CHECK ---
404
- # Check for neomorphism patterns (dual shadows with opposite directions)
405
- neo_shadows = re.findall(r'box-shadow:\s*([^;]+)', content)
406
- for shadow in neo_shadows:
407
- # Neomorphism has two shadows: positive offset + negative offset
408
- if ',' in shadow and '-' in shadow:
409
- # Check for inset pattern (pressed state)
410
- if 'inset' in shadow:
411
- self.warnings.append(f"[Visual] {filename}: Neomorphism inset detected. Ensure adequate contrast for accessibility.")
412
-
413
- # --- 3.2 SHADOW HIERARCHY ---
414
- # Count shadow levels to check for elevation consistency
415
- shadow_count = len(shadows)
416
- if shadow_count > 0:
417
- # Check for shadow opacity levels (should indicate hierarchy)
418
- opacities = re.findall(r'rgba?\([^)]+,\s*([\d.]+)\)', content)
419
- shadow_opacities = [float(o) for o in opacities if float(o) < 0.5]
420
- if shadow_count >= 3 and len(shadow_opacities) > 0:
421
- # Check if there's variety in shadow opacities for different elevations
422
- unique_opacities = len(set(shadow_opacities))
423
- if unique_opacities < 2:
424
- self.warnings.append(f"[Visual] {filename}: All shadows at same opacity level. Vary shadow intensity for elevation hierarchy.")
425
-
426
- # --- 3.3 GRADIENT CHECKS ---
427
- # Check for gradient usage
428
- has_gradient = bool(re.search(r'gradient|linear-gradient|radial-gradient|conic-gradient', content))
429
- if has_gradient:
430
- # Warn about mesh/aurora gradients (can be overused)
431
- gradient_count = len(re.findall(r'gradient', content, re.IGNORECASE))
432
- if gradient_count > 5:
433
- self.warnings.append(f"[Visual] {filename}: Many gradients detected ({gradient_count}). Ensure this serves purpose, not decoration.")
434
- else:
435
- # Check if hero section exists without gradient
436
- if has_hero and not re.search(r'background:|bg-', content):
437
- self.warnings.append(f"[Visual] {filename}: Hero section without visual interest. Consider gradient for depth.")
438
-
439
- # --- 3.4 BORDER EFFECTS ---
440
- # Check for gradient borders or animated borders
441
- has_border = bool(re.search(r'border:|border-', content))
442
- if has_border:
443
- # Check for overly complex borders
444
- border_count = len(re.findall(r'border:', content))
445
- if border_count > 8:
446
- self.warnings.append(f"[Visual] {filename}: Many border declarations ({border_count}). Simplify for cleaner look.")
447
-
448
- # --- 3.5 GLOW EFFECTS ---
449
- # Check for text-shadow or multiple box-shadow layers (glow effects)
450
- text_shadows = re.findall(r'text-shadow:', content)
451
- for ts in text_shadows:
452
- # Multiple text-shadow layers indicate glow
453
- if ',' in ts:
454
- self.warnings.append(f"[Visual] {filename}: Text glow effect detected. Ensure readability is maintained.")
455
-
456
- # Check for box-shadow glow (multiple layers with 0 offset)
457
- glow_shadows = re.findall(r'box-shadow:\s*[^;]*0\s+0\s+', content)
458
- if len(glow_shadows) > 2:
459
- self.warnings.append(f"[Visual] {filename}: Multiple glow effects detected. Use sparingly for emphasis only.")
460
-
461
- # --- 3.6 OVERLAY TECHNIQUES ---
462
- # Check for image overlays (for readability)
463
- has_images = bool(re.search(r'<img|background-image:|bg-\[url', content))
464
- if has_images and has_long_text:
465
- has_overlay = bool(re.search(r'overlay|rgba\(0|gradient.*transparent|::after|::before', content))
466
- if not has_overlay:
467
- self.warnings.append(f"[Visual] {filename}: Text over image without overlay. Add gradient overlay for readability.")
468
-
469
- # --- 3.7 PERFORMANCE: will-change ---
470
- # Check for will-change usage
471
- if re.search(r'will-change:', content):
472
- will_change_props = re.findall(r'will-change:\s*([^;]+)', content)
473
- for prop in will_change_props:
474
- prop = prop.strip().lower()
475
- if prop in ['width', 'height', 'top', 'left', 'right', 'bottom', 'margin', 'padding']:
476
- self.issues.append(f"[Performance] {filename}: will-change on '{prop}' (layout property). Use only for transform/opacity.")
477
-
478
- # Check for excessive will-change usage
479
- will_change_count = len(re.findall(r'will-change:', content))
480
- if will_change_count > 3:
481
- self.warnings.append(f"[Performance] {filename}: Many will-change declarations ({will_change_count}). Use sparingly, only for heavy animations.")
482
-
483
- # --- 3.8 EFFECT SELECTION ---
484
- # Check for effect overuse (too many visual effects)
485
- effect_count = (
486
- (1 if has_gradient else 0) +
487
- shadow_count +
488
- len(re.findall(r'backdrop-filter|blur\(', content)) +
489
- len(re.findall(r'text-shadow:', content))
490
- )
491
- if effect_count > 10:
492
- self.warnings.append(f"[Visual] {filename}: Many visual effects ({effect_count}). Ensure effects serve purpose, not decoration.")
493
-
494
- # Check for static/flat design (no depth)
495
- if has_long_text and effect_count == 0:
496
- self.warnings.append(f"[Visual] {filename}: Flat design with no depth. Consider shadows or subtle gradients for hierarchy.")
497
-
498
- # --- 4. COLOR SYSTEM (color-system.md) ---
499
-
500
- # 4.1 PURPLE BAN - Critical check from color-system.md
501
- purple_hexes = ['#8B5CF6', '#A855F7', '#9333EA', '#7C3AED', '#6D28D9',
502
- '#8B5CF6', '#A78BFA', '#C4B5FD', '#DDD6FE', '#EDE9FE',
503
- '#8b5cf6', '#a855f7', '#9333ea', '#7c3aed', '#6d28d9',
504
- 'purple', 'violet', 'fuchsia', 'magenta', 'lavender']
505
- for purple in purple_hexes:
506
- if purple.lower() in content.lower():
507
- self.issues.append(f"[Color] {filename}: PURPLE DETECTED ('{purple}'). Banned by Maestro rules. Use Teal/Cyan/Emerald instead.")
508
- break
509
-
510
- # 4.2 60-30-10 Rule check
511
- # Count color usage to estimate ratio
512
- color_hex_count = len(re.findall(r'#[0-9a-fA-F]{3,6}', content))
513
- hsl_count = len(re.findall(r'hsl\(', content))
514
- total_colors = color_hex_count + hsl_count
515
- if total_colors > 3:
516
- # Check for dominant colors (should be ~60%)
517
- bg_declarations = re.findall(r'(?:background|bg-|bg\[)([^;}\s]+)', content)
518
- text_declarations = re.findall(r'(?:color|text-)([^;}\s]+)', content)
519
- if len(bg_declarations) > 0 and len(text_declarations) > 0:
520
- # Just warn if too many distinct colors
521
- unique_hexes = set(re.findall(r'#[0-9a-fA-F]{6}', content))
522
- if len(unique_hexes) > 5:
523
- self.warnings.append(f"[Color] {filename}: {len(unique_hexes)} distinct colors. Consider 60-30-10 rule: dominant (60%), secondary (30%), accent (10%).")
524
-
525
- # 4.3 Color Scheme Pattern Detection
526
- # Detect monochromatic (same hue, different lightness)
527
- hsl_matches = re.findall(r'hsl\((\d+),\s*\d+%,\s*\d+%\)', content)
528
- if len(hsl_matches) >= 3:
529
- hues = [int(h) for h in hsl_matches]
530
- hue_range = max(hues) - min(hues)
531
- if hue_range < 10:
532
- self.warnings.append(f"[Color] {filename}: Monochromatic palette detected (hue variance: {hue_range}deg). Ensure adequate contrast.")
533
-
534
- # 4.4 Dark Mode Compliance
535
- # Check for pure black (#000000) or pure white (#FFFFFF) text (forbidden)
536
- if re.search(r'color:\s*#000000|#000\b', content):
537
- self.warnings.append(f"[Color] {filename}: Pure black (#000000) detected. Use #1a1a1a or darker grays for better dark mode.")
538
- if re.search(r'background:\s*#ffffff|#fff\b', content) and re.search(r'dark:\s*|dark:', content):
539
- self.warnings.append(f"[Color] {filename}: Pure white background in dark mode context. Use slight off-white (#f9fafb) for reduced eye strain.")
540
-
541
- # 4.5 WCAG Contrast Pattern Check
542
- # Look for potential low-contrast combinations
543
- light_bg_light_text = bool(re.search(r'bg-(?:gray|slate|zinc)-50|bg-white.*text-(?:gray|slate)-[12]', content))
544
- dark_bg_dark_text = bool(re.search(r'bg-(?:gray|slate|zinct)-9|bg-black.*text-(?:gray|slate)-[89]', content))
545
- if light_bg_light_text or dark_bg_dark_text:
546
- self.warnings.append(f"[Color] {filename}: Possible low-contrast combination detected. Verify WCAG AA (4.5:1 for text).")
547
-
548
- # 4.6 Color Psychology Context Check
549
- # Warn if blue used for food/restaurant context
550
- has_blue = bool(re.search(r'bg-blue|text-blue|from-blue|#[0-9a-fA-F]*00[0-9A-Fa-f]{2}|#[0-9a-fA-F]*1[0-9A-Fa-f]{2}', content))
551
- has_food_context = bool(re.search(r'restaurant|food|cooking|recipe|menu|dish|meal', content, re.IGNORECASE))
552
- if has_blue and has_food_context:
553
- self.warnings.append(f"[Color] {filename}: Blue color in food context. Blue suppresses appetite; consider warm colors (red, orange, yellow).")
554
-
555
- # 4.7 HSL-Based Palette Detection
556
- # Check if using HSL for palette (recommended in color-system.md)
557
- has_color_vars = bool(re.search(r'--color-|color-|primary-|secondary-', content))
558
- if has_color_vars and not re.search(r'hsl\(', content):
559
- self.warnings.append(f"[Color] {filename}: Color variables without HSL. Consider HSL for easier palette adjustment (Hue, Saturation, Lightness).")
560
-
561
- # --- 5. ANIMATION GUIDE (animation-guide.md) ---
562
-
563
- # 5.1 Duration Appropriateness
564
- # Check for excessively long or short animations
565
- durations = re.findall(r'(?:duration|animation-duration|transition-duration):\s*([\d.]+)(s|ms)', content)
566
- for duration, unit in durations:
567
- duration_ms = float(duration) * (1000 if unit == 's' else 1)
568
- if duration_ms < 50:
569
- self.warnings.append(f"[Animation] {filename}: Very fast animation ({duration}{unit}). Minimum 50ms for visibility.")
570
- elif duration_ms > 1000 and 'transition' in content.lower():
571
- self.warnings.append(f"[Animation] {filename}: Long transition ({duration}{unit}). Transitions should be 100-300ms for responsiveness.")
572
-
573
- # 5.2 Easing Function Correctness
574
- # Check for incorrect easing patterns
575
- if re.search(r'ease-in\s+.*entry|fade-in.*ease-in', content):
576
- self.warnings.append(f"[Animation] {filename}: Entry animation with ease-in. Entry should use ease-out for snappy feel.")
577
- if re.search(r'ease-out\s+.*exit|fade-out.*ease-out', content):
578
- self.warnings.append(f"[Animation] {filename}: Exit animation with ease-out. Exit should use ease-in for natural feel.")
579
-
580
- # 5.3 Micro-interaction Feedback Patterns
581
- # Check for interactive elements without hover/focus states
582
- interactive_elements = len(re.findall(r'<button|<a\s+href|onClick|@click', content))
583
- has_hover_focus = bool(re.search(r'hover:|focus:|:hover|:focus', content))
584
- if interactive_elements > 2 and not has_hover_focus:
585
- self.warnings.append(f"[Animation] {filename}: Interactive elements without hover/focus states. Add micro-interactions for feedback.")
586
-
587
- # 5.4 Loading State Indicators
588
- # Check for loading patterns
589
- has_async = bool(re.search(r'async|await|fetch|axios|loading|isLoading', content))
590
- has_loading_indicator = bool(re.search(r'skeleton|spinner|progress|loading|<circle.*animate', content))
591
- if has_async and not has_loading_indicator:
592
- self.warnings.append(f"[Animation] {filename}: Async operations without loading indicator. Add skeleton or spinner for perceived performance.")
593
-
594
- # 5.5 Page Transition Patterns
595
- # Check for page/view transitions
596
- has_routing = bool(re.search(r'router|navigate|Link.*to|useHistory', content))
597
- has_page_transition = bool(re.search(r'AnimatePresence|motion\.|transition.*page|fade.*route', content))
598
- if has_routing and not has_page_transition:
599
- self.warnings.append(f"[Animation] {filename}: Routing detected without page transitions. Consider fade/slide for context continuity.")
600
-
601
- # 5.6 Scroll Animation Performance
602
- # Check for scroll-driven animations
603
- has_scroll_anim = bool(re.search(r'onScroll|scroll.*trigger|IntersectionObserver', content))
604
- if has_scroll_anim:
605
- # Check if using expensive properties in scroll handlers
606
- if re.search(r'onScroll.*[^\w](width|height|top|left)', content):
607
- self.issues.append(f"[Animation] {filename}: Scroll handler animating layout properties. Use transform/opacity for 60fps.")
608
-
609
- # --- 6. MOTION GRAPHICS (motion-graphics.md) ---
610
-
611
- # 6.1 Lottie Animation Checks
612
- has_lottie = bool(re.search(r'lottie|Lottie|@lottie-react', content))
613
- if has_lottie:
614
- # Check for reduced motion fallback
615
- has_lottie_fallback = bool(re.search(r'prefers-reduced-motion.*lottie|lottie.*isPaused|lottie.*stop', content))
616
- if not has_lottie_fallback:
617
- self.warnings.append(f"[Motion] {filename}: Lottie animation without reduced-motion fallback. Add pause/stop for accessibility.")
618
-
619
- # 6.2 GSAP Memory Leak Risks
620
- has_gsap = bool(re.search(r'gsap|ScrollTrigger|from\(.*gsap', content))
621
- if has_gsap:
622
- # Check for cleanup patterns
623
- has_gsap_cleanup = bool(re.search(r'kill\(|revert\(|useEffect.*return.*gsap', content))
624
- if not has_gsap_cleanup:
625
- self.issues.append(f"[Motion] {filename}: GSAP animation without cleanup (kill/revert). Memory leak risk on unmount.")
626
-
627
- # 6.3 SVG Animation Performance
628
- svg_animations = re.findall(r'<animate|<animateTransform|stroke-dasharray|stroke-dashoffset', content)
629
- if len(svg_animations) > 3:
630
- self.warnings.append(f"[Motion] {filename}: Multiple SVG animations detected. Ensure stroke-dashoffset is used sparingly for mobile performance.")
631
-
632
- # 6.4 3D Transform Performance
633
- has_3d_transform = bool(re.search(r'transform3d|perspective\(|rotate3d|translate3d', content))
634
- if has_3d_transform:
635
- # Check for perspective on parent
636
- has_perspective_parent = bool(re.search(r'perspective:\s*\d+px|perspective\s*\(', content))
637
- if not has_perspective_parent:
638
- self.warnings.append(f"[Motion] {filename}: 3D transform without perspective parent. Add perspective: 1000px for realistic depth.")
639
-
640
- # Warn about mobile performance
641
- self.warnings.append(f"[Motion] {filename}: 3D transforms detected. Test on mobile; can impact performance on low-end devices.")
642
-
643
- # 6.5 Particle Effect Warnings
644
- # Check for canvas/WebGL particle systems
645
- has_particles = bool(re.search(r'particle|canvas.*loop|requestAnimationFrame.*draw|Three\.js', content))
646
- if has_particles:
647
- self.warnings.append(f"[Motion] {filename}: Particle effects detected. Ensure fallback or reduced-quality option for mobile devices.")
648
-
649
- # 6.6 Scroll-Driven Animation Performance
650
- has_scroll_driven = bool(re.search(r'IntersectionObserver.*animate|scroll.*progress|view-timeline', content))
651
- if has_scroll_driven:
652
- # Check for throttling/debouncing
653
- has_throttle = bool(re.search(r'throttle|debounce|requestAnimationFrame', content))
654
- if not has_throttle:
655
- self.issues.append(f"[Motion] {filename}: Scroll-driven animation without throttling. Add requestAnimationFrame for 60fps.")
656
-
657
- # 6.7 Motion Decision Tree - Context Check
658
- # Check if animation serves purpose (not just decoration)
659
- total_animations = (
660
- len(re.findall(r'@keyframes|transition:|animate-', content)) +
661
- (1 if has_lottie else 0) +
662
- (1 if has_gsap else 0)
663
- )
664
- if total_animations > 5:
665
- # Check if animations are functional
666
- functional_animations = len(re.findall(r'hover:|focus:|disabled|loading|error|success', content))
667
- if functional_animations < total_animations / 2:
668
- self.warnings.append(f"[Motion] {filename}: Many animations ({total_animations}). Ensure majority serve functional purpose (feedback, guidance), not decoration.")
669
-
670
- # --- 7. ACCESSIBILITY ---
671
- if re.search(r'<img(?![^>]*alt=)[^>]*>', content):
672
- self.issues.append(f"[Accessibility] {filename}: Missing img alt text")
673
-
674
- def audit_directory(self, directory: str) -> None:
675
- extensions = {'.tsx', '.jsx', '.html', '.vue', '.svelte', '.css'}
676
- for root, dirs, files in os.walk(directory):
677
- dirs[:] = [d for d in dirs if d not in {'node_modules', '.git', 'dist', 'build', '.next'}]
678
- for file in files:
679
- if Path(file).suffix in extensions:
680
- self.audit_file(os.path.join(root, file))
681
-
682
- def get_report(self):
683
- return {
684
- "files_checked": self.files_checked,
685
- "issues": self.issues,
686
- "warnings": self.warnings,
687
- "passed_checks": self.passed_count,
688
- "compliant": len(self.issues) == 0
689
- }
690
-
691
- def main():
692
- if len(sys.argv) < 2: sys.exit(1)
693
-
694
- path = sys.argv[1]
695
- is_json = "--json" in sys.argv
696
-
697
- auditor = UXAuditor()
698
- if os.path.isfile(path): auditor.audit_file(path)
699
- else: auditor.audit_directory(path)
700
-
701
- report = auditor.get_report()
702
-
703
- if is_json:
704
- print(json.dumps(report))
705
- else:
706
- # Use ASCII-safe output for Windows console compatibility
707
- print(f"\n[UX AUDIT] {report['files_checked']} files checked")
708
- print("-" * 50)
709
- if report['issues']:
710
- print(f"[!] ISSUES ({len(report['issues'])}):")
711
- for i in report['issues'][:10]: print(f" - {i}")
712
- if report['warnings']:
713
- print(f"[*] WARNINGS ({len(report['warnings'])}):")
714
- for w in report['warnings'][:15]: print(f" - {w}")
715
- print(f"[+] PASSED CHECKS: {report['passed_checks']}")
716
- status = "PASS" if report['compliant'] else "FAIL"
717
- print(f"STATUS: {status}")
718
-
719
- sys.exit(0 if report['compliant'] else 1)
720
-
721
- if __name__ == "__main__":
722
- main()