@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,68 +1,92 @@
1
1
  ---
2
- description: MORPH Spec Pipeline — cria ou retoma o planejamento de uma feature pelas fases 0→4 com pausas obrigatórias de aprovação
2
+ description: MORPH Spec Pipeline — creates or resumes feature planning through phases 0-6 with mandatory approval pauses. Use whenever the user wants to plan, spec, or design a new feature, or when they say /morph-proposal. This is the primary entry point for all MORPH-SPEC feature work.
3
3
  argument-hint: <feature-name>
4
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep
4
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
5
5
  ---
6
6
 
7
7
  # MORPH Spec Pipeline
8
8
 
9
- Crie ou retome o planejamento de uma feature, guiando automaticamente pelas fases 0→4 com pausas obrigatórias.
9
+ Guide a feature through the full planning pipeline (proposal through tasks) with mandatory approval pauses at each gate.
10
10
 
11
11
  ---
12
12
 
13
13
  ## 1. Resume Logic
14
14
 
15
- Primeiro, verifique se a feature existe:
15
+ Check if the feature already has state:
16
16
 
17
17
  ```bash
18
18
  npx morph-spec state get {feature-name}
19
19
  ```
20
20
 
21
- - **Se existe:** Identifique a fase atual e retome de onde parou (pular fases já concluídas)
22
- - **Se não existe:** Iniciar do zero (FASE 0)
21
+ - **Exists:** Read the current phase and resume from where it stopped (skip completed phases)
22
+ - **Does not exist:** Start from scratch (PHASE 0)
23
23
 
24
24
  ---
25
25
 
26
- ## 2. FASE 0: PROPOSAL
26
+ ## 2. PHASE 0: PROPOSAL
27
27
 
28
- ### Workflow
28
+ ### Step 1: Load project context
29
29
 
30
- 1. **Detecte agentes automaticamente:**
31
- - Read `.morph/framework/agents.json`
32
- - Para cada agente, compare `domains` e `keywords` com a feature solicitada
33
- - Registre os agentes relevantes: `npx morph-spec state add-agent {feature-name} {agent-id}`
30
+ Read these files to understand the project before writing anything:
31
+ - `.morph/context/README.md` — project overview, tech stack, architecture
32
+ - `.morph/config/config.json` project configuration (language, workflow, architecture style)
34
33
 
35
- 2. **Invoque skills dos agentes detectados:**
36
- - Para agentes com `skillPath` em agents.json, consulte o Skill correspondente
37
- - Use conhecimento dos skills para enriquecer a proposta
34
+ ### Step 2: Detect agents
38
35
 
39
- 3. **Analise a solicitação** e identifique: problema, usuários afetados, impacto
36
+ Read `framework/agents.json` (or `.morph/framework/agents.json` in client projects). For each agent:
37
+ 1. Check if `always_active: true` — include automatically
38
+ 2. Compare agent `keywords[]` and `domains[]` against the feature description — include on match
39
+ 3. **Document false-positive exclusions**: for agents that match on keywords but are irrelevant to this feature, note why they were excluded (this helps audit agent selection later)
40
40
 
