jarvis-ai-framework 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.
- package/AGENTS.md +416 -0
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/agents/AGENTS.md +234 -0
- package/agents/README.md +309 -0
- package/agents/engineering/data/eng.data-engineer.agent.md +309 -0
- package/agents/engineering/eng.agent.md +303 -0
- package/agents/engineering/eng.bug-hunter.md +386 -0
- package/agents/engineering/eng.cybersecurity.agent.md +503 -0
- package/agents/engineering/eng.dev-code-reviewer.md +148 -0
- package/agents/engineering/eng.docs-writer.md +152 -0
- package/agents/engineering/eng.frontend.agent.md +117 -0
- package/agents/engineering/eng.rpa.agent.md +215 -0
- package/agents/engineering/eng.tech-analyst.agent.md +102 -0
- package/agents/engineering/eng.ux-designer.agent.md +193 -0
- package/agents/engineering/qa/eng.qa.cypress-specialist.md +109 -0
- package/agents/engineering/qa/eng.qa.quality-champion-task-agent.md +85 -0
- package/agents/engineering/qa/eng.qa.quality-strategist.md +111 -0
- package/agents/engineering/qa/eng.qa.test-architect.md +400 -0
- package/agents/engineering/qa/eng.qa.test-planner.md +477 -0
- package/agents/engineering/qa/eng.qa.testing-engineer.md +339 -0
- package/agents/product/prod.pm-checker.md +52 -0
- package/bin/commands/docs-publish.js +184 -0
- package/bin/commands/docs-sync.js +139 -0
- package/bin/commands/info.js +87 -0
- package/bin/commands/init.js +237 -0
- package/bin/commands/install-rtk.js +90 -0
- package/bin/commands/list.js +48 -0
- package/bin/commands/qa-signoff.js +112 -0
- package/bin/commands/whoami.js +43 -0
- package/bin/jarvis.js +159 -0
- package/bin/lib/auth/session.js +56 -0
- package/bin/lib/config/constants.js +123 -0
- package/bin/lib/config/ide-config.js +233 -0
- package/bin/lib/core/scanner.js +124 -0
- package/bin/lib/core/sync-engine.js +551 -0
- package/bin/lib/docs/fetch-file.sh +41 -0
- package/bin/lib/docs/publish-file.sh +284 -0
- package/bin/lib/docs/validate-frontmatter.js +157 -0
- package/bin/lib/env-loader.js +198 -0
- package/bin/lib/tasks/comment.js +131 -0
- package/bin/lib/utils/git-parser.js +145 -0
- package/bin/lib/utils/logger.js +104 -0
- package/bin/lib/utils/npmrc-parser.js +106 -0
- package/bin/lib/utils/paths.js +55 -0
- package/bin/lib/utils/ui.js +59 -0
- package/bin/lib/vcs/api.js +312 -0
- package/bin/lib/vcs/create-issue.js +43 -0
- package/bin/lib/vcs/create-merge.js +43 -0
- package/bin/lib/vcs/fetch-raw.js +30 -0
- package/bin/postinstall.js +41 -0
- package/members.md +25 -0
- package/package.json +55 -0
- package/rules/AGENTS.md +205 -0
- package/rules/engineering/data/data-rules.md +200 -0
- package/rules/engineering/eng-rules.md +243 -0
- package/rules/engineering/eng-security-rules.md +186 -0
- package/rules/engineering/eng.breakdown-subtasks-rules.md +585 -0
- package/rules/engineering/eng.bump-rules.md +27 -0
- package/rules/engineering/eng.docs-scraping-rules.md +64 -0
- package/rules/engineering/eng.downstream-flow-rules.md +297 -0
- package/rules/engineering/eng.integrations-rules.md +73 -0
- package/rules/engineering/eng.plan-rules.md +333 -0
- package/rules/engineering/eng.pr-rules.md +359 -0
- package/rules/engineering/eng.pre-pr-rules.md +103 -0
- package/rules/engineering/eng.start-rules.md +246 -0
- package/rules/engineering/eng.tech-spec-rules.md +968 -0
- package/rules/engineering/eng.work-rules.md +312 -0
- package/rules/engineering/frontend/eng.frontend-rules.md +147 -0
- package/rules/engineering/qa/eng.qa.cypress-standards-rules.md +259 -0
- package/rules/engineering/qa/eng.qa.exploratory-session-rules.md +137 -0
- package/rules/engineering/qa/eng.qa.quality-gate-scoring-rules.md +181 -0
- package/rules/engineering/qa/eng.qa.tech-spec-validation-criteria-rules.md +120 -0
- package/rules/engineering/rpa/eng.rpa-rules.md +230 -0
- package/rules/product/README.md +24 -0
- package/rules/product/prod-rules.md +151 -0
- package/rules/rtk-rules.md +68 -0
- package/skills/AGENTS.md +290 -0
- package/skills/SKILLS-ROADMAP.md +333 -0
- package/skills/churn-audit/SKILL.md +385 -0
- package/skills/context-detect/SKILL.md +399 -0
- package/skills/context-detect/assets/context-profile-template.md +127 -0
- package/skills/docs-central/README.md +310 -0
- package/skills/docs-central/SKILL.md +423 -0
- package/skills/docs-index/SKILL.md +377 -0
- package/skills/eng-ai-engineer/SKILL.md +296 -0
- package/skills/eng-arch-c4/SKILL.md +358 -0
- package/skills/eng-arch-c4/assets/example-code.md +189 -0
- package/skills/eng-arch-c4/assets/example-component.md +105 -0
- package/skills/eng-arch-c4/assets/example-container.md +104 -0
- package/skills/eng-arch-c4/assets/example-context.md +81 -0
- package/skills/eng-backend/SKILL.md +776 -0
- package/skills/eng-browser-extension-builder/SKILL.md +385 -0
- package/skills/eng-cybersecurity/SKILL.md +645 -0
- package/skills/eng-data-bi/SKILL.md +199 -0
- package/skills/eng-data-debug/SKILL.md +307 -0
- package/skills/eng-data-engineer/SKILL.md +256 -0
- package/skills/eng-data-onboard/SKILL.md +310 -0
- package/skills/eng-data-orchestrator/SKILL.md +426 -0
- package/skills/eng-design-system/SKILL.md +619 -0
- package/skills/eng-docs-write/SKILL.md +312 -0
- package/skills/eng-frontend/SKILL.md +913 -0
- package/skills/eng-jira-comment/SKILL.md +17 -0
- package/skills/eng-microfrontend/SKILL.md +602 -0
- package/skills/eng-ms-trace/SKILL.md +469 -0
- package/skills/eng-nestjs/SKILL.md +791 -0
- package/skills/eng-performance-engineer/SKILL.md +312 -0
- package/skills/eng-pr/SKILL.md +339 -0
- package/skills/eng-qa-a11y-audit/SKILL.md +269 -0
- package/skills/eng-qa-bug-report/SKILL.md +1088 -0
- package/skills/eng-qa-bug-report/TASK_MANAGERS.md +138 -0
- package/skills/eng-qa-cypress-e2e/SKILL.md +177 -0
- package/skills/eng-qa-dev-guide/SKILL.md +164 -0
- package/skills/eng-qa-e2e/SKILL.md +400 -0
- package/skills/eng-qa-e2e-spec-writer/SKILL.md +322 -0
- package/skills/eng-qa-exploratory/SKILL.md +188 -0
- package/skills/eng-qa-gate/SKILL.md +370 -0
- package/skills/eng-qa-gate/assets/checklist-validacao.md +291 -0
- package/skills/eng-qa-graphql-contract/SKILL.md +256 -0
- package/skills/eng-qa-quality-report/SKILL.md +412 -0
- package/skills/eng-qa-test-plan/SKILL.md +466 -0
- package/skills/eng-qa-test-plan/assets/test-coverage-template.md +92 -0
- package/skills/eng-qa-test-plan/assets/test-patterns.md +178 -0
- package/skills/eng-qa-testsprite/SKILL.md +325 -0
- package/skills/eng-qa-testsprite/references/testsprite-mcp.md +224 -0
- package/skills/eng-qa-unit-test/SKILL.md +471 -0
- package/skills/eng-rabbitmq/SKILL.md +661 -0
- package/skills/eng-scraper/SKILL.md +683 -0
- package/skills/eng-scraper-robot-builder/SKILL.md +370 -0
- package/skills/eng-security-patch/SKILL.md +378 -0
- package/skills/eng-security-triage/SKILL.md +266 -0
- package/skills/eng-task-comment/SKILL.md +60 -0
- package/skills/eng-tech-analyst/SKILL.md +529 -0
- package/skills/eng-threat-model/SKILL.md +161 -0
- package/skills/init-jarvis/SKILL.md +1304 -0
- package/skills/init-jarvis/assets/mcp-configs.md +389 -0
- package/skills/init-jarvis/assets/onboarding-checklist.md +104 -0
- package/skills/init-jarvis/assets/setup-guide.md +360 -0
- package/skills/lovable-prompt-generator/SKILL.md +304 -0
- package/skills/prod-roadmap-report/README.md +303 -0
- package/skills/prod-roadmap-report/SKILL.md +198 -0
- package/skills/prod-roadmap-report/commands/status.compiled.single.team.md +23 -0
- package/skills/prod-roadmap-report/commands/status.list.projects.md +17 -0
- package/skills/prod-roadmap-report/commands/status.memory.md +192 -0
- package/skills/prod-roadmap-report/commands/status.roadmap.preview.md +94 -0
- package/skills/prod-roadmap-report/references/detailed-guide.md +236 -0
- package/skills/prod-roadmap-report/rules/detailed-guide.md +237 -0
- package/skills/prod-roadmap-report/rules/status-report-rules.md +44 -0
- package/skills/prod-roadmap-report/templates/template-multiple-teams-compiled-status.md +53 -0
- package/skills/prod-roadmap-report/templates/template-projects-list.md +23 -0
- package/skills/prod-roadmap-report/templates/template-single-team-compiled-status.md +60 -0
- package/skills/prod-roadmap-report/templates/template-single-team-status.md +49 -0
- package/skills/prod-specs/SKILL.md +108 -0
- package/skills/prod-specs/references/prod.spec.clarify.md +176 -0
- package/skills/prod-specs/references/prod.spec.epic.md +107 -0
- package/skills/prod-specs/references/prod.spec.frd.md +135 -0
- package/skills/prod-specs/references/prod.spec.issue.md +145 -0
- package/skills/prod-specs/references/prod.spec.prd.md +118 -0
- package/skills/prod-specs/rules/prod-spec-rules.md +186 -0
- package/skills/prod-specs/templates/prod-breakdown-template.md +136 -0
- package/skills/prod-specs/templates/prod-epic-template.md +76 -0
- package/skills/prod-specs/templates/prod-frd-template.md +172 -0
- package/skills/prod-specs/templates/prod-issue-template.md +68 -0
- package/skills/prod-specs/templates/prod-prd-full-template.md +159 -0
- package/skills/prod-specs/templates/prod-prd-template.md +173 -0
- package/skills/prod-specs-update/SKILL.md +272 -0
- package/skills/report-issue/SKILL.md +156 -0
- package/taxonomy.md +270 -0
- package/templates/AGENTS.md +189 -0
- package/templates/CDD aplicado a Prompts.md +182 -0
- package/templates/ENV-template.md +187 -0
- package/templates/engineering/AGENTS-template.md +71 -0
- package/templates/engineering/ARD-template.md +193 -0
- package/templates/engineering/CONTACTS-template.md +135 -0
- package/templates/engineering/PR-template.md +40 -0
- package/templates/engineering/RFC-Playbook.md +325 -0
- package/templates/engineering/RFC-template.md +199 -0
- package/templates/engineering/architecture-template.md +277 -0
- package/templates/engineering/breakdown-subtasks-template.md +582 -0
- package/templates/engineering/c4-model-template.md +516 -0
- package/templates/engineering/data-contract-template.md +135 -0
- package/templates/engineering/data-pipeline-template.md +163 -0
- package/templates/engineering/plan-template.md +255 -0
- package/templates/engineering/qa/eng.qa.quality-gate-examples-template.md +311 -0
- package/templates/engineering/qa/eng.qa.quality-gate-report-template.md +249 -0
- package/templates/engineering/qa/qa.cypress-test-template.md +172 -0
- package/templates/engineering/qa/qa.exploratory-session-template.md +148 -0
- package/templates/engineering/qa/qa.quality-report-template.md +130 -0
- package/templates/engineering/qa/qa.release-signoff-template.md +54 -0
- package/templates/engineering/qa/qa.sprint-plan-template.md +49 -0
- package/templates/engineering/swagger-template.md +145 -0
- package/templates/engineering/tech-spec-template.md +497 -0
- package/templates/engineering/work-progress-template.md +155 -0
- package/workflows/AGENTS.md +240 -0
- package/workflows/README.md +160 -0
- package/workflows/all-tools.md +11 -0
- package/workflows/engineering/data/data.contract.md +202 -0
- package/workflows/engineering/data/data.new-pipeline.md +234 -0
- package/workflows/engineering/eng.breakdown-subtasks.md +420 -0
- package/workflows/engineering/eng.bug-audit.md +591 -0
- package/workflows/engineering/eng.build-tech-spec.md +1116 -0
- package/workflows/engineering/eng.create-ard-from-code.md +259 -0
- package/workflows/engineering/eng.create-ard.md +382 -0
- package/workflows/engineering/eng.create-rfc.md +245 -0
- package/workflows/engineering/eng.debug.md +479 -0
- package/workflows/engineering/eng.docs.md +40 -0
- package/workflows/engineering/eng.light-arch.md +84 -0
- package/workflows/engineering/eng.plan.md +213 -0
- package/workflows/engineering/eng.pr.md +466 -0
- package/workflows/engineering/eng.pre-pr.md +167 -0
- package/workflows/engineering/eng.review.md +185 -0
- package/workflows/engineering/eng.rpa.robot.md +342 -0
- package/workflows/engineering/eng.security-audit.md +312 -0
- package/workflows/engineering/eng.security-incident.md +275 -0
- package/workflows/engineering/eng.security-pipeline.md +210 -0
- package/workflows/engineering/eng.security-review.md +235 -0
- package/workflows/engineering/eng.start.md +494 -0
- package/workflows/engineering/eng.work.md +558 -0
- package/workflows/engineering/frontend/eng.frontend-component.md +190 -0
- package/workflows/engineering/frontend/eng.frontend-perf-audit.md +375 -0
- package/workflows/engineering/frontend/eng.frontend-review.md +185 -0
- package/workflows/engineering/qa/eng.qa-dev-quality-guide.md +51 -0
- package/workflows/engineering/qa/eng.qa-e2e-test-generation.md +51 -0
- package/workflows/engineering/qa/eng.qa-exploratory-session.md +60 -0
- package/workflows/engineering/qa/eng.qa-quality-gate-validation.md +202 -0
- package/workflows/engineering/qa/eng.qa-quality-report.md +83 -0
- package/workflows/engineering/qa/eng.qa-refinement-entry.md +83 -0
- package/workflows/engineering/qa/eng.qa-release-signoff.md +170 -0
- package/workflows/engineering/qa/eng.qa-sprint-planning.md +100 -0
- package/workflows/engineering/ta/eng.ta.atendimento.md +93 -0
- package/workflows/product/prod.roadmap.preview.md +110 -0
- package/workflows/product/prod.spec.breakdown.md +163 -0
- package/workflows/product/prod.spec.clarify.md +178 -0
- package/workflows/product/prod.spec.epic.md +154 -0
- package/workflows/product/prod.spec.frd.md +96 -0
- package/workflows/product/prod.spec.issue.md +145 -0
- package/workflows/product/prod.spec.md +60 -0
- package/workflows/product/prod.spec.prd.md +100 -0
- package/workflows/taxonomy.md +92 -0
- package/workflows/warm-up.md +574 -0
|
@@ -0,0 +1,466 @@
|
|
|
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
|
+
---
|
|
13
|
+
|
|
14
|
+
# Test Planner - Análise de Cobertura de Testes
|
|
15
|
+
|
|
16
|
+
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.
|
|
17
|
+
|
|
18
|
+
## Objetivo
|
|
19
|
+
|
|
20
|
+
Garantir que todo código novo ou modificado possua cobertura de testes adequada antes do merge.
|
|
21
|
+
|
|
22
|
+
## Entrada
|
|
23
|
+
|
|
24
|
+
- `$ARGUMENTS` - (Opcional) Caminho específico ou nome da feature para análise focada
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Quando Usar
|
|
29
|
+
|
|
30
|
+
Use esta skill quando:
|
|
31
|
+
- Precisar verificar cobertura de testes antes de um merge/PR
|
|
32
|
+
- Quiser identificar lacunas de testes no código modificado
|
|
33
|
+
- Necessitar de um plano estruturado para implementar testes faltantes
|
|
34
|
+
- Estiver fazendo code review e precisar avaliar a cobertura de testes
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Padrões Críticos
|
|
39
|
+
|
|
40
|
+
### Padrão 1: Sempre analisar o diff primeiro
|
|
41
|
+
|
|
42
|
+
Antes de qualquer análise, obtenha as mudanças da branch:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
git diff origin/main...HEAD --name-only
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Padrão 2: Priorizar código crítico
|
|
49
|
+
|
|
50
|
+
Sempre priorize testes para:
|
|
51
|
+
- APIs públicas e endpoints
|
|
52
|
+
- Lógica de negócio e regras de validação
|
|
53
|
+
- Código de autenticação/autorização
|
|
54
|
+
- Manipulação de dados sensíveis
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Integração com TestSprite MCP
|
|
59
|
+
|
|
60
|
+
Esta skill prioriza o uso do TestSprite MCP para geração automática de testes quando disponível.
|
|
61
|
+
|
|
62
|
+
### Verificação de Disponibilidade
|
|
63
|
+
|
|
64
|
+
Para verificar se o TestSprite está disponível:
|
|
65
|
+
|
|
66
|
+
1. **Tente chamar** `testsprite_bootstrap` com parâmetros mínimos
|
|
67
|
+
2. **Se a tool existir e responder**: Prossiga com o Fluxo A (MCP)
|
|
68
|
+
3. **Se a tool não existir ou retornar erro**: Prossiga com o Fluxo B (Manual)
|
|
69
|
+
|
|
70
|
+
**Erros que indicam indisponibilidade:**
|
|
71
|
+
- `Tool not found`
|
|
72
|
+
- `MCP server not connected`
|
|
73
|
+
- `Connection refused`
|
|
74
|
+
- Timeout sem resposta
|
|
75
|
+
|
|
76
|
+
> ⚠️ **Importante**: Não tente reconectar ou instalar o MCP automaticamente. Se indisponível, siga direto para o Fluxo B.
|
|
77
|
+
|
|
78
|
+
### Decisão de Fluxo
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
82
|
+
│ │
|
|
83
|
+
│ VERIFICAR TESTSPRITE MCP │
|
|
84
|
+
│ │
|
|
85
|
+
│ ┌─────────────────────────┐ │
|
|
86
|
+
│ │ Tool testsprite_bootstrap│ │
|
|
87
|
+
│ │ disponível? │ │
|
|
88
|
+
│ └───────────┬─────────────┘ │
|
|
89
|
+
│ │ │
|
|
90
|
+
│ SIM │ NÃO │
|
|
91
|
+
│ ↓ │ ↓ │
|
|
92
|
+
│ FLUXO │ FLUXO │
|
|
93
|
+
│ MCP │ MANUAL │
|
|
94
|
+
│ (A) │ (B) │
|
|
95
|
+
│ │
|
|
96
|
+
└─────────────────────────────────────────────────────────────┘
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## FLUXO A: TestSprite MCP (Preferencial)
|
|
102
|
+
|
|
103
|
+
Se o TestSprite MCP estiver disponível, use as seguintes ferramentas:
|
|
104
|
+
|
|
105
|
+
### A.1. Detectar Tipo de Projeto
|
|
106
|
+
|
|
107
|
+
ANTES de iniciar, identifique se o projeto é frontend ou backend:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Verificar indicadores de Frontend
|
|
111
|
+
ls package.json 2>/dev/null && grep -E "(react|vue|angular|next|nuxt|svelte|vite)" package.json
|
|
112
|
+
|
|
113
|
+
# Verificar indicadores de Backend
|
|
114
|
+
ls requirements.txt 2>/dev/null || ls go.mod 2>/dev/null || ls pom.xml 2>/dev/null || ls Cargo.toml 2>/dev/null
|
|
115
|
+
ls package.json 2>/dev/null && grep -E "(express|fastify|nest|koa|hapi)" package.json
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Critérios de Detecção:
|
|
119
|
+
|
|
120
|
+
| Indicador | Tipo |
|
|
121
|
+
|-----------|------|
|
|
122
|
+
| `react`, `vue`, `angular`, `next`, `nuxt`, `svelte`, `vite` em package.json | Frontend |
|
|
123
|
+
| `express`, `fastify`, `nest`, `koa`, `hapi` em package.json | Backend |
|
|
124
|
+
| `requirements.txt`, `manage.py`, `app.py` | Backend (Python) |
|
|
125
|
+
| `go.mod`, `main.go` | Backend (Go) |
|
|
126
|
+
| `pom.xml`, `build.gradle` | Backend (Java) |
|
|
127
|
+
| `Cargo.toml` | Backend (Rust) |
|
|
128
|
+
| Pasta `src/components/`, `src/pages/`, `public/` | Frontend |
|
|
129
|
+
| Pasta `src/controllers/`, `src/routes/`, `src/services/` | Backend |
|
|
130
|
+
|
|
131
|
+
**Projetos Full-Stack:**
|
|
132
|
+
Se o projeto contém ambos (ex: Next.js com API routes, monorepo), execute os dois fluxos:
|
|
133
|
+
1. `testsprite_generate_frontend_test_plan` para UI/componentes
|
|
134
|
+
2. `testsprite_generate_backend_test_plan` para APIs/serviços
|
|
135
|
+
|
|
136
|
+
### A.2. Detectar Porta Local
|
|
137
|
+
|
|
138
|
+
Identifique a porta do projeto analisando:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Verificar em package.json (scripts de dev/start)
|
|
142
|
+
grep -E "PORT|port|:[\d]{4}" package.json
|
|
143
|
+
|
|
144
|
+
# Verificar em arquivos de configuração
|
|
145
|
+
cat .env 2>/dev/null | grep -i port
|
|
146
|
+
cat docker-compose.yml 2>/dev/null | grep -E "ports:|[\d]{4}:"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Portas comuns por framework:
|
|
150
|
+
| Framework | Porta Padrão |
|
|
151
|
+
|-----------|-------------|
|
|
152
|
+
| Vite/React | 5173 |
|
|
153
|
+
| Create React App | 3000 |
|
|
154
|
+
| Next.js | 3000 |
|
|
155
|
+
| Vue CLI | 8080 |
|
|
156
|
+
| Angular | 4200 |
|
|
157
|
+
| Express/Node | 3000 |
|
|
158
|
+
| Django | 8000 |
|
|
159
|
+
| FastAPI | 8000 |
|
|
160
|
+
| Spring Boot | 8080 |
|
|
161
|
+
|
|
162
|
+
### A.3. Bootstrap e Análise
|
|
163
|
+
|
|
164
|
+
```javascript
|
|
165
|
+
// Inicializar análise do projeto com foco nas mudanças (diff)
|
|
166
|
+
// IMPORTANTE: Ajustar 'type' e 'localPort' baseado na detecção acima
|
|
167
|
+
testsprite_bootstrap({
|
|
168
|
+
localPort: 5173, // ⚠️ Ajustar conforme detectado no passo A.2
|
|
169
|
+
type: "frontend", // ⚠️ Usar "frontend" ou "backend" conforme detectado
|
|
170
|
+
projectPath: "$PROJECT_ROOT", // ⚠️ Substituir pelo caminho absoluto do projeto
|
|
171
|
+
testScope: "diff" // Foca apenas nas mudanças da branch
|
|
172
|
+
})
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### A.4. Gerar Sumário do Código
|
|
176
|
+
|
|
177
|
+
```javascript
|
|
178
|
+
testsprite_generate_code_summary({
|
|
179
|
+
projectRootPath: "$PROJECT_ROOT" // ⚠️ Substituir pelo caminho absoluto do projeto
|
|
180
|
+
})
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### A.5. Gerar Plano de Testes
|
|
184
|
+
|
|
185
|
+
Para Frontend:
|
|
186
|
+
```javascript
|
|
187
|
+
testsprite_generate_frontend_test_plan({
|
|
188
|
+
projectPath: "$PROJECT_ROOT", // ⚠️ Substituir pelo caminho absoluto do projeto
|
|
189
|
+
needLogin: true // Ajustar conforme necessidade
|
|
190
|
+
})
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Para Backend:
|
|
194
|
+
```javascript
|
|
195
|
+
testsprite_generate_backend_test_plan({
|
|
196
|
+
projectPath: "$PROJECT_ROOT" // ⚠️ Substituir pelo caminho absoluto do projeto
|
|
197
|
+
})
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### A.6. Gerar e Executar Testes
|
|
201
|
+
|
|
202
|
+
```javascript
|
|
203
|
+
testsprite_generate_code_and_execute({
|
|
204
|
+
projectName: "$WORKSPACE", // ⚠️ Substituir pelo nome do workspace
|
|
205
|
+
projectPath: "$PROJECT_ROOT", // ⚠️ Substituir pelo caminho absoluto do projeto
|
|
206
|
+
testIds: [], // Vazio = todos os testes
|
|
207
|
+
additionalInstruction: "Foco nas mudanças da branch atual"
|
|
208
|
+
})
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### A.7. Saída do TestSprite
|
|
212
|
+
|
|
213
|
+
O TestSprite gera automaticamente:
|
|
214
|
+
- `testsprite_tests/` - Pasta com todos os testes gerados
|
|
215
|
+
- `TestSprite_MCP_Test_Report.md` - Relatório legível
|
|
216
|
+
- `TestSprite_MCP_Test_Report.html` - Relatório HTML
|
|
217
|
+
- `testsprite_tests/tmp/test_results.json` - Resultados detalhados
|
|
218
|
+
|
|
219
|
+
### A.8. Projeto sem Testes Existentes
|
|
220
|
+
|
|
221
|
+
Se o projeto não possui testes, o TestSprite cria testes do zero:
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
Código → Análise → PRD Normalizado + ARD + FRDs → Plano de Testes → Geração de Código → Execução
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Comportamento por `testScope`:
|
|
228
|
+
|
|
229
|
+
| testScope | Projeto sem testes |
|
|
230
|
+
|-----------|-------------------|
|
|
231
|
+
| `"diff"` | Cria testes apenas para o código modificado na branch |
|
|
232
|
+
| `"codebase"` | Cria testes para todo o projeto (ideal para legados) |
|
|
233
|
+
|
|
234
|
+
Quando usar `codebase` em vez de `diff`:
|
|
235
|
+
- Projeto legado sem nenhuma cobertura de testes
|
|
236
|
+
- Refatoração grande que impacta múltiplos módulos
|
|
237
|
+
- Primeira execução do TestSprite no projeto
|
|
238
|
+
|
|
239
|
+
```javascript
|
|
240
|
+
// Para projetos sem testes - cobertura completa
|
|
241
|
+
testsprite_bootstrap({
|
|
242
|
+
localPort: 5173,
|
|
243
|
+
type: "frontend",
|
|
244
|
+
projectPath: "$PROJECT_ROOT", // ⚠️ Substituir pelo caminho absoluto do projeto
|
|
245
|
+
testScope: "codebase" // ⚠️ Testa todo o projeto
|
|
246
|
+
})
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
> **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.
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## FLUXO B: Análise Manual (Fallback)
|
|
254
|
+
|
|
255
|
+
Se o TestSprite MCP NÃO estiver disponível, siga o fluxo manual abaixo.
|
|
256
|
+
|
|
257
|
+
### B.1. Analisar Mudanças da Branch
|
|
258
|
+
|
|
259
|
+
Execute os seguintes comandos para entender o que mudou:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Listar arquivos alterados
|
|
263
|
+
git diff origin/main...HEAD --name-only
|
|
264
|
+
|
|
265
|
+
# Ver mudanças em detalhe
|
|
266
|
+
git diff origin/main...HEAD
|
|
267
|
+
|
|
268
|
+
# Histórico de commits
|
|
269
|
+
git log origin/main..HEAD --oneline
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Foque especialmente em:
|
|
273
|
+
- Novas funções/métodos/classes
|
|
274
|
+
- Lógica modificada em código existente
|
|
275
|
+
- Novos endpoints ou interfaces de API
|
|
276
|
+
- Mudanças de configuração
|
|
277
|
+
- Breaking changes
|
|
278
|
+
|
|
279
|
+
### B.2. Mapear Código para Testes
|
|
280
|
+
|
|
281
|
+
Para cada arquivo alterado, identifique o arquivo de teste correspondente:
|
|
282
|
+
|
|
283
|
+
| Padrão | Exemplo |
|
|
284
|
+
|--------|---------|
|
|
285
|
+
| `[filename].test.[ext]` | `user.test.ts` |
|
|
286
|
+
| `[filename].spec.[ext]` | `user.spec.ts` |
|
|
287
|
+
| `tests/[filename]_test.[ext]` | `tests/user_test.py` |
|
|
288
|
+
| `__tests__/[filename].[ext]` | `__tests__/user.ts` |
|
|
289
|
+
| `test_[filename].[ext]` | `test_user.py` |
|
|
290
|
+
|
|
291
|
+
### B.3. Analisar Cobertura Existente
|
|
292
|
+
|
|
293
|
+
Para arquivos com testes existentes, verificar:
|
|
294
|
+
- Testes para novas funções/métodos
|
|
295
|
+
- Testes para comportamento modificado
|
|
296
|
+
- Casos de borda da nova lógica
|
|
297
|
+
- Tratamento de erros para novos caminhos
|
|
298
|
+
|
|
299
|
+
### B.4. Identificar Lacunas
|
|
300
|
+
|
|
301
|
+
Determinar quais testes estão faltando:
|
|
302
|
+
- Funcionalidades novas sem testes
|
|
303
|
+
- Comportamentos modificados não refletidos
|
|
304
|
+
- Casos de borda ausentes
|
|
305
|
+
- Cenários de erro não cobertos
|
|
306
|
+
- Pontos de integração não testados
|
|
307
|
+
|
|
308
|
+
### B.5. Priorizar por Criticidade
|
|
309
|
+
|
|
310
|
+
| Prioridade | Critério |
|
|
311
|
+
|------------|----------|
|
|
312
|
+
| Alta | APIs públicas, lógica de negócio crítica, código de segurança |
|
|
313
|
+
| Média | Utilitários compartilhados, tratamento de erros |
|
|
314
|
+
| Baixa | Código de apresentação, configurações simples |
|
|
315
|
+
|
|
316
|
+
### B.6. Formato de Saída (Fluxo Manual)
|
|
317
|
+
|
|
318
|
+
Gerar arquivo `$DOCS_FOLDER/engineering/qa/{task-id}-test_coverage_branch_report.md`:
|
|
319
|
+
|
|
320
|
+
```markdown
|
|
321
|
+
# Análise de Cobertura de Testes da Branch
|
|
322
|
+
|
|
323
|
+
## Informações da Branch
|
|
324
|
+
- **Branch:** [nome]
|
|
325
|
+
- **Base:** main
|
|
326
|
+
- **Arquivos alterados:** [número]
|
|
327
|
+
- **Arquivos com gaps de cobertura:** [número]
|
|
328
|
+
|
|
329
|
+
## Resumo Executivo
|
|
330
|
+
[Visão geral da cobertura e principais preocupações]
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Análise por Arquivo
|
|
335
|
+
|
|
336
|
+
### 1. `[caminho/do/arquivo.ts]`
|
|
337
|
+
|
|
338
|
+
**Mudanças Realizadas:**
|
|
339
|
+
- [Resumo das mudanças]
|
|
340
|
+
|
|
341
|
+
**Cobertura Atual:**
|
|
342
|
+
- Arquivo de teste: `[caminho]` ou ❌ Não encontrado
|
|
343
|
+
- Status: [✅ Totalmente coberto | ⚠️ Parcialmente coberto | ❌ Não coberto]
|
|
344
|
+
|
|
345
|
+
**Testes Ausentes:**
|
|
346
|
+
- [ ] [Cenário específico]
|
|
347
|
+
- [ ] [Outro cenário]
|
|
348
|
+
|
|
349
|
+
**Prioridade:** [Alta | Média | Baixa]
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Plano de Implementação
|
|
354
|
+
|
|
355
|
+
### Alta Prioridade
|
|
356
|
+
|
|
357
|
+
#### `[arquivo/funcionalidade]`
|
|
358
|
+
- **Arquivo de teste:** `[criar/atualizar em caminho]`
|
|
359
|
+
- **Cenários:**
|
|
360
|
+
1. [Caso de teste com descrição]
|
|
361
|
+
2. [Outro caso]
|
|
362
|
+
- **Estrutura sugerida:**
|
|
363
|
+
```[linguagem]
|
|
364
|
+
describe('[Funcionalidade]', () => {
|
|
365
|
+
it('should [comportamento esperado]', () => {
|
|
366
|
+
// arrange
|
|
367
|
+
// act
|
|
368
|
+
// assert
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### Média Prioridade
|
|
374
|
+
[Mesma estrutura]
|
|
375
|
+
|
|
376
|
+
### Baixa Prioridade
|
|
377
|
+
[Mesma estrutura]
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## Estatísticas
|
|
382
|
+
|
|
383
|
+
| Métrica | Valor |
|
|
384
|
+
|---------|-------|
|
|
385
|
+
| Arquivos analisados | X |
|
|
386
|
+
| Com cobertura adequada | X |
|
|
387
|
+
| Precisam de testes | X |
|
|
388
|
+
| Cenários identificados | X |
|
|
389
|
+
|
|
390
|
+
## Recomendações
|
|
391
|
+
|
|
392
|
+
1. [Recomendação principal]
|
|
393
|
+
2. [Outra recomendação]
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Diretrizes Gerais
|
|
399
|
+
|
|
400
|
+
### Foco nas Mudanças
|
|
401
|
+
- Analise apenas arquivos modificados na branch
|
|
402
|
+
- Não reporte código existente não alterado
|
|
403
|
+
|
|
404
|
+
### Qualidade > Quantidade
|
|
405
|
+
- Recomende testes significativos
|
|
406
|
+
- Priorize caminhos críticos e casos de borda
|
|
407
|
+
- Sugira tipo adequado (unitário/integração/e2e)
|
|
408
|
+
|
|
409
|
+
### Consciência de Framework
|
|
410
|
+
- Respeite padrões de teste existentes no projeto
|
|
411
|
+
- Utilize helpers e utilitários já existentes
|
|
412
|
+
- Mantenha consistência com testes atuais
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## Execução
|
|
417
|
+
|
|
418
|
+
### Com TestSprite MCP (Fluxo A)
|
|
419
|
+
1. Verificar disponibilidade tentando usar `testsprite_bootstrap`
|
|
420
|
+
2. Detectar tipo de projeto (frontend/backend)
|
|
421
|
+
3. Detectar porta local do projeto
|
|
422
|
+
4. Executar `testsprite_bootstrap` com `testScope: "diff"`
|
|
423
|
+
5. Gerar sumário do código
|
|
424
|
+
6. Gerar plano de testes (frontend/backend)
|
|
425
|
+
7. Executar testes e gerar relatório
|
|
426
|
+
|
|
427
|
+
### Sem TestSprite MCP (Fluxo B)
|
|
428
|
+
1. Executar comandos git para analisar mudanças
|
|
429
|
+
2. Mapear arquivos alterados para arquivos de teste
|
|
430
|
+
3. Analisar cobertura existente
|
|
431
|
+
4. Identificar lacunas e priorizar
|
|
432
|
+
5. Gerar relatório `$DOCS_FOLDER/engineering/qa/{task-id}-test_coverage_branch_report.md`
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## Resumo dos Fluxos
|
|
437
|
+
|
|
438
|
+
| Aspecto | Fluxo A (TestSprite) | Fluxo B (Manual) |
|
|
439
|
+
|---------|---------------------|------------------|
|
|
440
|
+
| Quando usar | TestSprite MCP disponível | TestSprite não instalado |
|
|
441
|
+
| Automação | Total - gera e executa testes | Parcial - apenas análise |
|
|
442
|
+
| Saída | Testes + Relatório HTML/MD | Relatório MD |
|
|
443
|
+
| Esforço | Mínimo | Requer implementação manual |
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## Output
|
|
448
|
+
|
|
449
|
+
O skill gera artefatos diferentes dependendo do fluxo utilizado:
|
|
450
|
+
|
|
451
|
+
### Fluxo A (TestSprite MCP)
|
|
452
|
+
|
|
453
|
+
| Artefato | Descrição |
|
|
454
|
+
|----------|-----------|
|
|
455
|
+
| `testsprite_tests/` | Pasta com todos os testes gerados automaticamente |
|
|
456
|
+
| `TestSprite_MCP_Test_Report.md` | Relatório legível em Markdown |
|
|
457
|
+
| `TestSprite_MCP_Test_Report.html` | Relatório visual em HTML |
|
|
458
|
+
| `testsprite_tests/tmp/test_results.json` | Resultados detalhados em JSON |
|
|
459
|
+
|
|
460
|
+
### Fluxo B (Manual)
|
|
461
|
+
|
|
462
|
+
| Artefato | Descrição |
|
|
463
|
+
|----------|-----------|
|
|
464
|
+
| `$DOCS_FOLDER/engineering/qa/{task-id}-test_coverage_branch_report.md` | Relatório de análise de cobertura com plano de implementação |
|
|
465
|
+
|
|
466
|
+
> **Nota**: Os artefatos são gerados na raiz do projeto ou no diretório especificado em `$ARGUMENTS`.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Análise de Cobertura de Testes da Branch
|
|
2
|
+
|
|
3
|
+
## Informações da Branch
|
|
4
|
+
|
|
5
|
+
| Campo | Valor |
|
|
6
|
+
|-------|-------|
|
|
7
|
+
| **Branch** | `{BRANCH_NAME}` |
|
|
8
|
+
| **Base** | `main` |
|
|
9
|
+
| **Data da Análise** | `{DATA}` |
|
|
10
|
+
| **Arquivos Alterados** | {NUMERO_ARQUIVOS} |
|
|
11
|
+
| **Arquivos com Gaps** | {NUMERO_GAPS} |
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Resumo Executivo
|
|
16
|
+
|
|
17
|
+
{VISAO_GERAL_COBERTURA}
|
|
18
|
+
|
|
19
|
+
### Estatísticas Rápidas
|
|
20
|
+
|
|
21
|
+
| Métrica | Valor |
|
|
22
|
+
|---------|-------|
|
|
23
|
+
| Arquivos analisados | {X} |
|
|
24
|
+
| Com cobertura adequada | {X} |
|
|
25
|
+
| Precisam de testes | {X} |
|
|
26
|
+
| Cenários identificados | {X} |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Análise por Arquivo
|
|
31
|
+
|
|
32
|
+
### 1. `{CAMINHO_ARQUIVO}`
|
|
33
|
+
|
|
34
|
+
**Mudanças Realizadas:**
|
|
35
|
+
- {RESUMO_MUDANCAS}
|
|
36
|
+
|
|
37
|
+
**Cobertura Atual:**
|
|
38
|
+
- **Arquivo de teste**: `{CAMINHO_TESTE}` | ❌ Não encontrado
|
|
39
|
+
- **Status**: ✅ Totalmente coberto | ⚠️ Parcialmente coberto | ❌ Não coberto
|
|
40
|
+
|
|
41
|
+
**Testes Ausentes:**
|
|
42
|
+
- [ ] {CENARIO_1}
|
|
43
|
+
- [ ] {CENARIO_2}
|
|
44
|
+
|
|
45
|
+
**Prioridade:** Alta | Média | Baixa
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Plano de Implementação
|
|
50
|
+
|
|
51
|
+
### 🔴 Alta Prioridade
|
|
52
|
+
|
|
53
|
+
#### `{ARQUIVO_FUNCIONALIDADE}`
|
|
54
|
+
|
|
55
|
+
- **Arquivo de teste**: `{CRIAR_ATUALIZAR_CAMINHO}`
|
|
56
|
+
- **Cenários**:
|
|
57
|
+
1. {CASO_TESTE_1}
|
|
58
|
+
2. {CASO_TESTE_2}
|
|
59
|
+
- **Estrutura sugerida**:
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
describe('{FUNCIONALIDADE}', () => {
|
|
63
|
+
it('should {COMPORTAMENTO_ESPERADO}', () => {
|
|
64
|
+
// arrange
|
|
65
|
+
// act
|
|
66
|
+
// assert
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 🟡 Média Prioridade
|
|
72
|
+
|
|
73
|
+
{MESMA_ESTRUTURA}
|
|
74
|
+
|
|
75
|
+
### 🟢 Baixa Prioridade
|
|
76
|
+
|
|
77
|
+
{MESMA_ESTRUTURA}
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Recomendações
|
|
82
|
+
|
|
83
|
+
1. **{RECOMENDACAO_PRINCIPAL}**
|
|
84
|
+
2. **{OUTRA_RECOMENDACAO}**
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Próximos Passos
|
|
89
|
+
|
|
90
|
+
- [ ] Implementar testes de alta prioridade
|
|
91
|
+
- [ ] Revisar cobertura após implementação
|
|
92
|
+
- [ ] Executar suite completa antes do merge
|