jarvis-ai-framework 2.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/AGENTS.md +14 -115
  2. package/agents/AGENTS.md +11 -23
  3. package/agents/README.md +27 -129
  4. package/agents/engineering/data/eng.data-engineer.agent.md +11 -34
  5. package/agents/engineering/eng.advisor.agent.md +56 -0
  6. package/agents/engineering/eng.agent.md +14 -24
  7. package/agents/engineering/eng.bug-hunter.md +7 -15
  8. package/agents/engineering/eng.dev-code-reviewer.md +1 -1
  9. package/agents/engineering/eng.frontend.agent.md +3 -7
  10. package/agents/engineering/eng.rpa.agent.md +2 -8
  11. package/agents/engineering/qa/eng.qa.quality-strategist.md +6 -11
  12. package/agents/engineering/qa/eng.qa.test-architect.md +8 -18
  13. package/agents/engineering/qa/eng.qa.test-planner.md +10 -14
  14. package/agents/engineering/qa/eng.qa.testing-engineer.md +91 -24
  15. package/agents/product/prod.discovery-interviewer.md +3 -3
  16. package/bin/README.md +142 -0
  17. package/bin/commands/docs-publish.js +105 -141
  18. package/bin/commands/docs-sync.js +66 -104
  19. package/bin/commands/info.js +7 -27
  20. package/bin/commands/init.js +23 -51
  21. package/bin/commands/install-rtk.js +9 -3
  22. package/bin/commands/list.js +5 -18
  23. package/bin/commands/map.js +20 -5
  24. package/bin/commands/qa-signoff.js +58 -55
  25. package/bin/commands/tokens.js +14 -17
  26. package/bin/commands/whoami.js +30 -26
  27. package/bin/jarvis.js +9 -163
  28. package/bin/lib/auth/session.js +20 -20
  29. package/bin/lib/cli/program.js +219 -0
  30. package/bin/lib/cli/shared-options.js +29 -0
  31. package/bin/lib/config/constants.js +59 -2
  32. package/bin/lib/config/ide-config.js +4 -8
  33. package/bin/lib/core/profile-filter.js +4 -1
  34. package/bin/lib/core/scanner.js +3 -29
  35. package/bin/lib/core/sync-engine.js +21 -14
  36. package/bin/lib/core/token-report.js +12 -2
  37. package/bin/lib/docs/fetch-file.js +39 -0
  38. package/bin/lib/docs/publish-file.js +194 -0
  39. package/bin/lib/docs/redis-cache.js +49 -0
  40. package/bin/lib/docs/validate-frontmatter.js +9 -39
  41. package/bin/lib/env-loader.js +11 -34
  42. package/bin/lib/flow-map/parse.js +11 -5
  43. package/bin/lib/flow-map/render.js +5 -2
  44. package/bin/lib/flow-map/tree.js +59 -10
  45. package/bin/lib/tasks/comment.js +40 -35
  46. package/bin/lib/utils/frontmatter.js +57 -0
  47. package/bin/lib/utils/git-parser.js +4 -6
  48. package/bin/lib/utils/npmrc-parser.js +6 -13
  49. package/bin/lib/utils/paths.js +2 -4
  50. package/bin/lib/utils/ui.js +3 -9
  51. package/bin/lib/vcs/api.js +25 -41
  52. package/bin/lib/vcs/create-issue.js +49 -33
  53. package/bin/lib/vcs/create-merge.js +47 -31
  54. package/bin/lib/vcs/fetch-raw.js +35 -23
  55. package/package.json +14 -5
  56. package/rules/engineering/eng-rules.md +1 -1
  57. package/rules/engineering/eng-security-rules.md +18 -16
  58. package/rules/engineering/eng.bump-rules.md +3 -2
  59. package/rules/engineering/eng.docs-scraping-rules.md +4 -4
  60. package/rules/engineering/eng.integrations-rules.md +6 -4
  61. package/rules/engineering/eng.skills-rules.md +1 -1
  62. package/rules/engineering/eng.specializations-rules.md +18 -4
  63. package/rules/engineering/frontend/eng.frontend-rules.md +1 -4
  64. package/rules/engineering/qa/eng.qa.cypress-standards-rules.md +1 -1
  65. package/rules/engineering/rpa/eng.rpa-rules.md +4 -9
  66. package/rules-on-demand/engineering/eng.pre-pr-rules.md +1 -1
  67. package/rules-on-demand/engineering/eng.start-rules.md +2 -0
  68. package/skills/AGENTS.md +52 -87
  69. package/skills/SKILLS-ROADMAP.md +47 -128
  70. package/skills/eng-ai/SKILL.md +270 -0
  71. package/skills/eng-ai/references/1-fundamentos-ml.md +24 -0
  72. package/skills/eng-ai/references/10-arquitetura-solucoes-ia.md +24 -0
  73. package/skills/eng-ai/references/11-governanca-ia.md +24 -0
  74. package/skills/eng-ai/references/12-seguranca-ia-responsavel.md +25 -0
  75. package/skills/eng-ai/references/2-matematica-estatistica.md +24 -0
  76. package/skills/eng-ai/references/3-dados-para-ia.md +24 -0
  77. package/skills/eng-ai/references/4-deep-learning-fundacionais.md +24 -0
  78. package/skills/eng-ai/references/5-llms-chatbots-agentes-rag.md +25 -0
  79. package/skills/eng-ai/references/6-avaliacao-experimentacao.md +24 -0
  80. package/skills/eng-ai/references/7-engenharia-sistemas-ia.md +24 -0
  81. package/skills/eng-ai/references/8-mlops-plataforma.md +24 -0
  82. package/skills/eng-ai/references/9-produto-ia.md +24 -0
  83. package/skills/eng-ai/references/especializacoes.md +17 -0
  84. package/skills/eng-automation/SKILL.md +290 -0
  85. package/skills/eng-automation/references/1-fundamentos-automacao.md +25 -0
  86. package/skills/eng-automation/references/10-ingestao-dados.md +25 -0
  87. package/skills/eng-automation/references/11-captcha-antibot.md +25 -0
  88. package/skills/eng-automation/references/12-limites-taxa-sessoes.md +25 -0
  89. package/skills/eng-automation/references/13-agendamento-orquestracao.md +24 -0
  90. package/skills/eng-automation/references/14-retentativa-erros.md +25 -0
  91. package/skills/eng-automation/references/15-autenticacao-credenciais.md +24 -0
  92. package/skills/eng-automation/references/16-observabilidade-confiabilidade.md +24 -0
  93. package/skills/eng-automation/references/2-aquisicao-dados.md +25 -0
  94. package/skills/eng-automation/references/3-automacao-navegador.md +24 -0
  95. package/skills/eng-automation/references/4-scraping-crawling.md +25 -0
  96. package/skills/eng-automation/references/5-apis-rest-graphql-soap.md +26 -0
  97. package/skills/eng-automation/references/6-webhooks-integracao.md +25 -0
  98. package/skills/eng-automation/references/7-rpa.md +25 -0
  99. package/skills/eng-automation/references/8-extracao-estruturada.md +25 -0
  100. package/skills/eng-automation/references/9-extracao-documentos.md +25 -0
  101. package/skills/eng-automation/references/especializacoes.md +18 -0
  102. package/skills/eng-backend-nestjs/SKILL.md +1 -1
  103. package/skills/eng-data/SKILL.md +271 -0
  104. package/skills/eng-data/references/1-fundamentos-dados.md +24 -0
  105. package/skills/eng-data/references/10-ciencia-dados.md +24 -0
  106. package/skills/eng-data/references/11-dataops-plataforma.md +24 -0
  107. package/skills/eng-data/references/12-seguranca-privacidade.md +24 -0
  108. package/skills/eng-data/references/2-modelagem-dados.md +24 -0
  109. package/skills/eng-data/references/3-bancos-dados.md +24 -0
  110. package/skills/eng-data/references/4-arquitetura-dados.md +24 -0
  111. package/skills/eng-data/references/5-pipelines-integracao.md +24 -0
  112. package/skills/eng-data/references/6-qualidade-dados.md +24 -0
  113. package/skills/eng-data/references/7-governanca-metadados.md +24 -0
  114. package/skills/eng-data/references/8-estatistica-analise.md +24 -0
  115. package/skills/eng-data/references/9-analytics-bi.md +24 -0
  116. package/skills/eng-data/references/especializacoes.md +20 -0
  117. package/skills/eng-frontend/SKILL.md +12 -5
  118. package/skills/eng-frontend/references/13-design-system.md +48 -0
  119. package/skills/eng-frontend/references/14-microfrontend.md +46 -0
  120. package/skills/eng-global-task-comment/SKILL.md +3 -3
  121. package/skills/eng-platform/SKILL.md +331 -0
  122. package/skills/eng-platform/references/1-fundamentos-sistemas.md +23 -0
  123. package/skills/eng-platform/references/10-resiliencia-arquitetura.md +24 -0
  124. package/skills/eng-platform/references/11-plataforma-devex.md +24 -0
  125. package/skills/eng-platform/references/12-finops-custos.md +24 -0
  126. package/skills/eng-platform/references/13-seguranca-fundamentos.md +26 -0
  127. package/skills/eng-platform/references/14-profiling-performance.md +23 -0
  128. package/skills/eng-platform/references/15-testes-carga-chaos.md +23 -0
  129. package/skills/eng-platform/references/16-cache-multicamada.md +22 -0
  130. package/skills/eng-platform/references/2-redes.md +23 -0
  131. package/skills/eng-platform/references/3-cloud.md +24 -0
  132. package/skills/eng-platform/references/4-iac-automacao.md +24 -0
  133. package/skills/eng-platform/references/5-containers-orquestracao.md +25 -0
  134. package/skills/eng-platform/references/6-cicd-entrega.md +24 -0
  135. package/skills/eng-platform/references/7-observabilidade.md +24 -0
  136. package/skills/eng-platform/references/8-confiabilidade-sre.md +24 -0
  137. package/skills/eng-platform/references/9-seguranca-infra.md +26 -0
  138. package/skills/eng-platform/references/especializacoes.md +34 -0
  139. package/skills/eng-qa/SKILL.md +283 -0
  140. package/skills/eng-qa/references/1-fundamentos-qualidade.md +25 -0
  141. package/skills/eng-qa/references/10-confiabilidade.md +25 -0
  142. package/skills/eng-qa/references/11-seguranca.md +24 -0
  143. package/skills/eng-qa/references/12-acessibilidade.md +24 -0
  144. package/skills/eng-qa/references/13-dados-testes.md +24 -0
  145. package/skills/eng-qa/references/14-gestao-testes-defeitos.md +25 -0
  146. package/skills/eng-qa/references/15-arquitetura-qa.md +25 -0
  147. package/skills/eng-qa/references/2-estrategia-planejamento.md +25 -0
  148. package/skills/eng-qa/references/3-design-testes.md +25 -0
  149. package/skills/eng-qa/references/4-manual-exploratorio.md +24 -0
  150. package/skills/eng-qa/references/5-automacao-testes.md +25 -0
  151. package/skills/eng-qa/references/6-api-integracao.md +25 -0
  152. package/skills/eng-qa/references/7-contrato.md +24 -0
  153. package/skills/eng-qa/references/8-interface-compat-mobile.md +24 -0
  154. package/skills/eng-qa/references/9-performance.md +24 -0
  155. package/skills/eng-qa/references/especializacoes.md +29 -0
  156. package/skills/eng-qa-planner/SKILL.md +264 -0
  157. package/skills/jarvis-context-detect/SKILL.md +1 -1
  158. package/skills/jarvis-context-detect/assets/context-profile-template.md +1 -1
  159. package/skills/jarvis-create-specialization/SKILL.md +8 -0
  160. package/skills/jarvis-docs-central/README.md +31 -28
  161. package/skills/jarvis-docs-central/SKILL.md +5 -5
  162. package/skills/jarvis-init/SKILL.md +9 -8
  163. package/skills/jarvis-init/assets/passo-adicionar-stacks.md +47 -18
  164. package/skills/jarvis-list-specializations/SKILL.md +30 -17
  165. package/skills/jarvis-report-issue/SKILL.md +1 -1
  166. package/taxonomy.md +4 -16
  167. package/templates/AGENTS.md +2 -0
  168. package/templates/ENV-template.md +20 -2
  169. package/templates/engineering/advisor-template.md +65 -0
  170. package/templates/engineering/architecture-template.md +52 -4
  171. package/templates/engineering/qa/qa.sprint-plan-template.md +1 -1
  172. package/workflows/AGENTS.md +3 -1
  173. package/workflows/README.md +0 -10
  174. package/workflows/engineering/data/data.new-pipeline.md +6 -5
  175. package/workflows/engineering/eng.bug-audit.md +4 -14
  176. package/workflows/engineering/eng.debug.md +4 -20
  177. package/workflows/engineering/eng.plan.md +4 -26
  178. package/workflows/engineering/eng.pr.md +13 -63
  179. package/workflows/engineering/eng.pre-pr.md +14 -51
  180. package/workflows/engineering/eng.review.md +7 -13
  181. package/workflows/engineering/eng.rpa.robot.md +3 -9
  182. package/workflows/engineering/eng.start.md +37 -32
  183. package/workflows/engineering/eng.work.md +17 -40
  184. package/workflows/engineering/qa/eng.qa-sprint-planning.md +1 -1
  185. package/workflows/product/prod.spec.discovery.md +2 -2
  186. package/workflows/warm-up.md +35 -63
  187. package/agents/engineering/eng.cybersecurity.agent.md +0 -486
  188. package/agents/engineering/qa/eng.qa.cypress-specialist.md +0 -112
  189. package/bin/lib/docs/fetch-file.sh +0 -41
  190. package/bin/lib/docs/publish-file.sh +0 -284
  191. package/rules/engineering/qa/eng.qa.exploratory-session-rules.md +0 -137
  192. package/rules/engineering/qa/eng.qa.quality-gate-scoring-rules.md +0 -181
  193. package/rules/engineering/qa/eng.qa.tech-spec-validation-criteria-rules.md +0 -120
  194. package/skills/eng-ai-engineer/SKILL.md +0 -303
  195. package/skills/eng-data-bi/SKILL.md +0 -206
  196. package/skills/eng-data-debug/SKILL.md +0 -314
  197. package/skills/eng-data-engineer/SKILL.md +0 -266
  198. package/skills/eng-data-onboard/SKILL.md +0 -317
  199. package/skills/eng-data-orchestrator/SKILL.md +0 -433
  200. package/skills/eng-devops-performance-engineer/SKILL.md +0 -319
  201. package/skills/eng-frontend-design-system/SKILL.md +0 -155
  202. package/skills/eng-frontend-design-system/references/1-estrutura-pacote.md +0 -57
  203. package/skills/eng-frontend-design-system/references/2-tokens.md +0 -116
  204. package/skills/eng-frontend-design-system/references/3-componentes.md +0 -165
  205. package/skills/eng-frontend-design-system/references/4-storybook.md +0 -85
  206. package/skills/eng-frontend-design-system/references/5-auditoria-versionamento.md +0 -76
  207. package/skills/eng-frontend-microfrontend/SKILL.md +0 -164
  208. package/skills/eng-frontend-microfrontend/references/1-criando-remote.md +0 -109
  209. package/skills/eng-frontend-microfrontend/references/2-configurando-shell.md +0 -70
  210. package/skills/eng-frontend-microfrontend/references/3-contratos-interface.md +0 -73
  211. package/skills/eng-frontend-microfrontend/references/4-shared-dependencies.md +0 -48
  212. package/skills/eng-frontend-microfrontend/references/5-event-bus.md +0 -59
  213. package/skills/eng-frontend-microfrontend/references/6-monorepo-deploy.md +0 -77
  214. package/skills/eng-frontend-microfrontend/references/7-troubleshooting.md +0 -45
  215. package/skills/eng-global-browser-extension-builder/SKILL.md +0 -392
  216. package/skills/eng-global-jira-comment/SKILL.md +0 -27
  217. package/skills/eng-qa-a11y-audit/SKILL.md +0 -276
  218. package/skills/eng-qa-bug-report/SKILL.md +0 -877
  219. package/skills/eng-qa-bug-report/TASK_MANAGERS.md +0 -138
  220. package/skills/eng-qa-bug-report/references/1-integracao-task-managers.md +0 -148
  221. package/skills/eng-qa-bug-report/references/2-exemplos-de-uso.md +0 -46
  222. package/skills/eng-qa-bug-report/references/3-bug-to-test.md +0 -45
  223. package/skills/eng-qa-cypress-e2e/SKILL.md +0 -184
  224. package/skills/eng-qa-dev-guide/SKILL.md +0 -173
  225. package/skills/eng-qa-e2e/SKILL.md +0 -407
  226. package/skills/eng-qa-e2e-spec-writer/SKILL.md +0 -329
  227. package/skills/eng-qa-exploratory/SKILL.md +0 -196
  228. package/skills/eng-qa-gate/SKILL.md +0 -377
  229. package/skills/eng-qa-gate/assets/checklist-validacao.md +0 -291
  230. package/skills/eng-qa-graphql-contract/SKILL.md +0 -263
  231. package/skills/eng-qa-quality-report/SKILL.md +0 -419
  232. package/skills/eng-qa-test-plan/SKILL.md +0 -473
  233. package/skills/eng-qa-testsprite/SKILL.md +0 -332
  234. package/skills/eng-qa-testsprite/references/testsprite-mcp.md +0 -224
  235. package/skills/eng-qa-unit-test/SKILL.md +0 -478
  236. package/skills/eng-scraper/SKILL.md +0 -260
  237. package/skills/eng-scraper/references/1-puppeteer.md +0 -140
  238. package/skills/eng-scraper/references/2-playwright-cheerio-pdf.md +0 -82
  239. package/skills/eng-scraper/references/3-anti-bot.md +0 -94
  240. package/skills/eng-scraper/references/4-resiliencia-etl-monitoramento.md +0 -137
  241. package/skills/eng-scraper-robot-builder/SKILL.md +0 -377
  242. package/skills/eng-security-cybersecurity/SKILL.md +0 -250
  243. package/skills/eng-security-cybersecurity/references/1-owasp-top-10.md +0 -331
  244. package/skills/eng-security-cybersecurity/references/2-secrets-management.md +0 -31
  245. package/skills/eng-security-cybersecurity/references/3-input-validation.md +0 -43
  246. package/skills/eng-security-cybersecurity/references/4-compliance.md +0 -20
  247. package/skills/eng-security-patch/SKILL.md +0 -388
  248. package/skills/eng-security-threat-model/SKILL.md +0 -171
  249. package/skills/eng-security-triage/SKILL.md +0 -276
  250. package/templates/engineering/qa/eng.qa.quality-gate-examples-template.md +0 -311
  251. package/templates/engineering/qa/eng.qa.quality-gate-report-template.md +0 -249
  252. package/templates/engineering/qa/qa.cypress-test-template.md +0 -172
  253. package/templates/engineering/qa/qa.exploratory-session-template.md +0 -148
  254. package/templates/engineering/qa/qa.quality-report-template.md +0 -130
  255. package/workflows/engineering/eng.security-audit.md +0 -319
  256. package/workflows/engineering/eng.security-incident.md +0 -281
  257. package/workflows/engineering/eng.security-pipeline.md +0 -219
  258. package/workflows/engineering/eng.security-review.md +0 -241
  259. package/workflows/engineering/qa/eng.qa-dev-quality-guide.md +0 -57
  260. package/workflows/engineering/qa/eng.qa-e2e-test-generation.md +0 -57
  261. package/workflows/engineering/qa/eng.qa-exploratory-session.md +0 -68
  262. package/workflows/engineering/qa/eng.qa-quality-gate-validation.md +0 -209
  263. package/workflows/engineering/qa/eng.qa-quality-report.md +0 -85
  264. /package/skills/{eng-qa-test-plan → eng-qa-planner}/assets/test-coverage-template.md +0 -0
  265. /package/skills/{eng-qa-test-plan → eng-qa-planner}/assets/test-patterns.md +0 -0
  266. /package/templates/{CDD aplicado a Prompts.md → cdd-aplicado-a-prompts.md} +0 -0