41
- 4. **Crie a estrutura:**
42
- ```
43
- .morph/features/{feature-name}/
44
- ├── 0-proposal/proposal.md
45
- ├── 1-design/spec.md (iniciar)
46
- └── 4-tasks/tasks.md (iniciar)
41
+ Register each selected agent:
42
+ ```bash
43
+ npx morph-spec state add-agent {feature-name} {agent-id}
44
+ ```
45
+
46
+ ### Step 3: Determine if UI/UX phase is needed
47
+
48
+ If `ui-designer` is among the selected agents, the feature will trigger the UI/UX phase later. Note this decision — it affects the pipeline path.
47
49
 
48
- ```
50
+ ### Step 4: Create proposal
51
+
52
+ Read the proposal template at `framework/templates/docs/proposal.md` first, then create:
53
+
54
+ ```
55
+ .morph/features/{feature-name}/
56
+ 0-proposal/proposal.md
57
+ ```
58
+
59
+ Fill every section of the template. In particular:
60
+ - **Metadata table**: date, author, status, priority, stack
61
+ - **Problem Statement**: use the What/Who/Impact structure from the template
62
+ - **Proposed Solution**: technical approach, key features, user journey
63
+ - **Success Metrics**: quantified current vs target values
64
+ - **Scope**: explicit In Scope, Out of Scope, and Future Considerations
65
+ - **Risks**: table with likelihood, impact, mitigation
66
+ - **Dependencies**: checklist of prerequisites
67
+ - **Estimated Effort**: broken down by phase (in hours)
68
+ - **Questions & Clarifications**: seed 3-6 questions for the clarify phase — these become input for phase 3
69
+
70
+ ### Step 5: Register state
71
+
72
+ ```bash
73
+ npx morph-spec state init {feature-name}
74
+ npx morph-spec state set {feature-name} status draft
75
+ npx morph-spec state mark-output {feature-name} proposal
76
+ ```
49
77
 
50
- 5. **Preencha `proposal.md`** baseado em `framework/templates/proposal.md`
78
+ ### MANDATORY PAUSE
51
79
 
52
- 6. **Registre no state:**
53
- ```bash
54
- npx morph-spec state set {feature-name} status draft
55
- npx morph-spec state set {feature-name} phase proposal
56
- npx morph-spec state mark-output {feature-name} proposal
57
- # Adicionar cada agente detectado:
58
- npx morph-spec state add-agent {feature-name} {agent-id}
59
- ```
80
+ Use `AskUserQuestion` to present the approval gate with these elements:
60
81
 
61
- ### PAUSA OBRIGATORIA
82
+ 1. **Proposal summary** — 3-4 sentence overview of what was proposed
83
+ 2. **Agents activated** — table showing agent ID, tier, role, and why selected
84
+ 3. **Effort estimate** — total hours from the proposal
85
+ 4. **Key decisions pending** — 2-3 design decisions that will be resolved in the design phase
62
86
 
63
- Apresente: resumo da proposta, agentes ativados, custo estimado, 3 itens de pausa.
87
+ Options: Approve proposal / Request changes / Reject
64
88
 
65
- Após o usuário aprovar:
89
+ After approval:
66
90
  ```bash
67
91
  npx morph-spec approve {feature-name} proposal
68
92
  npx morph-spec phase advance {feature-name}
@@ -70,23 +94,23 @@ npx morph-spec phase advance {feature-name}
70
94
 
71
95
  ---
72
96
 
73
- ## 3. Após Aprovação do Proposal → FASE 1: SETUP (auto, sem pausa)
97
+ ## 3. PHASE 1: SETUP (automatic, no pause)
74
98
 
75
- Use o skill `morph-phase-setup` para instruções detalhadas.
99
+ Invoke the `morph-phase-setup` skill.
76
100
 
77
- Resumo: carregar contexto do projeto, confirmar stack, listar agentes ativos, atualizar state.
101
+ Summary: load project context, confirm stack, list active agents, update state.
78
102
 
79
- **Não pausa aqui.** Continuar automaticamente.
103
+ **No pause here.** Continue automatically to the next phase.
80
104
 
81
105
  ---
82
106
 
83
- ## 4. FASE 1.5: UI/UX (condicional)
107
+ ## 4. PHASE 1.5: UI/UX (conditional)
84
108
 
85
- Verificar se `uiux-designer` está nos `activeAgents`:
86
- - **Se SIM:** Use o skill `morph-phase-uiux` e executar. **PAUSA OBRIGATORIA** após gerar deliverables UI.
87
- - **Se NÃO:** Pular para FASE 2.
109
+ Check if `ui-designer` is in `activeAgents`:
110
+ - **Yes:** Invoke the `morph-phase-uiux` skill. **MANDATORY PAUSE** after generating UI deliverables.
111
+ - **No:** Skip to PHASE 2.
88
112
 
89
- Após o usuário aprovar:
113
+ After approval:
90
114
  ```bash
