@polymorphism-tech/morph-spec 2.3.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +446 -1730
- package/README.md +515 -516
- package/bin/morph-spec.js +366 -294
- package/bin/task-manager.js +429 -368
- package/bin/validate.js +369 -268
- package/content/.claude/commands/morph-apply.md +221 -158
- package/content/.claude/commands/morph-deploy.md +529 -0
- package/content/.claude/commands/morph-preflight.md +227 -0
- package/content/.claude/commands/morph-proposal.md +122 -101
- package/content/.claude/commands/morph-status.md +86 -86
- package/content/.claude/commands/morph-troubleshoot.md +122 -0
- package/content/.claude/skills/infra/azure-deploy-specialist.md +699 -0
- package/content/.claude/skills/level-0-meta/README.md +7 -0
- package/content/.claude/skills/level-0-meta/code-review.md +226 -0
- package/content/.claude/skills/level-0-meta/morph-checklist.md +117 -0
- package/content/.claude/skills/level-0-meta/simulation-checklist.md +77 -0
- package/content/.claude/skills/level-1-workflows/README.md +7 -0
- package/content/.claude/skills/level-1-workflows/morph-replicate.md +213 -0
- package/content/.claude/{commands/morph-clarify.md → skills/level-1-workflows/phase-clarify.md} +131 -184
- package/content/.claude/{commands/morph-design.md → skills/level-1-workflows/phase-design.md} +213 -275
- package/content/.claude/skills/level-1-workflows/phase-setup.md +106 -0
- package/content/.claude/skills/level-1-workflows/phase-tasks.md +164 -0
- package/content/.claude/{commands/morph-uiux.md → skills/level-1-workflows/phase-uiux.md} +169 -211
- package/content/.claude/skills/level-2-domains/README.md +14 -0
- package/content/.claude/skills/level-2-domains/ai-agents/ai-system-architect.md +192 -0
- package/content/.claude/skills/{specialists → level-2-domains/architecture}/po-pm-advisor.md +197 -197
- package/content/.claude/skills/level-2-domains/architecture/standards-architect.md +156 -0
- package/content/.claude/skills/level-2-domains/backend/dotnet-senior.md +287 -0
- package/content/.claude/skills/level-2-domains/backend/ef-modeler.md +113 -0
- package/content/.claude/skills/level-2-domains/backend/hangfire-orchestrator.md +126 -0
- package/content/.claude/skills/level-2-domains/backend/ms-agent-expert.md +109 -0
- package/content/.claude/skills/level-2-domains/frontend/blazor-builder.md +210 -0
- package/content/.claude/skills/level-2-domains/frontend/nextjs-expert.md +154 -0
- package/content/.claude/skills/level-2-domains/frontend/ui-ux-designer.md +191 -0
- package/content/.claude/skills/{specialists → level-2-domains/infrastructure}/azure-architect.md +142 -142
- package/content/.claude/skills/level-2-domains/infrastructure/bicep-architect.md +126 -0
- package/content/.claude/skills/level-2-domains/infrastructure/container-specialist.md +131 -0
- package/content/.claude/skills/level-2-domains/infrastructure/devops-engineer.md +119 -0
- package/content/.claude/skills/level-2-domains/integrations/asaas-financial.md +130 -0
- package/content/.claude/skills/level-2-domains/integrations/azure-identity.md +142 -0
- package/content/.claude/skills/level-2-domains/integrations/clerk-auth.md +108 -0
- package/content/.claude/skills/level-2-domains/integrations/resend-email.md +119 -0
- package/content/.claude/skills/level-2-domains/quality/code-analyzer.md +235 -0
- package/content/.claude/skills/level-2-domains/quality/testing-specialist.md +126 -0
- package/content/.claude/skills/level-3-technologies/README.md +7 -0
- package/content/.claude/skills/level-4-patterns/README.md +7 -0
- package/content/.claude/skills/specialists/prompt-engineer.md +189 -0
- package/content/.claude/skills/specialists/seo-growth-hacker.md +320 -0
- package/content/.morph/config/agents.json +762 -242
- package/content/.morph/config/config.template.json +122 -108
- package/content/.morph/docs/workflows/design-impl.md +37 -0
- package/content/.morph/docs/workflows/enforcement-pipeline.md +668 -0
- package/content/.morph/docs/workflows/fast-track.md +29 -0
- package/content/.morph/docs/workflows/full-morph.md +76 -0
- package/content/.morph/docs/workflows/standard.md +44 -0
- package/content/.morph/docs/workflows/ui-refresh.md +39 -0
- package/content/.morph/examples/scheduled-reports/decisions.md +158 -0
- package/content/.morph/examples/scheduled-reports/proposal.md +95 -0
- package/content/.morph/examples/scheduled-reports/spec.md +267 -0
- package/content/.morph/hooks/README.md +348 -239
- package/content/.morph/hooks/pre-commit-agents.sh +24 -24
- package/content/.morph/hooks/task-completed.js +73 -0
- package/content/.morph/hooks/teammate-idle.js +68 -0
- package/content/.morph/schemas/tasks.schema.json +220 -0
- package/content/.morph/standards/agent-framework-blazor-ui.md +359 -0
- package/content/.morph/standards/agent-framework-production.md +410 -0
- package/content/.morph/standards/agent-framework-setup.md +413 -453
- package/content/.morph/standards/agent-framework-workflows.md +349 -0
- package/content/.morph/standards/agent-teams-workflow.md +474 -0
- package/content/.morph/standards/architecture.md +325 -325
- package/content/.morph/standards/azure.md +605 -379
- package/content/.morph/standards/dotnet10-migration.md +520 -494
- package/content/.morph/templates/CONTEXT-FEATURE.md +276 -0
- package/content/.morph/templates/CONTEXT.md +170 -0
- package/content/.morph/templates/agent.cs +163 -172
- package/content/.morph/templates/clarify-questions.md +159 -0
- package/content/.morph/templates/contracts/Commands.cs +74 -0
- package/content/.morph/templates/contracts/Entities.cs +25 -0
- package/content/.morph/templates/contracts/Queries.cs +74 -0
- package/content/.morph/templates/contracts/README.md +74 -0
- package/content/.morph/templates/decisions.md +123 -106
- package/content/.morph/templates/infra/azure-pipelines-deploy.yml +480 -0
- package/content/.morph/templates/infra/deploy-checklist.md +426 -0
- package/content/.morph/templates/proposal.md +141 -155
- package/content/.morph/templates/recap.md +94 -105
- package/content/.morph/templates/simulation.md +353 -0
- package/content/.morph/templates/spec.md +149 -148
- package/content/.morph/templates/state.template.json +222 -222
- package/content/.morph/templates/tasks.md +257 -235
- package/content/.morph/templates/ui-components.md +362 -276
- package/content/CLAUDE.md +150 -442
- package/detectors/structure-detector.js +245 -250
- package/docs/README.md +144 -149
- package/docs/getting-started.md +301 -302
- package/docs/installation.md +361 -361
- package/docs/validation-checklist.md +265 -266
- package/package.json +80 -80
- package/src/commands/advance-phase.js +266 -0
- package/src/commands/analyze-blazor-concurrency.js +193 -0
- package/src/commands/deploy.js +780 -0
- package/src/commands/detect-agents.js +167 -0
- package/src/commands/doctor.js +356 -280
- package/src/commands/generate-context.js +40 -0
- package/src/commands/init.js +258 -245
- package/src/commands/lint-fluent.js +352 -0
- package/src/commands/rollback-phase.js +185 -0
- package/src/commands/session-summary.js +291 -0
- package/src/commands/task.js +78 -75
- package/src/commands/troubleshoot.js +222 -0
- package/src/commands/update.js +192 -159
- package/src/commands/validate-blazor-state.js +210 -0
- package/src/commands/validate-blazor.js +156 -0
- package/src/commands/validate-css.js +84 -0
- package/src/commands/validate-phase.js +221 -0
- package/src/lib/blazor-concurrency-analyzer.js +288 -0
- package/src/lib/blazor-state-validator.js +291 -0
- package/src/lib/blazor-validator.js +374 -0
- package/src/lib/complexity-analyzer.js +441 -292
- package/src/lib/context-generator.js +513 -0
- package/src/lib/continuous-validator.js +421 -440
- package/src/lib/css-validator.js +352 -0
- package/src/lib/decision-constraint-loader.js +109 -0
- package/src/lib/design-system-detector.js +187 -0
- package/src/lib/design-system-scaffolder.js +299 -0
- package/src/lib/hook-executor.js +256 -0
- package/src/lib/recap-generator.js +205 -0
- package/src/lib/spec-validator.js +258 -0
- package/src/lib/standards-context-injector.js +287 -0
- package/src/lib/state-manager.js +397 -340
- package/src/lib/team-orchestrator.js +322 -0
- package/src/lib/troubleshoot-grep.js +194 -0
- package/src/lib/troubleshoot-index.js +144 -0
- package/src/lib/validation-runner.js +283 -0
- package/src/lib/validators/contract-compliance-validator.js +273 -0
- package/src/lib/validators/design-system-validator.js +231 -0
- package/src/utils/file-copier.js +187 -139
- package/content/.claude/commands/morph-costs.md +0 -206
- package/content/.claude/commands/morph-setup.md +0 -100
- package/content/.claude/commands/morph-tasks.md +0 -319
- package/content/.claude/skills/infra/bicep-architect.md +0 -419
- package/content/.claude/skills/infra/container-specialist.md +0 -437
- package/content/.claude/skills/infra/devops-engineer.md +0 -405
- package/content/.claude/skills/integrations/asaas-financial.md +0 -333
- package/content/.claude/skills/integrations/azure-identity.md +0 -309
- package/content/.claude/skills/integrations/clerk-auth.md +0 -290
- package/content/.claude/skills/specialists/ai-system-architect.md +0 -604
- package/content/.claude/skills/specialists/cost-guardian.md +0 -110
- package/content/.claude/skills/specialists/ef-modeler.md +0 -211
- package/content/.claude/skills/specialists/hangfire-orchestrator.md +0 -255
- package/content/.claude/skills/specialists/ms-agent-expert.md +0 -263
- package/content/.claude/skills/specialists/standards-architect.md +0 -78
- package/content/.claude/skills/specialists/ui-ux-designer.md +0 -1100
- package/content/.claude/skills/stacks/dotnet-blazor.md +0 -606
- package/content/.claude/skills/stacks/dotnet-nextjs.md +0 -402
- package/content/.claude/skills/stacks/shopify.md +0 -445
- package/content/.morph/config/azure-pricing.json +0 -70
- package/content/.morph/config/azure-pricing.schema.json +0 -50
- package/content/.morph/hooks/pre-commit-costs.sh +0 -91
- package/docs/api/cost-calculator.js.html +0 -513
- package/docs/api/design-system-generator.js.html +0 -382
- package/docs/api/global.html +0 -5263
- package/docs/api/index.html +0 -96
- package/docs/api/state-manager.js.html +0 -423
- package/src/commands/cost.js +0 -181
- package/src/commands/update-pricing.js +0 -206
- package/src/lib/cost-calculator.js +0 -429
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Pre-Flight Check for Azure Deployment
|
|
2
|
+
|
|
3
|
+
Validates project readiness before deploying to Azure.
|
|
4
|
+
|
|
5
|
+
## Uso
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/morph-preflight azure
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Objetivo
|
|
12
|
+
|
|
13
|
+
Detectar problemas **antes** do deploy que causariam falhas em produção. Economiza tempo e evita debugging em ambiente Azure.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Validações Executadas
|
|
18
|
+
|
|
19
|
+
### 1. Package Version Conflicts
|
|
20
|
+
|
|
21
|
+
**O que verifica:**
|
|
22
|
+
- `Azure.Identity` especificado explicitamente
|
|
23
|
+
- Sem conflitos de versão (NU1605, NU1608)
|
|
24
|
+
- Packages críticos com versões compatíveis
|
|
25
|
+
|
|
26
|
+
**Como verificar:**
|
|
27
|
+
```bash
|
|
28
|
+
dotnet restore --verbosity normal 2>&1 | grep -E "(NU1605|NU1608|warning)"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Fix comum:**
|
|
32
|
+
```xml
|
|
33
|
+
<PackageReference Include="Azure.Identity" Version="1.14.2" />
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### 2. EF Core Migrations
|
|
39
|
+
|
|
40
|
+
**O que verifica:**
|
|
41
|
+
- Sem pending model changes
|
|
42
|
+
- Migrations aplicáveis existem
|
|
43
|
+
- Migration scripts são válidos
|
|
44
|
+
|
|
45
|
+
**Como verificar:**
|
|
46
|
+
```bash
|
|
47
|
+
dotnet ef migrations has-pending-model-changes \
|
|
48
|
+
--project src/Infrastructure \
|
|
49
|
+
--startup-project src/Web
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Fix comum:**
|
|
53
|
+
```bash
|
|
54
|
+
dotnet ef migrations add <MigrationName> \
|
|
55
|
+
--project src/Infrastructure \
|
|
56
|
+
--startup-project src/Web
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### 3. Dockerfile Validation (se Container Apps)
|
|
62
|
+
|
|
63
|
+
**O que verifica:**
|
|
64
|
+
- Dockerfile existe
|
|
65
|
+
- Base image é válida
|
|
66
|
+
- Multi-stage build configurado
|
|
67
|
+
- EXPOSE ports corretos
|
|
68
|
+
- ENTRYPOINT definido
|
|
69
|
+
|
|
70
|
+
**Como verificar:**
|
|
71
|
+
```bash
|
|
72
|
+
docker build --check .
|
|
73
|
+
# Ou validação manual do Dockerfile
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### 4. Blazor .NET 10 Assets
|
|
79
|
+
|
|
80
|
+
**O que verifica:**
|
|
81
|
+
- `RequiresAspNetWebAssets` está `true` (se Blazor + .NET 10)
|
|
82
|
+
- Static web assets configurados corretamente
|
|
83
|
+
|
|
84
|
+
**Como verificar:**
|
|
85
|
+
```bash
|
|
86
|
+
grep -r "RequiresAspNetWebAssets" *.csproj
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Fix:**
|
|
90
|
+
```xml
|
|
91
|
+
<PropertyGroup>
|
|
92
|
+
<RequiresAspNetWebAssets>true</RequiresAspNetWebAssets>
|
|
93
|
+
</PropertyGroup>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### 5. Bicep Syntax Validation
|
|
99
|
+
|
|
100
|
+
**O que verifica:**
|
|
101
|
+
- Arquivos `.bicep` sem erros de sintaxe
|
|
102
|
+
- Parâmetros obrigatórios definidos
|
|
103
|
+
- Resources com nomes válidos
|
|
104
|
+
|
|
105
|
+
**Como verificar:**
|
|
106
|
+
```bash
|
|
107
|
+
az bicep build --file infra/main.bicep --stdout > /dev/null
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### 6. Key Vault Configuration
|
|
113
|
+
|
|
114
|
+
**O que verifica:**
|
|
115
|
+
- Key Vault URI configurado em `appsettings.json` ou environment
|
|
116
|
+
- Não condiciona Key Vault ao ambiente (bug comum)
|
|
117
|
+
- Managed Identity habilitada
|
|
118
|
+
|
|
119
|
+
**Como verificar:**
|
|
120
|
+
```bash
|
|
121
|
+
grep -r "KeyVaultUri\|AzureKeyVault" appsettings*.json
|
|
122
|
+
grep -r "IsDevelopment()" Program.cs | grep -i keyvault
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Anti-pattern a detectar:**
|
|
126
|
+
```csharp
|
|
127
|
+
// ❌ ERRADO - Não carrega Key Vault em dev!
|
|
128
|
+
if (!builder.Environment.IsDevelopment())
|
|
129
|
+
{
|
|
130
|
+
builder.Configuration.AddAzureKeyVault(...);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### 7. Connection Strings Security
|
|
137
|
+
|
|
138
|
+
**O que verifica:**
|
|
139
|
+
- Connection strings não hardcoded em código
|
|
140
|
+
- Secrets em Key Vault ou User Secrets
|
|
141
|
+
- Sem credentials em `appsettings.json` (exceto Development)
|
|
142
|
+
|
|
143
|
+
**Como verificar:**
|
|
144
|
+
```bash
|
|
145
|
+
# Detectar passwords em appsettings
|
|
146
|
+
grep -rE "(Password=|Pwd=|Secret=)" appsettings*.json | grep -v Development
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Output Exemplo
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
🔍 MORPH Pre-Flight Check: Azure Deployment
|
|
155
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
156
|
+
|
|
157
|
+
✅ Packages: No version conflicts detected
|
|
158
|
+
✅ Migrations: No pending model changes
|
|
159
|
+
✅ Dockerfile: Valid multi-stage build
|
|
160
|
+
✅ Blazor Assets: RequiresAspNetWebAssets=true
|
|
161
|
+
✅ Bicep: Syntax valid
|
|
162
|
+
❌ Key Vault: URI not configured in appsettings.Production.json
|
|
163
|
+
⚠️ Connection Strings: Found password in appsettings.Staging.json
|
|
164
|
+
|
|
165
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
166
|
+
|
|
167
|
+
📋 Summary: 5 passed, 1 failed, 1 warning
|
|
168
|
+
|
|
169
|
+
❌ BLOCKED: Fix Key Vault configuration before deploy!
|
|
170
|
+
|
|
171
|
+
Recommended fixes:
|
|
172
|
+
1. Add KeyVaultUri to appsettings.Production.json
|
|
173
|
+
2. Move password from appsettings.Staging.json to Key Vault
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Workflow de Uso
|
|
179
|
+
|
|
180
|
+
### Antes de criar PR para produção
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
/morph-preflight azure
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### No pipeline CI/CD
|
|
187
|
+
|
|
188
|
+
```yaml
|
|
189
|
+
- script: |
|
|
190
|
+
# Package check
|
|
191
|
+
dotnet restore 2>&1 | grep -E "NU1605|NU1608" && exit 1
|
|
192
|
+
|
|
193
|
+
# Migration check
|
|
194
|
+
dotnet ef migrations has-pending-model-changes \
|
|
195
|
+
--project src/Infrastructure \
|
|
196
|
+
--startup-project src/Web
|
|
197
|
+
if [ $? -ne 0 ]; then exit 1; fi
|
|
198
|
+
|
|
199
|
+
# Bicep check
|
|
200
|
+
az bicep build --file infra/main.bicep --stdout > /dev/null
|
|
201
|
+
if [ $? -ne 0 ]; then exit 1; fi
|
|
202
|
+
|
|
203
|
+
echo "Pre-flight checks passed!"
|
|
204
|
+
displayName: 'Pre-flight validation'
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Validações Futuras (Roadmap)
|
|
210
|
+
|
|
211
|
+
- [ ] Cost estimation validation (dentro do budget)
|
|
212
|
+
- [ ] RBAC permissions check
|
|
213
|
+
- [ ] Network security rules validation
|
|
214
|
+
- [ ] Health probe endpoint exists
|
|
215
|
+
- [ ] Application Insights configured
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Referências
|
|
220
|
+
|
|
221
|
+
- [azure.md](../../standards/azure.md) - Padrões Azure
|
|
222
|
+
- [dotnet10-migration.md](../../standards/dotnet10-migration.md) - Breaking changes .NET 10
|
|
223
|
+
- [blazor-efcore.md](../../../../framework/standards/blazor-efcore.md) - EF Core patterns
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,101 +1,122 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
Crie
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
2.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
1
|
+
# MORPH Spec Pipeline
|
|
2
|
+
|
|
3
|
+
Crie ou retome o planejamento de uma feature, guiando automaticamente pelas fases 0→4 com pausas obrigatórias.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Resume Logic
|
|
8
|
+
|
|
9
|
+
Primeiro, verifique se a feature já existe:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx morph-spec state get {feature-name}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- **Se existe:** Identifique a fase atual e retome de onde parou (pular fases já concluídas)
|
|
16
|
+
- **Se não existe:** Iniciar do zero (FASE 0)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 2. FASE 0: PROPOSAL
|
|
21
|
+
|
|
22
|
+
### Workflow
|
|
23
|
+
|
|
24
|
+
1. **Detecte agentes automaticamente:**
|
|
25
|
+
```bash
|
|
26
|
+
npx morph-spec detect-agents "$ARGUMENTS"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. **Invoque skills dos agentes detectados:**
|
|
30
|
+
- Para agentes com `skillPath` em agents.json, consulte o Skill correspondente
|
|
31
|
+
- Use conhecimento dos skills para enriquecer a proposta
|
|
32
|
+
|
|
33
|
+
3. **Analise a solicitação** e identifique: problema, usuários afetados, impacto
|
|
34
|
+
|
|
35
|
+
4. **Crie a estrutura:**
|
|
36
|
+
```
|
|
37
|
+
.morph/project/outputs/{feature-name}/
|
|
38
|
+
├── proposal.md
|
|
39
|
+
├── spec.md (iniciar)
|
|
40
|
+
└── tasks.json (iniciar)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
5. **Preencha `proposal.md`** baseado em `framework/templates/proposal.md`
|
|
44
|
+
|
|
45
|
+
6. **Registre no state:**
|
|
46
|
+
```bash
|
|
47
|
+
npx morph-spec state set {feature-name} status draft
|
|
48
|
+
npx morph-spec state set {feature-name} phase proposal
|
|
49
|
+
npx morph-spec state mark-output {feature-name} proposal
|
|
50
|
+
# Adicionar cada agente detectado:
|
|
51
|
+
npx morph-spec state add-agent {feature-name} {agent-id}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### PAUSA OBRIGATORIA
|
|
55
|
+
|
|
56
|
+
Apresente: resumo da proposta, agentes ativados, custo estimado, 3 itens de pausa.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 3. Após Aprovação do Proposal → FASE 1: SETUP (auto, sem pausa)
|
|
61
|
+
|
|
62
|
+
**Ler:** `.claude/skills/workflows/phase-setup.md` para instruções detalhadas.
|
|
63
|
+
|
|
64
|
+
Resumo: carregar contexto do projeto, confirmar stack, listar agentes ativos, atualizar state.
|
|
65
|
+
|
|
66
|
+
**Não pausa aqui.** Continuar automaticamente.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 4. FASE 1.5: UI/UX (condicional)
|
|
71
|
+
|
|
72
|
+
Verificar se `uiux-designer` está nos `activeAgents`:
|
|
73
|
+
- **Se SIM:** Ler `.claude/skills/workflows/phase-uiux.md` e executar. **PAUSA OBRIGATORIA** após gerar deliverables UI.
|
|
74
|
+
- **Se NÃO:** Pular para FASE 2.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 5. FASE 2: DESIGN
|
|
79
|
+
|
|
80
|
+
**Ler:** `.claude/skills/workflows/phase-design.md` para instruções detalhadas.
|
|
81
|
+
|
|
82
|
+
Resumo: gerar spec.md, contracts.cs, decisions.md com ADRs, estimar custos.
|
|
83
|
+
|
|
84
|
+
### PAUSA OBRIGATORIA
|
|
85
|
+
|
|
86
|
+
Apresente: spec, contracts, decisions, custos. 3 itens de pausa (aprovar, ajustar escopo, modificar contracts).
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 6. Após Aprovação do Design → FASE 3: CLARIFY (interativo)
|
|
91
|
+
|
|
92
|
+
**Ler:** `.claude/skills/workflows/phase-clarify.md` para instruções detalhadas.
|
|
93
|
+
|
|
94
|
+
Resumo: identificar ambiguidades, gerar 3-7 perguntas, aguardar respostas, atualizar spec com clarificações e edge cases.
|
|
95
|
+
|
|
96
|
+
**Aguardar respostas do usuário antes de continuar.**
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 7. FASE 4: TASKS
|
|
101
|
+
|
|
102
|
+
**Ler:** `.claude/skills/workflows/phase-tasks.md` para instruções detalhadas.
|
|
103
|
+
|
|
104
|
+
Resumo: quebrar spec em tasks T001-TXXX, definir dependências, checkpoints, estimativas.
|
|
105
|
+
|
|
106
|
+
### PAUSA OBRIGATORIA
|
|
107
|
+
|
|
108
|
+
Apresente: breakdown de tasks, ordem de execução, estimativa total. 3 itens de pausa (aprovar, repriorizar, adicionar/remover).
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 8. Planejamento Completo
|
|
113
|
+
|
|
114
|
+
Após aprovação das tasks:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Planejamento completo! Execute /morph-apply {feature-name} para iniciar implementação.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
**Feature solicitada:** $ARGUMENTS
|
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
# MORPH Project Status
|
|
2
|
-
|
|
3
|
-
Mostre o status atual do projeto MORPH e features em desenvolvimento.
|
|
4
|
-
|
|
5
|
-
## Como Usar
|
|
6
|
-
|
|
7
|
-
**SEMPRE** use o state-manager CLI para obter status:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Este comando automaticamente mostra:
|
|
14
|
-
- Todas as features ativas
|
|
15
|
-
- Fase atual de cada feature
|
|
16
|
-
- Progresso de tasks (X/Y)
|
|
17
|
-
- Agentes ativos
|
|
18
|
-
- Custos estimados
|
|
19
|
-
|
|
20
|
-
## Verificações Adicionais
|
|
21
|
-
|
|
22
|
-
### 1. Configuração MORPH
|
|
23
|
-
- [ ] `.morph/project.md` existe e está preenchido
|
|
24
|
-
- [ ] `.morph/config/config.json` configurado
|
|
25
|
-
- [ ] `.morph/standards/` presentes
|
|
26
|
-
|
|
27
|
-
### 2. Detalhes de Feature Específica
|
|
28
|
-
|
|
29
|
-
Para obter JSON detalhado de uma feature:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### 3. Features Arquivadas
|
|
36
|
-
|
|
37
|
-
Verifique `.morph/project/archive/` manualmente se necessário:
|
|
38
|
-
- Quantas features concluídas
|
|
39
|
-
- Tempo total gasto
|
|
40
|
-
- Custo acumulado
|
|
41
|
-
|
|
42
|
-
### 4. Specs Ativas
|
|
43
|
-
|
|
44
|
-
Verifique `.morph/project/specs/` para specs consolidadas.
|
|
45
|
-
|
|
46
|
-
## Output
|
|
47
|
-
|
|
48
|
-
O comando `
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
╔════════════════════════════════════════════════════════════════╗
|
|
52
|
-
║ MORPH-SPEC PROJECT STATUS ║
|
|
53
|
-
╠════════════════════════════════════════════════════════════════╣
|
|
54
|
-
║ Project: {PROJECT_NAME} ║
|
|
55
|
-
║ Type: blazor-server ║
|
|
56
|
-
╠════════════════════════════════════════════════════════════════╣
|
|
57
|
-
║ FEATURES ║
|
|
58
|
-
╠════════════════════════════════════════════════════════════════╣
|
|
59
|
-
║ 📝 {feature-1} ║
|
|
60
|
-
║ Phase: implement │ Tasks: 5/12 ║
|
|
61
|
-
║ Agents: blazor-builder ef-modeler hangfire-orchestrator ║
|
|
62
|
-
╠════════════════════════════════════════════════════════════════╣
|
|
63
|
-
║ 📝 {feature-2} ║
|
|
64
|
-
║ Phase: design │ Tasks: 0/0 ║
|
|
65
|
-
║ Agents: None ║
|
|
66
|
-
╠════════════════════════════════════════════════════════════════╣
|
|
67
|
-
║ SUMMARY ║
|
|
68
|
-
╠════════════════════════════════════════════════════════════════╣
|
|
69
|
-
║ Total Features: 2 ║
|
|
70
|
-
║ Completed: 0 ║
|
|
71
|
-
║ Estimated Cost: $5.50/month ║
|
|
72
|
-
╚════════════════════════════════════════════════════════════════╝
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**Simplesmente execute o comando e mostre o resultado ao usuário.**
|
|
76
|
-
|
|
77
|
-
## Ações Disponíveis
|
|
78
|
-
|
|
79
|
-
Sugira próximas ações:
|
|
80
|
-
- `/morph-proposal {feature}` - Criar nova feature
|
|
81
|
-
- `/morph-apply {feature}` - Implementar feature
|
|
82
|
-
- `/morph-archive {feature}` - Arquivar feature concluída
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
$ARGUMENTS
|
|
1
|
+
# MORPH Project Status
|
|
2
|
+
|
|
3
|
+
Mostre o status atual do projeto MORPH e features em desenvolvimento.
|
|
4
|
+
|
|
5
|
+
## Como Usar
|
|
6
|
+
|
|
7
|
+
**SEMPRE** use o state-manager CLI para obter status:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx morph-spec state list
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Este comando automaticamente mostra:
|
|
14
|
+
- Todas as features ativas
|
|
15
|
+
- Fase atual de cada feature
|
|
16
|
+
- Progresso de tasks (X/Y)
|
|
17
|
+
- Agentes ativos
|
|
18
|
+
- Custos estimados
|
|
19
|
+
|
|
20
|
+
## Verificações Adicionais
|
|
21
|
+
|
|
22
|
+
### 1. Configuração MORPH
|
|
23
|
+
- [ ] `.morph/project.md` existe e está preenchido
|
|
24
|
+
- [ ] `.morph/config/config.json` configurado
|
|
25
|
+
- [ ] `.morph/standards/` presentes
|
|
26
|
+
|
|
27
|
+
### 2. Detalhes de Feature Específica
|
|
28
|
+
|
|
29
|
+
Para obter JSON detalhado de uma feature:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx morph-spec state get {feature-name}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 3. Features Arquivadas
|
|
36
|
+
|
|
37
|
+
Verifique `.morph/project/archive/` manualmente se necessário:
|
|
38
|
+
- Quantas features concluídas
|
|
39
|
+
- Tempo total gasto
|
|
40
|
+
- Custo acumulado
|
|
41
|
+
|
|
42
|
+
### 4. Specs Ativas
|
|
43
|
+
|
|
44
|
+
Verifique `.morph/project/specs/` para specs consolidadas.
|
|
45
|
+
|
|
46
|
+
## Output
|
|
47
|
+
|
|
48
|
+
O comando `npx morph-spec state list` automaticamente gera um dashboard formatado:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
╔════════════════════════════════════════════════════════════════╗
|
|
52
|
+
║ MORPH-SPEC PROJECT STATUS ║
|
|
53
|
+
╠════════════════════════════════════════════════════════════════╣
|
|
54
|
+
║ Project: {PROJECT_NAME} ║
|
|
55
|
+
║ Type: blazor-server ║
|
|
56
|
+
╠════════════════════════════════════════════════════════════════╣
|
|
57
|
+
║ FEATURES ║
|
|
58
|
+
╠════════════════════════════════════════════════════════════════╣
|
|
59
|
+
║ 📝 {feature-1} ║
|
|
60
|
+
║ Phase: implement │ Tasks: 5/12 ║
|
|
61
|
+
║ Agents: blazor-builder ef-modeler hangfire-orchestrator ║
|
|
62
|
+
╠════════════════════════════════════════════════════════════════╣
|
|
63
|
+
║ 📝 {feature-2} ║
|
|
64
|
+
║ Phase: design │ Tasks: 0/0 ║
|
|
65
|
+
║ Agents: None ║
|
|
66
|
+
╠════════════════════════════════════════════════════════════════╣
|
|
67
|
+
║ SUMMARY ║
|
|
68
|
+
╠════════════════════════════════════════════════════════════════╣
|
|
69
|
+
║ Total Features: 2 ║
|
|
70
|
+
║ Completed: 0 ║
|
|
71
|
+
║ Estimated Cost: $5.50/month ║
|
|
72
|
+
╚════════════════════════════════════════════════════════════════╝
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Simplesmente execute o comando e mostre o resultado ao usuário.**
|
|
76
|
+
|
|
77
|
+
## Ações Disponíveis
|
|
78
|
+
|
|
79
|
+
Sugira próximas ações:
|
|
80
|
+
- `/morph-proposal {feature}` - Criar nova feature
|
|
81
|
+
- `/morph-apply {feature}` - Implementar feature
|
|
82
|
+
- `/morph-archive {feature}` - Arquivar feature concluída
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
$ARGUMENTS
|