@maestro-ai/cli 1.0.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 (252) hide show
  1. package/README.md +59 -0
  2. package/content/guides/Cat/303/241logo de Stacks para Cloud Moderna.md" +119 -0
  3. package/content/guides/Cat/303/241logo de Stacks para Hospedagem Compartilhada.md" +147 -0
  4. package/content/guides/Checklist Mestre de Entrega.md +68 -0
  5. package/content/guides/Gates de Qualidade.md +209 -0
  6. package/content/guides/Guia de Adi/303/247/303/243o de Novas Funcionalidades.md" +355 -0
  7. package/content/guides/Guia de Chaos Engineering.md +267 -0
  8. package/content/guides/Guia de Debugging com IA.md +135 -0
  9. package/content/guides/Guia de Estrat/303/251gias de Cache.md" +352 -0
  10. package/content/guides/Guia de Migrations Zero-Downtime.md +311 -0
  11. package/content/guides/Guia de Multi-tenancy.md +368 -0
  12. package/content/guides/Guia de Otimiza/303/247/303/243o de Custos Cloud.md" +195 -0
  13. package/content/guides/Guia de Refatora/303/247/303/243o de C/303/263digo Legado com IA.md" +162 -0
  14. package/content/guides/Guia de SLOs e Error Budgets.md +315 -0
  15. package/content/guides/M/303/251tricas de Efici/303/252ncia do Desenvolvimento com IA.md" +93 -0
  16. package/content/guides/Rules base.md +90 -0
  17. package/content/prompts/README.md +203 -0
  18. package/content/prompts/acessibilidade/analise-acessibilidade.md +257 -0
  19. package/content/prompts/apis/design-api-rest.md +303 -0
  20. package/content/prompts/apis/idempotencia.md +254 -0
  21. package/content/prompts/apis/versionamento.md +313 -0
  22. package/content/prompts/arquitetura/arquitetura-c4-completo.md +190 -0
  23. package/content/prompts/arquitetura/clean-architecture.md +151 -0
  24. package/content/prompts/arquitetura/ddd-bounded-contexts.md +183 -0
  25. package/content/prompts/arquitetura/ddd-cqrs.md +176 -0
  26. package/content/prompts/arquitetura/modelo-dominio.md +207 -0
  27. package/content/prompts/arquitetura/multi-tenancy.md +235 -0
  28. package/content/prompts/database/migrations-zero-downtime.md +192 -0
  29. package/content/prompts/database/otimizacao-queries.md +296 -0
  30. package/content/prompts/desenvolvimento/code-review.md +301 -0
  31. package/content/prompts/desenvolvimento/gerar-servico.md +271 -0
  32. package/content/prompts/devops/docker-compose.md +336 -0
  33. package/content/prompts/devops/feature-flags.md +374 -0
  34. package/content/prompts/devops/kubernetes-deploy.md +460 -0
  35. package/content/prompts/devops/pipeline-cicd.md +358 -0
  36. package/content/prompts/devops/terraform-iac.md +502 -0
  37. package/content/prompts/escalabilidade/analise-performance.md +240 -0
  38. package/content/prompts/escalabilidade/analise-performance.txt +94 -0
  39. package/content/prompts/escalabilidade/caching.md +255 -0
  40. package/content/prompts/observabilidade/chaos-testing.md +237 -0
  41. package/content/prompts/observabilidade/estrategia-observabilidade.md +263 -0
  42. package/content/prompts/observabilidade/estrategia-observabilidade.txt +134 -0
  43. package/content/prompts/observabilidade/slos.md +215 -0
  44. package/content/prompts/produto/discovery-inicial.md +203 -0
  45. package/content/prompts/produto/discovery-inicial.txt +33 -0
  46. package/content/prompts/requisitos/refinar-requisitos.md +232 -0
  47. package/content/prompts/requisitos/refinar-requisitos.txt +40 -0
  48. package/content/prompts/seguranca/analise-seguranca.md +243 -0
  49. package/content/prompts/seguranca/pentest-checklist.md +333 -0
  50. package/content/prompts/seguranca/rate-limiting.md +356 -0
  51. package/content/prompts/seguranca/revisao-lgpd.md +227 -0
  52. package/content/prompts/seguranca/threat-modeling.md +224 -0
  53. package/content/prompts/testes/contract-testing.md +340 -0
  54. package/content/prompts/testes/gerar-testes-unitarios.md +474 -0
  55. package/content/prompts/testes/testes-e2e.md +460 -0
  56. package/content/prompts/testes/testes-integracao.md +418 -0
  57. package/content/prompts/testes/testes-performance.md +458 -0
  58. package/content/prompts/ux/gerar-ui-stitch.md +151 -0
  59. package/content/skills/api-patterns/SKILL.md +81 -0
  60. package/content/skills/api-patterns/api-style.md +42 -0
  61. package/content/skills/api-patterns/auth.md +24 -0
  62. package/content/skills/api-patterns/documentation.md +26 -0
  63. package/content/skills/api-patterns/graphql.md +41 -0
  64. package/content/skills/api-patterns/rate-limiting.md +31 -0
  65. package/content/skills/api-patterns/response.md +37 -0
  66. package/content/skills/api-patterns/rest.md +40 -0
  67. package/content/skills/api-patterns/scripts/api_validator.py +211 -0
  68. package/content/skills/api-patterns/security-testing.md +122 -0
  69. package/content/skills/api-patterns/trpc.md +41 -0
  70. package/content/skills/api-patterns/versioning.md +22 -0
  71. package/content/skills/app-builder/SKILL.md +75 -0
  72. package/content/skills/app-builder/agent-coordination.md +71 -0
  73. package/content/skills/app-builder/feature-building.md +53 -0
  74. package/content/skills/app-builder/project-detection.md +34 -0
  75. package/content/skills/app-builder/scaffolding.md +118 -0
  76. package/content/skills/app-builder/tech-stack.md +40 -0
  77. package/content/skills/app-builder/templates/SKILL.md +39 -0
  78. package/content/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  79. package/content/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  80. package/content/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  81. package/content/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  82. package/content/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  83. package/content/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  84. package/content/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  85. package/content/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
  86. package/content/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  87. package/content/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  88. package/content/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
  89. package/content/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  90. package/content/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  91. package/content/skills/architecture/SKILL.md +55 -0
  92. package/content/skills/architecture/context-discovery.md +43 -0
  93. package/content/skills/architecture/examples.md +94 -0
  94. package/content/skills/architecture/pattern-selection.md +68 -0
  95. package/content/skills/architecture/patterns-reference.md +50 -0
  96. package/content/skills/architecture/trade-off-analysis.md +77 -0
  97. package/content/skills/bash-linux/SKILL.md +199 -0
  98. package/content/skills/behavioral-modes/SKILL.md +242 -0
  99. package/content/skills/brainstorming/SKILL.md +163 -0
  100. package/content/skills/brainstorming/dynamic-questioning.md +350 -0
  101. package/content/skills/clean-code/SKILL.md +201 -0
  102. package/content/skills/code-review-checklist/SKILL.md +109 -0
  103. package/content/skills/database-design/SKILL.md +52 -0
  104. package/content/skills/database-design/database-selection.md +43 -0
  105. package/content/skills/database-design/indexing.md +39 -0
  106. package/content/skills/database-design/migrations.md +48 -0
  107. package/content/skills/database-design/optimization.md +36 -0
  108. package/content/skills/database-design/orm-selection.md +30 -0
  109. package/content/skills/database-design/schema-design.md +56 -0
  110. package/content/skills/database-design/scripts/schema_validator.py +172 -0
  111. package/content/skills/deployment-procedures/SKILL.md +241 -0
  112. package/content/skills/doc.md +177 -0
  113. package/content/skills/documentation-templates/SKILL.md +194 -0
  114. package/content/skills/frontend-design/SKILL.md +396 -0
  115. package/content/skills/frontend-design/animation-guide.md +331 -0
  116. package/content/skills/frontend-design/color-system.md +311 -0
  117. package/content/skills/frontend-design/decision-trees.md +418 -0
  118. package/content/skills/frontend-design/motion-graphics.md +306 -0
  119. package/content/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  120. package/content/skills/frontend-design/scripts/ux_audit.py +722 -0
  121. package/content/skills/frontend-design/typography-system.md +345 -0
  122. package/content/skills/frontend-design/ux-psychology.md +541 -0
  123. package/content/skills/frontend-design/visual-effects.md +383 -0
  124. package/content/skills/game-development/2d-games/SKILL.md +119 -0
  125. package/content/skills/game-development/3d-games/SKILL.md +135 -0
  126. package/content/skills/game-development/SKILL.md +167 -0
  127. package/content/skills/game-development/game-art/SKILL.md +185 -0
  128. package/content/skills/game-development/game-audio/SKILL.md +190 -0
  129. package/content/skills/game-development/game-design/SKILL.md +129 -0
  130. package/content/skills/game-development/mobile-games/SKILL.md +108 -0
  131. package/content/skills/game-development/multiplayer/SKILL.md +132 -0
  132. package/content/skills/game-development/pc-games/SKILL.md +144 -0
  133. package/content/skills/game-development/vr-ar/SKILL.md +123 -0
  134. package/content/skills/game-development/web-games/SKILL.md +150 -0
  135. package/content/skills/geo-fundamentals/SKILL.md +156 -0
  136. package/content/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  137. package/content/skills/i18n-localization/SKILL.md +154 -0
  138. package/content/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  139. package/content/skills/intelligent-routing/SKILL.md +334 -0
  140. package/content/skills/lint-and-validate/SKILL.md +45 -0
  141. package/content/skills/lint-and-validate/scripts/lint_runner.py +172 -0
  142. package/content/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  143. package/content/skills/mcp-builder/SKILL.md +176 -0
  144. package/content/skills/mobile-design/SKILL.md +394 -0
  145. package/content/skills/mobile-design/decision-trees.md +516 -0
  146. package/content/skills/mobile-design/mobile-backend.md +491 -0
  147. package/content/skills/mobile-design/mobile-color-system.md +420 -0
  148. package/content/skills/mobile-design/mobile-debugging.md +122 -0
  149. package/content/skills/mobile-design/mobile-design-thinking.md +357 -0
  150. package/content/skills/mobile-design/mobile-navigation.md +458 -0
  151. package/content/skills/mobile-design/mobile-performance.md +767 -0
  152. package/content/skills/mobile-design/mobile-testing.md +356 -0
  153. package/content/skills/mobile-design/mobile-typography.md +433 -0
  154. package/content/skills/mobile-design/platform-android.md +666 -0
  155. package/content/skills/mobile-design/platform-ios.md +561 -0
  156. package/content/skills/mobile-design/scripts/mobile_audit.py +670 -0
  157. package/content/skills/mobile-design/touch-psychology.md +537 -0
  158. package/content/skills/nextjs-best-practices/SKILL.md +203 -0
  159. package/content/skills/nodejs-best-practices/SKILL.md +333 -0
  160. package/content/skills/parallel-agents/SKILL.md +175 -0
  161. package/content/skills/performance-profiling/SKILL.md +143 -0
  162. package/content/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  163. package/content/skills/plan-writing/SKILL.md +152 -0
  164. package/content/skills/powershell-windows/SKILL.md +167 -0
  165. package/content/skills/python-patterns/SKILL.md +441 -0
  166. package/content/skills/react-patterns/SKILL.md +198 -0
  167. package/content/skills/red-team-tactics/SKILL.md +199 -0
  168. package/content/skills/seo-fundamentals/SKILL.md +129 -0
  169. package/content/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  170. package/content/skills/server-management/SKILL.md +161 -0
  171. package/content/skills/systematic-debugging/SKILL.md +109 -0
  172. package/content/skills/tailwind-patterns/SKILL.md +269 -0
  173. package/content/skills/tdd-workflow/SKILL.md +149 -0
  174. package/content/skills/testing-patterns/SKILL.md +178 -0
  175. package/content/skills/testing-patterns/scripts/test_runner.py +219 -0
  176. package/content/skills/vulnerability-scanner/SKILL.md +276 -0
  177. package/content/skills/vulnerability-scanner/checklists.md +121 -0
  178. package/content/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  179. package/content/skills/webapp-testing/SKILL.md +187 -0
  180. package/content/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  181. package/content/specialists/Especialista em Acessibilidade.md +266 -0
  182. package/content/specialists/Especialista em An/303/241lise de Testes.md" +434 -0
  183. package/content/specialists/Especialista em Arquitetura Avan/303/247ada.md" +358 -0
  184. package/content/specialists/Especialista em Arquitetura de Software.md +177 -0
  185. package/content/specialists/Especialista em Banco de Dados.md +260 -0
  186. package/content/specialists/Especialista em Contrato de API.md +172 -0
  187. package/content/specialists/Especialista em Dados e Analytics com IA.md +246 -0
  188. package/content/specialists/Especialista em Debugging e Troubleshooting.md +191 -0
  189. package/content/specialists/Especialista em Desenvolvimento Frontend.md +477 -0
  190. package/content/specialists/Especialista em Desenvolvimento Mobile.md +241 -0
  191. package/content/specialists/Especialista em Desenvolvimento e Vibe Coding Estruturado.md +417 -0
  192. package/content/specialists/Especialista em DevOps e Infraestrutura.md +294 -0
  193. package/content/specialists/Especialista em Documenta/303/247/303/243o T/303/251cnica.md" +227 -0
  194. package/content/specialists/Especialista em Engenharia de Requisitos com IA.md +299 -0
  195. package/content/specialists/Especialista em Explora/303/247/303/243o de Codebase.md" +179 -0
  196. package/content/specialists/Especialista em Gest/303/243o de Produto.md" +179 -0
  197. package/content/specialists/Especialista em Migra/303/247/303/243o e Moderniza/303/247/303/243o.md" +410 -0
  198. package/content/specialists/Especialista em Modelagem e Arquitetura de Dom/303/255nio com IA.md" +248 -0
  199. package/content/specialists/Especialista em Observabilidade.md +415 -0
  200. package/content/specialists/Especialista em Performance e Escalabilidade.md +373 -0
  201. package/content/specialists/Especialista em Plano de Execu/303/247/303/243o com IA.md" +341 -0
  202. package/content/specialists/Especialista em Prototipagem R/303/241pida com Google Stitch.md" +419 -0
  203. package/content/specialists/Especialista em Seguran/303/247a da Informa/303/247/303/243o.md" +508 -0
  204. package/content/specialists/Especialista em UX Design.md +453 -0
  205. package/content/specialists/INDEX.md +43 -0
  206. package/content/templates/PRD.md +165 -0
  207. package/content/templates/README.md +65 -0
  208. package/content/templates/adr.md +103 -0
  209. package/content/templates/arquitetura.md +279 -0
  210. package/content/templates/backlog.md +185 -0
  211. package/content/templates/checklist-seguranca.md +180 -0
  212. package/content/templates/contexto.md +120 -0
  213. package/content/templates/criterios-aceite.md +99 -0
  214. package/content/templates/design-banco.md +270 -0
  215. package/content/templates/design-doc.md +240 -0
  216. package/content/templates/feature.md +88 -0
  217. package/content/templates/historia-backend.md +84 -0
  218. package/content/templates/historia-frontend.md +75 -0
  219. package/content/templates/historia-usuario.md +125 -0
  220. package/content/templates/mapa-navegacao.md +133 -0
  221. package/content/templates/matriz-rastreabilidade.md +121 -0
  222. package/content/templates/modelo-dominio.md +219 -0
  223. package/content/templates/plano-testes.md +199 -0
  224. package/content/templates/prototipo-stitch.md +138 -0
  225. package/content/templates/requisitos.md +162 -0
  226. package/content/templates/slo-sli.md +197 -0
  227. package/content/workflows/README-MCP.md +363 -0
  228. package/content/workflows/brainstorm.md +113 -0
  229. package/content/workflows/create.md +59 -0
  230. package/content/workflows/debug.md +103 -0
  231. package/content/workflows/deploy.md +176 -0
  232. package/content/workflows/enhance.md +63 -0
  233. package/content/workflows/mcp-debug.md +506 -0
  234. package/content/workflows/mcp-feature.md +385 -0
  235. package/content/workflows/mcp-gate.md +413 -0
  236. package/content/workflows/mcp-next.md +388 -0
  237. package/content/workflows/mcp-refactor.md +600 -0
  238. package/content/workflows/mcp-start.md +304 -0
  239. package/content/workflows/mcp-status.md +400 -0
  240. package/content/workflows/orchestrate.md +237 -0
  241. package/content/workflows/plan.md +89 -0
  242. package/content/workflows/preview.md +81 -0
  243. package/content/workflows/status.md +86 -0
  244. package/content/workflows/test.md +144 -0
  245. package/content/workflows/ui-ux-pro-max.md +296 -0
  246. package/dist/commands/init.d.ts +6 -0
  247. package/dist/commands/init.js +138 -0
  248. package/dist/commands/update.d.ts +5 -0
  249. package/dist/commands/update.js +50 -0
  250. package/dist/index.d.ts +2 -0
  251. package/dist/index.js +21 -0
  252. package/package.json +48 -0