91
115
  npx morph-spec approve {feature-name} uiux
92
116
  npx morph-spec phase advance {feature-name}
@@ -94,17 +118,17 @@ npx morph-spec phase advance {feature-name}
94
118
 
95
119
  ---
96
120
 
97
- ## 5. FASE 2: DESIGN
121
+ ## 5. PHASE 2: DESIGN
98
122
 
99
- Use o skill `morph-phase-design` para instruções detalhadas.
123
+ Invoke the `morph-phase-design` skill.
100
124
 
101
- Resumo: gerar spec.md, contracts.cs, decisions.md com ADRs, estimar custos.
125
+ Summary: generate spec.md, contracts.cs (or contracts-vsa.cs for VSA), decisions.md with ADRs.
102
126
 
103
- ### PAUSA OBRIGATORIA
127
+ ### MANDATORY PAUSE
104
128
 
105
- Apresente: spec, contracts, decisions, custos. 3 itens de pausa (aprovar, ajustar escopo, modificar contracts).
129
+ Present: spec, contracts, decisions, effort estimate. Use `AskUserQuestion` with options: Approve design / Adjust scope / Modify contracts.
106
130
 
107
- Após o usuário aprovar:
131
+ After approval:
108
132
  ```bash
109
133
  npx morph-spec approve {feature-name} design
110
134
  npx morph-spec phase advance {feature-name}
@@ -112,27 +136,27 @@ npx morph-spec phase advance {feature-name}
112
136
 
113
137
  ---
114
138
 
115
- ## 6. Após Aprovação do Design → FASE 3: CLARIFY (interativo)
139
+ ## 6. PHASE 3: CLARIFY (interactive)
116
140
 
117
- Use o skill `morph-phase-clarify` para instruções detalhadas.
141
+ Invoke the `morph-phase-clarify` skill.
118
142
 
119
- Resumo: identificar ambiguidades, gerar 3-7 perguntas, aguardar respostas, atualizar spec com clarificações e edge cases.
143
+ Summary: identify ambiguities in spec.md, generate 3-7 targeted questions (building on the questions seeded in the proposal), wait for user answers, update spec with clarifications and edge cases.
120
144
 
121
- **Aguardar respostas do usuário antes de continuar.**
145
+ **Wait for user responses before continuing.**
122
146
 
123
147
  ---
124
148
 
125
- ## 6.5. FASE 4: PLAN
149
+ ## 7. PHASE 4: PLAN
126
150
 
127
- Use o skill `morph-phase-plan` para instruções detalhadas.
151
+ Invoke the `morph-phase-plan` skill.
128
152
 
129
- Resumo: gerar plano de implementação detalhado com paths exatos, código TDD, e estratégia de execução context-aware.
153
+ Summary: generate a detailed implementation plan with exact file paths, TDD structure, and context-aware execution strategy.
130
154
 
131
- ### PAUSA OBRIGATORIA
155
+ ### MANDATORY PAUSE
132
156
 
133
- Apresente: plano de implementação com estratégia recomendada. 3 itens de pausa (aprovar plano, ajustar estratégia, modificar plano).
157
+ Present: implementation plan with recommended strategy. Use `AskUserQuestion` with options: Approve plan / Adjust strategy / Modify plan.
134
158
 
135
- Após o usuário aprovar:
159
+ After approval:
136
160
  ```bash
137
161
  npx morph-spec approve {feature-name} plan
138
162
  npx morph-spec phase advance {feature-name}
@@ -140,17 +164,17 @@ npx morph-spec phase advance {feature-name}
140
164
 
141
165
  ---
142
166
 
143
- ## 7. FASE 5: TASKS
167
+ ## 8. PHASE 5: TASKS
144
168
 
