@polymorphism-tech/morph-spec 4.10.0 → 4.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +2 -2
  2. package/claude-plugin.json +1 -1
  3. package/docs/CHEATSHEET.md +1 -1
  4. package/docs/QUICKSTART.md +1 -1
  5. package/framework/CLAUDE.md +5 -69
  6. package/framework/agents/backend/api-designer.md +3 -0
  7. package/framework/agents/backend/dotnet-senior.md +3 -0
  8. package/framework/agents/backend/ef-modeler.md +2 -0
  9. package/framework/agents/backend/hangfire-orchestrator.md +2 -0
  10. package/framework/agents/backend/ms-agent-expert.md +2 -0
  11. package/framework/agents/frontend/blazor-builder.md +2 -0
  12. package/framework/agents/frontend/nextjs-expert.md +2 -0
  13. package/framework/agents/infrastructure/azure-architect.md +2 -0
  14. package/framework/agents/infrastructure/azure-deploy-specialist.md +2 -0
  15. package/framework/agents/infrastructure/bicep-architect.md +2 -0
  16. package/framework/agents/infrastructure/container-specialist.md +2 -0
  17. package/framework/agents/infrastructure/devops-engineer.md +3 -0
  18. package/framework/agents/infrastructure/infra-architect.md +3 -0
  19. package/framework/agents/integrations/asaas-financial.md +2 -0
  20. package/framework/agents/integrations/azure-identity.md +2 -0
  21. package/framework/agents/integrations/clerk-auth.md +3 -0
  22. package/framework/agents/integrations/hangfire-integration.md +2 -0
  23. package/framework/agents/integrations/resend-email.md +2 -0
  24. package/framework/commands/morph-apply.md +151 -161
  25. package/framework/commands/morph-archive.md +28 -28
  26. package/framework/commands/morph-infra.md +79 -79
  27. package/framework/commands/morph-preflight.md +92 -56
  28. package/framework/commands/morph-proposal.md +94 -70
  29. package/framework/commands/morph-status.md +31 -31
  30. package/framework/commands/morph-troubleshoot.md +63 -60
  31. package/framework/rules/csharp-standards.md +3 -0
  32. package/framework/rules/frontend-standards.md +2 -0
  33. package/framework/rules/infrastructure-standards.md +3 -0
  34. package/framework/rules/morph-workflow.md +57 -2
  35. package/framework/rules/nextjs-standards.md +2 -0
  36. package/framework/rules/testing-standards.md +3 -0
  37. package/framework/skills/level-0-meta/morph-brainstorming/SKILL.md +54 -49
  38. package/framework/skills/level-0-meta/morph-checklist/SKILL.md +42 -19
  39. package/framework/skills/level-0-meta/morph-code-review/SKILL.md +8 -5
  40. package/framework/skills/level-0-meta/morph-code-review-nextjs/SKILL.md +7 -5
  41. package/framework/skills/level-0-meta/morph-frontend-review/SKILL.md +139 -136
  42. package/framework/skills/level-0-meta/morph-init/SKILL.md +42 -13
  43. package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +130 -130
  44. package/framework/skills/level-0-meta/morph-replicate/SKILL.md +95 -87
  45. package/framework/skills/level-0-meta/morph-simulation-checklist/SKILL.md +24 -0
  46. package/framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md +42 -41
  47. package/framework/skills/level-0-meta/morph-verification-before-completion/SKILL.md +22 -11
  48. package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +123 -114
  49. package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +120 -102
  50. package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +206 -214
  51. package/framework/skills/level-1-workflows/morph-phase-implement/.morph/logs/activity.json +38 -0
  52. package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +241 -360
  53. package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +107 -115
  54. package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +135 -135
  55. package/framework/skills/level-1-workflows/morph-phase-tasks/.morph/logs/activity.json +14 -0
  56. package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +143 -139
  57. package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +168 -165
  58. package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +57 -8
  59. package/package.json +3 -3
  60. package/src/commands/project/doctor.js +7 -2
  61. package/src/commands/project/update.js +4 -4
  62. package/src/lib/stack-filter.js +58 -0
  63. package/src/scripts/setup-infra.js +53 -18
  64. package/src/utils/agents-installer.js +19 -5
  65. package/src/utils/claude-md-injector.js +90 -0
  66. package/src/utils/hooks-installer.js +1 -4
  67. package/src/utils/skills-installer.js +67 -7
  68. package/CLAUDE.md +0 -98
  69. package/framework/memory/patterns-learned.md +0 -766
  70. package/framework/skills/level-0-meta/morph-terminal-title/SKILL.md +0 -61
  71. package/framework/skills/level-0-meta/morph-terminal-title/scripts/set_title.sh +0 -65