@@ -1,473 +0,0 @@
1
- ---
2
- name: eng-qa-test-plan
3
- description: >
4
- Analisa cobertura de testes da branch atual e identifica lacunas.
5
- Trigger: Use quando precisar verificar se o código novo ou modificado possui testes adequados antes do merge.
6
- argument-hint: "[caminho-opcional]"
7
- allowed-tools: Read Grep Glob Bash mcp__TestSprite__testsprite_bootstrap mcp__TestSprite__testsprite_generate_code_summary mcp__TestSprite__testsprite_generate_frontend_test_plan mcp__TestSprite__testsprite_generate_backend_test_plan mcp__TestSprite__testsprite_generate_code_and_execute
8
- license: AGPL-3.0
9
- metadata:
10
- author: jarvis-team
11
- version: "1.0"
12
- area: qa
13
- ---
14
-
15
- # Test Planner - Análise de Cobertura de Testes
16
-
17
- Você é um especialista em planejamento de testes focado em analisar as mudanças de código na branch atual e identificar lacunas de cobertura de testes.
18
-
19
- ## Objetivo
20
-
21
- Garantir que todo código novo ou modificado possua cobertura de testes adequada antes do merge.
22
-
23
- ## Entrada
24
-
25
- - `$ARGUMENTS` - (Opcional) Caminho específico ou nome da feature para análise focada
26
-
27
- ---
28
-
29
- ## Quando Usar
30
-
31
- Use esta skill quando:
32
- - Precisar verificar cobertura de testes antes de um merge/PR
33
- - Quiser identificar lacunas de testes no código modificado
34
- - Necessitar de um plano estruturado para implementar testes faltantes
35
- - Estiver fazendo code review e precisar avaliar a cobertura de testes
36
-
37
- ---
38
-
39
- ## Padrões Críticos
40
-
41
- ### Padrão 1: Sempre analisar o diff primeiro
42
-
43
- Antes de qualquer análise, obtenha as mudanças da branch:
44
-
45
- ```bash
46
- git diff origin/main...HEAD --name-only
47
- ```
48
-
49
- ### Padrão 2: Priorizar código crítico
50
-
51
- Sempre priorize testes para:
52
- - APIs públicas e endpoints
53
- - Lógica de negócio e regras de validação
54
- - Código de autenticação/autorização
55
- - Manipulação de dados sensíveis
56
-
57
- ---
58
-
59
- ## Integração com TestSprite MCP
60
-
61
- Esta skill prioriza o uso do TestSprite MCP para geração automática de testes quando disponível.
62
-
63
- ### Verificação de Disponibilidade
64
-
65
- Para verificar se o TestSprite está disponível:
66
-
67
- 1. **Tente chamar** `testsprite_bootstrap` com parâmetros mínimos
68
- 2. **Se a tool existir e responder**: Prossiga com o Fluxo A (MCP)
69
- 3. **Se a tool não existir ou retornar erro**: Prossiga com o Fluxo B (Manual)
70
-
71
- **Erros que indicam indisponibilidade:**
72
- - `Tool not found`
73
- - `MCP server not connected`
74
- - `Connection refused`
75
- - Timeout sem resposta
76
-
77
- > ⚠️ **Importante**: Não tente reconectar ou instalar o MCP automaticamente. Se indisponível, siga direto para o Fluxo B.
78
-
79
- ### Decisão de Fluxo
80
-
81
- ```
82
- ┌─────────────────────────────────────────────────────────────┐
83
- │ │
84
- │ VERIFICAR TESTSPRITE MCP │
85
- │ │
86
- │ ┌─────────────────────────┐ │
87
- │ │ Tool testsprite_bootstrap│ │
88
- │ │ disponível? │ │
89
- │ └───────────┬─────────────┘ │
90
- │ │ │
91
- │ SIM │ NÃO │
92
- │ ↓ │ ↓ │
93
- │ FLUXO │ FLUXO │
94
- │ MCP │ MANUAL │
95
- │ (A) │ (B) │
96
- │ │
97
- └─────────────────────────────────────────────────────────────┘
98
- ```
99
-
100
- ---
101
-
102
- ## FLUXO A: TestSprite MCP (Preferencial)
103
-
104
- Se o TestSprite MCP estiver disponível, use as seguintes ferramentas:
105
-
106
- ### A.1. Detectar Tipo de Projeto
107
-
108
- ANTES de iniciar, identifique se o projeto é frontend ou backend:
109
-
110
- ```bash
111
- # Verificar indicadores de Frontend
112
- ls package.json 2>/dev/null && grep -E "(react|vue|angular|next|nuxt|svelte|vite)" package.json
113
-
114
- # Verificar indicadores de Backend
115
- ls requirements.txt 2>/dev/null || ls go.mod 2>/dev/null || ls pom.xml 2>/dev/null || ls Cargo.toml 2>/dev/null
116
- ls package.json 2>/dev/null && grep -E "(express|fastify|nest|koa|hapi)" package.json
117
- ```
118
-
119
- Critérios de Detecção:
120
-
121
- | Indicador | Tipo |
122
- |-----------|------|
123
- | `react`, `vue`, `angular`, `next`, `nuxt`, `svelte`, `vite` em package.json | Frontend |
124
- | `express`, `fastify`, `nest`, `koa`, `hapi` em package.json | Backend |
125
- | `requirements.txt`, `manage.py`, `app.py` | Backend (Python) |
126
- | `go.mod`, `main.go` | Backend (Go) |
127
- | `pom.xml`, `build.gradle` | Backend (Java) |
128
- | `Cargo.toml` | Backend (Rust) |
129
- | Pasta `src/components/`, `src/pages/`, `public/` | Frontend |
130
- | Pasta `src/controllers/`, `src/routes/`, `src/services/` | Backend |
131
-
132
- **Projetos Full-Stack:**
133
- Se o projeto contém ambos (ex: Next.js com API routes, monorepo), execute os dois fluxos:
134
- 1. `testsprite_generate_frontend_test_plan` para UI/componentes
135
- 2. `testsprite_generate_backend_test_plan` para APIs/serviços
136
-
137
- ### A.2. Detectar Porta Local
138
-
139
- Identifique a porta do projeto analisando:
140
-
141
- ```bash
142
- # Verificar em package.json (scripts de dev/start)
143
- grep -E "PORT|port|:[\d]{4}" package.json
144
-
145
- # Verificar em arquivos de configuração
146
- cat .env 2>/dev/null | grep -i port
147
- cat docker-compose.yml 2>/dev/null | grep -E "ports:|[\d]{4}:"
148
- ```
149
-
150
- Portas comuns por framework:
151
- | Framework | Porta Padrão |
152
- |-----------|-------------|
153
- | Vite/React | 5173 |
154
- | Create React App | 3000 |
155
- | Next.js | 3000 |
156
- | Vue CLI | 8080 |
157
- | Angular | 4200 |
158
- | Express/Node | 3000 |
159
- | Django | 8000 |
160
- | FastAPI | 8000 |
161
- | Spring Boot | 8080 |
162
-
163
- ### A.3. Bootstrap e Análise
164
-
165
- ```javascript
166
- // Inicializar análise do projeto com foco nas mudanças (diff)
167
- // IMPORTANTE: Ajustar 'type' e 'localPort' baseado na detecção acima
168
- testsprite_bootstrap({
169
- localPort: 5173, // ⚠️ Ajustar conforme detectado no passo A.2
170
- type: "frontend", // ⚠️ Usar "frontend" ou "backend" conforme detectado
171
- projectPath: "$PROJECT_ROOT", // ⚠️ Substituir pelo caminho absoluto do projeto
172
- testScope: "diff" // Foca apenas nas mudanças da branch
173
- })
174
- ```
175
-
176
- ### A.4. Gerar Sumário do Código
177
-
178
- ```javascript
179
- testsprite_generate_code_summary({
180
- projectRootPath: "$PROJECT_ROOT" // ⚠️ Substituir pelo caminho absoluto do projeto
181
- })
182
- ```
183
-
184
- ### A.5. Gerar Plano de Testes
185
-
186
- Para Frontend:
187
- ```javascript
188
- testsprite_generate_frontend_test_plan({
189
- projectPath: "$PROJECT_ROOT", // ⚠️ Substituir pelo caminho absoluto do projeto
190
- needLogin: true // Ajustar conforme necessidade
191
- })
192
- ```
193
-
194
- Para Backend:
195
- ```javascript
196
- testsprite_generate_backend_test_plan({
197
- projectPath: "$PROJECT_ROOT" // ⚠️ Substituir pelo caminho absoluto do projeto
198
- })
199
- ```
200
-
201
- ### A.6. Gerar e Executar Testes
202
-
203
- ```javascript
204
- testsprite_generate_code_and_execute({
205
- projectName: "$WORKSPACE", // ⚠️ Substituir pelo nome do workspace
206
- projectPath: "$PROJECT_ROOT", // ⚠️ Substituir pelo caminho absoluto do projeto
207
- testIds: [], // Vazio = todos os testes
208
- additionalInstruction: "Foco nas mudanças da branch atual"
209
- })
210
- ```
211
-
212
- ### A.7. Saída do TestSprite
213
-
214
- O TestSprite gera automaticamente:
215
- - `testsprite_tests/` - Pasta com todos os testes gerados
216
- - `TestSprite_MCP_Test_Report.md` - Relatório legível
217
- - `TestSprite_MCP_Test_Report.html` - Relatório HTML
218
- - `testsprite_tests/tmp/test_results.json` - Resultados detalhados
219
-
220
- ### A.8. Projeto sem Testes Existentes
221
-
222
- Se o projeto não possui testes, o TestSprite cria testes do zero:
223
-
224
- ```
225
- Código → Análise → PRD Normalizado + ARD + FRDs → Plano de Testes → Geração de Código → Execução
226
- ```
227
-
228
- Comportamento por `testScope`:
229
-
230
- | testScope | Projeto sem testes |
231
- |-----------|-------------------|
232
- | `"diff"` | Cria testes apenas para o código modificado na branch |
233
- | `"codebase"` | Cria testes para todo o projeto (ideal para legados) |
234
-
235
- Quando usar `codebase` em vez de `diff`:
236
- - Projeto legado sem nenhuma cobertura de testes
237
- - Refatoração grande que impacta múltiplos módulos
238
- - Primeira execução do TestSprite no projeto
239
-
240
- ```javascript
241
- // Para projetos sem testes - cobertura completa
242
- testsprite_bootstrap({
243
- localPort: 5173,
244
- type: "frontend",
245
- projectPath: "$PROJECT_ROOT", // ⚠️ Substituir pelo caminho absoluto do projeto
246
- testScope: "codebase" // ⚠️ Testa todo o projeto
247
- })
248
- ```
249
-
250
- > **Nota:** O TestSprite não depende de testes existentes. Ele analisa o código-fonte, entende a funcionalidade e gera testes baseados no comportamento esperado.
251
-
252
- ---
253
-
254
- ## FLUXO B: Análise Manual (Fallback)
255
-
256
- Se o TestSprite MCP NÃO estiver disponível, siga o fluxo manual abaixo.
257
-
258
- ### B.1. Analisar Mudanças da Branch
259
-
260
- Execute os seguintes comandos para entender o que mudou:
261
-
262
- ```bash
263
- # Listar arquivos alterados
264
- git diff origin/main...HEAD --name-only
265
-
266
- # Ver mudanças em detalhe
267
- git diff origin/main...HEAD
268
-
269
- # Histórico de commits
270
- git log origin/main..HEAD --oneline
271
- ```
272
-
273
- Foque especialmente em:
274
- - Novas funções/métodos/classes
275
- - Lógica modificada em código existente
276
- - Novos endpoints ou interfaces de API
277
- - Mudanças de configuração
278
- - Breaking changes
279
-
280
- ### B.2. Mapear Código para Testes
281
-
282
- Para cada arquivo alterado, identifique o arquivo de teste correspondente:
283
-
284
- | Padrão | Exemplo |
285
- |--------|---------|
286
- | `[filename].test.[ext]` | `user.test.ts` |
287
- | `[filename].spec.[ext]` | `user.spec.ts` |
288
- | `tests/[filename]_test.[ext]` | `tests/user_test.py` |
289
- | `__tests__/[filename].[ext]` | `__tests__/user.ts` |
290
- | `test_[filename].[ext]` | `test_user.py` |
291
-
292
- ### B.3. Analisar Cobertura Existente
293
-
294
- Para arquivos com testes existentes, verificar:
295
- - Testes para novas funções/métodos
296
- - Testes para comportamento modificado
297
- - Casos de borda da nova lógica
298
- - Tratamento de erros para novos caminhos
299
-
300
- ### B.4. Identificar Lacunas
301
-
302
- Determinar quais testes estão faltando:
303
- - Funcionalidades novas sem testes
304
- - Comportamentos modificados não refletidos
305
- - Casos de borda ausentes
306
- - Cenários de erro não cobertos
307
- - Pontos de integração não testados
308
-
309
- ### B.5. Priorizar por Criticidade
310
-
311
- | Prioridade | Critério |
312
- |------------|----------|
313
- | Alta | APIs públicas, lógica de negócio crítica, código de segurança |
314
- | Média | Utilitários compartilhados, tratamento de erros |
315
- | Baixa | Código de apresentação, configurações simples |
316
-
317
- ### B.6. Formato de Saída (Fluxo Manual)
318
-
319
- Gerar arquivo `$DOCS_FOLDER/engineering/qa/{task-id}-test_coverage_branch_report.md`:
320
-
321
- ```markdown
322
- # Análise de Cobertura de Testes da Branch
323
-
324
- ## Informações da Branch
325
- - **Branch:** [nome]
326
- - **Base:** main
327
- - **Arquivos alterados:** [número]
328
- - **Arquivos com gaps de cobertura:** [número]
329
-
330
- ## Resumo Executivo
331
- [Visão geral da cobertura e principais preocupações]
332
-
333
- ---
334
-
335
- ## Análise por Arquivo
336
-
337
- ### 1. `[caminho/do/arquivo.ts]`
338
-
339
- **Mudanças Realizadas:**
340
- - [Resumo das mudanças]
341
-
342
- **Cobertura Atual:**
343
- - Arquivo de teste: `[caminho]` ou ❌ Não encontrado
344
- - Status: [✅ Totalmente coberto | ⚠️ Parcialmente coberto | ❌ Não coberto]
345
-
346
- **Testes Ausentes:**
347
- - [ ] [Cenário específico]
348
- - [ ] [Outro cenário]
349
-
350
- **Prioridade:** [Alta | Média | Baixa]
351
-
352
- ---
353
-
354
- ## Plano de Implementação
355
-
356
- ### Alta Prioridade
357
-
358
- #### `[arquivo/funcionalidade]`
359
- - **Arquivo de teste:** `[criar/atualizar em caminho]`
360
- - **Cenários:**
361
- 1. [Caso de teste com descrição]
362
- 2. [Outro caso]
363
- - **Estrutura sugerida:**
364
- ```[linguagem]
365
- describe('[Funcionalidade]', () => {
366
- it('should [comportamento esperado]', () => {
367
- // arrange
368
- // act
369
- // assert
370
- });
371
- });
372
- ```
373
-
374
- ### Média Prioridade
375
- [Mesma estrutura]
376
-
377
- ### Baixa Prioridade
378
- [Mesma estrutura]
379
-
380
- ---
381
-
382
- ## Estatísticas
383
-
384
- | Métrica | Valor |
385
- |---------|-------|
386
- | Arquivos analisados | X |
387
- | Com cobertura adequada | X |
388
- | Precisam de testes | X |
389
- | Cenários identificados | X |
390
-
391
- ## Recomendações
392
-
393
- 1. [Recomendação principal]
394
- 2. [Outra recomendação]
395
- ```
396
-
397
- ---
398
-
399
- ## Diretrizes Gerais
400
-
401
- ### Foco nas Mudanças
402
- - Analise apenas arquivos modificados na branch
403
- - Não reporte código existente não alterado
404
-
405
- ### Qualidade > Quantidade
406
- - Recomende testes significativos
407
- - Priorize caminhos críticos e casos de borda
408
- - Sugira tipo adequado (unitário/integração/e2e)
409
-
410
- ### Consciência de Framework
411
- - Respeite padrões de teste existentes no projeto
412
- - Utilize helpers e utilitários já existentes
413
- - Mantenha consistência com testes atuais
414
-
415
- ---
416
-
417
- ## Execução
418
-
419
- ### Com TestSprite MCP (Fluxo A)
420
- 1. Verificar disponibilidade tentando usar `testsprite_bootstrap`
421
- 2. Detectar tipo de projeto (frontend/backend)
422
- 3. Detectar porta local do projeto
423
- 4. Executar `testsprite_bootstrap` com `testScope: "diff"`
424
- 5. Gerar sumário do código
425
- 6. Gerar plano de testes (frontend/backend)
426
- 7. Executar testes e gerar relatório
427
-
428
- ### Sem TestSprite MCP (Fluxo B)
429
- 1. Executar comandos git para analisar mudanças
430
- 2. Mapear arquivos alterados para arquivos de teste
431
- 3. Analisar cobertura existente
432
- 4. Identificar lacunas e priorizar
433
- 5. Gerar relatório `$DOCS_FOLDER/engineering/qa/{task-id}-test_coverage_branch_report.md`
434
-
435
- ### Skills invocados durante a execução do skill
436
-
437
- | Passo | Skill | Condição |
438
- |-------|-------|----------|
439
- | — | Nenhuma — skill autocontida | — |
440
-
441
- ---
442
-
443
- ## Resumo dos Fluxos
444
-
445
- | Aspecto | Fluxo A (TestSprite) | Fluxo B (Manual) |
446
- |---------|---------------------|------------------|
447
- | Quando usar | TestSprite MCP disponível | TestSprite não instalado |
448
- | Automação | Total - gera e executa testes | Parcial - apenas análise |
449
- | Saída | Testes + Relatório HTML/MD | Relatório MD |
450
- | Esforço | Mínimo | Requer implementação manual |
451
-
452
- ---
453
-
454
- ## Output
455
-
456
- O skill gera artefatos diferentes dependendo do fluxo utilizado:
457
-
458
- ### Fluxo A (TestSprite MCP)
459
-
460
- | Artefato | Descrição |
461
- |----------|-----------|
462
- | `testsprite_tests/` | Pasta com todos os testes gerados automaticamente |
463
- | `TestSprite_MCP_Test_Report.md` | Relatório legível em Markdown |
464
- | `TestSprite_MCP_Test_Report.html` | Relatório visual em HTML |
465
- | `testsprite_tests/tmp/test_results.json` | Resultados detalhados em JSON |
466
-
467
- ### Fluxo B (Manual)
468
-
469
- | Artefato | Descrição |
470
- |----------|-----------|
471
- | `$DOCS_FOLDER/engineering/qa/{task-id}-test_coverage_branch_report.md` | Relatório de análise de cobertura com plano de implementação |
472
-
473
- > **Nota**: Os artefatos são gerados na raiz do projeto ou no diretório especificado em `$ARGUMENTS`.