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,877 +0,0 @@
1
- ---
2
- name: eng-qa-bug-report
3
- description: Gera relatórios estruturados de bugs e cria cards no $TASK_MANAGER automaticamente. Use para documentar bugs encontrados durante audit ou debugging.
4
- argument-hint: "[modo] [argumentos]"
5
- disable-model-invocation: false
6
- allowed-tools: Read Grep Glob Bash Write MCP
7
- license: AGPL-3.0
8
- metadata:
9
- author: jarvis-team
10
- version: "1.0"
11
- area: qa
12
- ---
13
-
14
- # Bug Report - Geração de Relatórios e Cards de Bugs
15
-
16
- Você é um **especialista em documentação de bugs**, responsável por gerar relatórios estruturados e criar cards no $TASK_MANAGER de forma automática e consistente.
17
-
18
- ## Objetivo
19
-
20
- Facilitar a documentação e rastreamento de bugs encontrados durante:
21
- - Bug Audit (`/eng.bug-audit`)
22
- - Debugging (`/eng.debug`)
23
- - Code Review
24
- - Testes manuais
25
-
26
- ---
27
-
28
- ## Modos de Operação
29
-
30
- ### 1. **create** - Criar card único no $TASK_MANAGER
31
-
32
- ```bash
33
- /eng-qa-bug-report create \
34
- --title="Título do bug" \
35
- --category="BUG-CRÍTICO" \
36
- --severity="P0" \
37
- --location="src/auth/login.ts:45" \
38
- --description="Descrição detalhada" \
39
- --suggestion="Sugestão de correção"
40
- ```
41
-
42
- ### 2. **batch** - Criar múltiplos cards a partir de relatório
43
-
44
- ```bash
45
- /eng-qa-bug-report batch --from-audit="./sessions/bug-audit-20260208/bug-audit-report.md"
46
- ```
47
-
48
- ### 3. **generate-report** - Gerar apenas relatório (sem criar cards)
49
-
50
- ```bash
51
- /eng-qa-bug-report generate-report \
52
- --bugs="./bugs-list.json" \
53
- --output="./sessions/bug-report.md"
54
- ```
55
-
56
- ---
57
-
58
- ## Entrada
59
-
60
- ### Modo `create`
61
-
62
- **Argumentos obrigatórios** (sempre):
63
- - `--title` - Título no formato `[SERVIÇO] descrição do problema` (ex: `[auth] Token expirado retorna 500 ao invés de 401`)
64
- - `--category` - Categoria (BUG-CRÍTICO, BUG-ALTO, BUG-MÉDIO, BUG-BAIXO, CODE-SMELL, DÉBITO-TÉCNICO, SEGURANÇA, PERFORMANCE)
65
- - `--location` - Localização no código (arquivo:linha)
66
- - `--description` - Descrição detalhada do problema (o que acontece, onde, quando)
67
- - `--environment` - Ambiente onde ocorre: `dev`, `staging` ou `prod`
68
- - `--behavior-actual` - O que o sistema faz atualmente (comportamento observado)
69
- - `--behavior-expected` - O que o sistema deveria fazer (comportamento correto)
70
-
71
- **Argumentos obrigatórios para P0/P1** (BUG-CRÍTICO, BUG-ALTO, SEGURANÇA):
72
- - `--reproduction` - Passos para reproduzir (pré-condições → passos → resultado atual)
73
- - `--impact` - Impacto no negócio/usuário (quem é afetado, volume, consequência)
74
- - `--entry-endpoint` - Endpoint ou ação que dispara o fluxo com bug (ex: `POST /auth/login`)
75
-
76
- **Argumentos opcionais**:
77
- - `--severity` - Prioridade (P0, P1, P2, P3) [default: calculado automaticamente]
78
- - `--suggestion` - Sugestão de correção
79
- - `--acceptance-criteria` - Como validar que o bug foi corrigido
80
- - `--correlation-id` - Correlation ID / Request ID da requisição com falha (fundamental para bugs cross-service)
81
- - `--affected-services` - Serviços envolvidos no fluxo (ex: `account,auth,notification`)
82
- - `--frequency` - Frequência do bug: `recorrente`, `intermitente` ou `uma-vez` [default: desconhecido]
83
- - `--linked-to` - `TASK_MANAGER_KEY` do card de origem (ex: `PROJ-456`) — obrigatório quando criado a partir de `eng.debug` para manter rastreabilidade entre débito técnico e bug investigado
84
- - `--assignee` - Assignee sugerido
85
- - `--labels` - Labels adicionais (separadas por vírgula)
86
-
87
- ### Modo `batch`
88
-
89
- **Argumentos obrigatórios**:
90
- - `--from-audit` - Caminho para o relatório de audit
91
-
92
- **Argumentos opcionais**:
93
- - `--priority-filter` - Criar apenas P0,P1 | P0,P1,P2 | all [default: P0,P1]
94
- - `--dry-run` - Simular sem criar cards [default: false]
95
-
96
- ### Modo `generate-report`
97
-
98
- **Argumentos obrigatórios**:
99
- - `--bugs` - Caminho para arquivo JSON com lista de bugs
100
-
101
- **Argumentos opcionais**:
102
- - `--output` - Caminho de saída [default: ./sessions/bug-report-{timestamp}.md]
103
- - `--format` - Formato (markdown, json, html) [default: markdown]
104
-
105
- ---
106
-
107
- ## Validação de Entrada
108
-
109
- ```bash
110
- # 1. Campos obrigatórios para todos os cards
111
- missing_fields=()
112
- [ -z "$TITLE" ] && missing_fields+=("--title (formato: [SERVIÇO] descrição)")
113
- [ -z "$CATEGORY" ] && missing_fields+=("--category")
114
- [ -z "$LOCATION" ] && missing_fields+=("--location (arquivo:linha)")
115
- [ -z "$DESCRIPTION" ] && missing_fields+=("--description")
116
- [ -z "$ENVIRONMENT" ] && missing_fields+=("--environment (dev|staging|prod)")
117
- [ -z "$BEHAVIOR_ACTUAL" ] && missing_fields+=("--behavior-actual")
118
- [ -z "$BEHAVIOR_EXPECTED" ] && missing_fields+=("--behavior-expected")
119
-
120
- if [ ${#missing_fields[@]} -gt 0 ]; then
121
- echo "⛔ Campos obrigatórios faltando:"
122
- for field in "${missing_fields[@]}"; do
123
- echo " - $field"
124
- done
125
- exit 1
126
- fi
127
-
128
- # 2. Validar formato do título: deve começar com [SERVIÇO]
129
- if ! echo "$TITLE" | grep -qE "^\[.+\] .+"; then
130
- echo "⛔ Formato de título inválido."
131
- echo " Esperado: [SERVIÇO] descrição do problema"
132
- echo " Exemplo: [auth] Token expirado retorna 500 ao invés de 401"
133
- exit 1
134
- fi
135
-
136
- # 3. Validar categoria
137
- valid_categories="BUG-CRÍTICO|BUG-ALTO|BUG-MÉDIO|BUG-BAIXO|CODE-SMELL|DÉBITO-TÉCNICO|SEGURANÇA|PERFORMANCE"
138
- if ! echo "$CATEGORY" | grep -qE "^($valid_categories)$"; then
139
- echo "⛔ Categoria inválida: $CATEGORY"
140
- echo " Categorias válidas: $valid_categories"
141
- exit 1
142
- fi
143
-
144
- # 4. Campos extras obrigatórios para P0/P1 (BUG-CRÍTICO, BUG-ALTO, SEGURANÇA)
145
- high_priority_categories="BUG-CRÍTICO|BUG-ALTO|SEGURANÇA"
146
- if echo "$CATEGORY" | grep -qE "^($high_priority_categories)$"; then
147
- missing_p1=()
148
- [ -z "$REPRODUCTION" ] && missing_p1+=("--reproduction (pré-condições + passos + resultado atual)")
149
- [ -z "$IMPACT" ] && missing_p1+=("--impact (quem é afetado, volume, consequência)")
150
- [ -z "$ENTRY_ENDPOINT" ] && missing_p1+=("--entry-endpoint (endpoint ou ação que dispara o fluxo)")
151
-
152
- if [ ${#missing_p1[@]} -gt 0 ]; then
153
- echo "⛔ Campos obrigatórios para ${CATEGORY} (P0/P1) faltando:"
154
- for field in "${missing_p1[@]}"; do
155
- echo " - $field"
156
- done
157
- echo ""
158
- echo " Cards ${CATEGORY} sem esses campos não podem ser investigados."
159
- exit 1
160
- fi
161
- fi
162
-
163
- # 5. Validar formato de location (arquivo:linha)
164
- if ! echo "$LOCATION" | grep -qE ".+:[0-9]+$"; then
165
- echo "⛔ Formato de localização inválido: $LOCATION"
166
- echo " Esperado: arquivo:linha → src/auth/token-validator.ts:67"
167
- exit 1
168
- fi
169
- ```
170
-
171
- ---
172
-
173
- ## Pré-requisitos
174
-
175
- ### Validar ENV.md
176
-
177
- ```bash
178
- if [ ! -f "$IDE/ENV.md" ]; then
179
- echo "⚠️ ENV.md não encontrado. Execute /jarvis-init primeiro."
180
- exit 1
181
- fi
182
-
183
- # Validar variáveis obrigatórias
184
- required_vars=("WORKSPACE" "IDE" "SQUAD" "HUB" "AREA" "POSITION")
185
- for var in "${required_vars[@]}"; do
186
- if ! grep -q "^$var=.\+" "$IDE/ENV.md"; then
187
- echo "⚠️ Variável $var não definida no ENV.md"
188
- fi
189
- done
190
- ```
191
-
192
- ### Detectar Task Manager Configurado
193
-
194
- ```bash
195
- # Ler task manager do ENV.md
196
- TASK_MANAGER=$(grep "^TASK_MANAGER=" "$IDE/ENV.md" | cut -d= -f2 | tr -d '[:space:]' | tr '[:upper:]' '[:lower:]')
197
- TOKEN_TASK_MANAGER=$(grep "^TOKEN_TASK_MANAGER=" "$IDE/ENV.md" | cut -d= -f2)
198
-
199
- # Validar se está configurado (vazio = freelance → LOCAL)
200
- if [ -z "$TASK_MANAGER" ] || [ "$TASK_MANAGER" = "[jira,linear,github,asana]" ]; then
201
- echo "⚠️ TASK_MANAGER vazio — modo freelance/local."
202
- echo "Cards serão salvos em $SESSIONS_DIR/qa/bug-reports/"
203
- TASK_MANAGER="local"
204
- fi
205
-
206
- # Verificar integração disponível (valores do ENV-template: jira|linear|github|asana)
207
- case "$TASK_MANAGER" in
208
- jira)
209
- if mcp list 2>/dev/null | grep -q "claude_ai_Atlassian" || [ -n "$TOKEN_TASK_MANAGER" ]; then
210
- TASK_MANAGER_ENABLED=true
211
- echo "✅ Integração Jira disponível"
212
- else
213
- TASK_MANAGER_ENABLED=false
214
- echo "⚠️ Jira configurado mas MCP/token indisponível. Salvando localmente."
215
- fi
216
- ;;
217
- linear)
218
- if command -v linear >/dev/null 2>&1 || [ -n "$TOKEN_TASK_MANAGER" ]; then
219
- TASK_MANAGER_ENABLED=true
220
- echo "✅ Integração Linear disponível"
221
- else
222
- TASK_MANAGER_ENABLED=false
223
- echo "⚠️ Linear configurado mas CLI/token indisponível. Salvando localmente."
224
- fi
225
- ;;
226
- github)
227
- if command -v gh >/dev/null 2>&1 || [ -n "$TOKEN_TASK_MANAGER" ] || [ -n "$GITHUB_TOKEN" ]; then
228
- TASK_MANAGER_ENABLED=true
229
- echo "✅ Integração GitHub Issues disponível"
230
- else
231
- TASK_MANAGER_ENABLED=false
232
- echo "⚠️ GitHub configurado mas gh/token indisponível. Salvando localmente."
233
- fi
234
- ;;
235
- asana)
236
- if [ -n "$TOKEN_TASK_MANAGER" ]; then
237
- TASK_MANAGER_ENABLED=true
238
- echo "✅ Integração Asana disponível"
239
- else
240
- TASK_MANAGER_ENABLED=false
241
- echo "⚠️ Asana configurado mas token indisponível. Salvando localmente."
242
- fi
243
- ;;
244
- local|*)
245
- TASK_MANAGER_ENABLED=false
246
- TASK_MANAGER="local"
247
- echo "📝 Modo local: Cards serão salvos em $SESSIONS_DIR/qa/bug-reports/"
248
- ;;
249
- esac
250
- ```
251
-
252
- ---
253
-
254
- ## Fluxo de Trabalho
255
-
256
- ### Modo `create` - Criar Card Único
257
-
258
- #### 0. Verificar Duplicatas
259
-
260
- Antes de qualquer outra ação, verificar se já existe card similar no `$TASK_MANAGER` (se configurado).
261
- Usar o skill de triagem disponível:
262
-
263
- ```
264
- /triage-issue --message="{TITLE}: {DESCRIPTION}"
265
- ```
266
-
267
- Se o skill `atlassian:triage-issue` não estiver disponível, buscar diretamente:
268
-
269
- ```
270
- mcp__claude_ai_Atlassian__searchJiraIssuesUsingJql({
271
- jql: "project = \"{PROJECT_KEY}\" AND summary ~ \"{palavras-chave do título}\" ORDER BY created DESC",
272
- maxResults: 5
273
- })
274
- ```
275
-
276
- **Resultado esperado:**
277
-
278
- | Resultado | Ação |
279
- |-----------|------|
280
- | Card idêntico já existe | Interromper e informar o usuário com o ID do card existente |
281
- | Card similar existe | Perguntar ao usuário: criar novo ou adicionar comentário ao existente? |
282
- | Nenhum similar | Prosseguir para o próximo passo |
283
-
284
- > ⛔ Nunca criar card sem executar este passo. Duplicatas desperdiçam tempo de triagem e
285
- > geram ruído no backlog.
286
-
287
- #### 1. Validar Entrada
288
-
289
- - Verificar argumentos obrigatórios
290
- - Validar categoria
291
- - Validar formato de location (arquivo:linha)
292
-
293
- #### 2. Calcular Severidade (se não fornecida)
294
-
295
- ```
296
- Severidade = f(Categoria, Impacto, Localização)
297
-
298
- Regras automáticas:
299
- - BUG-CRÍTICO + produção → P0
300
- - SEGURANÇA → P0
301
- - BUG-CRÍTICO + staging → P1
302
- - BUG-ALTO → P1
303
- - BUG-MÉDIO → P2
304
- - BUG-BAIXO, CODE-SMELL, DÉBITO-TÉCNICO → P3
305
- ```
306
-
307
- #### 3. Enriquecer Descrição
308
-
309
- Adicionar informações contextuais:
310
-
311
- ```bash
312
- # Ler código da localização (±5 linhas)
313
- file=$(echo "$LOCATION" | cut -d: -f1)
314
- line=$(echo "$LOCATION" | cut -d: -f2)
315
- start=$((line - 5))
316
- end=$((line + 5))
317
-
318
- code_snippet=$(sed -n "${start},${end}p" "$file" | cat -n)
319
-
320
- # Buscar informações de commit
321
- git_blame=$(git blame -L "$line,$line" "$file" 2>/dev/null)
322
- git_log=$(git log -1 --format="%h - %s (%ar by %an)" "$file" 2>/dev/null)
323
- ```
324
-
325
- #### 4. Gerar Estrutura do Card
326
-
327
- ```markdown
328
- # {TITLE}
329
- > Formato obrigatório: [SERVIÇO] descrição concisa do problema
330
-
331
- **Categoria**: {CATEGORY}
332
- **Prioridade**: {SEVERITY}
333
- **Ambiente**: {ENVIRONMENT}
334
- **Localização**: `{LOCATION}`
335
- **Reportado por**: {USER do ENV.md / git / SO}
336
- **Data**: {timestamp}
337
-
338
- ---
339
-
340
- ## Descrição
341
-
342
- {DESCRIPTION}
343
- > O que acontece, em qual contexto, com qual frequência (recorrente / intermitente / uma vez).
344
-
345
- ---
346
-
347
- ## Comportamento
348
-
349
- ### Atual (o que o sistema faz)
350
- {BEHAVIOR_ACTUAL}
351
-
352
- ### Esperado (o que deveria fazer)
353
- {BEHAVIOR_EXPECTED}
354
-
355
- ---
356
-
357
- ## Impacto
358
-
359
- {IMPACT}
360
- > Quem é afetado, volume estimado de usuários/requests, consequência de negócio.
361
- > ⛔ Obrigatório para BUG-CRÍTICO, BUG-ALTO e SEGURANÇA.
362
-
363
- ---
364
-
365
- ## Passos para Reproduzir
366
-
367
- > ⛔ Obrigatório para BUG-CRÍTICO, BUG-ALTO e SEGURANÇA.
368
- > Sem reprodução documentada, o bug não pode ser investigado nem validado.
369
-
370
- **Pré-condições**: {ambiente, usuário de teste, dados necessários}
371
-
372
- **Passos**:
373
- 1. {passo 1}
374
- 2. {passo 2}
375
- 3. {passo 3 — resultado atual observado}
376
-
377
- **Resultado atual**: {o que acontece no último passo}
378
- **Resultado esperado**: {o que deveria acontecer}
379
-
380
- ---
381
-
382
- ## Contexto de Rastreamento
383
-
384
- **Endpoint de entrada**: {ENTRY_ENDPOINT ou "não identificado"}
385
- **Serviços envolvidos**: {AFFECTED_SERVICES ou "não mapeado"}
386
- **Correlation ID**: {CORRELATION_ID ou "⚠️ não disponível — rastreamento manual necessário"}
387
- **Frequência**: {FREQUENCY ou "desconhecido"}
388
- **Card de origem**: {LINKED_TO ou "N/A — não originado de investigação"}
389
-
390
- > ℹ️ Se Correlation ID não disponível e `--affected-services` tem 2+ serviços, criar débito técnico automaticamente
391
- > conforme regra em `$IDE/rules/engineering/eng-rules.md`.
392
- > ℹ️ Se `--linked-to` foi fornecido, criar link Jira entre este card e o card de origem após a criação.
393
-
394
- ---
395
-
396
- ## Localização no Código
397
-
398
- **Arquivo**: `{file}`
399
- **Linha**: {line}
400
-
401
- ```{linguagem}
402
- {code_snippet}
403
- ```
404
-
405
- **Último commit neste arquivo**: {git_log}
406
- **Autor da linha**: {git_blame}
407
-
408
- ---
409
-
410
- ## Critério de Aceitação
411
-
412
- > Como validar que o bug foi corrigido? Definir antes de implementar.
413
-
414
- {ACCEPTANCE_CRITERIA ou critério inferido pelo AI com base no comportamento esperado}
415
-
416
- Exemplo:
417
- - [ ] `POST {endpoint}` retorna `{status esperado}` quando `{condição}`
418
- - [ ] Teste de regressão cobre o cenário reproduzido acima
419
- - [ ] Sem regressão em `{fluxos relacionados}`
420
-
421
- ---
422
-
423
- ## Sugestão de Correção
424
-
425
- {SUGGESTION ou "A definir na investigação — executar /eng.debug {TASK_MANAGER_KEY}"}
426
-
427
- ### Arquivos Prováveis de Modificar
428
- - `{file}`
429
-
430
- ### Testes Necessários
431
- - [ ] Teste que reproduz o bug (deve falhar antes da correção, passar depois)
432
- - [ ] Teste de regressão para {fluxo adjacente}
433
-
434
- ---
435
-
436
- ## Prevenção Futura
437
-
438
- {como evitar que esse tipo de bug ocorra novamente}
439
- > Ex: adicionar validação, melhorar observabilidade, cobrir cenário em testes.
440
-
441
- ---
442
-
443
- **Labels**: `bug-report`, `{category}`, `{severity}`, `{squad}`, `{hub}`
444
- **Assignee**: {ASSIGNEE ou "A definir"}
445
- ```
446
-
447
- #### 5. Criar Card no Task Manager (via Adapter)
448
-
449
- ```bash
450
- # Função: create_task_card
451
- # Cria card no task manager configurado ou salva localmente
452
- create_task_card() {
453
- local title="$1"
454
- local description="$2"
455
- local priority="$3"
456
- local category="$4"
457
- local labels="$5"
458
-
459
- if [ "$TASK_MANAGER_ENABLED" = true ]; then
460
- case "$TASK_MANAGER" in
461
- jira)
462
- TASK_MANAGER_KEY=$(mcp__claude_ai_Atlassian__createJiraIssue \
463
- --project="$(grep '^PROJECT_KEY=' "$IDE/ENV.md" | cut -d= -f2)" \
464
- --issueType="Bug" \
465
- --summary="$title" \
466
- --description="$description" \
467
- --priority="$priority" \
468
- --labels="$labels" | jq -r '.key')
469
-
470
- echo "✅ Card criado no Jira: $TASK_MANAGER_KEY"
471
- echo "$TASK_MANAGER_KEY"
472
- ;;
473
-
474
- linear)
475
- CARD_ID=$(linear issue create \
476
- --title="$title" \
477
- --description="$description" \
478
- --priority="$priority" \
479
- --label="$labels" \
480
- --team="$(grep '^LINEAR_TEAM_ID=' "$IDE/ENV.md" | cut -d= -f2)" \
481
- --json | jq -r '.id')
482
-
483
- echo "✅ Card criado no Linear: $CARD_ID"
484
- echo "$CARD_ID"
485
- ;;
486
-
487
- github)
488
- CARD_NUMBER=$(gh issue create \
489
- --title="$title" \
490
- --body="$description" \
491
- --label="$labels" \
492
- --json number | jq -r '.number')
493
-
494
- echo "✅ Issue criado no GitHub: #$CARD_NUMBER"
495
- echo "$CARD_NUMBER"
496
- ;;
497
-
498
- asana)
499
- echo "⚠️ Asana: use API/TOKEN_TASK_MANAGER ou crie o card manualmente e salve o GID como TASK_MANAGER_KEY"
500
- return 1
501
- ;;
502
-
503
- *)
504
- echo "⚠️ Task manager $TASK_MANAGER não suportado neste adapter"
505
- return 1
506
- ;;
507
- esac
508
- else
509
- # Fallback: Salvar card localmente
510
- mkdir -p "$SESSIONS_DIR/qa/bug-reports"
511
- card_file="$SESSIONS_DIR/qa/bug-reports/bug-$(date +%Y%m%d-%H%M%S).md"
512
-
513
- cat > "$card_file" << EOF
514
- # $title
515
-
516
- **Categoria**: $category
517
- **Prioridade**: $priority
518
- **Labels**: $labels
519
- **Task Manager**: $TASK_MANAGER (offline/não configurado)
520
-
521
- ---
522
-
523
- $description
524
-
525
- ---
526
-
527
- **Ação necessária**: Criar card manualmente no $TASK_MANAGER
528
- EOF
529
-
530
- echo "📝 Card salvo localmente: $card_file"
531
- echo "⚠️ Integração com $TASK_MANAGER indisponível. Crie card manualmente."
532
- echo "$card_file"
533
- fi
534
- }
535
-
536
- # Chamar função de criação
537
- CARD_RESULT=$(create_task_card "$TITLE" "$CARD_CONTENT" "$SEVERITY" "$CATEGORY" "bug-report,$CATEGORY,$SEVERITY")
538
- ```
539
-
540
- #### 6. Gerar Resumo
541
-
542
- ```markdown
543
- ✅ Bug report criado
544
-
545
- **Título**: {TITLE}
546
- **Prioridade**: {SEVERITY}
547
- **Categoria**: {CATEGORY}
548
- **Localização**: {LOCATION}
549
-
550
- {Card $TASK_MANAGER: {ID} ou Card local: ./sessions/bug-reports/bug-XXX.md}
551
-
552
- **Próximos passos**:
553
- - Revisar e ajustar prioridade se necessário
554
- - Atribuir para desenvolvedor apropriado
555
- - Planejar correção na próxima sprint (P0/P1) ou backlog (P2/P3)
556
- ```
557
-
558
- ---
559
-
560
- ### Modo `batch` - Criar Múltiplos Cards
561
-
562
- #### 1. Ler Relatório de Audit
563
-
564
- ```bash
565
- audit_report="$FROM_AUDIT"
566
-
567
- if [ ! -f "$audit_report" ]; then
568
- echo "⚠️ Relatório não encontrado: $audit_report"
569
- exit 1
570
- fi
571
- ```
572
-
573
- #### 2. Parsear Problemas do Relatório
574
-
575
- ```bash
576
- # Extrair problemas por prioridade
577
- problems=$(awk '/^### P[0-3]/,/^###/' "$audit_report")
578
-
579
- # Aplicar filtro de prioridade
580
- case "$PRIORITY_FILTER" in
581
- "P0,P1")
582
- problems=$(echo "$problems" | awk '/^### P0/,/^### P1/')
583
- ;;
584
- "P0,P1,P2")
585
- problems=$(echo "$problems" | awk '/^### P0/,/^### P2/')
586
- ;;
587
- "all")
588
- # Todos os problemas
589
- ;;
590
- esac
591
- ```
592
-
593
- #### 3. Iterar e Criar Cards
594
-
595
- ```bash
596
- # Para cada problema identificado
597
- while IFS= read -r problem; do
598
- # Extrair campos (título, categoria, localização, descrição)
599
- title=$(echo "$problem" | grep -oP '#### \K.*')
600
- category=$(echo "$problem" | grep -oP 'Categoria: \K.*')
601
- location=$(echo "$problem" | grep -oP 'Localização: \K.*')
602
- # ... extrair outros campos
603
-
604
- # Criar card usando modo create
605
- /eng-qa-bug-report create \
606
- --title="$title" \
607
- --category="$category" \
608
- --location="$location" \
609
- # ... outros argumentos
610
- done
611
- ```
612
-
613
- #### 4. Sumarizar Criação em Batch
614
-
615
- ```markdown
616
- ✅ Batch bug report concluído
617
-
618
- **Cards criados**: {N}
619
- - P0: {N}
620
- - P1: {N}
621
- - P2: {N}
622
- - P3: {N}
623
-
624
- **Relatório de origem**: {audit_report}
625
-
626
- **Cards criados**:
627
- | Card ID | Título | Prioridade | Categoria |
628
- |---------|--------|------------|-----------|
629
- | {ID-1} | {título} | P0 | BUG-CRÍTICO |
630
- | {ID-2} | {título} | P1 | SEGURANÇA |
631
- | ... | ... | ... | ... |
632
-
633
- **Próximos passos**:
634
- - Revisar cards P0 imediatamente
635
- - Planejar correção de P1 na próxima sprint
636
- - Priorizar P2/P3 no backlog
637
- ```
638
-
639
- ---
640
-
641
- ### Modo `generate-report` - Gerar Relatório
642
-
643
- #### 1. Ler Arquivo de Bugs
644
-
645
- ```bash
646
- bugs_file="$BUGS"
647
-
648
- if [ ! -f "$bugs_file" ]; then
649
- echo "⚠️ Arquivo de bugs não encontrado: $bugs_file"
650
- exit 1
651
- fi
652
-
653
- # Espera formato JSON:
654
- # [
655
- # {
656
- # "title": "...",
657
- # "category": "...",
658
- # "severity": "...",
659
- # "location": "...",
660
- # "description": "...",
661
- # "impact": "...",
662
- # "suggestion": "..."
663
- # },
664
- # ...
665
- # ]
666
- ```
667
-
668
- #### 2. Gerar Relatório Consolidado
669
-
670
- ```markdown
671
- # Bug Report Consolidado
672
-
673
- **Data**: $(date +%Y-%m-%d)
674
- **Workspace**: ${WORKSPACE}
675
- **Total de bugs**: {N}
676
-
677
- ---
678
-
679
- ## Resumo por Severidade
680
-
681
- | Severidade | Quantidade |
682
- |------------|------------|
683
- | P0 (Crítico) | {N} |
684
- | P1 (Alto) | {N} |
685
- | P2 (Médio) | {N} |
686
- | P3 (Baixo) | {N} |
687
-
688
- ## Resumo por Categoria
689
-
690
- | Categoria | Quantidade |
691
- |-----------|------------|
692
- | BUG-CRÍTICO | {N} |
693
- | SEGURANÇA | {N} |
694
- | BUG-ALTO | {N} |
695
- | CODE-SMELL | {N} |
696
- | ... | ... |
697
-
698
- ---
699
-
700
- ## Bugs Detalhados
701
-
702
- {Para cada bug, incluir estrutura completa do card}
703
- ```
704
-
705
- #### 3. Salvar Relatório
706
-
707
- ```bash
708
- output_file="${OUTPUT:-$SESSIONS_DIR/qa/bug-report-$(date +%Y%m%d-%H%M%S).md}"
709
-
710
- mkdir -p "$(dirname "$output_file")"
711
- echo "$REPORT_CONTENT" > "$output_file"
712
-
713
- echo "✅ Relatório gerado: $output_file"
714
- ```
715
-
716
- ### Skills invocados durante a execução do skill
717
-
718
- | Passo | Skill | Condição |
719
- |-------|-------|----------|
720
- | Fluxo de Trabalho › Modo `create` › 0. Verificar Duplicatas | `/triage-issue` (skill externo `atlassian:triage-issue`) | Se `$TASK_MANAGER` estiver configurado e o skill estiver disponível; senão a busca é direta via MCP (não é skill) |
721
- | Bug-to-Test (pós-criação) | `/eng-qa-cypress-e2e` | Se o usuário responder **[S] Gerar agora** à oferta de teste de regressão |
722
-
723
- ---
724
-
725
- ## Formato de Saída
726
-
727
- ### Card Individual (create)
728
-
729
- ```markdown
730
- ✅ Bug report criado
731
-
732
- **Card**: {CARD_ID ou local path}
733
- **Título**: {TITLE}
734
- **Prioridade**: {SEVERITY}
735
- **Categoria**: {CATEGORY}
736
- **Localização**: {LOCATION}
737
-
738
- **Próximos passos**: {ações sugeridas}
739
- ```
740
-
741
- ### Batch Creation (batch)
742
-
743
- ```markdown
744
- ✅ Batch bug report concluído
745
-
746
- **Total de cards criados**: {N}
747
- **Distribuição por prioridade**:
748
- - P0: {N} cards
749
- - P1: {N} cards
750
- - P2: {N} cards
751
- - P3: {N} cards
752
-
753
- **Relatório detalhado**: {output_path}
754
- ```
755
-
756
- ### Report Generation (generate-report)
757
-
758
- ```markdown
759
- ✅ Relatório gerado
760
-
761
- **Arquivo**: {output_path}
762
- **Total de bugs**: {N}
763
- **Formato**: {markdown | json | html}
764
- ```
765
-
766
- ---
767
-
768
- ## Regras
769
-
770
- ### Nunca
771
- - Criar card P0/P1 sem passos de reprodução — um bug irreproduzível não pode ser investigado
772
- - Criar card sem `--behavior-actual` E `--behavior-expected` — sem contraste claro o dev não sabe o que corrigir
773
- - Aceitar título fora do formato `[SERVIÇO] descrição` — padronização é obrigatória para triagem
774
- - Aceitar `--description` vago como "não funciona" ou "está quebrado" — exigir contexto objetivo
775
- - Criar duplicatas sem verificar se já existe card similar (buscar no `$TASK_MANAGER` antes de criar)
776
- - Pular validação por severidade — P0/P1 têm campos extras obrigatórios, sempre verificar
777
-
778
- ### Sempre
779
- - Validar todos os campos obrigatórios antes de qualquer outra ação
780
- - Incluir snippet do código problemático (±5 linhas em torno do `--location`)
781
- - Incluir `git blame` da linha para rastreabilidade de quem/quando introduziu o bug
782
- - Definir critério de aceitação (mesmo que inferido) — como saber que o bug foi resolvido?
783
- - Sinalizar ausência de Correlation ID como débito técnico P2 quando `--affected-services` tem 2+ serviços
784
- - Salvar localmente se task manager não disponível, com instrução de criação manual
785
- - Notificar usuário com o ID do card criado e próximo passo sugerido (`/eng.debug {TASK_MANAGER_KEY}`)
786
-
787
- ---
788
-
789
- ## Referências (leia só o tema que a tarefa pedir)
790
-
791
- Leia **só** o arquivo do tema que a tarefa pedir; o restante fica fora do contexto.
792
-
793
- | Tema | Quando ler | Arquivo |
794
- |------|-----------|---------|
795
- | Integração com Task Managers (Adapter Pattern) | A tarefa configurar ou implementar o adapter de um task manager (Jira, Linear, GitHub, Asana), mapear prioridades, usar o fallback local ou adicionar um task manager novo | `references/1-integracao-task-managers.md` |
796
- | Exemplos de Uso | Precisar de um exemplo completo dos modos create, batch ou generate-report | `references/2-exemplos-de-uso.md` |
797
- | Bug-to-Test (pós-criação) | Depois de criar o card, a pessoa quiser gerar o teste que reproduz o bug | `references/3-bug-to-test.md` |
798
-
799
- ## Checklist de Conclusão
800
-
801
- ### Modo `create`
802
- - [ ] Argumentos validados
803
- - [ ] Severidade calculada
804
- - [ ] Código da localização incluído
805
- - [ ] Card estruturado gerado
806
- - [ ] Card criado no task manager (ou salvo localmente)
807
- - [ ] Usuário notificado
808
-
809
- ### Modo `batch`
810
- - [ ] Relatório de audit lido
811
- - [ ] Problemas parseados e filtrados
812
- - [ ] Cards criados para cada problema
813
- - [ ] Resumo gerado
814
- - [ ] Usuário notificado
815
-
816
- ### Modo `generate-report`
817
- - [ ] Arquivo de bugs lido
818
- - [ ] Relatório consolidado gerado
819
- - [ ] Relatório salvo no output
820
- - [ ] Usuário notificado
821
-
822
- ---
823
-
824
- ## Tratamento de Erros
825
-
826
- ### Argumentos inválidos
827
- - Exibir mensagem de erro clara
828
- - Mostrar exemplos de uso correto
829
- - Encerrar execução
830
-
831
- ### Arquivo não encontrado
832
- - Verificar caminho fornecido
833
- - Sugerir caminhos alternativos
834
- - Listar arquivos disponíveis
835
-
836
- ### Task Manager indisponível
837
- - Salvar cards localmente
838
- - Gerar comandos CLI para execução manual (quando aplicável)
839
- - Notificar usuário sobre fallback e como configurar
840
-
841
- ### Categoria/Severidade inválida
842
- - Listar valores válidos
843
- - Sugerir valor mais próximo
844
- - Solicitar correção
845
-
846
- ---
847
-
848
- ## Mensagens de Status
849
-
850
- ### Início
851
- ```
852
- 📝 Bug Report iniciado
853
-
854
- Modo: {create | batch | generate-report}
855
- Argumentos: {lista de argumentos fornecidos}
856
-
857
- Processando...
858
- ```
859
-
860
- ### Durante Processamento
861
- ```
862
- ⏳ Criando card {N} de {total}...
863
- ⏳ Parseando relatório de audit...
864
- ⏳ Gerando relatório consolidado...
865
- ```
866
-
867
- ### Conclusão
868
- ```
869
- ✅ Bug report concluído!
870
-
871
- {Resumo específico do modo}
872
-
873
- **Próximos passos**: {ações recomendadas}
874
- ```
875
-
876
- ---
877
-