@@ -1,31 +1,34 @@
1
1
  ---
2
2
  name: morph:frontend-review
3
- description: Auditoria completa do frontend valida design outputs (design-system, contraste WCAG,
4
- mockups), scan estático de acessibilidade (TSX + Razor), screenshots responsivos em 3
5
- breakpoints via Playwright, axe-core a11y em runtime, e SEO (Next.js metadata). Cobre Next.js
6
- e Blazor. Disparado ao final do phase-uiux e pós-implementação.
3
+ description: Complete frontend auditvalidates design outputs (design-system, WCAG contrast,
4
+ mockups), static accessibility scan (TSX + Razor), responsive screenshots at 3
5
+ breakpoints via Playwright, axe-core a11y at runtime, and SEO (Next.js metadata). Covers Next.js
6
+ and Blazor. Triggered at end of phase-uiux and post-implementation.
7
7
  argument-hint: "[feature-name]"
8
8
  user-invocable: true
9
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep,
9
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion,
10
10
  mcp__playwright__browser_navigate, mcp__playwright__browser_resize,
11
11
  mcp__playwright__browser_take_screenshot, mcp__playwright__browser_snapshot,
12
12
  mcp__playwright__browser_evaluate, mcp__playwright__browser_console_messages
13
13
  cliVersion: "4.8.19"
14
+ stacks:
15
+ - blazor
16
+ - nextjs
14
17
  ---
15
18
 
16
19
  # Frontend Review
17
20
 
18
- > Auditoria completa do frontend: design outputs, acessibilidade estática + runtime, screenshots
19
- > responsivos e SEO. Disparado ao final do `phase-uiux` (valida design) e pós-implementação
20
- > (valida código implementado).
21
+ > Complete frontend audit: design outputs, static + runtime accessibility, responsive
22
+ > screenshots and SEO. Triggered at end of `phase-uiux` (validates design) and post-implementation
23
+ > (validates implemented code).
21
24
 
22
- > **Nota sobre MCP:** O prefixo `mcp__playwright__` corresponde ao nome do servidor Playwright
23
- > conforme configurado no `settings.json` do projeto. Se o servidor tiver nome diferente (ex:
24
- > `plugin_playwright_playwright`), ajuste o prefixo nos calls abaixo.
25
+ > **Note about MCP:** The `mcp__playwright__` prefix corresponds to the Playwright server name
26
+ > as configured in the project's `settings.json`. If the server has a different name (e.g.,
27
+ > `plugin_playwright_playwright`), adjust the prefix in the calls below.
25
28
 
26
29
  ---
27
30
 
28
- ## Step 0 — Detectar Contexto e Stack
31
+ ## Step 0 — Detect Context and Stack
29
32
 
30
33
  ```bash
31
34
  node .claude/skills/morph-post-implementation/scripts/detect-stack.mjs
@@ -33,128 +36,128 @@ node .claude/skills/morph-post-implementation/scripts/detect-stack.mjs
33
36
 
34
37
  Output JSON: `{ stack: "DOTNET" | "NEXTJS" | "FULLSTACK" | "UNKNOWN", frontendPath, backendPath, startCommand }`
35
38
 
36
- Além do stack, determinar o **contexto** examinando o que existe:
39
+ Beyond the stack, determine the **context** by examining what exists:
37
40
 
38
41
  ```bash
39
- # Verificar se design outputs existem
42
+ # Check if design outputs exist
40
43
  ls .morph/features/$ARGUMENTS/2-ui/ 2>/dev/null
41
44
 
42
- # Verificar se arquivos frontend implementados existem
45
+ # Check if implemented frontend files exist
43
46
  find . -name "*.tsx" -o -name "*.razor" 2>/dev/null | head -5
44
47
  ```
45
48
 
46
- - Se `.morph/features/$ARGUMENTS/2-ui/ui-design-system.md` existecontexto inclui **design validation**
47
- - Se arquivos frontend implementados existem (`.tsx`, `.razor`) → contexto inclui **implementation validation**
48
- - Ambos podem coexistir
49
+ - If `.morph/features/$ARGUMENTS/2-ui/ui-design-system.md` existscontext includes **design validation**
50
+ - If implemented frontend files exist (`.tsx`, `.razor`) → context includes **implementation validation**
51
+ - Both can coexist
49
52
 
50
- Guarde `stack`, `frontendPath`, `startCommand` e o contexto detectadotodos os passos dependem deles.
53
+ Store `stack`, `frontendPath`, `startCommand` and the detected contextall steps depend on them.
51
54
 
52
55
  ---
53
56
 
54
- ## Step 1 — Validação de Design Outputs (se contexto inclui design validation)
57
+ ## Step 1 — Design Outputs Validation (if context includes design validation)
55
58
 
56
59
  ```bash
