@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
@@ -4,58 +4,61 @@ description: Simplified workflow for converting HTML prototypes into functional
4
4
  user-invocable: true
5
5
  argument-hint: "[feature-name] [prototype-path]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ stacks:
8
+ - blazor
7
9
  ---
8
10
 
9
11
  # MORPH Replicate — HTML to Blazor Conversion
10
12
 
11
- > Workflow simplificado para replicar prototipos HTML em Blazor.
12
- > Use quando tiver um prototipo HTML pronto e precisar converter para codigo Blazor funcional.
13
+ > Simplified workflow for replicating HTML prototypes in Blazor.
14
+ > Use when you have a ready HTML prototype and need to convert it to functional Blazor code.
13
15
 
14
- ## Comando
16
+ ## Command
15
17
 
16
18
  ```bash
17
19
  /morph:replicate {feature-name} {prototype-path}
18
20
  ```
19
21
 
20
- **Exemplo:**
22
+ **Example:**
21
23
  ```bash
22
24
  /morph:replicate ui-redesign prototipo/
23
25
  ```
24
26
 
25
27
  ---
26
28
 
27
- ## Workflow Simplificado
29
+ ## Simplified Workflow
28
30
 
29
- ### FASE 1: ANALISE DO PROTOTIPO
31
+ ### PHASE 1: PROTOTYPE ANALYSIS
30
32
 
31
- 1. **Ler todos os arquivos HTML em `{prototype-path}/`**
33
+ 1. **Read all HTML files in `{prototype-path}/`**
32
34
  ```bash
33
- # Encontrar todos os arquivos HTML
35
+ # Find all HTML files
34
36
  glob: {prototype-path}/**/*.html
35
- glob: {prototype-path}/**/code.html # Pattern comum de prototipos
37
+ glob: {prototype-path}/**/code.html # Common prototype pattern
36
38
  ```
37
39
 
38
- 2. **Extrair padroes de cada arquivo:**
39
- - Layout (grid, flexbox, estrutura)
40
- - Componentes (cards, buttons, forms, modals)
41
- - Cores (extrair de inline styles e CSS)
42
- - Fontes (font-family, sizes)
43
- - Espacamentos (padding, margin, gap)
44
- - Classes CSS usadas
40
+ 2. **Extract patterns from each file:**
41
+ - Layout (grid, flexbox, structure)
42
+ - Components (cards, buttons, forms, modals)
43
+ - Colors (extract from inline styles and CSS)
44
+ - Fonts (font-family, sizes)
45
+ - Spacing (padding, margin, gap)
46
+ - CSS classes used
45
47
 
46
- 3. **Gerar mapeamento HTML → Blazor:**
48
+ 3. **Generate HTML → Blazor mapping:**
47
49
 
48
- > Para tabela completa de mapeamentos, veja `references/blazor-html-mapping.md`
50
+ **Read the reference file first:** `references/blazor-html-mapping.md` — this contains the complete mapping table for HTML→Fluent UI and HTML→MudBlazor conversions. Load it before generating the prototype-specific mapping.
49
51
 
50
- Documente os mapeamentos relevantes para este prototipo especifico:
52
+ Then document the relevant mappings for this specific prototype, citing the reference:
51
53
  ```markdown
52
- ## Mapeamento HTML → Blazor (este prototipo)
53
- - <elemento HTML> <ComponenteBlazor>
54
+ ## HTML → Blazor Mapping (this prototype)
55
+ > Source: references/blazor-html-mapping.md
56
+ - <HTML element> → <BlazorComponent>
54
57
  ```
55
58
 
56
- 4. **Gerar lista de classes CSS a criar:**
59
+ 4. **Generate list of CSS classes to create:**
57
60
  ```markdown
58
- ## Classes CSS Necessarias
61
+ ## Required CSS Classes
59
62
 
60
63
  - [ ] .page-layout
61
64
  - [ ] .home-hero
@@ -65,72 +68,72 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
65
68
  - [ ] .animate-slideInUp
66
69
  ```
67
70
 
68
- **PAUSA:** Aprovar mapeamento e lista de CSS
71
+ **PAUSE:** Approve mapping and CSS list
69
72
 
70
73
  ---
71
74
 
72
- ### FASE 2: TASKS (Lista de Telas)
75
+ ### PHASE 2: TASKS (Screen List)
73
76
 
