@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
@@ -6,423 +6,304 @@ disable-model-invocation: true
6
6
  context: fork
7
7
  agent: general-purpose
8
8
  user-invocable: false
9
- cliVersion: "4.10.0"
10
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep
9
+ cliVersion: "4.10.2"
10
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Agent
11
11
  ---
12
12
 
13
- # MORPH Implement - FASE 5
13
+ # MORPH Implement Phase 5
14
14
 
15
15
  > INTERNAL: Workflow skill used by /morph-apply during automated phase orchestration. Not a user command.
16
16
 
17
- Implemente as tasks definidas na FASE 4, com checkpoints a cada 3 tasks e recap final.
17
+ Implement the tasks defined in Phase 4, with checkpoints every 3 tasks and a final recap.
18
18
 
19
- ## Pré-requisitos
19
+ ## Prerequisites
20
20
 
21
- - [ ] FASE 4 (Tasks) concluída
22
- - [ ] `tasks.md` ou `tasks.json` aprovado pelo usuário
23
- - [ ] Tasks gate (`morph-spec approve $ARGUMENTS tasks`) aprovado
24
- - [ ] Todos os outputs de design existem (spec.md, contracts.cs, decisions.md)
21
+ - [ ] Phase 4 (Tasks) completed
22
+ - [ ] `tasks.md` approved by user
23
+ - [ ] Tasks gate approved (`morph-spec approve $ARGUMENTS tasks`)
24
+ - [ ] All design outputs exist (spec.md, contracts.cs/.ts, decisions.md)
25
25
 
26
- ## Passo 0: Garantir fase implement
26
+ ## Step 0: Ensure Implement Phase
27
27
 
28
- **PASSO 0 (ANTES de qualquer leitura ou escrita) Garantir fase implement:**
28
+ **Before any reads or writes verify the current phase:**
29
29
 
30
30
  ```bash
31
31
  npx morph-spec state get $ARGUMENTS
32
32
  ```
33
33
 
34
- Verifique o campo `"phase"` no output:
34
+ Check the `"phase"` field:
35
35
 
36
- **Se `"phase": "implement"`** → fase correta, prossiga.
36
+ **If `"phase": "implement"`** → correct phase, proceed.
37
37
 
38
- **Se `"phase": "tasks"`** → execute em sequência:
38
+ **If `"phase": "tasks"`** → run in sequence:
39
39
  1. `npx morph-spec state mark-output $ARGUMENTS tasks`
40
40
  2. `npx morph-spec approve $ARGUMENTS tasks`
41
41
  3. `npx morph-spec phase advance $ARGUMENTS` (→ implement)
42
42
 
43
- **Qualquer outro valor** → não prossiga estado inconsistente, reporte ao usuário.
43
+ **Any other value** → STOPinconsistent state, report to user.
44
44
 
45
- > **Regra:** Nunca escreva em `5-implement/` enquanto a fase não for `implement`. O hook bloqueará a escrita.
45
+ > **Rule:** Never write to `5-implement/` until the phase is `implement`. The hook will block writes.
46
46
 
47
47
  ---
48
48
 
49
- ## Pre-flight Validação Mecânica (OBRIGATÓRIO)
49
+ ## Pre-flight Validation (MANDATORY)
50
50
 
51
- Antes de qualquer task, valide que as fases anteriores estão realmente completas. O `state.json` pode ter sido setado manualmenteestes comandos verificam os artefatos reais no filesystem.
51
+ Before any task work, validate that prior phases are truly complete. `state.json` may have been set manuallythese commands verify actual filesystem artifacts.
52
52
 
53
53
  ```bash
54
- # 1. Verifica outputs obrigatórios de todas as fases anteriores
54
+ # 1. Verify mandatory outputs from all prior phases
55
55
  npx morph-spec validate-feature $ARGUMENTS
56
56
 
57
- # 2. Confirma que todos os approval gates foram aprovados
57
+ # 2. Confirm all approval gates passed
58
58
  npx morph-spec approval-status $ARGUMENTS
59
+
60
+ # 3. Verify activeAgents are populated
61
+ npx morph-spec state get $ARGUMENTS | grep -A5 activeAgents
59
62
  ```
60
63
 
61
- Se qualquer check falhar → **STOP**. Não inicie nenhuma task. Reporte ao usuário o que está faltando e quais comandos rodar para resolver:
64
+ If any check fails → **STOP**. Do not start any task. Report what's missing:
62
65
 
63
- | Problema | Comando de resolução |
64
- |----------|---------------------|
65
- | Output faltando (spec.md, contracts, etc.) | Volte à fase correspondente e gere o output |
66
- | Gate não aprovado (design, tasks) | `npx morph-spec approve $ARGUMENTS <gate>` |
67
- | Phase inválida | `npx morph-spec phase advance $ARGUMENTS` |
66
+ | Problem | Resolution |
67
+ |---------|-----------|
68
+ | Missing output (spec.md, contracts, etc.) | Return to corresponding phase and generate it |
69
+ | Gate not approved (design, plan, tasks) | `npx morph-spec approve $ARGUMENTS <gate>` |
70
+ | Invalid phase | `npx morph-spec phase advance $ARGUMENTS` |
71
+ | Empty activeAgents | Run `/phase-setup $ARGUMENTS` first |
68
72
 
69
- **Esta etapa não é opcional.** prossiga quando ambos os comandos retornarem sem erros.
73
+ **This step is not optional.** Only proceed when all commands return without errors.
70
74
 
71
- ## Ferramentas Recomendadas
75
+ ---
72
76
 
73
- > **Ref:** `framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md` para guia completo.
74
- > **Ref:** `framework/standards/integration/mcp/mcp-tools.md` para referência MCP.
75
- > **Example:** `references/recap-example.md` — filled-in recap.md showing expected output quality.
77
+ ## Pre-flight MCP Connection Validation
76
78
 
