jarvis-ai-framework 2.1.0 → 3.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 +22 -122
- package/agents/AGENTS.md +20 -24
- package/agents/README.md +25 -129
- package/agents/engineering/data/eng.data-engineer.agent.md +12 -35
- package/agents/engineering/eng.agent.md +18 -30
- package/agents/engineering/eng.bug-hunter.md +9 -12
- package/agents/engineering/eng.dev-code-reviewer.md +5 -1
- package/agents/engineering/eng.docs-writer.md +3 -3
- package/agents/engineering/eng.frontend.agent.md +13 -8
- package/agents/engineering/eng.rpa.agent.md +5 -13
- package/agents/engineering/eng.ux-designer.agent.md +4 -0
- package/agents/engineering/qa/eng.qa.quality-champion-task-agent.md +4 -0
- package/agents/engineering/qa/eng.qa.quality-strategist.md +13 -8
- package/agents/engineering/qa/eng.qa.test-architect.md +16 -15
- package/agents/engineering/qa/eng.qa.test-planner.md +22 -17
- package/agents/engineering/qa/eng.qa.testing-engineer.md +99 -15
- package/agents/product/prod.discovery-interviewer.md +22 -3
- package/agents/product/prod.pm-checker.md +4 -0
- package/bin/README.md +142 -0
- package/bin/commands/docs-publish.js +105 -141
- package/bin/commands/docs-sync.js +66 -104
- package/bin/commands/info.js +7 -27
- package/bin/commands/init.js +23 -51
- package/bin/commands/install-rtk.js +9 -3
- package/bin/commands/list.js +5 -18
- package/bin/commands/map.js +58 -0
- package/bin/commands/qa-signoff.js +58 -55
- package/bin/commands/tokens.js +90 -0
- package/bin/commands/whoami.js +30 -26
- package/bin/jarvis.js +9 -153
- package/bin/lib/auth/session.js +20 -20
- package/bin/lib/cli/program.js +219 -0
- package/bin/lib/cli/shared-options.js +29 -0
- package/bin/lib/config/constants.js +70 -2
- package/bin/lib/config/ide-config.js +4 -8
- package/bin/lib/core/profile-filter.js +116 -0
- package/bin/lib/core/scanner.js +5 -31
- package/bin/lib/core/sync-engine.js +21 -14
- package/bin/lib/core/token-report.js +100 -0
- package/bin/lib/docs/fetch-file.js +39 -0
- package/bin/lib/docs/publish-file.js +194 -0
- package/bin/lib/docs/redis-cache.js +49 -0
- package/bin/lib/docs/validate-frontmatter.js +9 -39
- package/bin/lib/env-loader.js +11 -34
- package/bin/lib/flow-map/index.js +65 -0
- package/bin/lib/flow-map/parse.js +223 -0
- package/bin/lib/flow-map/render.js +89 -0
- package/bin/lib/flow-map/tree.js +248 -0
- package/bin/lib/tasks/comment.js +40 -35
- package/bin/lib/utils/frontmatter.js +57 -0
- package/bin/lib/utils/git-parser.js +4 -6
- package/bin/lib/utils/npmrc-parser.js +6 -13
- package/bin/lib/utils/paths.js +2 -4
- package/bin/lib/utils/ui.js +3 -9
- package/bin/lib/vcs/api.js +25 -41
- package/bin/lib/vcs/create-issue.js +49 -33
- package/bin/lib/vcs/create-merge.js +47 -31
- package/bin/lib/vcs/fetch-raw.js +35 -23
- package/members.md +1 -1
- package/package.json +15 -4
- package/rules/AGENTS.md +18 -7
- package/rules/engineering/eng-rules.md +3 -13
- package/rules/engineering/eng-security-rules.md +19 -18
- package/rules/engineering/eng.bump-rules.md +3 -2
- package/rules/engineering/eng.docs-scraping-rules.md +4 -4
- package/rules/engineering/eng.integrations-rules.md +3 -7
- package/rules/engineering/eng.skills-rules.md +1 -5
- package/rules/engineering/eng.specializations-rules.md +18 -8
- package/rules/engineering/frontend/eng.frontend-rules.md +1 -4
- package/rules/engineering/qa/eng.qa.cypress-standards-rules.md +1 -1
- package/rules/engineering/rpa/eng.rpa-rules.md +4 -9
- package/rules/product/README.md +1 -0
- package/rules/product/prod-rules.md +1 -4
- package/rules/product/prod.spec-rules.md +0 -4
- package/rules/rtk-rules.md +0 -1
- package/{rules → rules-on-demand}/engineering/eng.breakdown-subtasks-rules.md +0 -4
- package/{rules → rules-on-demand}/engineering/eng.plan-rules.md +0 -4
- package/{rules → rules-on-demand}/engineering/eng.pr-rules.md +0 -4
- package/{rules → rules-on-demand}/engineering/eng.pre-pr-rules.md +0 -4
- package/{rules → rules-on-demand}/engineering/eng.start-rules.md +0 -4
- package/{rules → rules-on-demand}/engineering/eng.tech-spec-rules.md +1 -2
- package/{rules → rules-on-demand}/engineering/eng.work-rules.md +0 -4
- package/skills/AGENTS.md +69 -106
- package/skills/SKILLS-ROADMAP.md +47 -132
- package/skills/eng-ai/SKILL.md +270 -0
- package/skills/eng-ai/references/1-fundamentos-ml.md +24 -0
- package/skills/eng-ai/references/10-arquitetura-solucoes-ia.md +24 -0
- package/skills/eng-ai/references/11-governanca-ia.md +24 -0
- package/skills/eng-ai/references/12-seguranca-ia-responsavel.md +25 -0
- package/skills/eng-ai/references/2-matematica-estatistica.md +24 -0
- package/skills/eng-ai/references/3-dados-para-ia.md +24 -0
- package/skills/eng-ai/references/4-deep-learning-fundacionais.md +24 -0
- package/skills/eng-ai/references/5-llms-chatbots-agentes-rag.md +25 -0
- package/skills/eng-ai/references/6-avaliacao-experimentacao.md +24 -0
- package/skills/eng-ai/references/7-engenharia-sistemas-ia.md +24 -0
- package/skills/eng-ai/references/8-mlops-plataforma.md +24 -0
- package/skills/eng-ai/references/9-produto-ia.md +24 -0
- package/skills/eng-ai/references/especializacoes.md +17 -0
- package/skills/eng-automation/SKILL.md +290 -0
- package/skills/eng-automation/references/1-fundamentos-automacao.md +25 -0
- package/skills/eng-automation/references/10-ingestao-dados.md +25 -0
- package/skills/eng-automation/references/11-captcha-antibot.md +25 -0
- package/skills/eng-automation/references/12-limites-taxa-sessoes.md +25 -0
- package/skills/eng-automation/references/13-agendamento-orquestracao.md +24 -0
- package/skills/eng-automation/references/14-retentativa-erros.md +25 -0
- package/skills/eng-automation/references/15-autenticacao-credenciais.md +24 -0
- package/skills/eng-automation/references/16-observabilidade-confiabilidade.md +24 -0
- package/skills/eng-automation/references/2-aquisicao-dados.md +25 -0
- package/skills/eng-automation/references/3-automacao-navegador.md +24 -0
- package/skills/eng-automation/references/4-scraping-crawling.md +25 -0
- package/skills/eng-automation/references/5-apis-rest-graphql-soap.md +26 -0
- package/skills/eng-automation/references/6-webhooks-integracao.md +25 -0
- package/skills/eng-automation/references/7-rpa.md +25 -0
- package/skills/eng-automation/references/8-extracao-estruturada.md +25 -0
- package/skills/eng-automation/references/9-extracao-documentos.md +25 -0
- package/skills/eng-automation/references/especializacoes.md +18 -0
- package/skills/eng-backend/SKILL.md +6 -0
- package/skills/eng-backend-arch-c4/SKILL.md +10 -4
- package/skills/eng-backend-microservices-trace/SKILL.md +6 -0
- package/skills/eng-backend-nestjs/SKILL.md +17 -462
- package/skills/eng-backend-nestjs/references/1-arquitetura-modulos.md +54 -0
- package/skills/eng-backend-nestjs/references/2-guards-autenticacao.md +118 -0
- package/skills/eng-backend-nestjs/references/3-interceptors-pipes-filters.md +113 -0
- package/skills/eng-backend-nestjs/references/4-config-logging.md +61 -0
- package/skills/eng-backend-nestjs/references/5-testes.md +83 -0
- package/skills/eng-backend-nestjs/references/6-problemas-comuns.md +53 -0
- package/skills/eng-backend-rabbitmq/SKILL.md +15 -298
- package/skills/eng-backend-rabbitmq/references/1-referencia-endpoints.md +28 -0
- package/skills/eng-backend-rabbitmq/references/2-codigo-consumer-producer.md +90 -0
- package/skills/eng-backend-rabbitmq/references/3-arquiteturas-comuns.md +101 -0
- package/skills/eng-backend-rabbitmq/references/4-troubleshooting.md +93 -0
- package/skills/eng-data/SKILL.md +271 -0
- package/skills/eng-data/references/1-fundamentos-dados.md +24 -0
- package/skills/eng-data/references/10-ciencia-dados.md +24 -0
- package/skills/eng-data/references/11-dataops-plataforma.md +24 -0
- package/skills/eng-data/references/12-seguranca-privacidade.md +24 -0
- package/skills/eng-data/references/2-modelagem-dados.md +24 -0
- package/skills/eng-data/references/3-bancos-dados.md +24 -0
- package/skills/eng-data/references/4-arquitetura-dados.md +24 -0
- package/skills/eng-data/references/5-pipelines-integracao.md +24 -0
- package/skills/eng-data/references/6-qualidade-dados.md +24 -0
- package/skills/eng-data/references/7-governanca-metadados.md +24 -0
- package/skills/eng-data/references/8-estatistica-analise.md +24 -0
- package/skills/eng-data/references/9-analytics-bi.md +24 -0
- package/skills/eng-data/references/especializacoes.md +20 -0
- package/skills/eng-frontend/SKILL.md +18 -5
- package/skills/eng-frontend/references/13-design-system.md +48 -0
- package/skills/eng-frontend/references/14-microfrontend.md +46 -0
- package/skills/eng-global-docs-write/SKILL.md +10 -5
- package/skills/eng-global-pr/SKILL.md +7 -1
- package/skills/eng-global-task-comment/SKILL.md +8 -2
- package/skills/eng-platform/SKILL.md +331 -0
- package/skills/eng-platform/references/1-fundamentos-sistemas.md +23 -0
- package/skills/eng-platform/references/10-resiliencia-arquitetura.md +24 -0
- package/skills/eng-platform/references/11-plataforma-devex.md +24 -0
- package/skills/eng-platform/references/12-finops-custos.md +24 -0
- package/skills/eng-platform/references/13-seguranca-fundamentos.md +26 -0
- package/skills/eng-platform/references/14-profiling-performance.md +23 -0
- package/skills/eng-platform/references/15-testes-carga-chaos.md +23 -0
- package/skills/eng-platform/references/16-cache-multicamada.md +22 -0
- package/skills/eng-platform/references/2-redes.md +23 -0
- package/skills/eng-platform/references/3-cloud.md +24 -0
- package/skills/eng-platform/references/4-iac-automacao.md +24 -0
- package/skills/eng-platform/references/5-containers-orquestracao.md +25 -0
- package/skills/eng-platform/references/6-cicd-entrega.md +24 -0
- package/skills/eng-platform/references/7-observabilidade.md +24 -0
- package/skills/eng-platform/references/8-confiabilidade-sre.md +24 -0
- package/skills/eng-platform/references/9-seguranca-infra.md +26 -0
- package/skills/eng-platform/references/especializacoes.md +34 -0
- package/skills/eng-qa/SKILL.md +283 -0
- package/skills/eng-qa/references/1-fundamentos-qualidade.md +25 -0
- package/skills/eng-qa/references/10-confiabilidade.md +25 -0
- package/skills/eng-qa/references/11-seguranca.md +24 -0
- package/skills/eng-qa/references/12-acessibilidade.md +24 -0
- package/skills/eng-qa/references/13-dados-testes.md +24 -0
- package/skills/eng-qa/references/14-gestao-testes-defeitos.md +25 -0
- package/skills/eng-qa/references/15-arquitetura-qa.md +25 -0
- package/skills/eng-qa/references/2-estrategia-planejamento.md +25 -0
- package/skills/eng-qa/references/3-design-testes.md +25 -0
- package/skills/eng-qa/references/4-manual-exploratorio.md +24 -0
- package/skills/eng-qa/references/5-automacao-testes.md +25 -0
- package/skills/eng-qa/references/6-api-integracao.md +25 -0
- package/skills/eng-qa/references/7-contrato.md +24 -0
- package/skills/eng-qa/references/8-interface-compat-mobile.md +24 -0
- package/skills/eng-qa/references/9-performance.md +24 -0
- package/skills/eng-qa/references/especializacoes.md +29 -0
- package/skills/eng-qa-planner/SKILL.md +264 -0
- package/skills/jarvis-context-detect/SKILL.md +7 -1
- package/skills/jarvis-context-detect/assets/context-profile-template.md +1 -1
- package/skills/jarvis-create-specialization/SKILL.md +14 -0
- package/skills/jarvis-docs-central/README.md +31 -28
- package/skills/jarvis-docs-central/SKILL.md +11 -5
- package/skills/jarvis-docs-index/SKILL.md +10 -2
- package/skills/jarvis-evolution-architect/SKILL.md +6 -0
- package/skills/jarvis-init/SKILL.md +22 -15
- package/skills/jarvis-init/assets/passo-adicionar-stacks.md +47 -18
- package/skills/jarvis-list-specializations/SKILL.md +36 -17
- package/skills/jarvis-report-issue/SKILL.md +7 -1
- package/skills/product-roadmap-report/SKILL.md +8 -0
- package/skills/product-specs/SKILL.md +9 -0
- package/skills/product-specs-update/SKILL.md +6 -0
- package/taxonomy.md +16 -28
- package/templates/AGENTS.md +2 -0
- package/templates/ENV-template.md +10 -2
- package/templates/engineering/qa/qa.sprint-plan-template.md +1 -1
- package/templates/engineering/tech-spec-delivery-template.md +179 -0
- package/workflows/AGENTS.md +14 -2
- package/workflows/README.md +8 -16
- package/workflows/all-tools.md +7 -1
- package/workflows/engineering/data/data.contract.md +8 -0
- package/workflows/engineering/data/data.new-pipeline.md +15 -4
- package/workflows/engineering/eng.breakdown-subtasks.md +9 -0
- package/workflows/engineering/eng.bug-audit.md +10 -13
- package/workflows/engineering/eng.build-tech-spec.md +17 -146
- package/workflows/engineering/eng.create-ard-from-code.md +8 -0
- package/workflows/engineering/eng.create-ard.md +8 -0
- package/workflows/engineering/eng.create-rfc.md +7 -0
- package/workflows/engineering/eng.debug.md +5 -21
- package/workflows/engineering/eng.docs.md +9 -0
- package/workflows/engineering/eng.light-arch.md +7 -0
- package/workflows/engineering/eng.plan.md +15 -2
- package/workflows/engineering/eng.pr.md +24 -30
- package/workflows/engineering/eng.pre-pr.md +33 -15
- package/workflows/engineering/eng.review.md +18 -11
- package/workflows/engineering/eng.rpa.robot.md +17 -7
- package/workflows/engineering/eng.start.md +33 -12
- package/workflows/engineering/eng.work.md +25 -17
- package/workflows/engineering/frontend/eng.frontend-component.md +7 -0
- package/workflows/engineering/frontend/eng.frontend-perf-audit.md +8 -0
- package/workflows/engineering/frontend/eng.frontend-review.md +8 -0
- package/workflows/engineering/qa/eng.qa-refinement-entry.md +7 -0
- package/workflows/engineering/qa/eng.qa-release-signoff.md +6 -0
- package/workflows/engineering/qa/eng.qa-sprint-planning.md +7 -1
- package/workflows/product/prod.roadmap.preview.md +9 -0
- package/workflows/product/prod.spec.ard.md +97 -0
- package/workflows/product/prod.spec.breakdown.md +10 -0
- package/workflows/product/prod.spec.clarify.md +8 -2
- package/workflows/product/prod.spec.discovery.md +11 -1
- package/workflows/product/prod.spec.epic.md +8 -0
- package/workflows/product/prod.spec.frd.md +7 -0
- package/workflows/product/prod.spec.issue.md +6 -0
- package/workflows/product/prod.spec.md +15 -1
- package/workflows/product/prod.spec.prd.md +7 -0
- package/workflows/taxonomy.md +58 -6
- package/workflows/warm-up.md +47 -60
- package/agents/engineering/eng.cybersecurity.agent.md +0 -488
- package/agents/engineering/qa/eng.qa.cypress-specialist.md +0 -109
- package/bin/lib/docs/fetch-file.sh +0 -41
- package/bin/lib/docs/publish-file.sh +0 -284
- package/rules/engineering/eng.downstream-flow-rules.md +0 -297
- package/rules/engineering/qa/eng.qa.exploratory-session-rules.md +0 -137
- package/rules/engineering/qa/eng.qa.quality-gate-scoring-rules.md +0 -181
- package/rules/engineering/qa/eng.qa.tech-spec-validation-criteria-rules.md +0 -120
- package/skills/eng-ai-engineer/SKILL.md +0 -297
- package/skills/eng-data-bi/SKILL.md +0 -200
- package/skills/eng-data-debug/SKILL.md +0 -308
- package/skills/eng-data-engineer/SKILL.md +0 -257
- package/skills/eng-data-onboard/SKILL.md +0 -311
- package/skills/eng-data-orchestrator/SKILL.md +0 -427
- package/skills/eng-devops-performance-engineer/SKILL.md +0 -313
- package/skills/eng-frontend-design-system/SKILL.md +0 -621
- package/skills/eng-frontend-microfrontend/SKILL.md +0 -604
- package/skills/eng-global-browser-extension-builder/SKILL.md +0 -386
- package/skills/eng-global-jira-comment/SKILL.md +0 -21
- package/skills/eng-qa-a11y-audit/SKILL.md +0 -270
- package/skills/eng-qa-bug-report/SKILL.md +0 -1089
- package/skills/eng-qa-bug-report/TASK_MANAGERS.md +0 -138
- package/skills/eng-qa-cypress-e2e/SKILL.md +0 -178
- package/skills/eng-qa-dev-guide/SKILL.md +0 -165
- package/skills/eng-qa-e2e/SKILL.md +0 -401
- package/skills/eng-qa-e2e-spec-writer/SKILL.md +0 -323
- package/skills/eng-qa-exploratory/SKILL.md +0 -189
- package/skills/eng-qa-gate/SKILL.md +0 -371
- package/skills/eng-qa-gate/assets/checklist-validacao.md +0 -291
- package/skills/eng-qa-graphql-contract/SKILL.md +0 -257
- package/skills/eng-qa-quality-report/SKILL.md +0 -413
- package/skills/eng-qa-test-plan/SKILL.md +0 -467
- package/skills/eng-qa-testsprite/SKILL.md +0 -326
- package/skills/eng-qa-testsprite/references/testsprite-mcp.md +0 -224
- package/skills/eng-qa-unit-test/SKILL.md +0 -472
- package/skills/eng-scraper/SKILL.md +0 -684
- package/skills/eng-scraper-robot-builder/SKILL.md +0 -371
- package/skills/eng-security-cybersecurity/SKILL.md +0 -646
- package/skills/eng-security-patch/SKILL.md +0 -382
- package/skills/eng-security-threat-model/SKILL.md +0 -165
- package/skills/eng-security-triage/SKILL.md +0 -270
- package/templates/engineering/qa/eng.qa.quality-gate-examples-template.md +0 -311
- package/templates/engineering/qa/eng.qa.quality-gate-report-template.md +0 -249
- package/templates/engineering/qa/qa.cypress-test-template.md +0 -172
- package/templates/engineering/qa/qa.exploratory-session-template.md +0 -148
- package/templates/engineering/qa/qa.quality-report-template.md +0 -130
- package/workflows/engineering/eng.security-audit.md +0 -312
- package/workflows/engineering/eng.security-incident.md +0 -275
- package/workflows/engineering/eng.security-pipeline.md +0 -210
- package/workflows/engineering/eng.security-review.md +0 -235
- package/workflows/engineering/qa/eng.qa-dev-quality-guide.md +0 -51
- package/workflows/engineering/qa/eng.qa-e2e-test-generation.md +0 -51
- package/workflows/engineering/qa/eng.qa-exploratory-session.md +0 -60
- package/workflows/engineering/qa/eng.qa-quality-gate-validation.md +0 -202
- package/workflows/engineering/qa/eng.qa-quality-report.md +0 -78
- /package/skills/{eng-qa-test-plan → eng-qa-planner}/assets/test-coverage-template.md +0 -0
- /package/skills/{eng-qa-test-plan → eng-qa-planner}/assets/test-patterns.md +0 -0
- /package/templates/{CDD aplicado a Prompts.md → cdd-aplicado-a-prompts.md} +0 -0
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cypress-specialist
|
|
3
|
-
description: Especialista em Cypress + TypeScript. Conhece Page Objects, Custom Commands, fixtures, cy.intercept, viewport, CI config e debugging de testes flaky. Referencia eng.qa.cypress-standards-rules.md como fonte de verdade das convenções do projeto.
|
|
4
|
-
tools: Read, Glob, Grep, Bash, Write, Edit
|
|
5
|
-
model: sonnet
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Cypress Specialist — Especialista em Testes E2E Cypress
|
|
9
|
-
|
|
10
|
-
Você é o **especialista em Cypress + TypeScript do time**. Sua expertise cobre toda a stack
|
|
11
|
-
de testes E2E: desde escrita de specs até configuração de CI e debugging de testes instáveis.
|
|
12
|
-
|
|
13
|
-
> 🔒 **Fonte de verdade de convenções**: `$RULES_FOLDER/engineering/qa/eng.qa.cypress-standards-rules.md`
|
|
14
|
-
> Sempre ler antes de sugerir padrões ou gerar código.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Skills de Referência
|
|
19
|
-
|
|
20
|
-
| Situação | Skill |
|
|
21
|
-
|----------|-------|
|
|
22
|
-
| Gerar nova spec Cypress | `eng-qa-cypress-e2e` |
|
|
23
|
-
| Orientar dev sobre cobertura | `eng-qa-dev-guide` |
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Domínios de Expertise
|
|
28
|
-
|
|
29
|
-
### Page Objects
|
|
30
|
-
- Estrutura fluent (retorno `this`)
|
|
31
|
-
- Organização por domínio vs. por página
|
|
32
|
-
- Herança e composição entre Page Objects
|
|
33
|
-
- Quando criar vs. quando estender um existente
|
|
34
|
-
|
|
35
|
-
### Custom Commands
|
|
36
|
-
- Tipagem com TypeScript (`Cypress.Commands.add`)
|
|
37
|
-
- Declaração em `support/index.d.ts`
|
|
38
|
-
- Commands de autenticação via `cy.request` (não via UI)
|
|
39
|
-
- Commands de setup de estado (seed de dados, limpeza)
|
|
40
|
-
|
|
41
|
-
### Fixtures e Intercepts
|
|
42
|
-
- Estrutura de pastas de fixtures por domínio
|
|
43
|
-
- Tipagem de fixtures com tipos do projeto (`cy.fixture<T>`)
|
|
44
|
-
- Padrões de `cy.intercept` para REST e GraphQL
|
|
45
|
-
- Gestão de aliases e `cy.wait`
|
|
46
|
-
- Estratégia de intercept para diferentes cenários (sucesso, erro, timeout)
|
|
47
|
-
|
|
48
|
-
### Viewport e Responsividade
|
|
49
|
-
- `cy.viewport()` para testes multi-device
|
|
50
|
-
- Breakpoints a cobrir conforme o projeto
|
|
51
|
-
- Configuração em `cypress.config.ts`
|
|
52
|
-
|
|
53
|
-
### Configuração e CI
|
|
54
|
-
- `cypress.config.ts` — baseUrl, env, retries, video
|
|
55
|
-
- Estratégia de retries para flakiness (retry ≠ resolver o problema)
|
|
56
|
-
- Paralelização com Cypress Cloud ou via CI nativo
|
|
57
|
-
- Variáveis de ambiente seguras (`Cypress.env()` vs. hardcode)
|
|
58
|
-
- Artefatos de CI: screenshots, vídeos, relatórios
|
|
59
|
-
|
|
60
|
-
### Debugging de Testes Flaky
|
|
61
|
-
|
|
62
|
-
Causas comuns e soluções:
|
|
63
|
-
|
|
64
|
-
| Causa | Sintoma | Solução |
|
|
65
|
-
|-------|---------|---------|
|
|
66
|
-
| Race condition | Teste falha 1 em 5 vezes | Usar `cy.wait('@alias')` em vez de `cy.wait(ms)` |
|
|
67
|
-
| Estado compartilhado | Teste passa isolado, falha em suite | `beforeEach` garante estado limpo |
|
|
68
|
-
| Animação/transição | Clique em elemento não dispara | `.should('be.visible')` antes de `.click()` |
|
|
69
|
-
| Dados dinâmicos | Assertion em texto que muda | Usar `contain` em vez de `eq`, ou mockar dado |
|
|
70
|
-
| API real | Falha intermitente por timeout | Interceptar sempre — nunca depender de API real |
|
|
71
|
-
| Seletor frágil | Falha após deploy de UI | Migrar para `data-testid` |
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Como Responder
|
|
76
|
-
|
|
77
|
-
### Para dúvidas de padrão
|
|
78
|
-
Verificar `eng.qa.cypress-standards-rules.md` e responder com base nas convenções definidas.
|
|
79
|
-
Se o padrão não cobrir o caso, sugerir uma extensão consistente com o que já existe.
|
|
80
|
-
|
|
81
|
-
### Para debugging
|
|
82
|
-
1. Perguntar: o teste falha sempre ou às vezes? (determina se é flaky ou quebrado)
|
|
83
|
-
2. Pedir o erro e o trecho de código relevante
|
|
84
|
-
3. Identificar a causa raiz antes de sugerir solução
|
|
85
|
-
4. Nunca recomendar aumentar retry como solução definitiva
|
|
86
|
-
|
|
87
|
-
### Para revisão de spec
|
|
88
|
-
Ler a spec fornecida e verificar:
|
|
89
|
-
- Seletores: algum usando classe/id? → migrar para `data-testid`
|
|
90
|
-
- Intercepts: alguma API não interceptada? → adicionar
|
|
91
|
-
- Dependência entre testes: algum `it` depende de outro? → corrigir
|
|
92
|
-
- `cy.wait(ms)` hardcoded? → substituir por alias
|
|
93
|
-
- Page Object ausente? → criar ou indicar onde adicionar
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## Regras
|
|
98
|
-
|
|
99
|
-
### Nunca
|
|
100
|
-
- Sugerir `cy.wait({número})` como solução — identificar a causa real da espera
|
|
101
|
-
- Aceitar seletores por classe CSS em specs novas
|
|
102
|
-
- Recomendar retry como fix de flakiness — é um paliativo, não solução
|
|
103
|
-
- Ignorar tipagem TypeScript — fixtures, commands e Page Objects devem ser tipados
|
|
104
|
-
|
|
105
|
-
### Sempre
|
|
106
|
-
- Ler `eng.qa.cypress-standards-rules.md` antes de qualquer sugestão de padrão
|
|
107
|
-
- Justificar por que uma prática é ruim antes de sugerir a alternativa
|
|
108
|
-
- Verificar se já existe Page Object/command para o domínio antes de criar novo
|
|
109
|
-
- Considerar manutenibilidade: um teste bom é um teste que não falha sem razão
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Busca arquivo do central-docs (GitLab / GitHub / Bitbucket) + cache Redis
|
|
3
|
-
|
|
4
|
-
FILE_PATH="$1"
|
|
5
|
-
REF="${2:-main}"
|
|
6
|
-
|
|
7
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
|
|
9
|
-
if [ -z "$FILE_PATH" ]; then
|
|
10
|
-
echo "Uso: fetch-file.sh <file-path> [ref]" >&2
|
|
11
|
-
exit 1
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
if [ -z "$CENTRAL_DOCS_REPO" ]; then
|
|
15
|
-
echo "Erro: CENTRAL_DOCS_REPO não definido no ENV.md" >&2
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
CACHE_KEY="docs:${FILE_PATH}:${REF}"
|
|
20
|
-
CACHED=$(redis-cli GET "$CACHE_KEY" 2>/dev/null || echo "")
|
|
21
|
-
|
|
22
|
-
if [ -n "$CACHED" ]; then
|
|
23
|
-
echo "$CACHED"
|
|
24
|
-
exit 0
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
ERR_FILE=$(mktemp)
|
|
28
|
-
RESPONSE=$(node "${SCRIPT_DIR}/../vcs/fetch-raw.js" "$FILE_PATH" "$REF" 2>"$ERR_FILE")
|
|
29
|
-
EXIT_CODE=$?
|
|
30
|
-
|
|
31
|
-
if [ $EXIT_CODE -eq 0 ]; then
|
|
32
|
-
TTL="${CENTRAL_DOCS_CACHE_TTL:-3600}"
|
|
33
|
-
echo "$RESPONSE" | redis-cli -x SETEX "$CACHE_KEY" "$TTL" >/dev/null 2>&1 || true
|
|
34
|
-
rm -f "$ERR_FILE"
|
|
35
|
-
echo "$RESPONSE"
|
|
36
|
-
exit 0
|
|
37
|
-
fi
|
|
38
|
-
|
|
39
|
-
cat "$ERR_FILE" >&2
|
|
40
|
-
rm -f "$ERR_FILE"
|
|
41
|
-
exit $EXIT_CODE
|
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Publica documento no central-docs (GitLab / GitHub / Bitbucket) via branch + MR/PR
|
|
3
|
-
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
LOCAL_FILE="$1" # Ex: ./docs/engineering/ard-api-wallet.md
|
|
7
|
-
TIPO="$2" # prd|frd|ard|rfc
|
|
8
|
-
FEATURE="$3" # Ex: api-wallet-auth-jwt
|
|
9
|
-
|
|
10
|
-
# Resolver path absoluto do script (independente de cwd)
|
|
11
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
12
|
-
|
|
13
|
-
if [ -z "$LOCAL_FILE" ] || [ -z "$TIPO" ] || [ -z "$FEATURE" ]; then
|
|
14
|
-
echo "Uso: publish-file.sh <local-file> <tipo> <feature>" >&2
|
|
15
|
-
echo "Tipos válidos: prd, frd, ard, rfc, swagger, qa-report" >&2
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
if [ ! -f "$LOCAL_FILE" ]; then
|
|
20
|
-
echo "Erro: Arquivo não encontrado: $LOCAL_FILE" >&2
|
|
21
|
-
exit 1
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
# Detectar IDE directory
|
|
25
|
-
if [ -d ".windsurf" ]; then
|
|
26
|
-
IDE=".windsurf"
|
|
27
|
-
elif [ -d ".claude" ]; then
|
|
28
|
-
IDE=".claude"
|
|
29
|
-
elif [ -d ".cursor" ]; then
|
|
30
|
-
IDE=".cursor"
|
|
31
|
-
elif [ -d ".vscode" ]; then
|
|
32
|
-
IDE=".vscode"
|
|
33
|
-
else
|
|
34
|
-
echo "Erro: IDE directory não encontrado (.windsurf, .claude, .cursor, .vscode)" >&2
|
|
35
|
-
exit 1
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
# 1. Ler ENV.md (se não houver override)
|
|
39
|
-
if [ -n "$SQUAD_OVERRIDE" ] && [ -n "$WORKSPACE_OVERRIDE" ]; then
|
|
40
|
-
# Usar override das variáveis de ambiente
|
|
41
|
-
SQUAD="$SQUAD_OVERRIDE"
|
|
42
|
-
WORKSPACE="$WORKSPACE_OVERRIDE"
|
|
43
|
-
else
|
|
44
|
-
# Ler do ENV.md
|
|
45
|
-
if [ ! -f "$IDE/ENV.md" ]; then
|
|
46
|
-
echo "Erro: ENV.md não encontrado em $IDE/" >&2
|
|
47
|
-
echo "Ou passe --squad e --workspace via CLI" >&2
|
|
48
|
-
exit 1
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
SQUAD=$(grep '^SQUAD=' "$IDE/ENV.md" | cut -d'=' -f2 | tr -d ' ')
|
|
52
|
-
WORKSPACE=$(grep '^WORKSPACE=' "$IDE/ENV.md" | cut -d'=' -f2 | tr -d ' ')
|
|
53
|
-
|
|
54
|
-
if [ -z "$SQUAD" ] || [ -z "$WORKSPACE" ]; then
|
|
55
|
-
echo "Erro: SQUAD ou WORKSPACE não definidos no ENV.md" >&2
|
|
56
|
-
echo "Ou passe --squad e --workspace via CLI" >&2
|
|
57
|
-
exit 1
|
|
58
|
-
fi
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
TARGET_BRANCH="${CENTRAL_DOCS_TARGET_BRANCH:-dev}"
|
|
62
|
-
|
|
63
|
-
if [ -z "$CENTRAL_DOCS_REPO" ]; then
|
|
64
|
-
echo "Erro: CENTRAL_DOCS_REPO não definido no ENV.md" >&2
|
|
65
|
-
exit 1
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
# 2. Validar frontmatter
|
|
69
|
-
echo "Validando frontmatter..."
|
|
70
|
-
node --input-type=module -e "
|
|
71
|
-
import { validateFrontmatter } from 'file://${SCRIPT_DIR}/validate-frontmatter.js';
|
|
72
|
-
try {
|
|
73
|
-
validateFrontmatter('$LOCAL_FILE', '$TIPO');
|
|
74
|
-
console.log('✅ Frontmatter válido');
|
|
75
|
-
} catch (error) {
|
|
76
|
-
console.error(error.message);
|
|
77
|
-
process.exit(1);
|
|
78
|
-
}
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
if [ $? -ne 0 ]; then
|
|
82
|
-
exit 1
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
# 3. Extrair metadados
|
|
86
|
-
METADATA=$(node --input-type=module -e "
|
|
87
|
-
import { extractMetadata } from 'file://${SCRIPT_DIR}/validate-frontmatter.js';
|
|
88
|
-
const metadata = extractMetadata('$LOCAL_FILE');
|
|
89
|
-
console.log(JSON.stringify(metadata));
|
|
90
|
-
")
|
|
91
|
-
|
|
92
|
-
VERSION=$(echo "$METADATA" | jq -r '.version // "1.0.0"')
|
|
93
|
-
STATUS=$(echo "$METADATA" | jq -r '.status // "draft"')
|
|
94
|
-
JIRA=$(echo "$METADATA" | jq -r '.jira // ""')
|
|
95
|
-
DOC_NAME=$(echo "$METADATA" | jq -r '.name // ""')
|
|
96
|
-
|
|
97
|
-
# 4. Definir paths
|
|
98
|
-
if [ "$TIPO" = "prd" ] || [ "$TIPO" = "frd" ]; then
|
|
99
|
-
DEST_PATH="${SQUAD}/${WORKSPACE}/product/${TIPO}-${FEATURE}.md"
|
|
100
|
-
AREA="product"
|
|
101
|
-
elif [ "$TIPO" = "ard" ]; then
|
|
102
|
-
DEST_PATH="${SQUAD}/${WORKSPACE}/engineering/ARD/${TIPO}-${FEATURE}.md"
|
|
103
|
-
AREA="engineering"
|
|
104
|
-
elif [ "$TIPO" = "rfc" ]; then
|
|
105
|
-
DEST_PATH="${SQUAD}/${WORKSPACE}/engineering/RFC/${TIPO}-${FEATURE}.md"
|
|
106
|
-
AREA="engineering"
|
|
107
|
-
elif [ "$TIPO" = "swagger" ]; then
|
|
108
|
-
# Detectar extensão do arquivo (yaml, json ou md)
|
|
109
|
-
FILE_EXT="${LOCAL_FILE##*.}"
|
|
110
|
-
if [ "$FILE_EXT" = "yaml" ] || [ "$FILE_EXT" = "yml" ]; then
|
|
111
|
-
DEST_PATH="${SQUAD}/${WORKSPACE}/engineering/swagger/api-${FEATURE}.yaml"
|
|
112
|
-
elif [ "$FILE_EXT" = "json" ]; then
|
|
113
|
-
DEST_PATH="${SQUAD}/${WORKSPACE}/engineering/swagger/api-${FEATURE}.json"
|
|
114
|
-
else
|
|
115
|
-
# Default para .md (wrapper com metadados)
|
|
116
|
-
DEST_PATH="${SQUAD}/${WORKSPACE}/engineering/swagger/swagger-${FEATURE}.md"
|
|
117
|
-
fi
|
|
118
|
-
AREA="engineering"
|
|
119
|
-
elif [ "$TIPO" = "qa-report" ]; then
|
|
120
|
-
DEST_PATH="${SQUAD}/${WORKSPACE}/engineering/qa/qa-report-${FEATURE}.md"
|
|
121
|
-
AREA="engineering"
|
|
122
|
-
else
|
|
123
|
-
echo "Erro: Tipo inválido: $TIPO" >&2
|
|
124
|
-
echo "Tipos válidos: prd, frd, ard, rfc, swagger, qa-report" >&2
|
|
125
|
-
exit 1
|
|
126
|
-
fi
|
|
127
|
-
|
|
128
|
-
INDEX_PATH="${SQUAD}/${WORKSPACE}/index.md"
|
|
129
|
-
BRANCH_NAME="docs/${SQUAD}/${WORKSPACE}/${TIPO}-${FEATURE}"
|
|
130
|
-
|
|
131
|
-
echo ""
|
|
132
|
-
echo "📋 Resumo da Publicação:"
|
|
133
|
-
echo " Squad: $SQUAD"
|
|
134
|
-
echo " Workspace: $WORKSPACE"
|
|
135
|
-
echo " Tipo: $TIPO"
|
|
136
|
-
echo " Feature: $FEATURE"
|
|
137
|
-
echo " Destino: $DEST_PATH"
|
|
138
|
-
echo " Branch: $BRANCH_NAME → $TARGET_BRANCH"
|
|
139
|
-
echo ""
|
|
140
|
-
|
|
141
|
-
# 5–6. Token e parse do repo ficam no adapter VCS (api.js)
|
|
142
|
-
|
|
143
|
-
# 7. Ler conteúdo do arquivo local e encodar em base64
|
|
144
|
-
FILE_CONTENT=$(cat "$LOCAL_FILE" | base64)
|
|
145
|
-
|
|
146
|
-
# 8. Buscar index.md atual
|
|
147
|
-
echo "Buscando index.md do workspace..."
|
|
148
|
-
INDEX_CONTENT=$(bash "${SCRIPT_DIR}/fetch-file.sh" "$INDEX_PATH" "$TARGET_BRANCH" 2>/dev/null || echo "")
|
|
149
|
-
|
|
150
|
-
if [ -z "$INDEX_CONTENT" ]; then
|
|
151
|
-
echo "⚠️ index.md não encontrado, será criado"
|
|
152
|
-
INDEX_ACTION="create"
|
|
153
|
-
INDEX_CONTENT="# $WORKSPACE
|
|
154
|
-
|
|
155
|
-
**Squad:** $SQUAD
|
|
156
|
-
|
|
157
|
-
## $AREA
|
|
158
|
-
|
|
159
|
-
"
|
|
160
|
-
else
|
|
161
|
-
INDEX_ACTION="update"
|
|
162
|
-
fi
|
|
163
|
-
|
|
164
|
-
# 9. Adicionar nova linha ao index.md
|
|
165
|
-
NEW_LINE="- [${TIPO}-${FEATURE}.md](${AREA}/${TIPO}-${FEATURE}.md) | v${VERSION} | ${STATUS}"
|
|
166
|
-
[ -n "$JIRA" ] && NEW_LINE="${NEW_LINE} | jira: ${JIRA}"
|
|
167
|
-
[ -n "$DOC_NAME" ] && NEW_LINE="${NEW_LINE} | ${DOC_NAME}"
|
|
168
|
-
|
|
169
|
-
# Adicionar linha na seção correta
|
|
170
|
-
UPDATED_INDEX=$(echo "$INDEX_CONTENT" | awk -v line="$NEW_LINE" -v area="$AREA" '
|
|
171
|
-
/^## (product|engineering)/ {
|
|
172
|
-
print
|
|
173
|
-
if ($2 == area) {
|
|
174
|
-
found = 1
|
|
175
|
-
getline
|
|
176
|
-
print line
|
|
177
|
-
}
|
|
178
|
-
next
|
|
179
|
-
}
|
|
180
|
-
{ print }
|
|
181
|
-
END {
|
|
182
|
-
if (!found) {
|
|
183
|
-
print ""
|
|
184
|
-
print "## " area
|
|
185
|
-
print line
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
')
|
|
189
|
-
|
|
190
|
-
UPDATED_INDEX_B64=$(echo "$UPDATED_INDEX" | base64)
|
|
191
|
-
|
|
192
|
-
# 10. Criar commit via adapter VCS
|
|
193
|
-
echo "Criando branch e commit..."
|
|
194
|
-
|
|
195
|
-
COMMIT_JSON=$(mktemp)
|
|
196
|
-
cat > "$COMMIT_JSON" <<EOF
|
|
197
|
-
{
|
|
198
|
-
"branch": $(printf '%s' "$BRANCH_NAME" | jq -Rs .),
|
|
199
|
-
"startBranch": $(printf '%s' "$TARGET_BRANCH" | jq -Rs .),
|
|
200
|
-
"message": $(printf '%s' "docs(${SQUAD}): add ${TIPO} ${FEATURE}" | jq -Rs .),
|
|
201
|
-
"files": [
|
|
202
|
-
{
|
|
203
|
-
"path": $(printf '%s' "$DEST_PATH" | jq -Rs .),
|
|
204
|
-
"contentBase64": $(printf '%s' "$FILE_CONTENT" | jq -Rs .),
|
|
205
|
-
"action": "create"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"path": $(printf '%s' "$INDEX_PATH" | jq -Rs .),
|
|
209
|
-
"contentBase64": $(printf '%s' "$UPDATED_INDEX_B64" | jq -Rs .),
|
|
210
|
-
"action": $(printf '%s' "$INDEX_ACTION" | jq -Rs .)
|
|
211
|
-
}
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
EOF
|
|
215
|
-
|
|
216
|
-
COMMIT_RESULT=$(node --input-type=module -e "
|
|
217
|
-
import { readFileSync } from 'node:fs';
|
|
218
|
-
import { commitFiles } from 'file://${SCRIPT_DIR}/../vcs/api.js';
|
|
219
|
-
const opts = JSON.parse(readFileSync('$COMMIT_JSON', 'utf-8'));
|
|
220
|
-
const result = await commitFiles(process.env.CENTRAL_DOCS_REPO, opts);
|
|
221
|
-
console.log(JSON.stringify(result));
|
|
222
|
-
" 2>&1)
|
|
223
|
-
COMMIT_EXIT=$?
|
|
224
|
-
rm -f "$COMMIT_JSON"
|
|
225
|
-
|
|
226
|
-
if [ $COMMIT_EXIT -ne 0 ]; then
|
|
227
|
-
echo "❌ Erro ao criar commit:" >&2
|
|
228
|
-
echo "$COMMIT_RESULT" >&2
|
|
229
|
-
exit 1
|
|
230
|
-
fi
|
|
231
|
-
|
|
232
|
-
COMMIT_SHA=$(echo "$COMMIT_RESULT" | jq -r '.sha')
|
|
233
|
-
echo "✅ Commit criado: $COMMIT_SHA"
|
|
234
|
-
|
|
235
|
-
# 11. Criar MR/PR
|
|
236
|
-
echo "Criando Merge/Pull Request..."
|
|
237
|
-
|
|
238
|
-
MR_DESCRIPTION="## Documento
|
|
239
|
-
|
|
240
|
-
- **Tipo**: ${TIPO}
|
|
241
|
-
- **Workspace**: ${WORKSPACE}
|
|
242
|
-
- **Feature**: ${FEATURE}"
|
|
243
|
-
|
|
244
|
-
[ -n "$JIRA" ] && MR_DESCRIPTION="${MR_DESCRIPTION}
|
|
245
|
-
- **Card**: ${JIRA}"
|
|
246
|
-
|
|
247
|
-
[ -n "$DOC_NAME" ] && MR_DESCRIPTION="${MR_DESCRIPTION}
|
|
248
|
-
- **Nome**: ${DOC_NAME}"
|
|
249
|
-
|
|
250
|
-
BODY_FILE=$(mktemp)
|
|
251
|
-
printf '%s' "$MR_DESCRIPTION" > "$BODY_FILE"
|
|
252
|
-
|
|
253
|
-
MR_RESULT=$(node "${SCRIPT_DIR}/../vcs/create-merge.js" \
|
|
254
|
-
--repo "$CENTRAL_DOCS_REPO" \
|
|
255
|
-
--source "$BRANCH_NAME" \
|
|
256
|
-
--target "$TARGET_BRANCH" \
|
|
257
|
-
--title "docs(${SQUAD}): ${TIPO} ${FEATURE}" \
|
|
258
|
-
--body-file "$BODY_FILE" 2>&1)
|
|
259
|
-
MR_EXIT=$?
|
|
260
|
-
rm -f "$BODY_FILE"
|
|
261
|
-
|
|
262
|
-
if [ $MR_EXIT -ne 0 ]; then
|
|
263
|
-
echo "❌ Erro ao criar MR/PR:" >&2
|
|
264
|
-
echo "$MR_RESULT" >&2
|
|
265
|
-
exit 1
|
|
266
|
-
fi
|
|
267
|
-
|
|
268
|
-
MR_URL=$(echo "$MR_RESULT" | tail -1 | jq -r '.url // empty')
|
|
269
|
-
MR_IID=$(echo "$MR_RESULT" | tail -1 | jq -r '.iid // empty')
|
|
270
|
-
|
|
271
|
-
echo ""
|
|
272
|
-
echo "✅ Merge/Pull Request criado com sucesso!"
|
|
273
|
-
echo ""
|
|
274
|
-
echo " #${MR_IID}: ${BRANCH_NAME} → ${TARGET_BRANCH}"
|
|
275
|
-
echo " URL: ${MR_URL}"
|
|
276
|
-
echo ""
|
|
277
|
-
|
|
278
|
-
# 12. Invalidar cache Redis
|
|
279
|
-
redis-cli DEL "docs:${INDEX_PATH}:${TARGET_BRANCH}" >/dev/null 2>&1 || true
|
|
280
|
-
redis-cli DEL "docs:${INDEX_PATH}:main" >/dev/null 2>&1 || true
|
|
281
|
-
|
|
282
|
-
echo "🔄 Cache Redis invalidado"
|
|
283
|
-
echo ""
|
|
284
|
-
echo "✅ Publicação concluída!"
|