74
- Gerar lista de telas para implementar na ordem correta:
77
+ Generate screen list to implement in correct order:
75
78
 
76
79
  ```markdown
77
- ## Tasks de Implementacao
80
+ ## Implementation Tasks
78
81
 
79
82
  ### T001: Setup Design System
80
- - Criar/atualizar wwwroot/css/design-system.css
81
- - Adicionar todas as classes CSS listadas
82
- - Validar com `morph-spec validate`
83
-
84
- ### T002: {Nome da Tela 1}
85
- - Ler: {prototype-path}/{tela1}.html
86
- - Criar/Atualizar: Pages/{Tela1}.razor
87
- - Componentes: FluentCard, FluentButton, etc.
83
+ - Create/update wwwroot/css/design-system.css
84
+ - Add all listed CSS classes
85
+ - Validate with `morph-spec validate`
86
+
87
+ ### T002: {Screen Name 1}
88
+ - Read: {prototype-path}/{screen1}.html
89
+ - Create/Update: Pages/{Screen1}.razor
90
+ - Components: FluentCard, FluentButton, etc.
88
91
  - CSS: .home-hero, .card-premium
89
92
 
90
- ### T003: {Nome da Tela 2}
91
- - Ler: {prototype-path}/{tela2}.html
92
- - Criar/Atualizar: Pages/{Tela2}.razor
93
+ ### T003: {Screen Name 2}
94
+ - Read: {prototype-path}/{screen2}.html
95
+ - Create/Update: Pages/{Screen2}.razor
93
96
  - ...
94
97
 
95
- ### TXXX: Validacao Final
96
- - Build completo
98
+ ### TXXX: Final Validation
99
+ - Full build
97
100
  - `morph-spec validate`
98
- - Testar responsividade
101
+ - Test responsiveness
99
102
  ```
100
103
 
101
- **PAUSA:** Aprovar lista de tasks
104
+ **PAUSE:** Approve task list
102
105
 
103
106
  ---
104
107
 
105
- ### FASE 3: IMPLEMENT (Por Tela)
108
+ ### PHASE 3: IMPLEMENT (Per Screen)
106
109
 
107
- Para cada tela, seguir este fluxo:
110
+ For each screen, follow this flow:
108
111
 
109
- 1. **Ler HTML do prototipo**
112
+ 1. **Read prototype HTML**
110
113
  ```
111
- Read: {prototype-path}/{tela}.html
114
+ Read: {prototype-path}/{screen}.html
112
115
  ```
113
116
 
114
- 2. **Ler arquivo .razor atual** (se existir)
117
+ 2. **Read current .razor file** (if exists)
115
118
  ```
116
- Read: Pages/{Tela}.razor
119
+ Read: Pages/{Screen}.razor
117
120
  ```
118
121
 
119
- 3. **Reescrever .razor usando Fluent UI/MudBlazor**
120
- - Manter estrutura de layout do prototipo
121
- - Substituir elementos HTML por componentes Blazor
122
- - Aplicar classes CSS do design-system
122
+ 3. **Rewrite .razor using Fluent UI/MudBlazor**
123
+ - Keep prototype layout structure
124
+ - Replace HTML elements with Blazor components
125
+ - Apply design-system CSS classes
123
126
 
124
- 4. **Adicionar CSS ao design-system.css**
125
- - Se classe nova foi usada no .razor
126
- - Seguir padrao de nomenclatura (prefixo por pagina)
127
+ 4. **Add CSS to design-system.css**
128
+ - If new class was used in .razor
129
+ - Follow naming pattern (prefix by page)
127
130
 
128
- 5. **Build para validar**
131
+ 5. **Build to validate**
129
132
  ```bash
130
133
  dotnet build
131
134
  ```
132
135
 
133
- 6. **Validar CSS**
136
+ 6. **Validate CSS**
134
137
  ```bash
135
138
  morph-spec validate src/MyApp.Web
136
139
  ```
@@ -139,38 +142,43 @@ Para cada tela, seguir este fluxo:
139
142
 
140
143
  ## Outputs
141
144
 
142
- Este workflow gera apenas:
145
+ All outputs go in `.morph/features/{feature-name}/5-implement/`:
143
146
 
