@brunosps00/dev-workflow 0.4.2 → 0.4.3

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/lib/constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const COMMANDS = {
2
2
  en: [
3
3
  { name: 'dw-analyze-project', description: 'Analyze repository stack, patterns, and conventions to generate project rules' },
4
- { name: 'dw-autopilot', description: 'Full pipeline orchestrator: from a wish to a PR with minimal intervention (research, PRD, tasks, execution, QA, review, commit)' },
4
+ { name: 'dw-autopilot', description: 'Full pipeline orchestrator from a wish to a PR with minimal intervention (research, PRD, tasks, execution, QA, review, commit)' },
5
5
  { name: 'dw-brainstorm', description: 'Explore ideas and directions before starting implementation' },
6
6
  { name: 'dw-bugfix', description: 'Analyze and fix bugs with automatic triage (bug vs feature vs scope)' },
7
7
  { name: 'dw-code-review', description: 'Formal code review (Level 3) with persisted report' },
@@ -26,7 +26,7 @@ const COMMANDS = {
26
26
  ],
27
27
  'pt-br': [
28
28
  { name: 'dw-analyze-project', description: 'Analisa stack, patterns e convencoes do repositorio para gerar regras do projeto' },
29
- { name: 'dw-autopilot', description: 'Orquestrador completo: de um desejo ate o PR com minima intervencao (pesquisa, PRD, tasks, execucao, QA, review, commit)' },
29
+ { name: 'dw-autopilot', description: 'Orquestrador completo de um desejo ate o PR com minima intervencao (pesquisa, PRD, tasks, execucao, QA, review, commit)' },
30
30
  { name: 'dw-brainstorm', description: 'Explorar ideias e direcoes antes de comecar a implementacao' },
31
31
  { name: 'dw-bugfix', description: 'Analisar e corrigir bugs com triagem automatica (bug vs feature vs escopo)' },
32
32
  { name: 'dw-code-review', description: 'Code review formal (Nivel 3) com relatorio persistido' },
@@ -56,7 +56,7 @@ const PLATFORMS = {
56
56
  dir: '.claude/skills',
57
57
  wrapperTemplate: (name, description) => `---
58
58
  name: ${name}
59
- description: ${description}
59
+ description: "${description.replace(/"/g, '\\"')}"
60
60
  ---
61
61
 
62
62
  Read and follow ALL instructions in \`.dw/commands/${name}.md\`.
@@ -66,7 +66,7 @@ Read and follow ALL instructions in \`.dw/commands/${name}.md\`.
66
66
  dir: '.agents/skills',
67
67
  wrapperTemplate: (name, description) => `---
68
68
  name: ${name}
69
- description: ${description}
69
+ description: "${description.replace(/"/g, '\\"')}"
70
70
  ---
71
71
  <system_instructions>
72
72
  Source of truth: \`.dw/commands/${name}.md\`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosps00/dev-workflow",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
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"
@@ -4,6 +4,7 @@ You are a frontend redesign specialist for the current workspace. This command e
4
4
  <critical>Do NOT redesign without first auditing the current implementation. Always read the code and capture the visual state before proposing changes.</critical>
5
5
  <critical>ALWAYS propose design directions and wait for user approval before implementing any changes.</critical>
6
6
  <critical>Preserve existing functionality. Redesign is visual/UX, not behavioral. If the change alters behavior, redirect to `/dw-create-prd`.</critical>
7
+ <critical>MOBILE FIRST is MANDATORY. Every design proposal MUST include both mobile AND desktop versions. Implementation MUST start with mobile and then adapt for desktop. Do NOT present only the desktop layout — if the proposal does not show how it looks on mobile, it is incomplete.</critical>
7
8
 
8
9
  ## When to Use
9
10
  - Use for rebuild/modernization of existing pages or components
@@ -57,10 +58,10 @@ Use diagnostic tools based on the project's framework:
57
58
  1. Identify the target: page, component, or route to be redesigned.
58
59
  2. **AUDIT**: read the current implementation, identify the CSS stack (Tailwind, CSS Modules, styled-components, etc.), capture screenshot if `webapp-testing` is available, run react-doctor if React project.
59
60
  3. Ask 3 to 5 questions about redesign goals: style direction, brand constraints, inspirations, target audience, priority devices.
60
- 4. **PROPOSE**: present 2 to 3 design directions using `ui-ux-pro-max` — each with color palette, typography pairing, layout style, and rationale.
61
+ 4. **PROPOSE**: present 2 to 3 design directions using `ui-ux-pro-max` — each with color palette, typography pairing, layout style, and rationale. For EACH direction, explicitly describe the mobile layout (<=768px) and desktop layout (>=1024px), including how elements reorganize, stack, or hide between breakpoints.
61
62
  5. Wait for explicit user approval before implementing.
62
- 6. **IMPLEMENT**: apply the chosen design respecting the existing stack. Use `vercel-react-best-practices` for React/Next.js. Maintain the project's CSS methodology.
63
- 7. **VALIDATE**: capture after-state, compare before/after, verify accessibility (WCAG 2.2 via `ui-ux-pro-max`), run react-doctor `--diff` if React.
63
+ 6. **IMPLEMENT**: apply the chosen design with a mobile-first approach — implement the mobile layout first, then add media queries/breakpoints for tablet and desktop. Respect the existing stack. Use `vercel-react-best-practices` for React/Next.js. Maintain the project's CSS methodology.
64
+ 7. **VALIDATE**: capture after-state in BOTH resolutions (mobile and desktop), compare before/after, verify accessibility (WCAG 2.2 via `ui-ux-pro-max`), run react-doctor `--diff` if React. If `webapp-testing` is available, capture screenshots at 375px viewport (mobile) and 1440px viewport (desktop).
64
65
  8. **PERSIST CONTRACT**: if the user approved a direction, generate `design-contract.md` in the PRD directory (`.dw/spec/prd-[name]/design-contract.md`) with: approved direction, color palette, typography pairing, layout rules, accessibility rules, and component rules. This contract will be read by `dw-run-task` and `dw-run-plan` to ensure visual consistency.
65
66
 
66
67
  ## GSD Integration
@@ -107,7 +108,8 @@ If GSD is NOT installed:
107
108
  - Prefer incremental changes that can be reviewed visually
108
109
  - When in doubt about style direction, ask — don't assume
109
110
  - If the page has no tests, flag regression risk before changing
110
- - Mobile responsiveness is mandatory unless explicitly scoped out by the user
111
+ - Mobile-first is the default implement mobile first, adapt for desktop after
112
+ - Validate at least 2 breakpoints: mobile (375px) and desktop (1440px)
111
113
  - In Angular projects, respect Angular component patterns (style encapsulation, ViewEncapsulation)
112
114
 
113
115
  ## Useful Outputs
@@ -222,7 +222,20 @@ Use `browser_snapshot` to verify labels and semantic structure.
222
222
  - Capture screenshots of main screens with `browser_take_screenshot` and save to `{{PRD_PATH}}/QA/screenshots/`
223
223
  - Check layouts in different states (empty, with data, error, loading)
224
224
  - Document visual inconsistencies found
225
- - Check responsiveness if applicable (different viewports)
225
+
226
+ ### 6.1. Mobile Validation (Required)
227
+
228
+ <critical>ALL visual checks MUST include tests at mobile viewport (375px) IN ADDITION to desktop (1440px). QA approval REQUIRES that BOTH resolutions are functional and visually acceptable. If the mobile layout is broken, unusable, or visually degraded, QA CANNOT be approved.</critical>
229
+
230
+ - Capture screenshots at 375px viewport (mobile) for EACH tested screen
231
+ - Capture screenshots at 1440px viewport (desktop) for comparison
232
+ - Verify: elements do not overlap, text is readable, buttons are tappable (min 44x44px), no horizontal scroll, forms are usable
233
+ - Save screenshots with suffix: `[screen]-mobile.png` and `[screen]-desktop.png`
234
+
235
+ If mobile FAILS visual validation:
236
+ - Document issues in `{{PRD_PATH}}/QA/bugs.md` with severity **High** and tag `[MOBILE]`
237
+ - In the final report, recommend `/dw-redesign-ui` as the next step to fix the mobile layout with a mobile-first approach
238
+ - QA CANNOT be approved with broken mobile
226
239
 
227
240
  ### 7. Bug Documentation (If issues found)
228
241
 
@@ -4,6 +4,7 @@ Você é um especialista em redesign de frontend para o workspace atual. Este co
4
4
  <critical>NÃO redesenhe sem antes auditar a implementação atual. Sempre leia o código e capture o estado visual antes de propor mudanças.</critical>
5
5
  <critical>SEMPRE proponha direções de design e espere aprovação do usuário antes de implementar qualquer mudança.</critical>
6
6
  <critical>Preserve a funcionalidade existente. Redesign é visual/UX, não comportamental. Se a mudança alterar comportamento, redirecione para `/dw-create-prd`.</critical>
7
+ <critical>MOBILE FIRST é OBRIGATÓRIO. Toda proposta de design DEVE incluir versão mobile E desktop. A implementação DEVE começar pelo mobile e depois adaptar para desktop. NÃO apresente apenas o layout desktop — se a proposta não mostrar como fica no mobile, está incompleta.</critical>
7
8
 
8
9
  ## Quando Usar
9
10
  - Use para rebuild/modernização visual de páginas ou componentes existentes
@@ -57,10 +58,10 @@ Utilize ferramentas de diagnóstico conforme o framework do projeto:
57
58
  1. Identifique o alvo: página, componente ou rota que será redesenhada.
58
59
  2. **AUDITAR**: leia a implementação atual, identifique stack CSS (Tailwind, CSS Modules, styled-components, etc.), capture screenshot se `webapp-testing` disponível, rode react-doctor se projeto React.
59
60
  3. Faça 3 a 5 perguntas sobre objetivos do redesign: direção de estilo, constraints de marca, inspirações, público-alvo, dispositivos prioritários.
60
- 4. **PROPOR**: apresente 2 a 3 direções de design usando `ui-ux-pro-max` — cada uma com paleta de cores, par tipográfico, estilo de layout e racional.
61
+ 4. **PROPOR**: apresente 2 a 3 direções de design usando `ui-ux-pro-max` — cada uma com paleta de cores, par tipográfico, estilo de layout e racional. Para CADA direção, descreva explicitamente o layout mobile (<=768px) e o layout desktop (>=1024px), incluindo como os elementos se reorganizam, empilham ou escondem entre breakpoints.
61
62
  5. Espere aprovação explícita do usuário antes de implementar.
62
- 6. **IMPLEMENTAR**: aplique o design escolhido respeitando a stack existente. Use `vercel-react-best-practices` para React/Next.js. Mantenha a metodologia CSS do projeto.
63
- 7. **VALIDAR**: capture estado depois, compare antes/depois, verifique acessibilidade (WCAG 2.2 via `ui-ux-pro-max`), rode react-doctor `--diff` se React.
63
+ 6. **IMPLEMENTAR**: aplique o design escolhido com abordagem mobile-first — implemente primeiro o layout mobile e depois adicione media queries/breakpoints para tablet e desktop. Respeite a stack existente. Use `vercel-react-best-practices` para React/Next.js. Mantenha a metodologia CSS do projeto.
64
+ 7. **VALIDAR**: capture estado depois em AMBAS as resoluções (mobile e desktop), compare antes/depois, verifique acessibilidade (WCAG 2.2 via `ui-ux-pro-max`), rode react-doctor `--diff` se React. Se `webapp-testing` disponível, capture screenshots em viewport 375px (mobile) e 1440px (desktop).
64
65
  8. **PERSISTIR CONTRATO**: se o usuário aprovou uma direção, gere `design-contract.md` no diretório do PRD (`.dw/spec/prd-[nome]/design-contract.md`) com: direção aprovada, paleta de cores, par tipográfico, regras de layout, regras de acessibilidade e regras de componentes. Este contrato será lido por `dw-run-task` e `dw-run-plan` para garantir consistência visual.
65
66
 
66
67
  ## Integração GSD
@@ -107,7 +108,8 @@ Se o GSD NÃO estiver instalado:
107
108
  - Prefira mudanças incrementais que possam ser revisadas visualmente
108
109
  - Quando em dúvida sobre direção de estilo, pergunte — não assuma
109
110
  - Se a página não tem testes, sinalize risco de regressão antes de alterar
110
- - Responsividade mobile é mandatória salvo escopo explícito do usuário
111
+ - Mobile-first é o padrão implemente mobile primeiro, adapte para desktop depois
112
+ - Valide em pelo menos 2 breakpoints: mobile (375px) e desktop (1440px)
111
113
  - Em projetos Angular, respeite os padrões de componentes do Angular (encapsulação de estilos, ViewEncapsulation)
112
114
 
113
115
  ## Saídas Úteis
@@ -222,7 +222,20 @@ Use `browser_snapshot` para verificar labels e estrutura semântica.
222
222
  - Capturar screenshots das telas principais com `browser_take_screenshot` e salvar em `{{PRD_PATH}}/QA/screenshots/`
223
223
  - Verificar layouts em diferentes estados (vazio, com dados, erro, loading)
224
224
  - Documentar inconsistências visuais encontradas
225
- - Verificar responsividade se aplicável (diferentes viewports)
225
+
226
+ ### 6.1. Validação Mobile (Obrigatório)
227
+
228
+ <critical>TODA verificação visual DEVE incluir testes em viewport mobile (375px) ALÉM do desktop (1440px). A aprovação do QA REQUER que AMBAS as resoluções estejam funcionais e visualmente aceitáveis. Se o layout mobile estiver quebrado, inutilizável ou visualmente degradado, o QA NÃO pode ser aprovado.</critical>
229
+
230
+ - Capture screenshots em viewport 375px (mobile) para CADA tela testada
231
+ - Capture screenshots em viewport 1440px (desktop) para comparação
232
+ - Verifique: elementos não se sobrepõem, texto é legível, botões são clicáveis (min 44x44px), scroll horizontal não existe, formulários são usáveis
233
+ - Salve screenshots com sufixo: `[tela]-mobile.png` e `[tela]-desktop.png`
234
+
235
+ Se o mobile FALHAR na validação visual:
236
+ - Documente os problemas em `{{PRD_PATH}}/QA/bugs.md` com severidade **Alta** e tag `[MOBILE]`
237
+ - No relatório final, recomende `/dw-redesign-ui` como próximo passo para corrigir o layout mobile com abordagem mobile-first
238
+ - O QA NÃO pode ser aprovado com mobile quebrado
226
239
 
227
240
  ### 7. Documentação de Bugs (Se encontrar problemas)
228
241