77
- | Ação | Ferramenta | Alternativa |
78
- |------|------------|-------------|
79
- | Verificar modo de execução (single/subagents/agent-teams) | **Bash** `npx morph-spec dispatch-agents $ARGUMENTS implement` | Grupos de tasks + prompts de subagents |
80
- | **Dispatch implementadores por domínio** (subagents) | **Agent** `subagent_type=<taskGroups[grupo].agentId>` + `prompt=taskPrompt` do dispatch config | Backend + frontend + infra em paralelo |
81
- | **Criar Agent Team** (features críticas multi-domínio) | Linguagem natural — veja Passo 0.5b | — |
82
- | Ler task details | **Read** tasks.json, spec.md, contracts.cs | — |
83
- | Criar novos arquivos | **Write** source files | — |
84
- | Modificar arquivos existentes | **Edit** source files | — |
85
- | Consultar API de biblioteca | **Context7 MCP** `query_docs()` | **WebSearch** + **WebFetch** |
86
- | Executar migrations | **Supabase MCP** `query()` | **Bash** `npx supabase migration ...` |
87
- | Build do projeto | **Bash** `dotnet build` ou `npm run build` | — |
88
- | Rodar testes | **Bash** `dotnet test` ou `npm test` | — |
89
- | Checkpoint validation | **Bash** `npx morph-spec validate-feature ...` | — |
90
- | Marcar task concluída | **Bash** `npx morph-spec task done $ARGUMENTS T001` | — |
91
- | Smoke test no browser | **Playwright MCP** `browser_navigate()` + `browser_snapshot()` | Manual |
92
- | Verificar erros de console | **Playwright MCP** `browser_console_messages()` | — |
93
- | Screenshot para recap | **Playwright MCP** `browser_take_screenshot()` | — |
94
- | Deploy e logs Vercel | **Vercel MCP** `list_projects()`, `get_deployments()`, `manage_env_vars()` | **Bash** `vercel deploy` |
95
- | Criar PR | **Bash** `gh pr create ...` | **GitHub MCP** `create_pull_request()` |
96
- | Atualizar state | **Bash** `npx morph-spec state set ...` | — |
97
-
98
- **MCPs desta fase:** Supabase (migrations, RLS), Context7 (API lookup), Playwright (smoke test), GitHub (PRs), Vercel (deploy, logs, env vars).
99
-
100
- **Anti-padrões:**
101
- - ❌ Task agent para editar um único arquivo (use Edit direto)
102
- - ✅ Task agent para implementar service layer em 5+ arquivos (multi-file legítimo)
103
- - ✅ Task agents paralelos quando `tasks.total ≥ 6` e feature tem 2+ domínios ativos
104
- - ✅ Agent Teams quando backend e frontend precisam coordenar contratos de API
105
- - ❌ Agent Teams para features single-domain (subagents são suficientes)
106
- - ❌ Agent Teams sem plan approval (cria risco de implementações divergentes)
107
- - ❌ Bash `cat` para criar arquivos (use Write tool)
108
- - ❌ Bash `sed` para modificar código (use Edit tool)
109
- - ❌ Implementar sem ler contracts.cs primeiro (contracts são a fonte de verdade!)
110
- - ❌ Implementar tasks de backend e frontend sequencialmente quando são independentes
111
- - ❌ **(VSA)** Criar Application Service layer — handler acessa IRepository diretamente
112
- - ❌ **(VSA)** Registrar handlers/endpoints manualmente no Program.cs — auto-discovery via reflection
113
- - ❌ **(VSA)** Colocar Request/Response em arquivos separados do Handler
114
- - ❌ **(VSA)** Usar `Guid.NewGuid()` — use `Guid.CreateVersion7()`
115
- - ❌ **Tentar corrigir um bug sem invocar `systematic-debugging` primeiro** — "a mudança é pequena" não é justificativa
116
- - ✅ Ao encontrar bug: `Skill(superpowers:systematic-debugging)` → causa raiz → fix mínimo → verificar
79
+ Before starting tasks, verify that MCPs needed for the implement phase are working.
117
80
 
118
- ---
81
+ **1. Collect MCPs for the implement phase:**
82
+ - Read `framework/skills/level-0-meta/mcp-registry.json` → `phaseMatrix.implement`
83
+ - Read `.claude/settings.local.json` → identify configured MCPs
119
84
 
120
- ## Pre-flight MCP Validacao de Conexoes
85
+ **2. For each CONFIGURED MCP in `phaseMatrix.implement`:**
86
+ 1. Look for a tool matching `healthCheck.toolPattern`
87
+ 2. If found → run `healthCheck.testCall` with `healthCheck.testParams`
88
+ 3. Evaluate:
121
89
 
122
- Antes de iniciar as tasks, verifique que os MCPs necessarios para a fase implement estao funcionando.
90
+ | Result | Action |
91
+ |--------|--------|
92
+ | **Success** | `✓ {MCP} — ready` |
93
+ | **Tool not found** | `○ {MCP} — needs restart` |
94
+ | **Error** | → **AskUserQuestion** (below) |
123
95
 
124
- **1. Coletar MCPs da fase implement:**
125
- - Leia `framework/skills/level-0-meta/mcp-registry.json` → campo `phaseMatrix.implement`
126
- - Leia `.claude/settings.local.json` → identifique quais MCPs estao configurados
96
+ **On error ask the user:**
127
97
 
128
- **2. Para cada MCP CONFIGURADO que aparece em `phaseMatrix.implement`:**
129
- 1. Procure nas ferramentas disponiveis por uma que contenha `healthCheck.toolPattern` no nome
130
- 2. Se encontrada execute `healthCheck.testCall` com `healthCheck.testParams`
131
- 3. Avalie:
98
+ Use `AskUserQuestion` with header `"{MCP}"` and options:
99
+ - **Continue without {MCP}** Show `fallback` from registry. Implementation will use the fallback automatically.
100
+ - **Reconfigure credentials** Collect credentials and update `.claude/settings.local.json`. Re-test after reconfiguring.
101
+ - **Stop implementation** — Abort. User must fix the MCP and re-run `/morph-apply`.
132
102
 
133
- | Resultado | Acao |
134
- |-----------|------|
135
- | **Sucesso** | `✓ {MCP} — pronto` |
136
- | **Ferramenta nao encontrada** | `○ {MCP} — precisa restart` |
137
- | **Erro** | → **AskUserQuestion** (abaixo) |
103
+ > **Design:** This check is fail-open — consistent with morph-spec philosophy. The user gets explicit choice instead of tasks failing silently.
138
104
 
