@brunosps00/dev-workflow 0.0.7 → 0.0.8
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/bin/dev-workflow.js +11 -4
- package/lib/install-deps.js +42 -0
- package/package.json +1 -1
- package/scaffold/en/commands/dw-bugfix.md +2 -3
- package/scaffold/en/commands/dw-fix-qa.md +1 -2
- package/scaffold/en/commands/dw-functional-doc.md +0 -1
- package/scaffold/en/commands/dw-run-qa.md +2 -3
- package/scaffold/en/commands/dw-run-task.md +1 -2
- package/scaffold/pt-br/commands/dw-bugfix.md +2 -3
- package/scaffold/pt-br/commands/dw-fix-qa.md +1 -2
- package/scaffold/pt-br/commands/dw-functional-doc.md +0 -1
- package/scaffold/pt-br/commands/dw-run-qa.md +2 -3
- package/scaffold/pt-br/commands/dw-run-task.md +1 -2
- package/scaffold/skills/agent-browser/SKILL.md +0 -750
- package/scaffold/skills/agent-browser/references/authentication.md +0 -303
- package/scaffold/skills/agent-browser/references/commands.md +0 -295
- package/scaffold/skills/agent-browser/references/profiling.md +0 -120
- package/scaffold/skills/agent-browser/references/proxy-support.md +0 -194
- package/scaffold/skills/agent-browser/references/session-management.md +0 -193
- package/scaffold/skills/agent-browser/references/snapshot-refs.md +0 -219
- package/scaffold/skills/agent-browser/references/video-recording.md +0 -173
- package/scaffold/skills/agent-browser/templates/authenticated-session.sh +0 -105
- package/scaffold/skills/agent-browser/templates/capture-workflow.sh +0 -69
- package/scaffold/skills/agent-browser/templates/form-automation.sh +0 -62
package/bin/dev-workflow.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const { run } = require('../lib/init');
|
|
4
|
+
const installDeps = require('../lib/install-deps');
|
|
4
5
|
|
|
5
6
|
const args = process.argv.slice(2);
|
|
6
7
|
const command = args[0];
|
|
@@ -19,13 +20,15 @@ const HELP_TEXT = `
|
|
|
19
20
|
Usage:
|
|
20
21
|
npx dev-workflow init [--force] [--lang=en|pt-br]
|
|
21
22
|
npx dev-workflow update [--lang=en|pt-br]
|
|
23
|
+
npx dev-workflow install-deps
|
|
22
24
|
npx dev-workflow help
|
|
23
25
|
|
|
24
26
|
Commands:
|
|
25
|
-
init
|
|
26
|
-
update
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
init Scaffold .dw/ (commands, templates, references, scripts, skills, rules, MCPs)
|
|
28
|
+
update Update managed files (commands, templates, references, scripts, skills, wrappers, MCPs)
|
|
29
|
+
Preserves: .dw/rules/, .dw/spec/, user data
|
|
30
|
+
install-deps Install system dependencies (Playwright browsers, MCP servers)
|
|
31
|
+
help Show this help message
|
|
29
32
|
|
|
30
33
|
Options:
|
|
31
34
|
--force Overwrite existing files (init only; update always overwrites managed files)
|
|
@@ -37,6 +40,7 @@ const HELP_TEXT = `
|
|
|
37
40
|
npx dev-workflow init --lang=pt-br # Portuguese, no prompt
|
|
38
41
|
npx dev-workflow init --force # Overwrite existing files
|
|
39
42
|
npx dev-workflow update --lang=en # Update all managed files to latest version
|
|
43
|
+
npx dev-workflow install-deps # Install Playwright browsers and MCP servers
|
|
40
44
|
`;
|
|
41
45
|
|
|
42
46
|
async function main() {
|
|
@@ -47,6 +51,9 @@ async function main() {
|
|
|
47
51
|
case 'update':
|
|
48
52
|
await run({ force: !!flags.force, lang: flags.lang, mode: 'update' });
|
|
49
53
|
break;
|
|
54
|
+
case 'install-deps':
|
|
55
|
+
installDeps.run();
|
|
56
|
+
break;
|
|
50
57
|
case 'help':
|
|
51
58
|
case '--help':
|
|
52
59
|
case '-h':
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const { execSync } = require('child_process');
|
|
2
|
+
|
|
3
|
+
function run() {
|
|
4
|
+
console.log('\n dev-workflow install-deps');
|
|
5
|
+
console.log(` ${'='.repeat(40)}\n`);
|
|
6
|
+
|
|
7
|
+
const deps = [
|
|
8
|
+
{
|
|
9
|
+
name: 'Playwright browsers',
|
|
10
|
+
check: 'npx playwright --version',
|
|
11
|
+
install: 'npx playwright install --with-deps',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'Context7 MCP',
|
|
15
|
+
check: null,
|
|
16
|
+
install: 'npx -y @upstash/context7-mcp --help',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
let installed = 0;
|
|
21
|
+
let skipped = 0;
|
|
22
|
+
let failed = 0;
|
|
23
|
+
|
|
24
|
+
for (const dep of deps) {
|
|
25
|
+
process.stdout.write(` Installing ${dep.name}...`);
|
|
26
|
+
try {
|
|
27
|
+
execSync(dep.install, { stdio: 'pipe', timeout: 300000 });
|
|
28
|
+
console.log(' \x1b[32m✓\x1b[0m');
|
|
29
|
+
installed++;
|
|
30
|
+
} catch (err) {
|
|
31
|
+
console.log(' \x1b[31m✗\x1b[0m');
|
|
32
|
+
console.log(` Error: ${err.message.split('\n')[0]}`);
|
|
33
|
+
failed++;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
console.log(`\n ${'='.repeat(40)}`);
|
|
38
|
+
console.log(` Done! ${installed} installed, ${skipped} skipped, ${failed} failed`);
|
|
39
|
+
console.log();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
module.exports = { run };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brunosps00/dev-workflow",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "AI-driven development workflow commands for any project. Scaffolds a complete PRD-to-PR pipeline with multi-platform AI assistant support.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"dev-workflow": "./bin/dev-workflow.js"
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
When available in the project at `./.agents/skills/`, use these skills as contextual support without replacing this command:
|
|
17
17
|
|
|
18
18
|
- `vercel-react-best-practices`: use when the bug affects React/Next.js and there is suspicion of render, hydration, fetching, waterfall, bundle, or re-render issues
|
|
19
|
-
- `agent-browser`: use when the bug requires reproduction in a real browser, persistent session, request inspection, or visual capture
|
|
20
19
|
- `webapp-testing`: use when the fix requires a reproducible E2E/retest flow in a web app
|
|
21
20
|
- `security-review`: use when the root cause touches auth, authorization, external input, upload, secrets, SQL, XSS, SSRF, or other sensitive surfaces
|
|
22
21
|
|
|
@@ -158,7 +157,7 @@
|
|
|
158
157
|
- Related error messages
|
|
159
158
|
- Stack traces
|
|
160
159
|
- Recently modified files
|
|
161
|
-
- If the bug is UI-related or depends on browser flow, supplement collection with `
|
|
160
|
+
- If the bug is UI-related or depends on browser flow, supplement collection with `webapp-testing`
|
|
162
161
|
|
|
163
162
|
### 3. Clarification Questions (MANDATORY - EXACTLY 3)
|
|
164
163
|
|
|
@@ -196,7 +195,7 @@
|
|
|
196
195
|
- **Probable Cause**: Based on the evidence
|
|
197
196
|
- **Affected Files**: List of files to modify
|
|
198
197
|
- **Impact**: Other components that may be affected
|
|
199
|
-
- **Skills used**: explicitly record if the analysis used `vercel-react-best-practices`, `
|
|
198
|
+
- **Skills used**: explicitly record if the analysis used `vercel-react-best-practices`, `webapp-testing`, or `security-review`
|
|
200
199
|
|
|
201
200
|
### 4.1 Scope Checkpoint (MANDATORY)
|
|
202
201
|
|
|
@@ -17,7 +17,6 @@ You are an AI assistant specialized in post-QA bug fixing with evidence-driven r
|
|
|
17
17
|
|
|
18
18
|
When available in the project under `./.agents/skills/`, use these skills as operational support without replacing this command:
|
|
19
19
|
|
|
20
|
-
- `agent-browser`: support for reproducing bugs with persistent sessions, capturing network data, additional screenshots, and validating fixes browser-first
|
|
21
20
|
- `webapp-testing`: support for structuring retests, captures, and scripts when complementary to Playwright MCP
|
|
22
21
|
- `vercel-react-best-practices`: use only if the fix affects React/Next.js frontend and there is risk of rendering, hydration, fetching, or performance regression
|
|
23
22
|
|
|
@@ -87,7 +86,7 @@ For each fixed bug:
|
|
|
87
86
|
- `QA/logs/console-retest.log`
|
|
88
87
|
- `QA/logs/network-retest.log`
|
|
89
88
|
7. Record in the QA report which user/profile was used in the retest
|
|
90
|
-
8. If the retest requires persistent auth, request inspection beyond MCP, or more faithful real-browser reproduction,
|
|
89
|
+
8. If the retest requires persistent auth, request inspection beyond MCP, or more faithful real-browser reproduction, record this in the report
|
|
91
90
|
|
|
92
91
|
### 4. Update Artifacts
|
|
93
92
|
|
|
@@ -49,7 +49,6 @@ Works best with project analyzed by `/dw-analyze-project`
|
|
|
49
49
|
|
|
50
50
|
When available in the project under `./.agents/skills/`, use these skills as operational support without replacing this command as source of truth:
|
|
51
51
|
|
|
52
|
-
- `agent-browser`: support for real navigation, request inspection, screenshots, persistent auth, and browser-first reproduction
|
|
53
52
|
- `webapp-testing`: support for structuring E2E flows, local retests, and evidence collection
|
|
54
53
|
- `remotion-best-practices`: mandatory support when there is a final human video, captions, composition, transitions, FFmpeg, or Remotion
|
|
55
54
|
- `humanizer`: mandatory support for reviewing and naturalizing all captions, `.srt` files, descriptive texts, and any human-facing writing before final delivery
|
|
@@ -20,7 +20,6 @@ You are an AI assistant specialized in Quality Assurance. Your task is to valida
|
|
|
20
20
|
|
|
21
21
|
When available in the project under `./.agents/skills/`, use these skills as operational support without replacing this command:
|
|
22
22
|
|
|
23
|
-
- `agent-browser`: support for operational navigation, persistent auth, additional screenshots, request inspection, and session debugging
|
|
24
23
|
- `webapp-testing`: support for structuring test flows, retests, screenshots, and logs when complementary to Playwright MCP
|
|
25
24
|
- `vercel-react-best-practices`: use only if the frontend under test is React/Next.js and there is indication of regression related to rendering, fetching, hydration, or perceived performance
|
|
26
25
|
|
|
@@ -96,7 +95,7 @@ Refer to `.dw/rules/` for project-specific URLs and frameworks.
|
|
|
96
95
|
- Verify the application is running on localhost
|
|
97
96
|
- Use `browser_navigate` from Playwright MCP to access the application
|
|
98
97
|
- Confirm the page loaded correctly with `browser_snapshot`
|
|
99
|
-
- If persistent session, auth import, network inspection beyond MCP
|
|
98
|
+
- If persistent session, auth import, or network inspection beyond MCP is needed, complement with `webapp-testing`
|
|
100
99
|
|
|
101
100
|
### 3. Menu Page Verification (Required -- Execute BEFORE RF tests)
|
|
102
101
|
|
|
@@ -163,7 +162,7 @@ For each functional requirement from the PRD:
|
|
|
163
162
|
8. Mark as PASSED or FAILED
|
|
164
163
|
9. Save the Playwright flow script in `{{PRD_PATH}}/QA/scripts/` with standardized name: `RF-XX-[slug].spec.ts` (or `.js`)
|
|
165
164
|
10. Record in the report which credentials (user/profile) were used in each permission-sensitive flow
|
|
166
|
-
11. When the MCP flow becomes unstable or insufficient for operational evidence, complement with `
|
|
165
|
+
11. When the MCP flow becomes unstable or insufficient for operational evidence, complement with `webapp-testing`, recording this explicitly in the report
|
|
167
166
|
|
|
168
167
|
<critical>It is not enough to validate only the happy path. Each requirement must be exercised against its boundary states and most likely regressions</critical>
|
|
169
168
|
<critical>If a requirement cannot be fully validated via E2E, QA must be marked as REJECTED or BLOCKED, never APPROVED</critical>
|
|
@@ -20,7 +20,6 @@ When available in the project at `./.agents/skills/`, use these skills as specia
|
|
|
20
20
|
|-------|---------|
|
|
21
21
|
| `vercel-react-best-practices` | Task touches React rendering, hydration, data fetching, bundle, cache, or performance |
|
|
22
22
|
| `webapp-testing` | Task has interactive frontend needing E2E validation in a real browser |
|
|
23
|
-
| `agent-browser` | UI validation requires persistent session, operational navigation inspection, or complementary visual evidence |
|
|
24
23
|
|
|
25
24
|
## File Locations
|
|
26
25
|
|
|
@@ -78,7 +77,7 @@ After providing the summary and approach, **begin implementation immediately**:
|
|
|
78
77
|
- Follow established project patterns
|
|
79
78
|
- Ensure all requirements are met
|
|
80
79
|
- **Run tests**: use the project's test command
|
|
81
|
-
- If there is interactive frontend, also validate real behavior with `webapp-testing`
|
|
80
|
+
- If there is interactive frontend, also validate real behavior with `webapp-testing` when doing so reduces the risk of invisible regression in unit tests
|
|
82
81
|
|
|
83
82
|
**YOU MUST** start the implementation right after the process above.
|
|
84
83
|
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
Quando disponíveis no projeto em `./.agents/skills/`, use estas skills como suporte contextual sem substituir este comando:
|
|
17
17
|
|
|
18
18
|
- `vercel-react-best-practices`: use quando o bug afeta React/Next.js e há suspeita de problemas de render, hidratação, fetching, waterfall, bundle ou re-render
|
|
19
|
-
- `agent-browser`: use quando o bug requer reprodução em navegador real, sessão persistente, inspeção de requests ou captura visual
|
|
20
19
|
- `webapp-testing`: use quando a correção requer fluxo E2E/reteste reproduzível em uma web app
|
|
21
20
|
- `security-review`: use quando a causa raiz toca auth, autorização, input externo, upload, secrets, SQL, XSS, SSRF ou outras superfícies sensíveis
|
|
22
21
|
|
|
@@ -152,7 +151,7 @@
|
|
|
152
151
|
- Mensagens de erro relacionadas
|
|
153
152
|
- Stack traces
|
|
154
153
|
- Arquivos modificados recentemente
|
|
155
|
-
- Se o bug for relacionado a UI ou depender de fluxo no navegador, complemente a coleta com `
|
|
154
|
+
- Se o bug for relacionado a UI ou depender de fluxo no navegador, complemente a coleta com `webapp-testing`
|
|
156
155
|
|
|
157
156
|
### 3. Perguntas de Clarificação (OBRIGATÓRIO - EXATAMENTE 3)
|
|
158
157
|
|
|
@@ -179,7 +178,7 @@
|
|
|
179
178
|
- **Causa Provável**: Baseado nas evidências
|
|
180
179
|
- **Arquivos Afetados**: Lista de arquivos a modificar
|
|
181
180
|
- **Impacto**: Outros componentes que podem ser afetados
|
|
182
|
-
- **Skills utilizadas**: registre explicitamente se a análise usou `vercel-react-best-practices`, `
|
|
181
|
+
- **Skills utilizadas**: registre explicitamente se a análise usou `vercel-react-best-practices`, `webapp-testing` ou `security-review`
|
|
183
182
|
|
|
184
183
|
### 4.1 Checkpoint de Escopo (OBRIGATÓRIO)
|
|
185
184
|
|
|
@@ -17,7 +17,6 @@ Você é um assistente IA especializado em correção de bugs pós-QA com retest
|
|
|
17
17
|
|
|
18
18
|
Quando disponíveis no projeto em `./.agents/skills/`, use estas skills como suporte operacional sem substituir este comando:
|
|
19
19
|
|
|
20
|
-
- `agent-browser`: suporte para reproduzir bugs com sessões persistentes, capturar dados de rede, screenshots adicionais e validar correções browser-first
|
|
21
20
|
- `webapp-testing`: suporte para estruturar retestes, capturas e scripts quando complementar ao Playwright MCP
|
|
22
21
|
- `vercel-react-best-practices`: use apenas se a correção afetar frontend React/Next.js e houver risco de regressão de renderização, hidratação, fetching ou performance
|
|
23
22
|
|
|
@@ -87,7 +86,7 @@ Para cada bug corrigido:
|
|
|
87
86
|
- `QA/logs/console-retest.log`
|
|
88
87
|
- `QA/logs/network-retest.log`
|
|
89
88
|
7. Registrar no relatório de QA qual usuário/perfil foi usado no reteste
|
|
90
|
-
8. Se o reteste exigir auth persistente, inspeção além do MCP, ou reprodução mais fiel em navegador real,
|
|
89
|
+
8. Se o reteste exigir auth persistente, inspeção além do MCP, ou reprodução mais fiel em navegador real, registrar no relatório
|
|
91
90
|
|
|
92
91
|
### 4. Atualização de Artefatos
|
|
93
92
|
|
|
@@ -49,7 +49,6 @@ Funciona melhor com projeto analisado por `/dw-analyze-project`
|
|
|
49
49
|
|
|
50
50
|
Quando disponíveis no projeto em `./.agents/skills/`, use estas skills como apoio operacional, sem substituir este comando como fonte de verdade:
|
|
51
51
|
|
|
52
|
-
- `agent-browser`: apoio para navegação real, inspeção de requests, screenshots, auth persistente e reprodução browser-first
|
|
53
52
|
- `webapp-testing`: apoio para estruturar fluxos E2E, retestes locais e coleta de evidências
|
|
54
53
|
- `remotion-best-practices`: apoio obrigatório quando houver vídeo humano final, legendas, composição, transições, FFmpeg ou Remotion
|
|
55
54
|
- `humanizer`: apoio obrigatório para revisar e naturalizar todas as legendas, captions `.srt`, textos descritivos e qualquer redação voltada a leitura humana antes da entrega final
|
|
@@ -20,7 +20,6 @@ Você é um assistente IA especializado em Quality Assurance. Sua tarefa é vali
|
|
|
20
20
|
|
|
21
21
|
Quando disponíveis no projeto em `./.agents/skills/`, use estas skills como apoio operacional sem substituir este comando:
|
|
22
22
|
|
|
23
|
-
- `agent-browser`: apoio para navegação operacional, auth persistente, screenshots adicionais, inspeção de requests e debugging de sessão
|
|
24
23
|
- `webapp-testing`: apoio para estruturar fluxos de teste, retestes, screenshots e logs quando complementar ao Playwright MCP
|
|
25
24
|
- `vercel-react-best-practices`: use apenas se o frontend sob teste for React/Next.js e houver indicação de regressão relacionada a renderização, fetching, hidratação ou performance percebida
|
|
26
25
|
|
|
@@ -96,7 +95,7 @@ Consulte `.dw/rules/` para URLs e frameworks específicos do projeto.
|
|
|
96
95
|
- Verificar se a aplicação está rodando em localhost
|
|
97
96
|
- Usar `browser_navigate` do Playwright MCP para acessar a aplicação
|
|
98
97
|
- Confirmar que a página carregou corretamente com `browser_snapshot`
|
|
99
|
-
- Se sessão persistente, import de auth, inspeção de rede além do MCP ou reprodução browser-first forem necessários, complementar com `
|
|
98
|
+
- Se sessão persistente, import de auth, inspeção de rede além do MCP ou reprodução browser-first forem necessários, complementar com `webapp-testing`
|
|
100
99
|
|
|
101
100
|
### 3. Verificação de Páginas do Menu (Obrigatório — Executar ANTES dos testes de RF)
|
|
102
101
|
|
|
@@ -163,7 +162,7 @@ Para cada requisito funcional do PRD:
|
|
|
163
162
|
8. Marcar como PASSOU ou FALHOU
|
|
164
163
|
9. Salvar o script Playwright do fluxo em `{{PRD_PATH}}/QA/scripts/` com nome padronizado: `RF-XX-[slug].spec.ts` (ou `.js`)
|
|
165
164
|
10. Registrar no relatório quais credenciais (usuário/perfil) foram usadas em cada fluxo sensível a permissões
|
|
166
|
-
11. Quando o fluxo MCP ficar instável ou insuficiente para evidência operacional, complementar com `
|
|
165
|
+
11. Quando o fluxo MCP ficar instável ou insuficiente para evidência operacional, complementar com `webapp-testing`, registrando isso explicitamente no relatório
|
|
167
166
|
|
|
168
167
|
<critical>Não basta validar apenas o caminho feliz. Cada requisito deve ser exercitado contra seus estados de borda e suas regressões mais prováveis</critical>
|
|
169
168
|
<critical>Se um requisito não puder ser completamente validado via E2E, o QA deve ser marcado como REJEITADO ou BLOQUEADO, nunca APROVADO</critical>
|
|
@@ -20,7 +20,6 @@ Quando disponíveis no projeto em `./.agents/skills/`, use estas skills como sup
|
|
|
20
20
|
|-------|---------|
|
|
21
21
|
| `vercel-react-best-practices` | Task envolve renderização React, hidratação, data fetching, bundle, cache ou performance |
|
|
22
22
|
| `webapp-testing` | Task tem frontend interativo que necessita validação E2E em navegador real |
|
|
23
|
-
| `agent-browser` | Validação de UI requer sessão persistente, inspeção de navegação operacional ou evidência visual complementar |
|
|
24
23
|
|
|
25
24
|
## Localização dos Arquivos
|
|
26
25
|
|
|
@@ -78,7 +77,7 @@ Após fornecer o resumo e abordagem, **comece imediatamente** a implementar a ta
|
|
|
78
77
|
- Seguir padrões estabelecidos do projeto
|
|
79
78
|
- Garantir que todos os requisitos sejam atendidos
|
|
80
79
|
- **Rodar testes**: use o comando de teste do projeto
|
|
81
|
-
- Se houver frontend interativo, valide também o comportamento real com `webapp-testing`
|
|
80
|
+
- Se houver frontend interativo, valide também o comportamento real com `webapp-testing` quando isso reduzir o risco de regressão invisível nos testes unitários
|
|
82
81
|
|
|
83
82
|
**VOCÊ DEVE** iniciar a implementação logo após o processo acima.
|
|
84
83
|
|