@@ -0,0 +1,241 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ i18n Checker - Detects hardcoded strings and missing translations.
4
+ Scans for untranslated text in React, Vue, and Python files.
5
+ """
6
+ import sys
7
+ import re
8
+ import json
9
+ from pathlib import Path
10
+
11
+ # Fix Windows console encoding for Unicode output
12
+ try:
13
+ sys.stdout.reconfigure(encoding='utf-8', errors='replace')
14
+ sys.stderr.reconfigure(encoding='utf-8', errors='replace')
15
+ except AttributeError:
16
+ pass # Python < 3.7
17
+
18
+ # Patterns that indicate hardcoded strings (should be translated)
19
+ HARDCODED_PATTERNS = {
20
+ 'jsx': [
21
+ # Text directly in JSX: <div>Hello World</div>
22
+ r'>\s*[A-Z][a-zA-Z\s]{3,30}\s*</',
23
+ # JSX attribute strings: title="Welcome"
24
+ r'(title|placeholder|label|alt|aria-label)="[A-Z][a-zA-Z\s]{2,}"',
25
+ # Button/heading text
26
+ r'<(button|h[1-6]|p|span|label)[^>]*>\s*[A-Z][a-zA-Z\s!?.,]{3,}\s*</',
27
+ ],
28
+ 'vue': [
29
+ # Vue template text
30
+ r'>\s*[A-Z][a-zA-Z\s]{3,30}\s*</',
31
+ r'(placeholder|label|title)="[A-Z][a-zA-Z\s]{2,}"',
32
+ ],
33
+ 'python': [
34
+ # print/raise with string literals
35
+ r'(print|raise\s+\w+)\s*\(\s*["\'][A-Z][^"\']{5,}["\']',
36
+ # Flask flash messages
37
+ r'flash\s*\(\s*["\'][A-Z][^"\']{5,}["\']',
38
+ ]
39
+ }
40
+
41
+ # Patterns that indicate proper i18n usage
42
+ I18N_PATTERNS = [
43
+ r't\(["\']', # t('key') - react-i18next
44
+ r'useTranslation', # React hook
45
+ r'\$t\(', # Vue i18n
46
+ r'_\(["\']', # Python gettext
47
+ r'gettext\(', # Python gettext
48
+ r'useTranslations', # next-intl
49
+ r'FormattedMessage', # react-intl
50
+ r'i18n\.', # Generic i18n
51
+ ]
52
+
53
+ def find_locale_files(project_path: Path) -> list:
54
+ """Find translation/locale files."""
55
+ patterns = [
56
+ "**/locales/**/*.json",
57
+ "**/translations/**/*.json",
58
+ "**/lang/**/*.json",
59
+ "**/i18n/**/*.json",
60
+ "**/messages/*.json",
61
+ "**/*.po", # gettext
62
+ ]
63
+
64
+ files = []
65
+ for pattern in patterns:
66
+ files.extend(project_path.glob(pattern))
67
+
68
+ return [f for f in files if 'node_modules' not in str(f)]
69
+
70
+ def check_locale_completeness(locale_files: list) -> dict:
71
+ """Check if all locales have the same keys."""
72
+ issues = []
73
+ passed = []
74
+
75
+ if not locale_files:
76
+ return {'passed': [], 'issues': ["[!] No locale files found"]}
77
+
78
+ # Group by parent folder (language)
79
+ locales = {}
80
+ for f in locale_files:
81
+ if f.suffix == '.json':
82
+ try:
83
+ lang = f.parent.name
84
+ content = json.loads(f.read_text(encoding='utf-8'))
85
+ if lang not in locales:
86
+ locales[lang] = {}
87
+ locales[lang][f.stem] = set(flatten_keys(content))
88
+ except:
89
+ continue
90
+
91
+ if len(locales) < 2:
92
+ passed.append(f"[OK] Found {len(locale_files)} locale file(s)")
93
+ return {'passed': passed, 'issues': issues}
94
+
95
+ passed.append(f"[OK] Found {len(locales)} language(s): {', '.join(locales.keys())}")
96
+
97
+ # Compare keys across locales
98
+ all_langs = list(locales.keys())
99
+ base_lang = all_langs[0]
100
+
101
+ for namespace in locales.get(base_lang, {}):
102
+ base_keys = locales[base_lang].get(namespace, set())
103
+
104
+ for lang in all_langs[1:]:
105
+ other_keys = locales.get(lang, {}).get(namespace, set())
106
+
107
+ missing = base_keys - other_keys
108
+ if missing:
109
+ issues.append(f"[X] {lang}/{namespace}: Missing {len(missing)} keys")
110
+
111
+ extra = other_keys - base_keys
112
+ if extra:
113
+ issues.append(f"[!] {lang}/{namespace}: {len(extra)} extra keys")
114
+
115
+ if not issues:
116
+ passed.append("[OK] All locales have matching keys")
117
+
118
+ return {'passed': passed, 'issues': issues}
119
+
120
+ def flatten_keys(d, prefix=''):
121
+ """Flatten nested dict keys."""
122
+ keys = set()
123
+ for k, v in d.items():
124
+ new_key = f"{prefix}.{k}" if prefix else k
125
+ if isinstance(v, dict):
126
+ keys.update(flatten_keys(v, new_key))
127
+ else:
128
+ keys.add(new_key)
129
+ return keys
130
+
131
+ def check_hardcoded_strings(project_path: Path) -> dict:
132
+ """Check for hardcoded strings in code files."""
133
+ issues = []
134
+ passed = []
135
+
136
+ # Find code files
137
+ extensions = {
138
+ '.tsx': 'jsx', '.jsx': 'jsx', '.ts': 'jsx', '.js': 'jsx',
139
+ '.vue': 'vue',
140
+ '.py': 'python'
141
+ }
142
+
143
+ code_files = []
144
+ for ext in extensions:
145
+ code_files.extend(project_path.rglob(f"*{ext}"))
146
+
147
+ code_files = [f for f in code_files if not any(x in str(f) for x in
148
+ ['node_modules', '.git', 'dist', 'build', '__pycache__', 'venv', 'test', 'spec'])]
149
+
150
+ if not code_files:
151
+ return {'passed': ["[!] No code files found"], 'issues': []}
152
+
153
+ files_with_i18n = 0
154
+ files_with_hardcoded = 0
155
+ hardcoded_examples = []
156
+
157
+ for file_path in code_files[:50]: # Limit
158
+ try:
159
+ content = file_path.read_text(encoding='utf-8', errors='ignore')
160
+ ext = file_path.suffix
161
+ file_type = extensions.get(ext, 'jsx')
162
+
163
+ # Check for i18n usage
164
+ has_i18n = any(re.search(p, content) for p in I18N_PATTERNS)
165
+ if has_i18n:
166
+ files_with_i18n += 1
167
+
168
+ # Check for hardcoded strings
169
+ patterns = HARDCODED_PATTERNS.get(file_type, [])
170
+ hardcoded_found = False
171
+
172
+ for pattern in patterns:
173
+ matches = re.findall(pattern, content)
174
+ if matches and not has_i18n:
175
+ hardcoded_found = True
176
+ if len(hardcoded_examples) < 5:
177
+ hardcoded_examples.append(f"{file_path.name}: {str(matches[0])[:40]}...")
178
+
179
+ if hardcoded_found:
180
+ files_with_hardcoded += 1
181
+
182
+ except:
183
+ continue
184
+
185
+ passed.append(f"[OK] Analyzed {len(code_files)} code files")
186
+
187
+ if files_with_i18n > 0:
188
+ passed.append(f"[OK] {files_with_i18n} files use i18n")
189
+
190
+ if files_with_hardcoded > 0:
191
+ issues.append(f"[X] {files_with_hardcoded} files may have hardcoded strings")
192
+ for ex in hardcoded_examples:
193
+ issues.append(f" → {ex}")
194
+ else:
195
+ passed.append("[OK] No obvious hardcoded strings detected")
196
+
197
+ return {'passed': passed, 'issues': issues}
198
+
199
+ def main():
200
+ target = sys.argv[1] if len(sys.argv) > 1 else "."
201
+ project_path = Path(target)
202
+
203
+ print("\n" + "=" * 60)
204
+ print(" i18n CHECKER - Internationalization Audit")
205
+ print("=" * 60 + "\n")
206
+
207
+ # Check locale files
208
+ locale_files = find_locale_files(project_path)
209
+ locale_result = check_locale_completeness(locale_files)
210
+
211
+ # Check hardcoded strings
212
+ code_result = check_hardcoded_strings(project_path)
213
+
214
+ # Print results
215
+ print("[LOCALE FILES]")
216
+ print("-" * 40)
217
+ for item in locale_result['passed']:
218
+ print(f" {item}")
219
+ for item in locale_result['issues']:
220
+ print(f" {item}")
221
+
222
+ print("\n[CODE ANALYSIS]")
223
+ print("-" * 40)
224
+ for item in code_result['passed']:
225
+ print(f" {item}")
226
+ for item in code_result['issues']:
227
+ print(f" {item}")
228
+
229
+ # Summary
230
+ critical_issues = sum(1 for i in locale_result['issues'] + code_result['issues'] if i.startswith("[X]"))
231
+
232
+ print("\n" + "=" * 60)
233
+ if critical_issues == 0:
234
+ print("[OK] i18n CHECK: PASSED")
235
+ sys.exit(0)
236
+ else:
237
+ print(f"[X] i18n CHECK: {critical_issues} issues found")
238
+ sys.exit(1)
239
+
240
+ if __name__ == "__main__":
241
+ main()
@@ -0,0 +1,334 @@
1
+ ---
2
+ name: intelligent-routing
3
+ description: Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Intelligent Agent Routing
8
+
9
+ **Purpose**: Automatically analyze user requests and route them to the most appropriate specialist agent(s) without requiring explicit user mentions.
10
+
11
+ ## Core Principle
12
+
13
+ > **The AI should act as an intelligent Project Manager**, analyzing each request and automatically selecting the best specialist(s) for the job.
14
+
15
+ ## How It Works
16
+
17
+ ### 1. Request Analysis
18
+
19
+ Before responding to ANY user request, perform automatic analysis:
20
+
21
+ ```mermaid
22
+ graph TD
23
+ A[User Request: Add login] --> B[ANALYZE]
24
+ B --> C[Keywords]
25
+ B --> D[Domains]
26
+ B --> E[Complexity]
27
+ C --> F[SELECT AGENT]
28
+ D --> F
29
+ E --> F
30
+ F --> G[security-auditor + backend-specialist]
31
+ G --> H[AUTO-INVOKE with context]
32
+ ```
33
+
34
+ ### 2. Agent Selection Matrix
35
+
36
+ **Use this matrix to automatically select agents:**
37
+
38
+ | User Intent | Keywords | Selected Agent(s) | Auto-invoke? |
39
+ | ------------------- | ------------------------------------------ | ------------------------------------------- | ------------ |
40
+ | **Authentication** | "login", "auth", "signup", "password" | `security-auditor` + `backend-specialist` | ✅ YES |
41
+ | **UI Component** | "button", "card", "layout", "style" | `frontend-specialist` | ✅ YES |
42
+ | **Mobile UI** | "screen", "navigation", "touch", "gesture" | `mobile-developer` | ✅ YES |
43
+ | **API Endpoint** | "endpoint", "route", "API", "POST", "GET" | `backend-specialist` | ✅ YES |
44
+ | **Database** | "schema", "migration", "query", "table" | `database-architect` + `backend-specialist` | ✅ YES |
45
+ | **Bug Fix** | "error", "bug", "not working", "broken" | `debugger` | ✅ YES |
46
+ | **Test** | "test", "coverage", "unit", "e2e" | `test-engineer` | ✅ YES |
47
+ | **Deployment** | "deploy", "production", "CI/CD", "docker" | `devops-engineer` | ✅ YES |
48
+ | **Security Review** | "security", "vulnerability", "exploit" | `security-auditor` + `penetration-tester` | ✅ YES |
49
+ | **Performance** | "slow", "optimize", "performance", "speed" | `performance-optimizer` | ✅ YES |
50
+ | **New Feature** | "build", "create", "implement", "new app" | `orchestrator` → multi-agent | ⚠️ ASK FIRST |
51
+ | **Complex Task** | Multiple domains detected | `orchestrator` → multi-agent | ⚠️ ASK FIRST |
52
+
53
+ ### 3. Automatic Routing Protocol
54
+
55
+ ## TIER 0 - Automatic Analysis (ALWAYS ACTIVE)
56
+
57
+ Before responding to ANY request:
58
+
59
+ ```javascript
60
+ // Pseudo-code for decision tree
61
+ function analyzeRequest(userMessage) {
62
+ // 1. Classify request type
63
+ const requestType = classifyRequest(userMessage);
64
+
65
+ // 2. Detect domains
66
+ const domains = detectDomains(userMessage);
67
+
68
+ // 3. Determine complexity
69
+ const complexity = assessComplexity(domains);
70
+
71
+ // 4. Select agent(s)
72
+ if (complexity === "SIMPLE" && domains.length === 1) {
73
+ return selectSingleAgent(domains[0]);
74
+ } else if (complexity === "MODERATE" && domains.length <= 2) {
75
+ return selectMultipleAgents(domains);
76
+ } else {
77
+ return "orchestrator"; // Complex task
78
+ }
79
+ }
80
+ ```
81
+
82
+ ## 4. Response Format
83
+
84
+ **When auto-selecting an agent, inform the user concisely:**
85
+
86
+ ```markdown
87
+ 🤖 **Applying knowledge of `@security-auditor` + `@backend-specialist`...**
88
+
89
+ [Proceed with specialized response]
90
+ ```
91
+
92
+ **Benefits:**
93
+
94
+ - ✅ User sees which expertise is being applied
95
+ - ✅ Transparent decision-making
96
+ - ✅ Still automatic (no /commands needed)
97
+
98
+ ## Domain Detection Rules
99
+
100
+ ### Single-Domain Tasks (Auto-invoke Single Agent)
101
+
102
+ | Domain | Patterns | Agent |
103
+ | --------------- | ------------------------------------------ | ----------------------- |
104
+ | **Security** | auth, login, jwt, password, hash, token | `security-auditor` |
105
+ | **Frontend** | component, react, vue, css, html, tailwind | `frontend-specialist` |
106
+ | **Backend** | api, server, express, fastapi, node | `backend-specialist` |
107
+ | **Mobile** | react native, flutter, ios, android, expo | `mobile-developer` |
108
+ | **Database** | prisma, sql, mongodb, schema, migration | `database-architect` |
109
+ | **Testing** | test, jest, vitest, playwright, cypress | `test-engineer` |
110
+ | **DevOps** | docker, kubernetes, ci/cd, pm2, nginx | `devops-engineer` |
111
+ | **Debug** | error, bug, crash, not working, issue | `debugger` |
112
+ | **Performance** | slow, lag, optimize, cache, performance | `performance-optimizer` |
113
+ | **SEO** | seo, meta, analytics, sitemap, robots | `seo-specialist` |
114
+ | **Game** | unity, godot, phaser, game, multiplayer | `game-developer` |
115
+
116
+ ### Multi-Domain Tasks (Auto-invoke Orchestrator)
117
+
118
+ If request matches **2+ domains from different categories**, automatically use `orchestrator`:
119
+
120
+ ```text
121
+ Example: "Create a secure login system with dark mode UI"
122
+ → Detected: Security + Frontend
123
+ → Auto-invoke: orchestrator
124
+ → Orchestrator will handle: security-auditor, frontend-specialist, test-engineer
125
+ ```
126
+
127
+ ## Complexity Assessment
128
+
129
+ ### SIMPLE (Direct agent invocation)
130
+
131
+ - Single file edit
132
+ - Clear, specific task
133
+ - One domain only
134
+ - Example: "Fix the login button style"
135
+
136
+ **Action**: Auto-invoke respective agent
137
+
138
+ ### MODERATE (2-3 agents)
139
+
140
+ - 2-3 files affected
141
+ - Clear requirements
142
+ - 2 domains max
143
+ - Example: "Add API endpoint for user profile"
144
+
145
+ **Action**: Auto-invoke relevant agents sequentially
146
+
147
+ ### COMPLEX (Orchestrator required)
148
+
149
+ - Multiple files/domains
150
+ - Architectural decisions needed
151
+ - Unclear requirements
152
+ - Example: "Build a social media app"
153
+
154
+ **Action**: Auto-invoke `orchestrator` → will ask Socratic questions
155
+
156
+ ## Implementation Rules
157
+
158
+ ### Rule 1: Silent Analysis
159
+
160
+ #### DO NOT announce "I'm analyzing your request..."
161
+
162
+ - ✅ Analyze silently
163
+ - ✅ Inform which agent is being applied
164
+ - ❌ Avoid verbose meta-commentary
165
+
166
+ ### Rule 2: Inform Agent Selection
167
+
168
+ **DO inform which expertise is being applied:**
169
+
170
+ ```markdown
171
+ 🤖 **Applying knowledge of `@frontend-specialist`...**
172
+
173
+ I will create the component with the following characteristics:
174
+ [Continue with specialized response]
175
+ ```
176
+
177
+ ### Rule 3: Seamless Experience
178
+
179
+ **The user should not notice a difference from talking to the right specialist directly.**
180
+
181
+ ### Rule 4: Override Capability
182
+
183
+ **User can still explicitly mention agents:**
184
+
185
+ ```text
186
+ User: "Use @backend-specialist to review this"
187
+ → Override auto-selection
188
+ → Use explicitly mentioned agent
189
+ ```
190
+
191
+ ## Edge Cases
192
+
193
+ ### Case 1: Generic Question
194
+
195
+ ```text
196
+ User: "How does React work?"
197
+ → Type: QUESTION
198
+ → No agent needed
199
+ → Respond directly with explanation
200
+ ```
201
+
202
+ ### Case 2: Extremely Vague Request
203
+
204
+ ```text
205
+ User: "Make it better"
206
+ → Complexity: UNCLEAR
207
+ → Action: Ask clarifying questions first
208
+ → Then route to appropriate agent
209
+ ```
210
+
211
+ ### Case 3: Contradictory Patterns
212
+
213
+ ```text
214
+ User: "Add mobile support to the web app"
215
+ → Conflict: mobile vs web
216
+ → Action: Ask: "Do you want responsive web or native mobile app?"
217
+ → Then route accordingly
218
+ ```
219
+
220
+ ## Integration with Existing Workflows
221
+
222
+ ### With /orchestrate Command
223
+
224
+ - **User types `/orchestrate`**: Explicit orchestration mode
225
+ - **AI detects complex task**: Auto-invoke orchestrator (same result)
226
+
227
+ **Difference**: User doesn't need to know the command exists.
228
+
229
+ ### With Socratic Gate
230
+
231
+ - **Auto-routing does NOT bypass Socratic Gate**
232
+ - If task is unclear, still ask questions first
233
+ - Then route to appropriate agent
234
+
235
+ ### With GEMINI.md Rules
236
+
237
+ - **Priority**: GEMINI.md rules > intelligent-routing
238
+ - If GEMINI.md specifies explicit routing, follow it
239
+ - Intelligent routing is the DEFAULT when no explicit rule exists
240
+
241
+ ## Testing the System
242
+
243
+ ### Test Cases
244
+
245
+ #### Test 1: Simple Frontend Task
246
+
247
+ ```text
248
+ User: "Create a dark mode toggle button"
249
+ Expected: Auto-invoke frontend-specialist
250
+ Verify: Response shows "Using @frontend-specialist"
251
+ ```
252
+
253
+ #### Test 2: Security Task
254
+
255
+ ```text
256
+ User: "Review the authentication flow for vulnerabilities"
257
+ Expected: Auto-invoke security-auditor
258
+ Verify: Security-focused analysis
259
+ ```
260
+
261
+ #### Test 3: Complex Multi-Domain
262
+
263
+ ```text
264
+ User: "Build a chat application with real-time notifications"
265
+ Expected: Auto-invoke orchestrator
266
+ Verify: Multiple agents coordinated (backend, frontend, test)
267
+ ```
268
+
269
+ #### Test 4: Bug Fix
270
+
271
+ ```text
272
+ User: "Login is not working, getting 401 error"
273
+ Expected: Auto-invoke debugger
274
+ Verify: Systematic debugging approach
275
+ ```
276
+
277
+ ## Performance Considerations
278
+
279
+ ### Token Usage
280
+
281
+ - Analysis adds ~50-100 tokens per request
282
+ - Tradeoff: Better accuracy vs slight overhead
283
+ - Overall SAVES tokens by reducing back-and-forth
284
+
285
+ ### Response Time
286
+
287
+ - Analysis is instant (pattern matching)
288
+ - No additional API calls required
289
+ - Agent selection happens before first response
290
+
291
+ ## User Education
292
+
293
+ ### Optional: First-Time Explanation
294
+
295
+ If this is the first interaction in a project:
296
+
297
+ ```markdown
298
+ 💡 **Tip**: I am configured with automatic specialist agent selection.
299
+ I will always choose the most suitable specialist for your task. You can
300
+ still mention agents explicitly with `@agent-name` if you prefer.
301
+ ```
302
+
303
+ ## Debugging Agent Selection
304
+
305
+ ### Enable Debug Mode (for development)
306
+
307
+ Add to GEMINI.md temporarily:
308
+
309
+ ```markdown
310
+ ## DEBUG: Intelligent Routing
311
+
312
+ Show selection reasoning:
313
+
314
+ - Detected domains: [list]
315
+ - Selected agent: [name]
316
+ - Reasoning: [why]
317
+ ```
318
+
319
+ ## Summary
320
+
321
+ **intelligent-routing skill enables:**
322
+
323
+ ✅ Zero-command operation (no need for `/orchestrate`)
324
+ ✅ Automatic specialist selection based on request analysis
325
+ ✅ Transparent communication of which expertise is being applied
326
+ ✅ Seamless integration with existing workflows
327
+ ✅ Override capability for explicit agent mentions
328
+ ✅ Fallback to orchestrator for complex tasks
329
+
330
+ **Result**: User gets specialist-level responses without needing to know the system architecture.
331
+
332
+ ---
333
+
334
+ **Next Steps**: Integrate this skill into GEMINI.md TIER 0 rules.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: lint-and-validate
3
+ description: Automatic quality control, linting, and static analysis procedures. Use after every code modification to ensure syntax correctness and project standards. Triggers onKeywords: lint, format, check, validate, types, static analysis.
4
+ allowed-tools: Read, Glob, Grep, Bash
5
+ ---
6
+
7
+ # Lint and Validate Skill
8
+
9
+ > **MANDATORY:** Run appropriate validation tools after EVERY code change. Do not finish a task until the code is error-free.
10
+
11
+ ### Procedures by Ecosystem
12
+
13
+ #### Node.js / TypeScript
14
+ 1. **Lint/Fix:** `npm run lint` or `npx eslint "path" --fix`
15
+ 2. **Types:** `npx tsc --noEmit`
16
+ 3. **Security:** `npm audit --audit-level=high`
17
+
18
+ #### Python
19
+ 1. **Linter (Ruff):** `ruff check "path" --fix` (Fast & Modern)
20
+ 2. **Security (Bandit):** `bandit -r "path" -ll`
21
+ 3. **Types (MyPy):** `mypy "path"`
22
+
23
+ ## The Quality Loop
24
+ 1. **Write/Edit Code**
25
+ 2. **Run Audit:** `npm run lint && npx tsc --noEmit`
26
+ 3. **Analyze Report:** Check the "FINAL AUDIT REPORT" section.
27
+ 4. **Fix & Repeat:** Submitting code with "FINAL AUDIT" failures is NOT allowed.
28
+
29
+ ## Error Handling
30
+ - If `lint` fails: Fix the style or syntax issues immediately.
31
+ - If `tsc` fails: Correct type mismatches before proceeding.
32
+ - If no tool is configured: Check the project root for `.eslintrc`, `tsconfig.json`, `pyproject.toml` and suggest creating one.
33
+
34
+ ---
35
+ **Strict Rule:** No code should be committed or reported as "done" without passing these checks.
36
+
37
+ ---
38
+
39
+ ## Scripts
40
+
41
+ | Script | Purpose | Command |
42
+ |--------|---------|---------|
43
+ | `scripts/lint_runner.py` | Unified lint check | `python scripts/lint_runner.py <project_path>` |
44
+ | `scripts/type_coverage.py` | Type coverage analysis | `python scripts/type_coverage.py <project_path>` |
45
+