139
- **Em caso de erro — pergunte ao usuario:**
105
+ ---
140
106
 
141
- Use `AskUserQuestion` com header `"{MCP}"` e opcoes:
142
- - **Continuar sem {MCP}** — Mostre `fallback` do registry (ex: "Bash `gh` CLI" para GitHub). A implementacao usara o fallback automaticamente.
143
- - **Reconfigurar credenciais** — Colete credenciais e atualize `.claude/settings.local.json`. Re-teste apos reconfigurar.
144
- - **Parar implementacao** — Aborte. Usuario deve corrigir o MCP e re-rodar `/morph-apply`.
107
+ ## Recommended Tools
145
108
 
146
- **3. Resumo MCP Readiness:**
147
- ```
148
- MCP Readiness (implement phase):
149
- ✓ context7 — pronto
150
- ✓ supabase — pronto
151
- ○ playwright — precisa restart (fallback: manual testing)
152
- — docker — nao configurado
153
- ```
109
+ > **Ref:** `framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md` for complete guide.
110
+ > **Ref:** `framework/standards/integration/mcp/mcp-tools.md` for MCP reference.
111
+ > **Example:** `references/recap-example.md` — filled-in recap.md showing expected output quality.
154
112
 
155
- > **Design:** Este check e fail-open — consistente com a filosofia morph-spec. O usuario tem escolha explicita em vez de tasks falhando silenciosamente.
113
+ | Action | Tool | Alternative |
114
+ |--------|------|-------------|
115
+ | Check execution mode (single/subagents/agent-teams) | **Bash** `npx morph-spec dispatch-agents $ARGUMENTS implement` | Task groups + subagent prompts |
116
+ | **Dispatch implementers by domain** (subagents) | **Agent** `subagent_type=<taskGroups[group].agentId>` + `prompt=taskPrompt` from dispatch config | Backend + frontend + infra in parallel |
117
+ | **Create Agent Team** (critical multi-domain features) | Natural language — see Step 0.5b | — |
118
+ | Read task details | **Read** tasks.md, spec.md, contracts.cs/.ts | — |
119
+ | Create new files | **Write** source files | — |
120
+ | Modify existing files | **Edit** source files | — |
121
+ | Look up library API | **Context7 MCP** `query_docs()` | **WebSearch** + **WebFetch** |
122
+ | Run migrations | **Supabase MCP** `query()` | **Bash** `npx supabase migration ...` |
123
+ | Build project | **Bash** `dotnet build` or `npm run build` | — |
124
+ | Run tests | **Bash** `dotnet test` or `npm test` | — |
125
+ | Checkpoint validation | **Bash** `npx morph-spec validate-feature ...` | — |
126
+ | Mark task complete | **Bash** `npx morph-spec task done $ARGUMENTS T001` | — |
127
+ | Smoke test in browser | **Playwright MCP** `browser_navigate()` + `browser_snapshot()` | Manual |
128
+ | Check console errors | **Playwright MCP** `browser_console_messages()` | — |
129
+ | Screenshot for recap | **Playwright MCP** `browser_take_screenshot()` | — |
130
+ | Deploy and logs Vercel | **Vercel MCP** `list_projects()`, `get_deployments()`, `manage_env_vars()` | **Bash** `vercel deploy` |
131
+ | Create PR | **Bash** `gh pr create ...` | **GitHub MCP** `create_pull_request()` |
132
+ | Update state | **Bash** `npx morph-spec state set ...` | — |
133
+
134
+ **Phase MCPs:** Supabase (migrations, RLS), Context7 (API lookup), Playwright (smoke test), GitHub (PRs), Vercel (deploy, logs, env vars).
135
+
136
+ **Anti-patterns:**
137
+ - Task agent for editing a single file (use Edit directly)
138
+ - Agent Teams for single-domain features (subagents suffice)
139
+ - Agent Teams without plan approval (creates risk of divergent implementations)
140
+ - `Bash cat` to create files (use Write tool)
141
+ - `Bash sed` to modify code (use Edit tool)
142
+ - Implementing without reading contracts.cs/.ts first (contracts are the source of truth!)
143
+ - Running backend and frontend tasks sequentially when they are independent
144
+ - **(VSA)** Creating Application Service layer — handler accesses IRepository directly
145
+ - **(VSA)** Manually registering handlers/endpoints in Program.cs — use auto-discovery via reflection
146
+ - **(VSA)** Placing Request/Response in separate files from Handler
147
+ - **(VSA)** Using `Guid.NewGuid()` — use `Guid.CreateVersion7()`
148
+ - Trying to fix a bug without invoking `systematic-debugging` first
156
149
 
157
150
  ---
158
151
 
159
- ## PRÉ-VOO OBRIGATÓRIO (antes de iniciar implementação)
152
+ ## Context Loading
160
153
 
161
- ### 1. Ler contexto completo em PARALELO
154
+ ### 1. Read full context in PARALLEL
162
155
 
163
156
  ```
164
- # Uma única chamada, não sequencial:
157
+ # Single parallel call, not sequential:
165
158
  Read: .morph/features/{feature}/4-tasks/tasks.md
166
159
  + Read: .morph/features/{feature}/1-design/spec.md
167
- + Read: .morph/features/{feature}/1-design/contracts.cs
160
+ + Read: .morph/features/{feature}/1-design/contracts.cs (or contracts.ts for TypeScript projects)
168
161
  + Read: .morph/config/config.json (→ architecture.style)
169
162
  + Read: .morph/features/{feature}/3-plan/plan.md
170
163
  ```
171
164
 
172
- ### 2. Criar native tasks individuais por T001-T00N
165
+ ### 2. Create native tasks for each T001-T00N
173
166
 
174
- Após ler `tasks.md` no passo 1, crie **uma native task por task encontrada**:
167
+ After reading `tasks.md`, create **one native task per task found**:
175
168
 