57
- npx morph-spec validate-feature $ARGUMENTS --phase uiux
60
+ npx morph-spec validate-feature $ARGUMENTS
58
61
  ```
59
62
 
60
- Verificar existência e qualidade dos 4 outputs obrigatórios em `.morph/features/$ARGUMENTS/2-ui/`:
63
+ Verify existence and quality of the 4 mandatory outputs in `.morph/features/$ARGUMENTS/2-ui/`:
61
64
 
62
65
  ```
63
- [ ] ui-design-system.md — paleta de cores, tokens de tipografia, espaçamento
64
- [ ] ui-mockups.md — wireframes com estados responsivos
65
- [ ] ui-components.md — specs técnicas dos componentes
66
- [ ] ui-flows.md — jornadas de usuário e edge cases
67
- [ ] Contraste WCAG AA: cores primárias e de texto ≥ 4.5:1 (verificar ui-design-system.md)
68
- [ ] Touch targets documentados: ≥ 44x44px para mobile
69
- [ ] Estados de loading/error/empty definidos nos mockups
66
+ [ ] ui-design-system.md — color palette, typography tokens, spacing
67
+ [ ] ui-mockups.md — wireframes with responsive states
68
+ [ ] ui-components.md — technical component specs
69
+ [ ] ui-flows.md — user journeys and edge cases
70
+ [ ] WCAG AA Contrast: primary and text colors ≥ 4.5:1 (check ui-design-system.md)
71
+ [ ] Documented touch targets: ≥ 44x44px for mobile
72
+ [ ] Loading/error/empty states defined in mockups
70
73
  ```
71
74
 
72
- **🚫 BLOCK** se `validate-feature` falhar ou outputs obrigatórios ausentes.
75
+ **🚫 BLOCK** if `validate-feature` fails or mandatory outputs missing.
73
76
 
74
- Leia `ui-design-system.md` e verifique manualmente se as cores primária e de texto têm razão de
75
- contraste ≥ 4.5:1. Ferramentas de referência: WebAIM Contrast Checker (critérios WCAG 2.1 AA).
77
+ Read `ui-design-system.md` and manually verify that primary and text colors have a contrast ratio
78
+ ≥ 4.5:1. Reference tools: WebAIM Contrast Checker (WCAG 2.1 AA criteria).
76
79
 
77
80
  ---
78
81
 
79
- ## Step 2 — Scan Estático de Acessibilidade
82
+ ## Step 2 — Static Accessibility Scan
80
83
 
81
84
  ```bash
82
85
  node .claude/skills/morph-frontend-review/scripts/scan-accessibility.mjs $frontendPath
83
86
  ```
84
87
 
85
- O script detecta automaticamente a extensão dos arquivos para determinar Next.js (`.tsx`) vs
86
- Blazor (`.razor`). Se `frontendPath` não estiver definido, o script usa `.` (raiz do projeto).
88
+ The script automatically detects file extensions to determine Next.js (`.tsx`) vs
89
+ Blazor (`.razor`). If `frontendPath` is not defined, the script uses `.` (project root).
87
90
 
88
- **Checks implementados:**
91
+ **Checks implemented:**
89
92
 
90
- | ID | Severidade | Arquivos | Verifica |
93
+ | ID | Severity | Files | Checks |
91
94
  |----|-----------|---------|---------|
92
- | `IMG_MISSING_ALT` | CRITICAL | .tsx, .razor | `<img` sem atributo `alt=` |
93
- | `INPUT_MISSING_LABEL` | HIGH | .tsx, .razor | `<input`/`<InputText`/`<FluentTextField` sem `aria-label`, `aria-labelledby`, ou `<label for=` associado |
94
- | `HEADING_HIERARCHY` | HIGH | .tsx, .razor | Salto de nível em headings (H1→H3 pulando H2) |
95
- | `LINK_NO_TEXT` | HIGH | .tsx, .razor | `<a` vazio ou com apenas ícone e sem `aria-label` |
96
- | `BUTTON_NO_TEXT` | HIGH | .tsx, .razor | `<button`/`<FluentButton` sem texto e sem `aria-label` |
97
- | `AUTOPLAY_MEDIA` | MEDIUM | .tsx, .razor | `<video`/`<audio` com `autoPlay` sem `muted` |
98
- | `FLUENT_CHECKBOX_NO_LABEL` | MEDIUM | .razor | `<FluentCheckbox` sem `Label=` |
95
+ | `IMG_MISSING_ALT` | CRITICAL | .tsx, .razor | `<img` missing `alt=` attribute |
96
+ | `INPUT_MISSING_LABEL` | HIGH | .tsx, .razor | `<input`/`<InputText`/`<FluentTextField` without `aria-label`, `aria-labelledby`, or associated `<label for=` |
97
+ | `HEADING_HIERARCHY` | HIGH | .tsx, .razor | Heading level skip (H1→H3 skipping H2) |
98
+ | `LINK_NO_TEXT` | HIGH | .tsx, .razor | `<a` empty or with only icon and no `aria-label` |
99
+ | `BUTTON_NO_TEXT` | HIGH | .tsx, .razor | `<button`/`<FluentButton` no text and no `aria-label` |
100
+ | `AUTOPLAY_MEDIA` | MEDIUM | .tsx, .razor | `<video`/`<audio` with `autoPlay` without `muted` |
101
+ | `FLUENT_CHECKBOX_NO_LABEL` | MEDIUM | .razor | `<FluentCheckbox` without `Label=` |
99
102
 
100
- **🚫 BLOCK** se qualquer finding CRITICAL ou count de HIGH ≥ 3.
103
+ **🚫 BLOCK** if any CRITICAL finding or HIGH count ≥ 3.
101
104
 
102
- Corrija todos os CRITICALs antes de continuar. Para HIGH < 3, registre no resumo como warnings.
105
+ Fix all CRITICALs before continuing. For HIGH < 3, record in summary as warnings.
103
106
 
104
107
  ---
105
108
 
106
- ## Step 3 — Scan de Código Frontend (se contexto inclui implementation validation)
109
+ ## Step 3 — Frontend Code Scan (if context includes implementation validation)
107
110
 
108
- ### Se NEXTJS ou FULLSTACK:
111
+ ### If NEXTJS or FULLSTACK:
109
112
 
110
113
  ```bash