144
- | Arquivo | Descricao |
145
- |---------|-----------|
146
- | `.razor` files | Paginas convertidas |
147
- | `design-system.css` | CSS atualizado |
148
- | `recap.md` | Resumo da implementacao (ao final) |
147
+ | File | Location | Description |
148
+ |---------|----------|-----------|
149
+ | `.razor` files | Project source (Pages/, Components/, Shared/) | Converted pages |
150
+ | `design-system.css` | `wwwroot/css/design-system.css` | Updated CSS |
151
+ | `recap.md` | `.morph/features/{feature-name}/5-implement/recap.md` | Implementation summary |
149
152
 
150
- **NAO gera:** proposal.md, spec.md, contracts.cs, tasks.json
153
+ After completion, mark the output:
154
+ ```bash
155
+ npx morph-spec state mark-output {feature-name} recap
156
+ ```
157
+
158
+ **Does NOT generate:** proposal.md, spec.md, contracts.cs, tasks.md
151
159
 
152
160
  ---
153
161
 
154
- ## Exemplo de Execucao
162
+ ## Execution Example
155
163
 
156
164
  ```markdown
157
165
  /morph:replicate checkout-redesign prototipo/checkout/
158
166
 
159
- 📁 Analisando prototipo em prototipo/checkout/...
167
+ 📁 Analyzing prototype in prototipo/checkout/...
160
168
 
161
- **Arquivos encontrados:**
169
+ **Files found:**
162
170
  - step1-cart.html
163
171
  - step2-payment.html
164
172
  - step3-confirmation.html
165
173
 
166
- **Padroes extraidos:**
174
+ **Extracted patterns:**
167
175
 
168
- Cores:
176
+ Colors:
169
177
  - Primary: #FF6B35
170
178
  - Secondary: #2D3047
171
179
  - Background: #FAFAFA
172
180
 
173
- Classes CSS a criar:
181
+ CSS classes to create:
174
182
  - [ ] .checkout-layout
175
183
  - [ ] .checkout-steps
176
184
  - [ ] .checkout-form
@@ -178,39 +186,39 @@ Classes CSS a criar:
178
186
  - [ ] .payment-options
179
187
  - [ ] .confirmation-message
180
188
 
181
- Mapeamento HTML → Blazor:
189
+ HTML → Blazor Mapping:
182
190
  - form.checkout-form → EditForm + FluentTextField
183
191
  - div.payment-card → FluentCard
184
192
  - button.btn-pay → FluentButton Accent
185
193
 
186
194
  ---
187
195
 
188
- ⛔ **PAUSA OBRIGATORIA**
196
+ ⛔ **MANDATORY PAUSE**
189
197
 
190
- **Proximos passos:**
191
- 1. ✅ Aprovar e gerar tasks de implementacao
192
- 2. 🔄 Ajustar mapeamento
193
- 3. 📋 Ver mais detalhes dos componentes
198
+ **Next steps:**
199
+ 1. ✅ Approve and generate implementation tasks
200
+ 2. 🔄 Adjust mapping
201
+ 3. 📋 See more component details
194
202
  ```
195
203
 
196
204
  ---
197
205
 
198
- ## Quando Usar
206
+ ## When to Use
199
207
 
200
- - ✅ Prototipo HTML pronto (hand-coded, exported, etc.)
201
- - ✅ Design ja aprovado pelo cliente
202
- - ✅ Apenas conversao visual (sem logica de negocio nova)
203
- - ✅ Codigo Blazor existente para atualizar
208
+ - ✅ HTML prototype ready (hand-coded, exported, etc.)
209
+ - ✅ Design already approved by client
210
+ - ✅ Visual conversion only (no new business logic)
211
+ - ✅ Existing Blazor code to update
204
212
 
205
- ## Quando NAO Usar
213
+ ## When NOT to Use
206
214
 
207
- - ❌ Feature nova com logica complexa (use FULL MORPH)
208
- - ❌ Infraestrutura Azure necessaria (use FULL MORPH)
209
- - ❌ Sem prototipo definido (use STANDARD ou FULL MORPH)
215
+ - ❌ New feature with complex logic (use FULL MORPH)
216
+ - ❌ Azure infrastructure needed (use FULL MORPH)
217
+ - ❌ No prototype defined (use STANDARD or FULL MORPH)
210
218
 