145
- Use o skill `morph-phase-tasks` para instruções detalhadas.
169
+ Invoke the `morph-phase-tasks` skill.
146
170
 
147
- Resumo: quebrar spec em tasks T001-TXXX, definir dependências, checkpoints, estimativas.
171
+ Summary: break spec into tasks T001-TXXX with dependencies, checkpoints, estimates.
148
172
 
149
- ### PAUSA OBRIGATORIA
173
+ ### MANDATORY PAUSE
150
174
 
151
- Apresente: breakdown de tasks, ordem de execução, estimativa total. 3 itens de pausa (aprovar, repriorizar, adicionar/remover).
175
+ Present: task breakdown, execution order, total estimate. Use `AskUserQuestion` with options: Approve tasks / Reprioritize / Add or remove tasks.
152
176
 
153
- Após o usuário aprovar:
177
+ After approval:
154
178
  ```bash
155
179
  npx morph-spec approve {feature-name} tasks
156
180
  npx morph-spec phase advance {feature-name}
@@ -158,14 +182,14 @@ npx morph-spec phase advance {feature-name}
158
182
 
159
183
  ---
160
184
 
161
- ## 8. Planejamento Completo
185
+ ## 9. Planning Complete
162
186
 
163
- Após aprovação das tasks:
187
+ After task approval:
164
188
 
165
189
  ```
166
- Planejamento completo! Execute /morph-apply {feature-name} para iniciar implementação.
190
+ Planning complete! Run /morph-apply {feature-name} to start implementation.
167
191
  ```
168
192
 
169
193
  ---
170
194
 
171
- **Feature solicitada:** $ARGUMENTS
195
+ **Feature requested:** $ARGUMENTS
@@ -1,57 +1,57 @@
1
1
  ---
2
- description: Mostra o status atual do projeto MORPH e todas as features em desenvolvimento com suas fases e aprovações
2
+ description: Show current MORPH project status and all features in development with their phases and approvals
3
3
  argument-hint: [feature-name]
4
4
  allowed-tools: Read, Bash
5
5
  ---
6
6
 
7
7
  # MORPH Project Status
8
8
 
9
- Mostre o status atual do projeto MORPH e features em desenvolvimento.
9
+ Show the current MORPH project status and features in development.
10
10
 
11
- ## Como Usar
11
+ ## Usage
12
12
 
13
- **SEMPRE** use o state-manager CLI para obter status:
13
+ **ALWAYS** use the state-manager CLI to get status:
14
14
 
15
15
  ```bash
16
16
  npx morph-spec state list
17
17
  ```
18
18
 
19
- Este comando automaticamente mostra:
20
- - Todas as features ativas
21
- - Fase atual de cada feature
22
- - Progresso de tasks (X/Y)
23
- - Agentes ativos
24
- - Custos estimados
19
+ This command automatically shows:
20
+ - All active features
21
+ - Current phase of each feature
22
+ - Task progress (X/Y)
23
+ - Active agents
24
+ - Estimated costs
25
25
 
26
- ## Verificações Adicionais
26
+ ## Additional Checks
27
27
 
28
- ### 1. Configuração MORPH
29
- - [ ] `.morph/project.md` existe e está preenchido
30
- - [ ] `.morph/config/config.json` configurado
31
- - [ ] `.morph/framework/standards/` presentes
28
+ ### 1. MORPH Configuration
29
+ - [ ] `.morph/project.md` exists and is filled in
30
+ - [ ] `.morph/config/config.json` configured
31
+ - [ ] `.morph/framework/standards/` present
32
32
 
33
- ### 2. Detalhes de Feature Específica
33
+ ### 2. Specific Feature Details
34
34
 
35
- Para obter JSON detalhado de uma feature:
35
+ To get detailed JSON for a feature:
36
36
 
37
37
  ```bash
38
38
  npx morph-spec state get {feature-name}