176
169
  ```
177
- # Para cada task em tasks.md (T001, T002, ..., T00N):
178
- TaskCreate: "{T001}: {título da task}" → description: descrição completa → activeForm: "Implementando T001"
179
- TaskCreate: "{T002}: {título da task}" → description: descrição completa → activeForm: "Implementando T002"
180
- ... (uma TaskCreate por task)
181
-
182
- # Tarefas orquestrais sempre ao final:
183
- TaskCreate: "Checkpoints e validação" → activeForm: "Validando checkpoint"
184
- TaskCreate: "Gerar recap.md" → activeForm: "Gerando recap"
185
- ```
170
+ # For each task in tasks.md (T001, T002, ..., T00N):
171
+ TaskCreate: "{T001}: {task title}" → description: full description → activeForm: "Implementing T001"
172
+ TaskCreate: "{T002}: {task title}" → description: full description → activeForm: "Implementing T002"
173
+ ... (one TaskCreate per task)
186
174
 
187
- **Após criar todas as tasks, configure dependências espelhando `tasks.md`:**
188
- ```
189
- # Para cada task com `dependencies: [T00X, T00Y]` em tasks.md:
190
- TaskUpdate(taskId="<id de T003>", addBlockedBy=["<id de T001>", "<id de T002>"])
175
+ # Orchestral tasks always at the end:
176
+ TaskCreate: "Checkpoints and validation" → activeForm: "Validating checkpoint"
177
+ TaskCreate: "Generate recap.md" → activeForm: "Generating recap"
191
178
  ```
192
179
 
193
- > Guarde o mapeamento `{T001 taskId}` internamente para usar nos TaskUpdates do loop.
194
-
195
- ---
196
-
197
- ## Workflow
198
-
199
- ### Passo 0.5: Planejar Modo de Execução
200
-
201
- **Ler estratégia do plano:**
180
+ **After creating all tasks, configure dependencies mirroring `tasks.md`:**
202
181
  ```
203
- Read: .morph/features/{feature}/3-plan/plan.md extrair campo "Execution Strategy"
182
+ # For each task with `dependencies: [T00X, T00Y]` in tasks.md:
183
+ TaskUpdate(taskId="<id of T003>", addBlockedBy=["<id of T001>", "<id of T002>"])
204
184
  ```
205
185
 
206
- A estratégia foi definida e aprovada na fase Plan. Use-a diretamente:
207
-
208
- **O campo `Execution Strategy` determina o caminho de execução:**
209
-
210
- | Estratégia | Ação |
211
- |--------|------|
212
- | `"single"` | → Continue para o workflow sequencial normal (Passo 1) |
213
- | `"subagents"` | → Dispatch Task subagents em paralelo (abaixo) |
214
- | `"agent-teams"` | → Crie Agent Team com plan approval (Passo 0.5b) |
215
-
216
- Se `plan.md` não existir ou o campo não estiver presente, execute como fallback:
186
+ ### 3. Detect architecture style
217
187
 
218
188
  ```bash
219
- npx morph-spec dispatch-agents $ARGUMENTS implement
189
+ cat .morph/config/config.json | grep architecture
220
190
  ```
221
191
 
222
- **O output inclui um campo `mode` equivalente à estratégia do plano.**
192
+ If `config.architecture.style === "vertical-slice"` follow **Step 1.5** before implementing.
193
+ Otherwise → go directly to the task loop.
223
194
 
224
- ---
225
-
226
- #### Modo `"subagents"` (se `mode: "subagents"` no output):
195
+ ### Step 1.5: VSA Implementation Guide (only if `style: "vertical-slice"`)
227
196
 
228
- 1. Leia os `taskGroups` retornados (ex: `backend`, `frontend`, `infra`)
229
- 2. Para cada grupo com ≥ 3 tasks e sem dependências cruzadas, use o **Agent tool** com o `subagent_type=<agentId>` do grupo e o `taskPrompt` do dispatch config:
197
+ > For the complete slice structure and VSA rules, see `references/vsa-implementation-guide.md`
230
198
 
231
- > **Mapeamento:** `taskGroups[grupo].agentId` do dispatch config = `subagent_type` no Agent tool.
232
- > Exemplo: `agentId: "dotnet-senior"` → `Agent(subagent_type=dotnet-senior, prompt=taskPrompt)`.
233
-
234
- ```
235
- [Task tool — grupo backend, por exemplo]
236
- Prompt do dispatch config enriquecido:
237
-
238
- Você é o implementador do grupo BACKEND da feature '$ARGUMENTS'.
239
-
240
- Contexto completo:
241
- - Spec: [conteúdo de .morph/features/$ARGUMENTS/1-design/spec.md]
242
- - Contracts: [conteúdo de .morph/features/$ARGUMENTS/1-design/contracts.cs]
243
- - Tasks do grupo: [lista de TXXX do grupo backend]
244
-
245
- # No início deste subagent (grupo BACKEND):
246
- # 1. Criar native task por task do grupo:
247
- # TaskCreate: "{T00X}: {título}" → activeForm: "Implementando T00X"
248
- # 2. Configurar dependências do grupo via TaskUpdate:
249
- # TaskUpdate(taskId="<id de T003>", addBlockedBy=["<id de T001>", "<id de T002>"])
250
- # Guarde o mapeamento {T00X → taskId} para usar no loop abaixo.
251
-
252
- Para cada task do grupo, em ordem:
253
- 1. TaskUpdate(taskId="<native id de T00X>", status="in_progress")
254
- 2. Execute: npx morph-spec task start $ARGUMENTS TXXX
255
- 3. Leia a descrição completa da task
256
- 4. Implemente os arquivos — use Write (novo) ou Edit (existente)
257
- 5. Verifique build: [dotnet build / npm run build]
258
- 5b. Invoke Skill(verification-before-completion) — só prossiga para o passo 6 se passar
259
- 6. Execute: npx morph-spec task done $ARGUMENTS TXXX
260
- 7. Se task done retornar sem erro: TaskUpdate(taskId="<native id de T00X>", status="completed")
261
-
262
- A cada 3 tasks:
263
- - Execute: npx morph-spec checkpoint-save $ARGUMENTS
264
- - Execute: npx morph-spec validate-feature $ARGUMENTS --phase implement
265
- - Reporte qualquer falha de validação antes de continuar
266
-
267
- Restrições OBRIGATÓRIAS:
268
- - Modifique APENAS os arquivos listados nas tasks do grupo BACKEND
269
- - NÃO toque em arquivos de frontend, UI ou infra
270
- - Se encontrar dependência em outro grupo, pause e reporte
271
- ```
272
-
273
- 3. Dispare os Task subagents dos grupos em **paralelo** (quando sem dependências entre si)
274
- 4. Após todos completarem, valide integração: `npx morph-spec validate-feature $ARGUMENTS --phase implement`
275
-
276
- **Se `mode: "single"`** (feature pequena ou single-domain):
277
- → Continue para o workflow sequencial normal abaixo.
199
+ Structure: `Features/{Entity}Feature/{Op}/` with Handler (+ Request/Response records) + Validator + Endpoint per slice. Everything `sealed`. `Guid.CreateVersion7()`. `result.Match()` in endpoints. No Application Service layer handler accesses IRepository directly. Auto-discovery via reflection: do not manually register in Program.cs.
278
200
 