111
114
  node .claude/skills/morph-code-review-nextjs/scripts/scan-nextjs.mjs $frontendPath
112
115
  ```
113
116
 
114
- > Pular se executado pelo `post-implementation` na mesma sessão.
117
+ > Skip if already run by `post-implementation` in the same session.
115
118
 
116
- **🚫 BLOCK** se CRITICAL findings encontrados.
119
+ **🚫 BLOCK** if CRITICAL findings found.
117
120
 
118
- ### Se DOTNET ou FULLSTACK (Blazor):
121
+ ### If DOTNET or FULLSTACK (Blazor):
119
122
 
120
- Verificar manualmente as categorias principais do checklist para o feature implementado:
123
+ Manually verify the main checklist categories for the implemented feature:
121
124
 
122
125
  ```
123
- [ ] Componentes Blazor com parâmetros tipados corretamente
124
- [ ] EventCallback<T> para eventossem Action/Func diretos
125
- [ ] Dispose implementado onde subscriptions (IDisposable)
126
- [ ] Sem lógica de negócio nos arquivos .razor (separar em @code ou classes)
127
- [ ] StateHasChanged() chamado apenas quando necessário
128
- [ ] Formulários com EditForm e DataAnnotationsValidator
129
- [ ] Campos obrigatórios com [Required] e mensagens de erro definidas
126
+ [ ] Blazor components with correctly typed parameters
127
+ [ ] EventCallback<T> for eventsno direct Action/Func
128
+ [ ] Dispose implemented where there are subscriptions (IDisposable)
129
+ [ ] No business logic in .razor files (separate into @code or classes)
130
+ [ ] StateHasChanged() called only when necessary
131
+ [ ] Forms with EditForm and DataAnnotationsValidator
132
+ [ ] Required fields with [Required] and defined error messages
130
133
  ```
131
134
 
132
- **🚫 BLOCK** se qualquer item CRITICAL for encontrado.
135
+ **🚫 BLOCK** if any CRITICAL item is found.
133
136
 
134
137
  ---
135
138
 
136
- ## Step 4 — Screenshots Responsivos (Playwright MCP)
139
+ ## Step 4 — Responsive Screenshots (Playwright MCP)
137
140
 
138
- ### 4a. Detectar Dev Server
141
+ ### 4a. Detect Dev Server
139
142
 
140
143
  ```bash
141
144
  node .claude/skills/morph-post-implementation/scripts/detect-dev-server.mjs "$startCommand"
142
145
  ```
143
146
 
144
- ### 4b. Se dev server disponível (exit 0):
147
+ ### 4b. If dev server available (exit 0):
145
148
 
146
- Extraia as URLs principais da feature lendo `spec.md`:
149
+ Extract the main feature URLs by reading `spec.md`:
147
150
 
148
151
  ```bash
149
152
  Read: .morph/features/$ARGUMENTS/1-design/spec.md