39
39
  ```
40
40
 
41
- ### 3. Features Arquivadas
41
+ ### 3. Archived Features
42
42
 
43
- Verifique `.morph/archive/` manualmente se necessário:
44
- - Quantas features concluídas
45
- - Tempo total gasto
46
- - Custo acumulado
43
+ Check `.morph/archive/` manually if needed:
44
+ - How many features completed
45
+ - Total time spent
46
+ - Accumulated cost
47
47
 
48
- ### 4. Specs Ativas
48
+ ### 4. Active Specs
49
49
 
50
- Verifique `.morph/specs/` para specs consolidadas.
50
+ Check `.morph/specs/` for consolidated specs.
51
51
 
52
52
  ## Output
53
53
 
54
- O comando `npx morph-spec state list` automaticamente gera um dashboard formatado:
54
+ The `npx morph-spec state list` command automatically generates a formatted dashboard:
55
55
 
56
56
  ```
57
57
  ╔════════════════════════════════════════════════════════════════╗
@@ -78,14 +78,14 @@ O comando `npx morph-spec state list` automaticamente gera um dashboard formatad
78
78
  ╚════════════════════════════════════════════════════════════════╝
79
79
  ```
80
80
 
81
- **Simplesmente execute o comando e mostre o resultado ao usuário.**
81
+ **Simply run the command and show the result to the user.**
82
82
 
83
- ## Ações Disponíveis
83
+ ## Available Actions
84
84
 
85
- Sugira próximas ações:
86
- - `/morph-proposal {feature}` - Criar nova feature
87
- - `/morph-apply {feature}` - Implementar feature
88
- - `/morph-archive {feature}` - Arquivar feature concluída
85
+ Suggest next actions:
86
+ - `/morph-proposal {feature}` - Create a new feature
87
+ - `/morph-apply {feature}` - Implement a feature
88
+ - `/morph-archive {feature}` - Archive a completed feature
89
89
 
90
90
  ---
91
91
 
@@ -1,127 +1,130 @@
1
1
  ---
2
- description: Busca soluções para erros e problemas comuns no desenvolvimento .NET/Blazor/Azure com análise root-cause
2
+ description: Find solutions for common .NET/Blazor/Azure development errors with root-cause analysis
3
3
  argument-hint: "[error-message]"
4
4
  allowed-tools: Read, Bash, Glob, Grep
5
5
  ---
6
6
 
7
- # Troubleshoot - Buscar Soluções para Erros
7
+ # Troubleshoot - Find Solutions for Errors
8
8
 
9
- Busca soluções para erros e problemas comuns no desenvolvimento .NET/Blazor/Azure.
9
+ Find solutions for common .NET/Blazor/Azure development errors and problems.
10
10
 
11
- ## Uso
11
+ ## Usage
12
12
 
13
13
  ```
14
- /morph-troubleshoot <descrição do erro ou keywords>
14
+ /morph-troubleshoot <error description or keywords>
15
15
  ```
16
16
 
17
- ## Exemplos
17
+ ## Examples
18
18
 
19
19
  ```bash
20
20
  /morph-troubleshoot blazor.web.js 404
21
21
  /morph-troubleshoot DbContext second operation
22
22
  /morph-troubleshoot Azure.Identity NU1605
23
- /morph-troubleshoot Include retorna vazio
23
+ /morph-troubleshoot Include returns empty
24
24
  /morph-troubleshoot PendingModelChanges
25
25
  ```
26
26
 
27
- ## Workflow de 3 Níveis
27
+ ## 3-Level Workflow
28
28
 
29
- ### Nível 1: Índice JSON (Primário)
29
+ ### Level 1: Search Standards (Primary)
30
30
 
31
- Primeiro, execute o comando CLI para buscar no índice de problemas conhecidos:
31
+ Search the known problems and standards files for matching patterns:
32
32
 
33
33
  ```bash