279
201
  ---
280
202
 
281
- ### Passo 0.5b: Agent Teams (features críticas multi-domínio)
282
-
283
- **Quando usar:** `mode: "agent-teams"` no output de `dispatch-agents`
284
- **Requisito:** `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` no `.claude/settings.local.json` (instalado pelo morph-spec)
285
-
286
- **Por que Agent Teams em vez de subagents:**
287
- Agent Teams têm TaskList compartilhada, mensagens diretas entre teammates e hooks `TeammateIdle`. Subagents são fire-and-forget. Para features onde backend e frontend precisam coordenar contratos de API, Agent Teams garantem que o frontend não implemente chamadas antes do backend estabilizar os DTOs.
203
+ ## Workflow
288
204
 
289
- **1. Crie o Agent Team com linguagem natural:**
205
+ ### Step 0.5: Plan Execution Mode
290
206
 
207
+ **Read the plan's execution strategy:**
291
208
  ```
292
- Crie um agent team para implementar a feature '$ARGUMENTS' com teammates:
293
- - Backend teammate (dotnet-senior): Implemente as tasks do grupo backend.
294
- Contexto: .morph/features/$ARGUMENTS/1-design/spec.md, contracts.cs, standards/coding.md
295
- Restrição: Modifique APENAS arquivos de backend/domain/application.
296
- Antes de implementar interfaces compartilhadas, envie mensagem ao frontend teammate.
297
- - Frontend teammate (blazor-builder OU nextjs-expert): Implemente as tasks do grupo frontend.
298
- Contexto: .morph/features/$ARGUMENTS/1-design/spec.md, design-system.md, standards/frontend/
299
- Restrição: Modifique APENAS arquivos de UI/components/pages.
300
- Aguarde confirmação do backend teammate antes de implementar chamadas de API.
301
- - Quality teammate (standards-architect): Revise o output de cada teammate e execute validate-feature.
302
- Exija plan approval antes de cada implementação.
303
- Só aprove planos que correspondam ao contracts.cs e spec.md.
209
+ Read: .morph/features/{feature}/3-plan/plan.md extract "Execution Strategy" field
304
210
  ```
305
211
 
306
- **2. Protocolo de coordenação entre teammates:**
212
+ The strategy was defined and approved in the Plan phase. Use it directly:
307
213
 
308
- - Backend deve completar definição de DTOs/interfaces ANTES do frontend implementar chamadas de API
309
- - Para qualquer interface compartilhada: backend envia mensagem ao frontend confirmando contratos estáveis
310
- - Se frontend precisar de um endpoint que não existe instrua a enviar mensagem ao backend teammate
311
- - Conflitos de contratos escalone ao quality teammate para resolver
214
+ | Strategy | Action |
215
+ |----------|--------|
216
+ | `"single"` | Continue to the sequential task loop (Step 2) |
217
+ | `"subagents"` |Dispatch Task subagents in parallel (below) |
218
+ | `"agent-teams"` | → Create Agent Team with plan approval (Step 0.5b) |
312
219
 
313
- **3. Configurações obrigatórias ao criar o team:**
314
-
315
- - Habilite **plan approval**: "Require plan approval before each teammate implements"
316
- - Gate de qualidade: "Only approve plans that match contracts.cs and spec.md"
317
- - Restrição de domínio por teammate: cada um modifica APENAS arquivos do seu domínio
318
-
319
- **4. Após todos os teammates completarem:**
220
+ If `plan.md` doesn't exist or the field is missing, run as fallback:
320
221
 
321
222
  ```bash
322
- npx morph-spec validate-feature $ARGUMENTS --phase implement
223
+ npx morph-spec dispatch-agents $ARGUMENTS implement
323
224
  ```
324
225
 
325
- Sintetize os resultados de todos os teammates no recap.md (Passo 6).
326
-
327
226
  ---
328
227
 
329
- ### CHECKPOINT DE ENTRADA: Verificar Pré-requisitos
228
+ #### Subagents Mode (if strategy is `"subagents"`):
330
229
 
331
- **⏸️ Antes de iniciar implementação:**
230
+ 1. Read `taskGroups` from dispatch config (e.g., `backend`, `frontend`, `infra`)
231
+ 2. For each group with >= 3 tasks and no cross-group dependencies, use **Agent tool** with `subagent_type=<agentId>` and `taskPrompt` from dispatch config:
332
232
 
333
- - [ ] `tasks.md` ou `tasks.json` existe e foi aprovado?
334
- - [ ] Tasks gate aprovado (`morph-spec approve $ARGUMENTS tasks`)?
335
- - [ ] `spec.md` atualizado com clarificações?
336
- - [ ] `contracts.cs` corresponde ao schema real?
337
- - [ ] Build base do projeto compila sem erros?
338
- - [ ] `activeAgents` estão populados? (`morph-spec state get $ARGUMENTS` → campo `activeAgents` não vazio)
233
+ > **Mapping:** `taskGroups[group].agentId` = `subagent_type` in Agent tool.
234
+ > Example: `agentId: "dotnet-senior"` `Agent(subagent_type=dotnet-senior, prompt=taskPrompt)`.
339
235
 