211
219
  ---
212
220
 
213
- ## Referências
221
+ ## References
214
222
 
215
223
  - **Ref:** `framework/standards/frontend/blazor/html-conversion.md`
216
224
  - **Ref:** `framework/standards/frontend/design-system/naming.md`
@@ -219,4 +227,4 @@ Mapeamento HTML → Blazor:
219
227
 
220
228
  ---
221
229
 
222
- *MORPH-SPEC by Polymorphism Tech*
230
+ *MORPH-SPEC by Polymorphism Tech*
@@ -3,6 +3,8 @@ name: morph:simulation-checklist
3
3
  description: Checklist for implementing mock/simulation clients for external .NET services (AI APIs, payments, email). Use when setting up simulation mode without real API access, when creating fake service implementations for development/testing, or when debugging external service integrations.
4
4
  user-invocable: true
5
5
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
6
+ stacks:
7
+ - dotnet
6
8
  ---
7
9
 
8
10
  # Simulation Checklist
@@ -52,11 +54,33 @@ else
52
54
  services.AddProductionClients(configuration);
53
55
  ```
54
56
 
57
+ ## MORPH-SPEC Integration
58
+
59
+ When implementing simulation as a morph-spec task:
60
+
61
+ ```bash
62
+ # Track the simulation setup task
63
+ npx morph-spec task start {feature} {task-id}
64
+
65
+ # After implementation, validate the feature
66
+ npx morph-spec validate-feature {feature}
67
+
68
+ # Complete the task (triggers Tier-4 validators)
69
+ npx morph-spec task done {feature} {task-id}
70
+ ```
71
+
72
+ Reference the project's service lifetime patterns:
73
+ ```bash
74
+ # Check existing DI patterns in the project
75
+ grep -r "AddSingleton\|AddScoped\|AddTransient" src/ --include="*.cs" -l
76
+ ```
77
+
55
78
  ## Post-Implementation
56
79
 
57
80
  - [ ] Validate DI: `dotnet build && dotnet run` + health check
58
81
  - [ ] Test full flow end-to-end (not just unit tests)
59
82
  - [ ] Verify simulation logs — confirm mocks are being called
83
+ - [ ] Run `npx morph-spec validate-feature {feature}` to check architecture compliance
60
84
 
61
85
  ## Common Errors
62
86
 
@@ -82,66 +82,67 @@ Feature with multiple active agents?
82
82
 
83
83
  ---
84
84
 
85
- ## Comunicação com o Usuário
85
+ ## User Communication
86
86
 
87
- ### AskUserQuestion vs. Texto Livre
87
+ ### AskUserQuestion vs. Plain Text
88
88
 
89
- | Situação | Ferramenta |
89
+ | Situation | Tool |
90
90
  |---|---|
91
- | ≥2 opções mutuamente exclusivas | `AskUserQuestion` (options[]) |
92
- | Escolha binária sim/não | `AskUserQuestion` (2 options) |
93
- | Aprovação de plano | `ExitPlanMode` |
94
- | Explicação, progresso, confirmação | Texto direto |
91
+ | ≥2 mutually exclusive options | `AskUserQuestion` (options[]) |
92
+ | Binary yes/no choice | `AskUserQuestion` (2 options) |
93
+ | Plan approval | `ExitPlanMode` |
94
+ | Explanation, progress, confirmation | Direct text |
95
95
 
96
- **Regra:** NUNCA apresentar opções múltiplas como texto livre. Use `AskUserQuestion` com `options[]` para garantir escolha estruturada sem ambiguidade.
96
+ **Rule:** NEVER present multiple options as plain text. Use `AskUserQuestion` with `options[]` to ensure structured, unambiguous choices.
97
97
 
98
98
  ### EnterPlanMode
99
99
 
100
- Use **ANTES** de iniciar implementação quando:
101
- - Refactor toca ≥5 arquivos ou muda arquitetura
102
- - Estimativa de tasks ≥20
103
- - Escolha entre ≥2 abordagens de design significativamente diferentes
100
+ Use **BEFORE** starting implementation when:
101
+ - Refactor touches ≥5 files or changes architecture
102
+ - Estimated tasks ≥20
103
+ - Choosing between ≥2 significantly different design approaches
104
104
 
105
- NÃO use para:
106
- - Correção pontual de 1-3 arquivos
107
- - Usuário especificou abordagem detalhada
108
- - Fase implement com tasks.md aprovado
105
+ Do NOT use for:
106
+ - Point fix of 1-3 files
107
+ - User already specified detailed approach
108
+ - Implement phase with tasks.md already approved
109
109
 
110
110
  ---
111
111
 
112
- ### Regra de Leituras Paralelas (CRÍTICO)
112
+ ### Parallel Read Rule (CRITICAL)
113
113
 
114
- Arquivos independentes = uma única mensagem com múltiplas chamadas Read.
114
+ Independent files = a single message with multiple Read calls.
115
115
 
116
116
  ```