34
- npx morph-spec troubleshoot {keywords}
35
-
36
- # Opções
37
- --category <cat> # Filtrar por categoria (blazor, efcore, azure)
38
- --verbose # Mostrar conteúdo completo da solução
39
- --list-categories # Listar categorias disponíveis
34
+ # Search in framework standards
35
+ Grep: "{keywords}" in framework/standards/ (glob: "*.md")
36
+ Grep: "{keywords}" in .morph/framework/standards/ (glob: "*.md")
40
37
  ```
41
38
 
42
- ### Nível 2: Grep nos Standards (Automático)
39
+ Read matching files and extract the relevant solution sections.
40
+
41
+ ### Level 2: Search Codebase (Automatic)
42
+
43
+ If standards don't cover the issue, search the codebase for the error pattern:
44
+
45
+ ```bash
46
+ Grep: "{error pattern}" in src/ (glob: "*.cs,*.tsx,*.ts")
47
+ ```
43
48
 
44
- Se o índice retornar poucos resultados, o CLI automaticamente busca nos arquivos:
45
- - `framework/standards/*.md`
46
- - `.morph/framework/standards/*.md`
49
+ Check if similar patterns exist elsewhere in the codebase that work correctly.
47
50
 
48
- ### Nível 3: Web Search (Se necessário)
51
+ ### Level 3: Web Search (If needed)
49
52
 
50
- **IMPORTANTE:** Se os níveis 1 e 2 não encontrarem solução, use o tool **WebSearch** nativo do Claude Code para buscar nas seguintes fontes:
53
+ **IMPORTANT:** If levels 1 and 2 don't find a solution, use Claude Code's native **WebSearch** tool to search the following sources:
51
54
 
52
- **Queries recomendadas:**
55
+ **Recommended queries:**
53
56
 
54
57
  ```
55
58
  # GitHub Issues (.NET)
56
- site:github.com/dotnet/aspnetcore {erro}
57
- site:github.com/dotnet/efcore {erro}
59
+ site:github.com/dotnet/aspnetcore {error}
60
+ site:github.com/dotnet/efcore {error}
58
61
 
59
62
  # Stack Overflow
60
- site:stackoverflow.com [blazor] {erro}
61
- site:stackoverflow.com [entity-framework-core] {erro}
62
- site:stackoverflow.com [azure] {erro}
63
+ site:stackoverflow.com [blazor] {error}
64
+ site:stackoverflow.com [entity-framework-core] {error}
65
+ site:stackoverflow.com [azure] {error}
63
66
 
64
- # Documentação Microsoft
65
- site:learn.microsoft.com {erro}
66
- site:learn.microsoft.com/azure {erro}
67
+ # Microsoft Documentation
68
+ site:learn.microsoft.com {error}
69
+ site:learn.microsoft.com/azure {error}
67
70
  ```
68
71
 
69
- **Exemplo de uso do WebSearch:**
72
+ **WebSearch usage example:**
70
73
 
71
- Se o usuário perguntar sobre um erro de SignalR:
72
- 1. Primeiro: `npx morph-spec troubleshoot SignalR connection`
73
- 2. Se não encontrar: WebSearch com `site:github.com/dotnet/aspnetcore SignalR connection closed`
74
- 3. Retornar links relevantes formatados
74
+ If the user asks about a SignalR error:
75
+ 1. First: `npx morph-spec troubleshoot SignalR connection`
76
+ 2. If not found: WebSearch with `site:github.com/dotnet/aspnetcore SignalR connection closed`
77
+ 3. Return formatted relevant links
75
78
 
76
- ## Categorias Disponíveis
79
+ ## Available Categories
77
80
 
78
- | Categoria | Descrição |
81
+ | Category | Description |
79
82
  |-----------|-----------|
80
- | `blazor` | Blazor Server/WASM, componentes, lifecycle, renderização |
83
+ | `blazor` | Blazor Server/WASM, components, lifecycle, rendering |
81
84
  | `efcore` | Entity Framework Core, DbContext, migrations, queries |
82
85
  | `azure` | Azure services, deploy, identity, Key Vault |
83
86
  | `auth` | Authentication, authorization, tokens, claims |
84
87
  | `deploy` | Deployment, CI/CD, pipelines, containers |
85
88
 
86
- ## Formato de Output
89
+ ## Output Format
87
90
 
88
- Ao encontrar uma solução, apresente no seguinte formato:
91
+ When finding a solution, present in the following format:
89
92
 
90
93
  ```
91
94
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
92
95
 
93
- 🔴 CRITICAL: {título do problema}
96
+ 🔴 CRITICAL: {problem title}
94
97
 
95
- 📁 Arquivo: {caminho do arquivo com solução}
96
- 📂 Seção: {seção específica}
98
+ 📁 File: {path to file with solution}
99
+ 📂 Section: {specific section}
97
100
 
98
- Erro:
99
- {padrão de erro que identifica o problema}
101
+ Error:
102
+ {error pattern that identifies the problem}
100
103
 
101
- 💡 Causa:
102
- {explicação da causa raiz}
104
+ 💡 Cause:
105
+ {root cause explanation}
103
106
 
104
- Solução:
105
- {código ou passos para resolver}
107
+ Solution:
108
+ {code or steps to resolve}
106
109
 
107
- 📚 Ver completo: morph-spec read {arquivo}
110
+ 📚 See full: morph-spec read {file}
108
111
 
109
112
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
110
113
  ```
111
114
 
112
- ## Troubleshooting Rápido
115
+ ## Quick Troubleshooting
113
116
 
114
- ### Problemas Mais Comuns
117
+ ### Most Common Problems
115
118
 
116
- | Erro | Solução Rápida |
119
+ | Error | Quick Fix |
117
120
  |------|----------------|
118
121
  | `blazor.web.js 404` | `<RequiresAspNetWebAssets>true</RequiresAspNetWebAssets>` |
119
- | `PendingModelChangesWarning` | `dotnet ef migrations add <Name>` antes de update |
120
- | `DbContext second operation` | Usar `IDbContextFactory` para background tasks |
121
- | `Include() vazio` | Usar `HasMany(x => x.Nav)` em vez de `HasMany<T>()` |
122
- | `Azure.Identity NU1605` | Especificar versão explícita no .csproj |
123
- | `Key Vault não carrega` | Não condicionar ao ambiente (IsDevelopment) |
124
- | `DefaultAzureCredential lento` | Desabilitar credenciais não usadas |
122
+ | `PendingModelChangesWarning` | `dotnet ef migrations add <Name>` before update |
123
+ | `DbContext second operation` | Use `IDbContextFactory` for background tasks |
124
+ | `Include()` empty | Use `HasMany(x => x.Nav)` instead of `HasMany<T>()` |
125
+ | `Azure.Identity NU1605` | Specify explicit version in .csproj |
126
+ | `Key Vault won't load` | Don't condition on environment (IsDevelopment) |
127
+ | `DefaultAzureCredential slow` | Disable unused credentials |
125
128
 
126
129
  ---
127
130
 
@@ -2,6 +2,9 @@
2
2
  paths:
3
3
  - "**/*.cs"
4
4
  - "**/*.csproj"
5
+ stacks:
6
+ - dotnet
7
+ - blazor
5
8
  ---
6
9
 
7
10
  # C# and .NET Standards
@@ -3,6 +3,8 @@ paths:
3
3
  - "**/*.razor"
4
4
  - "**/*.css"
5
5
  - "**/*.scss"
6
+ stacks:
7
+ - blazor
6
8
  ---
7
9
 
8
10
  # Frontend Standards
@@ -5,6 +5,9 @@ paths:
5
5
  - "**/docker-compose*.yml"
6
6
  - "**/pipelines/**"
7
7
  - "**/.github/workflows/**"
8
+ stacks:
9
+ - azure
10
+ - docker
8
11
  ---
9
12
 
10
13
  # Infrastructure Standards