340
- ```bash
341
- npx morph-spec state get $ARGUMENTS
342
- npx morph-spec approval-status $ARGUMENTS
343
- # Se activeAgents estiver vaziopare aqui e execute /phase-setup $ARGUMENTS primeiro
344
- npx morph-spec state get $ARGUMENTS | grep -A5 activeAgents
345
- ```
236
+ Each subagent receives a prompt with:
237
+ - Full spec.md and contracts.cs/.ts content
238
+ - The group's task list
239
+ - Instructions to create native tasks, follow the task loop (start implement verify done), checkpoint every 3 tasks
240
+ - Domain isolation: modify ONLY files in their domain
241
+ - **MANDATORY verification before every `task done`** (see Step 2, item 6b)
346
242
 
347
- **❌ Se alguma checkbox NÃO estiver marcada:**
348
- Voltar para a fase correspondente
243
+ 3. Dispatch subagents for groups in **parallel** (when no cross-group dependencies)
244
+ 4. After all complete, validate integration: `npx morph-spec validate-feature $ARGUMENTS --phase implement`
349
245
 
350
- **❌ Se `activeAgents` estiver vazio:**
351
- → Execute o skill `phase-setup` primeiro: `/phase-setup $ARGUMENTS`
352
- → Agentes não detectados = standards não carregados = implementação sem contexto correto
246
+ **If strategy is `"single"`** continue to sequential task loop below.
353
247
 
354
248
  ---
355
249
 
356
- ### Passo 1: Carregar Contexto Completo
357
-
358
- Leia todos os outputs antes de implementar:
250
+ #### Step 0.5b: Agent Teams (critical multi-domain features)
359
251
 
360
- 1. `.morph/features/$ARGUMENTS/4-tasks/tasks.md` — Lista de tasks
361
- 2. `.morph/features/$ARGUMENTS/1-design/spec.md` — Especificação completa
362
- 3. `.morph/features/$ARGUMENTS/1-design/contracts.cs` — Interfaces e DTOs
363
- 4. `.morph/features/$ARGUMENTS/1-design/decisions.md` — ADRs
364
- 5. `.morph/features/$ARGUMENTS/1-design/schema-analysis.md` — Schema real (se existir)
365
- 6. `.morph/features/$ARGUMENTS/2-ui/design-system.md` — Design tokens (se existir)
252
+ **When:** strategy is `"agent-teams"`
253
+ **Requirement:** `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in `.claude/settings.local.json`
366
254
 
367
- **Detectar estilo de arquitetura:**
368
- ```bash
369
- # Leia config para saber se é VSA ou DDD:
370
- cat .morph/config/config.json | grep architecture
371
- ```
255
+ **Why Agent Teams over subagents:**
256
+ Agent Teams have a shared TaskList, direct teammate messaging, and `TeammateIdle` hooks. Subagents are fire-and-forget. For features where backend and frontend need to coordinate API contracts, Agent Teams ensure frontend doesn't implement calls before backend stabilizes DTOs.
372
257
 
373
- Se `config.architecture.style === "vertical-slice"` siga o **Passo 1.5** antes de implementar.
374
- Caso contrário direto para o Passo 2.
258
+ Create the team with natural language specifying:
259
+ - Backend teammate (dotnet-senior): backend/domain/application files only
260
+ - Frontend teammate (blazor-builder or nextjs-expert): UI/components/pages files only
261
+ - Quality teammate (standards-architect): review + validate-feature after each implementation
262
+ - Enable **plan approval**: teammates must get plans approved before implementing
263
+ - Gate: only approve plans matching contracts.cs/.ts and spec.md
375
264
 
376
- ### Passo 1.5: Guia de Implementação VSA (somente se `style: "vertical-slice"`)
265
+ After all teammates complete: `npx morph-spec validate-feature $ARGUMENTS --phase implement`
377
266
 
378
- > Para a estrutura completa de slices e regras VSA, veja `references/vsa-implementation-guide.md`
379
-
380
- Estrutura: `Features/{Entity}Feature/{Op}/` com Handler (+ Request/Response records) + Validator + Endpoint por slice. Tudo `sealed`. `Guid.CreateVersion7()`. `result.Match()` nos endpoints. Sem Application Service layer — handler acessa IRepository diretamente. Auto-discovery via reflection: não registrar manualmente no Program.cs.
381
-
382
- Após cada slice completo, verificar build:
383
- ```bash
384
- dotnet build
385
- ```
267
+ ---
386
268
 
387
- ### Passo 2: Iniciar Primeira Task
269
+ ### Step 2: Task Loop
388
270
 
389
271
  ```bash
390
272
  npx morph-spec task next $ARGUMENTS
391
273
  ```
392
274
 
393
- Para cada task (T001 → T00N):
275
+ For each task (T001 → T00N):
394
276
 
395
- 1. **Marcar como em progresso (native task):**
277
+ 1. **Mark as in-progress (native task):**
396
278
  ```
397
- TaskUpdate(taskId="<native id de T001>", status="in_progress")
279
+ TaskUpdate(taskId="<native id>", status="in_progress")
398
280
  ```
399
- 2. **Iniciar via CLI:**
281
+ 2. **Start via CLI:**
400
282
  ```bash
401
283
  npx morph-spec task start $ARGUMENTS T001
402
284
  ```
403
- 3. **Ler a task description** completa
404
- 4. **Ler contracts.cs** para DTOs/interfaces relevantes
405
- 5. **Implementar** usando Write (novo) ou Edit (existente)
406
- 6. **Verificar**build, lint, testes
407
- 6b. **⚠️ OBRIGATÓRIOVerificação antes de `task done`:**
408
- Invoke `Skill(verification-before-completion)` ou execute manualmente:
285
+ 3. **Read the task description** + contracts.cs/.ts for relevant DTOs/interfaces
286
+ 4. **Implement** using Write (new) or Edit (existing)
287
+ 5. **Verify** build, lint, tests
288
+ 6. **MANDATORYVerification before `task done`:**
289
+ Run `validate-feature` before marking ANY task as done. This is non-negotiable it catches broken code, missing files, and spec violations before they compound across tasks.
409
290
  ```bash