150
153
  ```
151
154
 
152
- Para cada página principal (máximo 3), capture screenshots nos 3 breakpoints:
155
+ For each main page (max 3), capture screenshots at 3 breakpoints:
153
156
 
154
157
  ```javascript
155
158
  // Mobile (375px)
156
159
  await mcp__playwright__browser_resize({ width: 375, height: 812 });
157
- await mcp__playwright__browser_navigate({ url: '<url-da-feature>' });
160
+ await mcp__playwright__browser_navigate({ url: '<feature-url>' });
158
161
  await mcp__playwright__browser_take_screenshot({
159
162
  type: 'png',
160
163
  filename: `.morph/features/${ARGUMENTS}/visual-screenshots/mobile-<page>.png`
@@ -162,7 +165,7 @@ await mcp__playwright__browser_take_screenshot({
162
165
 
163
166
  // Tablet (768px)
164
167
  await mcp__playwright__browser_resize({ width: 768, height: 1024 });
165
- await mcp__playwright__browser_navigate({ url: '<url-da-feature>' });
168
+ await mcp__playwright__browser_navigate({ url: '<feature-url>' });
166
169
  await mcp__playwright__browser_take_screenshot({
167
170
  type: 'png',
168
171
  filename: `.morph/features/${ARGUMENTS}/visual-screenshots/tablet-<page>.png`
@@ -170,45 +173,45 @@ await mcp__playwright__browser_take_screenshot({
170
173
 
171
174
  // Desktop (1440px)
172
175
  await mcp__playwright__browser_resize({ width: 1440, height: 900 });
173
- await mcp__playwright__browser_navigate({ url: '<url-da-feature>' });
176
+ await mcp__playwright__browser_navigate({ url: '<feature-url>' });
174
177
  await mcp__playwright__browser_take_screenshot({
175
178
  type: 'png',
176
179
  filename: `.morph/features/${ARGUMENTS}/visual-screenshots/desktop-<page>.png`
177
180
  });
178
181
  ```
179
182
 
180
- Screenshots salvos em: `.morph/features/$ARGUMENTS/visual-screenshots/`
181
- (funciona tanto na fase `2-ui` quanto na `5-implement`)
183
+ Screenshots saved to: `.morph/features/$ARGUMENTS/visual-screenshots/`
184
+ (works in both phase `2-ui` and `5-implement`)
182
185
 
183
- ### 4c. Se dev server NÃO disponível (exit 1):
186
+ ### 4c. If dev server NOT available (exit 1):
184
187
 
185
- **⚠️ ATENÇÃO: Dev server não encontrado.**
188
+ **⚠️ WARNING: Dev server not found.**
186
189
 
187
- Solicite confirmação explícita ao usuário antes de pular os screenshots:
190
+ Request explicit user confirmation before skipping screenshots:
188
191
 
189
192
  ```
190
- Dev server não detectado. Screenshots responsivos via Playwright não podem ser capturados.
193
+ Dev server not detected. Responsive screenshots via Playwright cannot be captured.
191
194
 
192
- Opções:
193
- 1. Inicie manualmente o servidor e re-execute /morph:frontend-review
194
- 2. Confirme explicitamente que deseja pular os screenshots e por quê
195
+ Options:
196
+ 1. Start the server manually and re-run /morph:frontend-review
197
+ 2. Explicitly confirm you want to skip screenshots and why
195
198
 
196
- Não é possível prosseguir para axe-core sem dev server.
199
+ Cannot proceed to axe-core without dev server.
197
200
  ```
198
201
 
199
- **Aguarde resposta antes de continuar.**
202
+ **Wait for response before continuing.**
200
203
 
201
204
  ---
202
205
 
203
- ## Step 5 — axe-core Runtime (Playwright MCP, se dev server ativo)
206
+ ## Step 5 — axe-core Runtime (Playwright MCP, if dev server active)
204
207
 
205
- Para cada página da feature (usar as mesmas URLs do Step 4):
208
+ For each feature page (use the same URLs from Step 4):
206
209
 
207
210
  ```javascript
208
- // Navegar para a página
209
- await mcp__playwright__browser_navigate({ url: '<url-da-feature>' });
211
+ // Navigate to the page
212
+ await mcp__playwright__browser_navigate({ url: '<feature-url>' });
210
213
 
211
- // Injetar axe-core via CDN e executar scan WCAG 2.1 AA
214
+ // Inject axe-core via CDN and run WCAG 2.1 AA scan
212
215
  await mcp__playwright__browser_evaluate({
213
216
  function: `async () => {
214
217
  if (!window.axe) {
@@ -234,11 +237,11 @@ await mcp__playwright__browser_evaluate({
234
237
  });
235
238
  ```
236
239
 
237
- Agrupar violations por impacto:
238
- - `critical` / `serious` → **🚫 BLOCK** (não criar PR)
239
- - `moderate` / `minor` → reportar como warnings no resumo, não bloqueiam
240
+ Group violations by impact:
241
+ - `critical` / `serious` → **🚫 BLOCK** (do not create PR)
242
+ - `moderate` / `minor` → report as warnings in summary, non-blocking
240
243
 
241
- Verificar também erros de console relacionados a acessibilidade:
244
+ Also check for accessibility-related console errors:
242
245
 
243
246
  ```javascript
244
247
  await mcp__playwright__browser_console_messages({ level: 'error' });
@@ -248,111 +251,111 @@ await mcp__playwright__browser_console_messages({ level: 'error' });
248
251
 
249
252
  ## Step 6 — SEO Check (Next.js only)
250
253
 
251
- Varrer arquivos `page.tsx` da feature para verificar metadata:
254
+ Scan feature `page.tsx` files to verify metadata:
252
255
 
253
256
  ```bash
254
- # Buscar páginas da feature
257
+ # Find feature pages
255
258
  find . -name "page.tsx" -path "*$ARGUMENTS*" 2>/dev/null
256
259
 
257
- # Verificar se têm metadata
260
+ # Check if they have metadata
258
261
  grep -l "export const metadata\|export async function generateMetadata" $(find . -name "page.tsx" -path "*$ARGUMENTS*" 2>/dev/null)
259
262
  ```
260
263
 
261
- Checklist por página:
264
+ Checklist per page:
262
265
 
263
266
  ```
264
- [ ] export const metadata com title e description
265
- [ ] og:title e og:description (Open Graph)
266
- [ ] og:image definida (para compartilhamento social)
267
- [ ] Sem título duplicado entre páginas
268
- [ ] robots não bloqueia indexação das páginas públicas
267
+ [ ] export const metadata with title and description
268
+ [ ] og:title and og:description (Open Graph)
269
+ [ ] og:image defined (for social sharing)
270
+ [ ] No duplicate titles between pages
271
+ [ ] robots doesn't block public page indexing
269
272
  ```
270
273
 
271
- > SEO não bloqueia PR — reportar como warnings no resumo final.
274
+ > SEO doesn't block PR — report as warnings in final summary.
272
275
 
273
276
  ---
274
277
 
275
- ## Step 7 — Checklist de Design Responsivo
278
+ ## Step 7 — Responsive Design Checklist
276
279
 
277
- Após visualizar os screenshots do Step 4:
280
+ After viewing Step 4 screenshots:
278
281
 
279
282
  ```
280
- [ ] Mobile (375px): sem scroll horizontal, botões ≥ 44px, texto legível
281
- [ ] Tablet (768px): layout adapta (sidebar colapsa, grid ajusta colunas)
282
- [ ] Desktop (1440px): aproveita espaço disponível, sem conteúdo esticado
283
- [ ] Navegação funciona em todos os breakpoints
284
- [ ] Formulários acessíveis em mobile (labels visíveis, inputs grandes o suficiente)
283
+ [ ] Mobile (375px): no horizontal scroll, buttons ≥ 44px, legible text
284
+ [ ] Tablet (768px): layout adapts (sidebar collapses, grid adjusts columns)
285
+ [ ] Desktop (1440px): uses available space, no stretched content
286
+ [ ] Navigation works on all breakpoints
287
+ [ ] Forms accessible on mobile (visible labels, large enough inputs)
285
288
  ```
286
289
 
287
- Se screenshots não foram capturados (dev server indisponível), marcar como "não verificado" e
288
- registrar no resumo.
290
+ If screenshots were not captured (dev server unavailable), mark as "unverified" and
291
+ record in summary.
289
292
 
290
293
  ---
291
294
 
292
- ## Step 8 — Resumo e Artefatos
295
+ ## Step 8 — Summary and Artifacts
293
296
 
294
- Criar arquivo de resumo consolidado:
297
+ Create consolidated summary file:
295
298
 
296
299
  ```bash
297
300
  mkdir -p ".morph/features/$ARGUMENTS/visual-screenshots"
298
301
  ```
299
302
 
300
- Salvar em `.morph/features/$ARGUMENTS/visual-screenshots/morph:frontend-review-summary.md`:
303
+ Save to `.morph/features/$ARGUMENTS/visual-screenshots/morph:frontend-review-summary.md`:
301
304
 
302
305
  ```markdown
303
306
  # Frontend Review — {feature}
304
307
 
305
- **Data:** {data}
306
- **Stack:** {stack detectado}
307
- **Contexto:** design validation | implementation validation | ambos
308
+ **Date:** {date}
309
+ **Stack:** {detected stack}
310
+ **Context:** design validation | implementation validation | both
308
311
 
309
- ## Resultados
312
+ ## Results
310
313
 
311
314
  ### Step 1 — Design Outputs
312
315
  - validate-feature: ✅ PASS / 🚫 BLOCK
313
- - Outputs verificados: ui-design-system.md, ui-mockups.md, ui-components.md, ui-flows.md
314
- - Contraste WCAG: {resultado}
316
+ - Outputs verified: ui-design-system.md, ui-mockups.md, ui-components.md, ui-flows.md
317
+ - WCAG Contrast: {result}
315
318
 
316
- ### Step 2 — Scan de Acessibilidade Estática
317
- - Arquivos escaneados: {N}
319
+ ### Step 2 — Static Accessibility Scan
320
+ - Files scanned: {N}
318
321
  - Findings: {total} ({CRITICAL: N, HIGH: N, MEDIUM: N})
319
322
  - Status: ✅ PASS / 🚫 BLOCK
320
323
 
321
- ### Step 3 — Scan de Código Frontend
322
- - Status: ✅ PASS / 🚫 BLOCK / ⏭️ pulado ( executado)
324
+ ### Step 3 — Frontend Code Scan
325
+ - Status: ✅ PASS / 🚫 BLOCK / ⏭️ skipped (already run)
323
326
 
324
- ### Step 4 — Screenshots Responsivos
325
- - Mobile (375px): {paths ou "não capturado"}
326
- - Tablet (768px): {paths ou "não capturado"}
327
- - Desktop (1440px): {paths ou "não capturado"}
327
+ ### Step 4 — Responsive Screenshots
328
+ - Mobile (375px): {paths or "not captured"}
329
+ - Tablet (768px): {paths or "not captured"}
330
+ - Desktop (1440px): {paths or "not captured"}
328
331
 
329
332
  ### Step 5 — axe-core Runtime
330
- - Violations críticas/sérias: {N} → ✅ / 🚫
333
+ - Critical/serious violations: {N} → ✅ / 🚫
331
334
  - Warnings (moderate/minor): {N}
332
335
 
333
336
  ### Step 6 — SEO (Next.js)
334
- - Páginas com metadata: {N}/{total}
335
- - Gaps: {lista ou "nenhum"}
337
+ - Pages with metadata: {N}/{total}
338
+ - Gaps: {list or "none"}
336
339
 
337
- ## Status Geral
340
+ ## Overall Status
338
341
 
339
342
  **{✅ PASS / 🚫 BLOCK}**
340
343
 
341
- {Se BLOCK: motivo(s) listados aqui}
344
+ {If BLOCK: reason(s) listed here}
342
345
  ```
343
346
 
344
347
  ---
345
348
 
346
- ## Resumo dos BLOCKs
349
+ ## Block Summary
347
350
 
348
- | Step | Condição de BLOCK |
351
+ | Step | Block Condition |
349
352
  |------|-------------------|
350
- | Step 1 | `validate-feature` falhou ou outputs obrigatórios ausentes |
351
- | Step 2 | Qualquer finding CRITICAL ou HIGH ≥ 3 no scan estático |
352
- | Step 3 | Qualquer finding CRITICAL no scan de código |
353
- | Step 5 | Dev server ativo + axe-core violations `critical` ou `serious` |
353
+ | Step 1 | `validate-feature` failed or mandatory outputs missing |
354
+ | Step 2 | Any CRITICAL finding or HIGH ≥ 3 in static scan |
355
+ | Step 3 | Any CRITICAL finding in code scan |
356
+ | Step 5 | Dev server active + axe-core violations `critical` or `serious` |
354
357
 
355
- **Todos os BLOCKs devem ser resolvidos antes de criar o PR (quando executado pós-implementação).**
358
+ **All BLOCKs must be resolved before creating the PR (when run post-implementation).**
356
359
 
357
360
  ---
358
361
 
@@ -125,13 +125,13 @@ uiLibrary: shadcn | fluent-ui | mudblazor | null
125
125
  monorepo: true | false
126
126
  frontendPath: src/frontend (if monorepo)
127
127
  backendPath: src/backend (if monorepo)
128
- architectureStyle: vertical-slice | null ← novo
128
+ architectureStyle: vertical-slice | null ← new
129
129
  ```
130
130
 
131
- **VSA detection:** `architectureStyle: "vertical-slice"` se qualquer um destes existir:
132
- - `Abstractions/IHandler.cs` encontrado pelo Glob
133
- - `Pipelines/ValidationDecorator.cs` encontrado pelo Glob
134
- - 2+ pastas com sufixo `Feature` em `Features/` (ex: `BookFeature`, `OrderFeature`)
131
+ **VSA detection:** `architectureStyle: "vertical-slice"` if any of these exist:
132
+ - `Abstractions/IHandler.cs` found by Glob
133
+ - `Pipelines/ValidationDecorator.cs` found by Glob
134
+ - 2+ folders with `Feature` suffix in `Features/` (e.g., `BookFeature`, `OrderFeature`)
135
135
 
136
136
  ---
137
137
 
@@ -143,9 +143,9 @@ Ask at most 3 questions, only those that apply:
143
143
 
144
144
  | # | Question | Condition | Purpose |
145
145
  |---|----------|-----------|---------|
146
- | 1 | *"Em uma frase: qual é o objetivo principal do **[ProjectName]**?"* | Always | README.md Overview |
147
- | 2 | *"Confirmo: frontend em `{frontendPath}`, backend em `{backendPath}`. Correto?"* | Monorepo detected | Validate paths before persisting |
148
- | 3 | *"Supabase Cloud (managed) ou self-hosted?"* | Supabase detected | MCP URL configuration |
146
+ | 1 | *"In one sentence: what is the main purpose of **[ProjectName]**?"* | Always | README.md Overview |
147
+ | 2 | *"Confirmed: frontend at `{frontendPath}`, backend at `{backendPath}`. Correct?"* | Monorepo detected | Validate paths before persisting |
148
+ | 3 | *"Supabase Cloud (managed) or self-hosted?"* | Supabase detected | MCP URL configuration |
149
149
 
150
150
  Do **not** ask about technology already confirmed by file evidence.
151
151
 
@@ -200,7 +200,7 @@ Read `.morph/config/config.json` and merge into `project`:
200
200
  }
201
201
  ```
202
202
 
203
- **Se `architectureStyle: "vertical-slice"` foi detectado no Step 3**, adicione também:
203
+ **If `architectureStyle: "vertical-slice"` was detected in Step 3**, also add:
204
204
 
205
205
  ```json
206
206
  {
@@ -210,7 +210,7 @@ Read `.morph/config/config.json` and merge into `project`:
210
210
  }
211
211
  ```
212
212
 
213
- E informe o usuário:
213
+ And inform the user:
214
214
 
215
215
  ```
216
216
  ✓ Detected: Vertical Slice Architecture (IHandler.cs / *Feature folders)
@@ -218,12 +218,12 @@ E informe o usuário:
218
218
  → morph-spec will use vsa-architect + contracts-vsa.cs for features
219
219
  ```
220
220
 
221
- > Esta key é o que ativa o `vsa-architect` em vez do `domain-architect` durante `/morph-proposal`.
221
+ > This key is what activates `vsa-architect` instead of `domain-architect` during `/morph-proposal`.
222
222
 
223
- **Se o projeto ainda não existe (novo projeto VSA do zero)**, informe também:
223
+ **If the project doesn't exist yet (new VSA project from scratch)**, also inform:
224
224
 
225
225
  ```
226
- Para criar um novo projeto VSA:
226
+ To create a new VSA project:
227
227
  dotnet new install https://github.com/polymorphism-tech/Morph_Template_VerticalSliceArchitecture
228
228
  dotnet new vsa -n MyProject
229
229
  cd MyProject && npx morph-spec init
@@ -324,6 +324,35 @@ Use `AskUserQuestion` with header `"{MCP} failed"` and these options:
324
324
 
325
325
  ---
326
326
 
327
+ ## Step 7.7 — Run Doctor
328
+
329
+ After all configuration is complete, run the health check to verify everything is properly installed:
330
+
331
+ ```bash
332
+ npx morph-spec doctor
333
+ ```
334
+
335
+ This validates: config.json integrity, agents.json presence, hooks installation, skills distribution, required command files, and state.json schema version. Fix any reported issues before proceeding.
336
+
337
+ ---
338
+
339
+ ## Step 7.8 — Workflow Selection
340
+
341
+ If the project stack suggests a non-standard workflow, ask the user:
342
+
343
+ | Stack | Default Workflow | Alternative |
344
+ |-------|-----------------|-------------|
345
+ | Node.js CLI (no UI) | `nodejs-cli` (skips uiux/clarify/sync) | `standard` |
346
+ | .NET + Blazor | `standard` (all phases) | — |
347
+ | Next.js | `standard` (all phases) | — |
348
+
349
+ For Node.js CLI projects, update config:
350
+ ```json
351
+ { "workflow": "nodejs-cli" }
352
+ ```
353
+
354
+ ---
355
+
327
356
  ## Step 8 — Final Output
328
357
 
329
358
  Before printing the summary, check `~/.claude/settings.local.json` for `env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`. If set to `"1"`, mark Agent Teams as enabled; otherwise show the warning.