117
- # ERRADO (sequencial)
117
+ # WRONG (sequential)
118
118
  Read: state.json → Read: spec.md → Read: tasks.md # 3 round-trips
119
119
 
120
- # CORRETO (paralelo, 1 round-trip)
120
+ # CORRECT (parallel, 1 round-trip)
121
121
  Read: state.json + Read: spec.md + Read: tasks.md
122
122
  ```
123
123
 
124
- Critério: se a leitura de arquivo B não depende do CONTEÚDO de arquivo A, leia os dois juntos.
124
+ Criterion: if reading file B does not depend on the CONTENT of file A, read both together.
125
125
 
126
- **Exemplos de independência:** spec.md ↔ decisions.md ↔ contracts.cs ↔ tasks.md (todos lidos juntos na investigação de uma fase).
126
+ **Independence examples:** spec.md ↔ decisions.md ↔ contracts.cs ↔ tasks.md (all read together when investigating a phase).
127
127
 
128
128
  ---
129
129
 
130
130
  ## Tools Per Phase
131
131
 
132
- > Para detalhes de ferramentas por fase, veja `references/tools-per-phase.md`
132
+ > For detailed per-phase tool tables, see `references/tools-per-phase.md`
133
133
 
134
- **Resumo rápido por fase:**
134
+ **Quick summary by phase:**
135
135
 
136
- | Fase | MCPs principais | Dispatch subagents? |
137
- |------|----------------|---------------------|
138
- | Proposal | GitHub (opcional) | Não |
139
- | Setup | GitHub (opcional) | Não |
140
- | UI/UX | Playwright, Context7 | Não |
141
- | Design | Supabase, Context7, GitHub | Sim (domain-architect + schema em paralelo) |
142
- | Clarify | Context7, GitHub | Não |
143
- | Tasks | Context7, GitHub | Sim (quando spec tem 20+ reqs ou 3+ domínios) |
144
- | Implement | Supabase, Context7, Playwright, GitHub | Sim (quando tasks.total 6 e 2+ domínios) |
136
+ | Phase | Primary MCPs | Dispatch subagents? |
137
+ |-------|-------------|---------------------|
138
+ | Proposal | GitHub (optional) | No |
139
+ | Setup | GitHub (optional) | No |
140
+ | UI/UX | Playwright, Context7 | No |
141
+ | Design | Supabase, Context7, GitHub | Yes (domain-architect + schema in parallel) |
142
+ | Clarify | Context7, GitHub | No |
143
+ | Plan | Context7, GitHub | No |
144
+ | Tasks | Context7, GitHub | Yes (when spec has 20+ reqs or 3+ domains) |
145
+ | Implement | Supabase, Context7, Playwright, GitHub | Yes (when tasks.total ≥ 6 and 2+ domains) |
145
146
 
146
147
  ---
147
148
 
@@ -191,15 +192,15 @@ Before choosing a tool, ask:
191
192
  - Unknown files needing exploration → Glob/Grep, then Read
192
193
  - Complex multi-step analysis → Task subagent
193
194
 
194
- ### Anti-Padrões Globais
195
+ ### Global Anti-Patterns
195
196
 
196
- - ❌ **WebFetch para URLs GitHub** → Use `gh api` ou `gh` CLI
197
- - Correto: `gh api repos/owner/repo/git/trees/main --field recursive=1`
198
- - Correto: `gh pr view 123`, `gh issue view 456`
199
- - WebFetch para GitHub retorna HTML/redirect; `gh` usa a API autenticada
200
- - ❌ **Perguntas multi-opção como texto livre** → Use `AskUserQuestion` com `options[]`
201
- - Correto: `AskUserQuestion({ question: "Qual abordagem?", options: [{label: "A"}, {label: "B"}] })`
202
- - Texto livre cria ambiguidade e requer parse manual da resposta
197
+ - ❌ **WebFetch for GitHub URLs** → Use `gh api` or `gh` CLI
198
+ - Correct: `gh api repos/owner/repo/git/trees/main --field recursive=1`
199
+ - Correct: `gh pr view 123`, `gh issue view 456`
200
+ - WebFetch for GitHub returns HTML/redirect; `gh` uses the authenticated API
201
+ - ❌ **Multi-option questions as plain text** → Use `AskUserQuestion` with `options[]`
202
+ - Correct: `AskUserQuestion({ question: "Which approach?", options: [{label: "A"}, {label: "B"}] })`
203
+ - Plain text creates ambiguity and requires manual response parsing
203
204
 
204
205
  ---
205
206
 
@@ -3,6 +3,7 @@ name: morph:verification-before-completion
3
3
  description: Phase-specific verification checklists and morph-spec validation commands for confirming MORPH-SPEC outputs are complete and correct. Use before marking any task done, before advancing to the next phase, before committing, or before creating PRs.
4
4
  user-invocable: true
5
5
  argument-hint: "[feature-name] [phase?]"
6
+ allowed-tools: Read, Bash, Glob, Grep
6
7
  ---
7
8
 
8
9
  # Verification Before Completion — MORPH-SPEC Integrated
@@ -52,16 +53,26 @@ argument-hint: "[feature-name] [phase?]"
52
53
 
53
54
  - [ ] All clarification questions answered by user
54
55
  - [ ] `spec.md` updated with Clarifications section
56
+ - [ ] `clarifications.md` exists in `1-design/`
55
57
  - [ ] No unresolved ambiguities in spec
56
58
 
57
- ### Phase 4 — Tasks
59
+ ### Phase 4 — Plan
58
60
 
59
- - [ ] `tasks.md` or `tasks.json` exists
61
+ - [ ] `plan.md` exists in `.morph/features/{feature}/3-plan/`
62
+ - [ ] Plan contains: Goal, Architecture, Execution Strategy, Task Groups
63
+ - [ ] Each task has exact file paths and complete code
64
+ - [ ] Execution strategy defined (single / subagents / agent-teams)
65
+ - [ ] `morph-spec state mark-output {feature} plan` was called
66
+ - [ ] User approved plan via `morph-spec approve {feature} plan`
67
+
68
+ ### Phase 5 — Tasks
69
+
70
+ - [ ] `tasks.md` exists
60
71
  - [ ] All tasks have: ID, title, description, dependencies
61
72
  - [ ] Checkpoints defined (every 3 tasks)
62
73
  - [ ] `morph-spec state set {feature} tasks.total N` called
63
74
 
64
- ### Phase 5 — Implement
75
+ ### Phase 6 — Implement
65
76
 
66
77
  - [ ] All tasks marked as completed
67
78
  - [ ] Build succeeds (`npm run build` or `dotnet build`)
@@ -74,17 +85,17 @@ argument-hint: "[feature-name] [phase?]"
74
85
  ## Verification Commands
75
86
 
76
87
  ```bash
77
- # Run content-aware validation
88
+ # Run full feature validation
78
89
  npx morph-spec validate-feature {feature-name}
79
90
 
80
- # Run with specific phase
81
- npx morph-spec validate-feature {feature-name} --phase design
91
+ # Check feature state and phase
92
+ npx morph-spec state get {feature-name}
82
93
 
83
- # Check feature status
84
- npx morph-spec status {feature-name} --verbose
94
+ # Check approval gates
95
+ npx morph-spec approval-status {feature-name}
85
96
 
86
- # Run full project validation
87
- npx morph-spec validate
97
+ # Check overall project status
98
+ npx morph-spec status
88
99
  ```
89
100
 
90
101
  ---
@@ -100,7 +111,7 @@ Before running `morph-spec task done`:
100
111
 
101
112
  ```bash
102
113
  # Verify before marking done
103
- npx morph-spec validate-feature {feature} --phase implement
114
+ npx morph-spec validate-feature {feature}
104
115
  npx morph-spec task done {feature} T001
105
116
  ```
106
117