410
291
  npx morph-spec validate-feature $ARGUMENTS --phase implement
411
292
  ```
412
- prossiga para o passo 7 se a verificação passar. Se falharcorrija antes de marcar `task done`.
413
- 7. **Marcar como done via CLI:**
293
+ Only proceed to step 7 if verification passes. If it fails fix before marking `task done`.
294
+ 7. **Mark as done via CLI:**
414
295
  ```bash
415
296
  npx morph-spec task done $ARGUMENTS T001
416
297
  ```
417
- 8. **Se `task done` retornar sem erro, marcar native task como concluída:**
298
+ 8. **If `task done` returns without error, mark native task as completed:**
418
299
  ```
419
- TaskUpdate(taskId="<native id de T001>", status="completed")
300
+ TaskUpdate(taskId="<native id>", status="completed")
420
301
  ```
421
- > **Nota:** `TaskUpdate(completed)` ocorre se `task done` retornar sem erro (validação passou).
302
+ > `TaskUpdate(completed)` only happens if `task done` returns without error (validation passed).
422
303
 
423
- ### Passo 3: Checkpoint a Cada 3 Tasks
304
+ ### Step 3: Checkpoint Every 3 Tasks
424
305
 
425
- **A cada 3 tasks completadas:**
306
+ **After every 3 completed tasks:**
426
307
 
427
308
  ```bash
428
309
  # Save checkpoint
@@ -432,21 +313,21 @@ npx morph-spec checkpoint-save $ARGUMENTS
432
313
  npx morph-spec validate-feature $ARGUMENTS --phase implement
433
314
  ```
434
315
 
435
- **Se validação falhar:**
436
- 1. NÃO avançar para próxima task
437
- 2. Corrigir issues reportados
438
- 3. Re-rodar validação
439
- 4. então prosseguir
316
+ **If validation fails:**
317
+ 1. Do NOT advance to the next task
318
+ 2. Fix reported issues
319
+ 3. Re-run validation
320
+ 4. Only then proceed
440
321
 
441
- ### Passo 4: Test-Driven Development (Recomendado)
322
+ ### Step 4: Test-Driven Development (Recommended)
442
323
 
443
- Para cada task de implementação:
324
+ For each implementation task:
444
325
 
445
- 1. **Escrever teste primeiro** (unit test para service/domain)
446
- 2. **Rodar teste** — deve falhar (RED)
447
- 3. **Implementar** o mínimo para passar
448
- 4. **Rodar teste** — deve passar (GREEN)
449
- 5. **Refatorar** se necessário (REFACTOR)
326
+ 1. **Write test first** (unit test for service/domain)
327
+ 2. **Run test** — should fail (RED)
328
+ 3. **Implement** the minimum to pass
329
+ 4. **Run test** — should pass (GREEN)
330
+ 5. **Refactor** if needed (REFACTOR)
450
331
 
451
332
  ```bash
452
333
  # .NET
@@ -456,136 +337,136 @@ dotnet test --filter "FullyQualifiedName~{TestClass}"
456
337
  npm test -- test/path/to/test.js
457
338
  ```
458
339
 
459
- ### Passo 5: Smoke Test com Playwright (se UI)
340
+ ### Step 5: Smoke Test with Playwright (if UI)
460
341
 
461
- Após implementar componentes visuais:
342
+ After implementing visual components:
462
343
 
463
344
  ```javascript
464
- // Navegar para a página
345
+ // Navigate to the page
465
346
  await mcp__playwright__browser_navigate({ url: 'http://localhost:5000/feature-page' });
466
347
 
467
- // Capturar estado da página
348
+ // Capture page state
468
349
  await mcp__playwright__browser_snapshot();
469
350
 
470
- // Verificar erros de console
351
+ // Check console errors
471
352
  await mcp__playwright__browser_console_messages({ level: 'error' });
472
353
 
473
- // Screenshot para recap
354
+ // Screenshot for recap
474
355
  await mcp__playwright__browser_take_screenshot({ type: 'png' });
475
356
  ```
476
357
 
477
- ### Passo 6: Gerar `recap.md`
358
+ ### Step 6: Generate `recap.md`
478
359
 
479
- Após TODAS as tasks completadas:
360
+ After ALL tasks completed:
480
361
 
481
362
  ```bash
482
363
  npx morph-spec generate recap $ARGUMENTS
483
364
  ```
484
365
 
485
- > Para o formato completo do recap, veja `references/recap-example.md`
366
+ > For the full recap format, see `references/recap-example.md`
486
367
 
487
- ### Passo 7: Atualizar State
368
+ ### Step 7: Update State
488
369
 
489
370
  ```bash
490
371
  npx morph-spec state set $ARGUMENTS status done
491
372
  npx morph-spec state mark-output $ARGUMENTS recap
492
373
  ```
493
374
 
494
- ### Passo 8: Revisão Pós-Implementação (obrigatório antes do PR)
375
+ ### Step 8: Post-Implementation Review (mandatory before PR)
495
376
 
496
377
  ```bash
497
378
  /post-implementation $ARGUMENTS
498
379
  ```
499
380
 
500
- Execute o skill `post-implementation` antes de criar o PR. Ele orquestra:
501
- - Scans automáticos (CRITICAL findings bloqueiam PR)
502
- - Test suite completo
503
- - `validate-feature` final
504
- - Smoke test via Playwright (obrigatório se dev server ativo)
505
- - Checklist de code review (CRITICAL + HIGH)
506
- - **`morph-checklist`** — compliance (segurança, SEO, performance, acessibilidade, LGPD)
507
- - Checkpoint + recap final
381
+ Run the `post-implementation` skill before creating the PR. It orchestrates:
382
+ - Automated scans (CRITICAL findings block PR)
383
+ - Full test suite
384
+ - Final `validate-feature`
385
+ - Smoke test via Playwright (mandatory if dev server active)
386
+ - Code review checklist (CRITICAL + HIGH)
387
+ - **`morph-checklist`** — compliance (security, SEO, performance, accessibility, LGPD)
388
+ - Checkpoint + final recap
508
389
 
509
- ### Passo 9: Frontend Review (NEXTJS/FULLSTACK)
390
+ ### Step 9: Frontend Review (NEXTJS/FULLSTACK)
510
391
 
511
- Se stack for NEXTJS ou FULLSTACK:
392
+ If stack is NEXTJS or FULLSTACK:
512
393
 
513
394
  ```bash
