@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,109 +0,0 @@
1
- ---
2
- name: code-review-checklist
3
- description: Code review guidelines covering code quality, security, and best practices.
4
- allowed-tools: Read, Glob, Grep
5
- ---
6
-
7
- # Code Review Checklist
8
-
9
- ## Quick Review Checklist
10
-
11
- ### Correctness
12
- - [ ] Code does what it's supposed to do
13
- - [ ] Edge cases handled
14
- - [ ] Error handling in place
15
- - [ ] No obvious bugs
16
-
17
- ### Security
18
- - [ ] Input validated and sanitized
19
- - [ ] No SQL/NoSQL injection vulnerabilities
20
- - [ ] No XSS or CSRF vulnerabilities
21
- - [ ] No hardcoded secrets or sensitive credentials
22
- - [ ] **AI-Specific:** Protection against Prompt Injection (if applicable)
23
- - [ ] **AI-Specific:** Outputs are sanitized before being used in critical sinks
24
-
25
- ### Performance
26
- - [ ] No N+1 queries
27
- - [ ] No unnecessary loops
28
- - [ ] Appropriate caching
29
- - [ ] Bundle size impact considered
30
-
31
- ### Code Quality
32
- - [ ] Clear naming
33
- - [ ] DRY - no duplicate code
34
- - [ ] SOLID principles followed
35
- - [ ] Appropriate abstraction level
36
-
37
- ### Testing
38
- - [ ] Unit tests for new code
39
- - [ ] Edge cases tested
40
- - [ ] Tests readable and maintainable
41
-
42
- ### Documentation
43
- - [ ] Complex logic commented
44
- - [ ] Public APIs documented
45
- - [ ] README updated if needed
46
-
47
- ## AI & LLM Review Patterns (2025)
48
-
49
- ### Logic & Hallucinations
50
- - [ ] **Chain of Thought:** Does the logic follow a verifiable path?
51
- - [ ] **Edge Cases:** Did the AI account for empty states, timeouts, and partial failures?
52
- - [ ] **External State:** Is the code making safe assumptions about file systems or networks?
53
-
54
- ### Prompt Engineering Review
55
- ```markdown
56
- // ❌ Vague prompt in code
57
- const response = await ai.generate(userInput);
58
-
59
- // ✅ Structured & Safe prompt
60
- const response = await ai.generate({
61
- system: "You are a specialized parser...",
62
- input: sanitize(userInput),
63
- schema: ResponseSchema
64
- });
65
- ```
66
-
67
- ## Anti-Patterns to Flag
68
-
69
- ```typescript
70
- // ❌ Magic numbers
71
- if (status === 3) { ... }
72
-
73
- // ✅ Named constants
74
- if (status === Status.ACTIVE) { ... }
75
-
76
- // ❌ Deep nesting
77
- if (a) { if (b) { if (c) { ... } } }
78
-
79
- // ✅ Early returns
80
- if (!a) return;
81
- if (!b) return;
82
- if (!c) return;
83
- // do work
84
-
85
- // ❌ Long functions (100+ lines)
86
- // ✅ Small, focused functions
87
-
88
- // ❌ any type
89
- const data: any = ...
90
-
91
- // ✅ Proper types
92
- const data: UserData = ...
93
- ```
94
-
95
- ## Review Comments Guide
96
-
97
- ```
98
- // Blocking issues use 🔴
99
- 🔴 BLOCKING: SQL injection vulnerability here
100
-
101
- // Important suggestions use 🟡
102
- 🟡 SUGGESTION: Consider using useMemo for performance
103
-
104
- // Minor nits use 🟢
105
- 🟢 NIT: Prefer const over let for immutable variable
106
-
107
- // Questions use ❓
108
- ❓ QUESTION: What happens if user is null here?
109
- ```
@@ -1,52 +0,0 @@
1
- ---
2
- name: database-design
3
- description: Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
4
- allowed-tools: Read, Write, Edit, Glob, Grep
5
- ---
6
-
7
- # Database Design
8
-
9
- > **Learn to THINK, not copy SQL patterns.**
10
-
11
- ## 🎯 Selective Reading Rule
12
-
13
- **Read ONLY files relevant to the request!** Check the content map, find what you need.
14
-
15
- | File | Description | When to Read |
16
- |------|-------------|--------------|
17
- | `database-selection.md` | PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |
18
- | `orm-selection.md` | Drizzle vs Prisma vs Kysely | Choosing ORM |
19
- | `schema-design.md` | Normalization, PKs, relationships | Designing schema |
20
- | `indexing.md` | Index types, composite indexes | Performance tuning |
21
- | `optimization.md` | N+1, EXPLAIN ANALYZE | Query optimization |
22
- | `migrations.md` | Safe migrations, serverless DBs | Schema changes |
23
-
24
- ---
25
-
26
- ## ⚠️ Core Principle
27
-
28
- - ASK user for database preferences when unclear
29
- - Choose database/ORM based on CONTEXT
30
- - Don't default to PostgreSQL for everything
31
-
32
- ---
33
-
34
- ## Decision Checklist
35
-
36
- Before designing schema:
37
-
38
- - [ ] Asked user about database preference?
39
- - [ ] Chosen database for THIS context?
40
- - [ ] Considered deployment environment?
41
- - [ ] Planned index strategy?
42
- - [ ] Defined relationship types?
43
-
44
- ---
45
-
46
- ## Anti-Patterns
47
-
48
- ❌ Default to PostgreSQL for simple apps (SQLite may suffice)
49
- ❌ Skip indexing
50
- ❌ Use SELECT * in production
51
- ❌ Store JSON when structured data is better
52
- ❌ Ignore N+1 queries
@@ -1,43 +0,0 @@
1
- # Database Selection (2025)
2
-
3
- > Choose database based on context, not default.
4
-
5
- ## Decision Tree
6
-
7
- ```
8
- What are your requirements?
9
-
10
- ├── Full relational features needed
11
- │ ├── Self-hosted → PostgreSQL
12
- │ └── Serverless → Neon, Supabase
13
-
14
- ├── Edge deployment / Ultra-low latency
15
- │ └── Turso (edge SQLite)
16
-
17
- ├── AI / Vector search
18
- │ └── PostgreSQL + pgvector
19
-
20
- ├── Simple / Embedded / Local
21
- │ └── SQLite
22
-
23
- └── Global distribution
24
- └── PlanetScale, CockroachDB, Turso
25
- ```
26
-
27
- ## Comparison
28
-
29
- | Database | Best For | Trade-offs |
30
- |----------|----------|------------|
31
- | **PostgreSQL** | Full features, complex queries | Needs hosting |
32
- | **Neon** | Serverless PG, branching | PG complexity |
33
- | **Turso** | Edge, low latency | SQLite limitations |
34
- | **SQLite** | Simple, embedded, local | Single-writer |
35
- | **PlanetScale** | MySQL, global scale | No foreign keys |
36
-
37
- ## Questions to Ask
38
-
39
- 1. What's the deployment environment?
40
- 2. How complex are the queries?
41
- 3. Is edge/serverless important?
42
- 4. Vector search needed?
43
- 5. Global distribution required?
@@ -1,39 +0,0 @@
1
- # Indexing Principles
2
-
3
- > When and how to create indexes effectively.
4
-
5
- ## When to Create Indexes
6
-
7
- ```
8
- Index these:
9
- ├── Columns in WHERE clauses
10
- ├── Columns in JOIN conditions
11
- ├── Columns in ORDER BY
12
- ├── Foreign key columns
13
- └── Unique constraints
14
-
15
- Don't over-index:
16
- ├── Write-heavy tables (slower inserts)
17
- ├── Low-cardinality columns
18
- ├── Columns rarely queried
19
- ```
20
-
21
- ## Index Type Selection
22
-
23
- | Type | Use For |
24
- |------|---------|
25
- | **B-tree** | General purpose, equality & range |
26
- | **Hash** | Equality only, faster |
27
- | **GIN** | JSONB, arrays, full-text |
28
- | **GiST** | Geometric, range types |
29
- | **HNSW/IVFFlat** | Vector similarity (pgvector) |
30
-
31
- ## Composite Index Principles
32
-
33
- ```
34
- Order matters for composite indexes:
35
- ├── Equality columns first
36
- ├── Range columns last
37
- ├── Most selective first
38
- └── Match query pattern
39
- ```
@@ -1,48 +0,0 @@
1
- # Migration Principles
2
-
3
- > Safe migration strategy for zero-downtime changes.
4
-
5
- ## Safe Migration Strategy
6
-
7
- ```
8
- For zero-downtime changes:
9
-
10
- ├── Adding column
11
- │ └── Add as nullable → backfill → add NOT NULL
12
-
13
- ├── Removing column
14
- │ └── Stop using → deploy → remove column
15
-
16
- ├── Adding index
17
- │ └── CREATE INDEX CONCURRENTLY (non-blocking)
18
-
19
- └── Renaming column
20
- └── Add new → migrate data → deploy → drop old
21
- ```
22
-
23
- ## Migration Philosophy
24
-
25
- - Never make breaking changes in one step
26
- - Test migrations on data copy first
27
- - Have rollback plan
28
- - Run in transaction when possible
29
-
30
- ## Serverless Databases
31
-
32
- ### Neon (Serverless PostgreSQL)
33
-
34
- | Feature | Benefit |
35
- |---------|---------|
36
- | Scale to zero | Cost savings |
37
- | Instant branching | Dev/preview |
38
- | Full PostgreSQL | Compatibility |
39
- | Autoscaling | Traffic handling |
40
-
41
- ### Turso (Edge SQLite)
42
-
43
- | Feature | Benefit |
44
- |---------|---------|
45
- | Edge locations | Ultra-low latency |
46
- | SQLite compatible | Simple |
47
- | Generous free tier | Cost |
48
- | Global distribution | Performance |
@@ -1,36 +0,0 @@
1
- # Query Optimization
2
-
3
- > N+1 problem, EXPLAIN ANALYZE, optimization priorities.
4
-
5
- ## N+1 Problem
6
-
7
- ```
8
- What is N+1?
9
- ├── 1 query to get parent records
10
- ├── N queries to get related records
11
- └── Very slow!
12
-
13
- Solutions:
14
- ├── JOIN → Single query with all data
15
- ├── Eager loading → ORM handles JOIN
16
- ├── DataLoader → Batch and cache (GraphQL)
17
- └── Subquery → Fetch related in one query
18
- ```
19
-
20
- ## Query Analysis Mindset
21
-
22
- ```
23
- Before optimizing:
24
- ├── EXPLAIN ANALYZE the query
25
- ├── Look for Seq Scan (full table scan)
26
- ├── Check actual vs estimated rows
27
- └── Identify missing indexes
28
- ```
29
-
30
- ## Optimization Priorities
31
-
32
- 1. **Add missing indexes** (most common issue)
33
- 2. **Select only needed columns** (not SELECT *)
34
- 3. **Use proper JOINs** (avoid subqueries when possible)
35
- 4. **Limit early** (pagination at database level)
36
- 5. **Cache** (when appropriate)
@@ -1,30 +0,0 @@
1
- # ORM Selection (2025)
2
-
3
- > Choose ORM based on deployment and DX needs.
4
-
5
- ## Decision Tree
6
-
7
- ```
8
- What's the context?
9
-
10
- ├── Edge deployment / Bundle size matters
11
- │ └── Drizzle (smallest, SQL-like)
12
-
13
- ├── Best DX / Schema-first
14
- │ └── Prisma (migrations, studio)
15
-
16
- ├── Maximum control
17
- │ └── Raw SQL with query builder
18
-
19
- └── Python ecosystem
20
- └── SQLAlchemy 2.0 (async support)
21
- ```
22
-
23
- ## Comparison
24
-
25
- | ORM | Best For | Trade-offs |
26
- |-----|----------|------------|
27
- | **Drizzle** | Edge, TypeScript | Newer, less examples |
28
- | **Prisma** | DX, schema management | Heavier, not edge-ready |
29
- | **Kysely** | Type-safe SQL builder | Manual migrations |
30
- | **Raw SQL** | Complex queries, control | Manual type safety |
@@ -1,56 +0,0 @@
1
- # Schema Design Principles
2
-
3
- > Normalization, primary keys, timestamps, relationships.
4
-
5
- ## Normalization Decision
6
-
7
- ```
8
- When to normalize (separate tables):
9
- ├── Data is repeated across rows
10
- ├── Updates would need multiple changes
11
- ├── Relationships are clear
12
- └── Query patterns benefit
13
-
14
- When to denormalize (embed/duplicate):
15
- ├── Read performance critical
16
- ├── Data rarely changes
17
- ├── Always fetched together
18
- └── Simpler queries needed
19
- ```
20
-
21
- ## Primary Key Selection
22
-
23
- | Type | Use When |
24
- |------|----------|
25
- | **UUID** | Distributed systems, security |
26
- | **ULID** | UUID + sortable by time |
27
- | **Auto-increment** | Simple apps, single database |
28
- | **Natural key** | Rarely (business meaning) |
29
-
30
- ## Timestamp Strategy
31
-
32
- ```
33
- For every table:
34
- ├── created_at → When created
35
- ├── updated_at → Last modified
36
- └── deleted_at → Soft delete (if needed)
37
-
38
- Use TIMESTAMPTZ (with timezone) not TIMESTAMP
39
- ```
40
-
41
- ## Relationship Types
42
-
43
- | Type | When | Implementation |
44
- |------|------|----------------|
45
- | **One-to-One** | Extension data | Separate table with FK |
46
- | **One-to-Many** | Parent-children | FK on child table |
47
- | **Many-to-Many** | Both sides have many | Junction table |
48
-
49
- ## Foreign Key ON DELETE
50
-
51
- ```
52
- ├── CASCADE → Delete children with parent
53
- ├── SET NULL → Children become orphans
54
- ├── RESTRICT → Prevent delete if children exist
55
- └── SET DEFAULT → Children get default value
56
- ```
@@ -1,172 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Schema Validator - Database schema validation
4
- Validates Prisma schemas and checks for common issues.
5
-
6
- Usage:
7
- python schema_validator.py <project_path>
8
-
9
- Checks:
10
- - Prisma schema syntax
11
- - Missing relations
12
- - Index recommendations
13
- - Naming conventions
14
- """
15
-
16
- import sys
17
- import json
18
- import re
19
- from pathlib import Path
20
- from datetime import datetime
21
-
22
- # Fix Windows console encoding
23
- try:
24
- sys.stdout.reconfigure(encoding='utf-8', errors='replace')
25
- except:
26
- pass
27
-
28
-
29
- def find_schema_files(project_path: Path) -> list:
30
- """Find database schema files."""
31
- schemas = []
32
-
33
- # Prisma schema
34
- prisma_files = list(project_path.glob('**/prisma/schema.prisma'))
35
- schemas.extend([('prisma', f) for f in prisma_files])
36
-
37
- # Drizzle schema files
38
- drizzle_files = list(project_path.glob('**/drizzle/*.ts'))
39
- drizzle_files.extend(project_path.glob('**/schema/*.ts'))
40
- for f in drizzle_files:
41
- if 'schema' in f.name.lower() or 'table' in f.name.lower():
42
- schemas.append(('drizzle', f))
43
-
44
- return schemas[:10] # Limit
45
-
46
-
47
- def validate_prisma_schema(file_path: Path) -> list:
48
- """Validate Prisma schema file."""
49
- issues = []
50
-
51
- try:
52
- content = file_path.read_text(encoding='utf-8', errors='ignore')
53
-
54
- # Find all models
55
- models = re.findall(r'model\s+(\w+)\s*{([^}]+)}', content, re.DOTALL)
56
-
57
- for model_name, model_body in models:
58
- # Check naming convention (PascalCase)
59
- if not model_name[0].isupper():
60
- issues.append(f"Model '{model_name}' should be PascalCase")
61
-
62
- # Check for id field
63
- if '@id' not in model_body and 'id' not in model_body.lower():
64
- issues.append(f"Model '{model_name}' might be missing @id field")
65
-
66
- # Check for createdAt/updatedAt
67
- if 'createdAt' not in model_body and 'created_at' not in model_body:
68
- issues.append(f"Model '{model_name}' missing createdAt field (recommended)")
69
-
70
- # Check for @relation without fields
71
- relations = re.findall(r'@relation\([^)]*\)', model_body)
72
- for rel in relations:
73
- if 'fields:' not in rel and 'references:' not in rel:
74
- pass # Implicit relation, ok
75
-
76
- # Check for @@index suggestions
77
- foreign_keys = re.findall(r'(\w+Id)\s+\w+', model_body)
78
- for fk in foreign_keys:
79
- if f'@@index([{fk}])' not in content and f'@@index(["{fk}"])' not in content:
80
- issues.append(f"Consider adding @@index([{fk}]) for better query performance in {model_name}")
81
-
82
- # Check for enum definitions
83
- enums = re.findall(r'enum\s+(\w+)\s*{', content)
84
- for enum_name in enums:
85
- if not enum_name[0].isupper():
86
- issues.append(f"Enum '{enum_name}' should be PascalCase")
87
-
88
- except Exception as e:
89
- issues.append(f"Error reading schema: {str(e)[:50]}")
90
-
91
- return issues
92
-
93
-
94
- def main():
95
- project_path = Path(sys.argv[1] if len(sys.argv) > 1 else ".").resolve()
96
-
97
- print(f"\n{'='*60}")
98
- print(f"[SCHEMA VALIDATOR] Database Schema Validation")
99
- print(f"{'='*60}")
100
- print(f"Project: {project_path}")
101
- print(f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
102
- print("-"*60)
103
-
104
- # Find schema files
105
- schemas = find_schema_files(project_path)
106
- print(f"Found {len(schemas)} schema files")
107
-
108
- if not schemas:
109
- output = {
110
- "script": "schema_validator",
111
- "project": str(project_path),
112
- "schemas_checked": 0,
113
- "issues_found": 0,
114
- "passed": True,
115
- "message": "No schema files found"
116
- }
117
- print(json.dumps(output, indent=2))
118
- sys.exit(0)
119
-
120
- # Validate each schema
121
- all_issues = []
122
-
123
- for schema_type, file_path in schemas:
124
- print(f"\nValidating: {file_path.name} ({schema_type})")
125
-
126
- if schema_type == 'prisma':
127
- issues = validate_prisma_schema(file_path)
128
- else:
129
- issues = [] # Drizzle validation could be added
130
-
131
- if issues:
132
- all_issues.append({
133
- "file": str(file_path.name),
134
- "type": schema_type,
135
- "issues": issues
136
- })
137
-
138
- # Summary
139
- print("\n" + "="*60)
140
- print("SCHEMA ISSUES")
141
- print("="*60)
142
-
143
- if all_issues:
144
- for item in all_issues:
145
- print(f"\n{item['file']} ({item['type']}):")
146
- for issue in item["issues"][:5]: # Limit per file
147
- print(f" - {issue}")
148
- if len(item["issues"]) > 5:
149
- print(f" ... and {len(item['issues']) - 5} more issues")
150
- else:
151
- print("No schema issues found!")
152
-
153
- total_issues = sum(len(item["issues"]) for item in all_issues)
154
- # Schema issues are warnings, not failures
155
- passed = True
156
-
157
- output = {
158
- "script": "schema_validator",
159
- "project": str(project_path),
160
- "schemas_checked": len(schemas),
161
- "issues_found": total_issues,
162
- "passed": passed,
163
- "issues": all_issues
164
- }
165
-
166
- print("\n" + json.dumps(output, indent=2))
167
-
168
- sys.exit(0)
169
-
170
-
171
- if __name__ == "__main__":
172
- main()