514
395
  /frontend-review $ARGUMENTS
515
396
  ```
516
397
 
517
- Complementa o `post-implementation` com: scan de acessibilidade (static + axe-core runtime),
518
- screenshots responsivos (mobile/tablet/desktop), e verificação de SEO metadata.
398
+ Complements `post-implementation` with: accessibility scan (static + axe-core runtime),
399
+ responsive screenshots (mobile/tablet/desktop), and SEO metadata verification.
519
400
 
520
401
  ---
521
402
 
522
- ## Dispatch Morph-Nativo
403
+ ## Morph-Native Dispatch
523
404
 
524
- O morph-spec usa seus próprios agentes e validadores para implementação, dispatch e review.
405
+ morph-spec uses its own agents and validators for implementation, dispatch, and review.
525
406
 
526
- ### Implementação
407
+ ### Implementation
527
408
 
528
- Implementadores são despachados via `dispatch-agents`:
409
+ Implementers are dispatched via `dispatch-agents`:
529
410
  ```bash
530
411
  npx morph-spec dispatch-agents $ARGUMENTS implement
531
412
  ```
532
413
 
533
- Use o `agentId` de cada grupo como `subagent_type` no Agent tool:
414
+ Use the `agentId` from each group as `subagent_type` in the Agent tool:
534
415
  ```
535
- Agent(subagent_type=<agentId>, prompt=<conteúdo de prompts/implementer-prompt.md preenchido>)
416
+ Agent(subagent_type=<agentId>, prompt=<filled prompts/implementer-prompt.md>)
536
417
  ```
537
418
 
538
419
  ### Review (Two-Stage)
539
420
 
540
- **Stage 1 — Spec Compliance (obrigatório):**
421
+ **Stage 1 — Spec Compliance (mandatory):**
541
422
  ```
542
- Agent(subagent_type=<tier-4 validator>, prompt=<conteúdo de prompts/spec-reviewer-prompt.md>)
423
+ Agent(subagent_type=<tier-4 validator>, prompt=<filled prompts/spec-reviewer-prompt.md>)
543
424
  ```
544
- Use validadores do `dispatch-agents --mode validate`. Spec compliance DEVE passar antes de prosseguir.
425
+ Use validators from `dispatch-agents --mode validate`. Spec compliance MUST pass before proceeding.
545
426
 
546
- **Stage 2 — Code Quality (obrigatório):**
427
+ **Stage 2 — Code Quality (mandatory):**
547
428
  ```
548
- Agent(subagent_type=standards-architect, prompt=<conteúdo de prompts/code-quality-reviewer-prompt.md>)
429
+ Agent(subagent_type=standards-architect, prompt=<filled prompts/code-quality-reviewer-prompt.md>)
549
430
  ```
550
- Issues `critical` bloqueiam. Issues `important` devem ser corrigidas. `suggestion` é opcional.
431
+ `critical` issues block. `important` issues must be fixed. `suggestion` is optional.
551
432
 
552
433
  ### Prompt Templates
553
434
 
554
- | Template | Uso |
555
- |----------|-----|
556
- | `prompts/implementer-prompt.md` | Dispatch para agentes implementadores |
557
- | `prompts/spec-reviewer-prompt.md` | Review de compliance com spec |
558
- | `prompts/code-quality-reviewer-prompt.md` | Review de qualidade de código |
435
+ | Template | Usage |
436
+ |----------|-------|
437
+ | `prompts/implementer-prompt.md` | Dispatch to implementer agents |
438
+ | `prompts/spec-reviewer-prompt.md` | Spec compliance review |
439
+ | `prompts/code-quality-reviewer-prompt.md` | Code quality review |
559
440
 
560
441
  ---
561
442
 
562
- ## Outputs Gerados
443
+ ## Outputs
563
444
 
564
- - Código fonte implementado (vários arquivos)
565
- - Testes unitários e de integração
566
- - `.morph/features/$ARGUMENTS/5-implement/recap.md` — Resumo da implementação
445
+ - Implemented source code (various files)
446
+ - Unit and integration tests
447
+ - `.morph/features/$ARGUMENTS/5-implement/recap.md` — Implementation summary
567
448
 
568
- ## Critérios de Conclusão
449
+ ## Completion Criteria
569
450
 
570
- - [x] Todas as tasks completadas
571
- - [x] Build compila sem erros
572
- - [x] Testes passando
573
- - [x] Validation pipeline passa
574
- - [x] `recap.md` gerado
575
- - [x] State atualizado para `status: done`
576
- - [x] Checkpoints salvos a cada 3 tasks
577
- - [x] `/post-implementation` executado sem BLOCKs (smoke test, scans, code review, `morph-checklist`)
451
+ - [x] All tasks completed
452
+ - [x] Build compiles without errors
453
+ - [x] Tests passing
454
+ - [x] Validation pipeline passes
455
+ - [x] `recap.md` generated
456
+ - [x] State updated to `status: done`
457
+ - [x] Checkpoints saved every 3 tasks
458
+ - [x] `/post-implementation` executed without BLOCKs
578
459
 
579
460
  ---
580
461
 
581
- ## Outputs desta Fase
462
+ ## Phase Outputs
582
463
 
583
464
  <!-- morph:outputs:implement -->
584
- | Output | Caminho |
585
- |--------|---------|
465
+ | Output | Path |
466
+ |--------|------|
586
467
  | `recap` | `.morph/features/{feature}/5-implement/recap.md` |
587
468
  <!-- /morph:outputs -->
588
469
 
589
470
  ---
590
471
 
591
- Feature completa! Considere criar um PR e rodar `morph-spec generate recap $ARGUMENTS`.
472
+ Feature complete! Consider creating a PR and running `morph-spec generate recap $ARGUMENTS`.