@polymorphism-tech/morph-spec 2.2.0 → 2.4.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 +314 -1673
- package/LICENSE +72 -72
- package/README.md +515 -516
- package/bin/detect-agents.js +225 -225
- package/bin/morph-spec.js +358 -173
- package/bin/render-template.js +302 -302
- package/bin/semantic-detect-agents.js +246 -246
- package/bin/task-manager.js +429 -0
- package/bin/validate-agents-skills.js +251 -251
- package/bin/validate-agents.js +69 -69
- package/bin/validate-phase.js +263 -263
- package/bin/validate.js +369 -0
- package/content/.azure/README.md +293 -293
- package/content/.azure/docs/azure-devops-setup.md +454 -454
- package/content/.azure/docs/branch-strategy.md +398 -398
- package/content/.azure/docs/local-development.md +515 -515
- package/content/.azure/pipelines/pipeline-variables.yml +34 -34
- package/content/.azure/pipelines/prod-pipeline.yml +319 -319
- package/content/.azure/pipelines/staging-pipeline.yml +234 -234
- package/content/.azure/pipelines/templates/build-dotnet.yml +75 -75
- package/content/.azure/pipelines/templates/deploy-app-service.yml +94 -94
- package/content/.azure/pipelines/templates/deploy-container-app.yml +120 -120
- package/content/.azure/pipelines/templates/infra-deploy.yml +90 -90
- package/content/.claude/commands/morph-apply.md +221 -158
- package/content/.claude/commands/morph-archive.md +79 -79
- package/content/.claude/commands/morph-infra.md +209 -209
- 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/settings.local.json +15 -15
- package/content/.claude/skills/checklists/code-review.md +226 -0
- package/content/.claude/skills/checklists/morph-checklist.md +117 -0
- package/content/.claude/skills/checklists/simulation-checklist.md +77 -0
- package/content/.claude/skills/infra/bicep-architect.md +126 -419
- package/content/.claude/skills/infra/container-specialist.md +131 -437
- package/content/.claude/skills/infra/devops-engineer.md +119 -405
- package/content/.claude/skills/integrations/asaas-financial.md +130 -333
- package/content/.claude/skills/integrations/azure-identity.md +142 -309
- package/content/.claude/skills/integrations/clerk-auth.md +108 -290
- package/content/.claude/skills/integrations/resend-email.md +119 -0
- package/content/.claude/skills/specialists/ai-system-architect.md +192 -604
- package/content/.claude/skills/specialists/azure-architect.md +142 -142
- package/content/.claude/skills/specialists/code-analyzer.md +235 -0
- package/content/.claude/skills/specialists/dotnet-senior.md +287 -0
- package/content/.claude/skills/specialists/ef-modeler.md +113 -200
- package/content/.claude/skills/specialists/hangfire-orchestrator.md +126 -245
- package/content/.claude/skills/specialists/ms-agent-expert.md +109 -263
- package/content/.claude/skills/specialists/po-pm-advisor.md +197 -197
- package/content/.claude/skills/specialists/standards-architect.md +156 -78
- package/content/.claude/skills/specialists/testing-specialist.md +126 -0
- package/content/.claude/skills/specialists/ui-ux-designer.md +191 -1060
- package/content/.claude/skills/stacks/dotnet-blazor.md +210 -588
- package/content/.claude/skills/stacks/dotnet-nextjs.md +154 -402
- package/content/.claude/skills/workflows/morph-replicate.md +213 -0
- package/content/.claude/{commands/morph-clarify.md → skills/workflows/phase-clarify.md} +5 -58
- package/content/.claude/{commands/morph-design.md → skills/workflows/phase-design.md} +16 -86
- package/content/.claude/{commands/morph-setup.md → skills/workflows/phase-setup.md} +9 -17
- package/content/.claude/skills/workflows/phase-tasks.md +164 -0
- package/content/.claude/{commands/morph-uiux.md → skills/workflows/phase-uiux.md} +15 -88
- package/content/.morph/.morphversion +5 -5
- package/content/.morph/archive/.gitkeep +25 -25
- package/content/.morph/config/agents.json +378 -242
- package/content/.morph/config/config.template.json +89 -108
- package/content/.morph/docs/STORY-DRIVEN-DEVELOPMENT.md +392 -392
- package/content/.morph/docs/workflows/design-impl.md +37 -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/api-nextjs/README.md +241 -241
- package/content/.morph/examples/api-nextjs/contracts.ts +307 -307
- package/content/.morph/examples/api-nextjs/spec.md +399 -399
- package/content/.morph/examples/api-nextjs/tasks.md +168 -168
- package/content/.morph/examples/micro-saas/README.md +125 -125
- package/content/.morph/examples/micro-saas/contracts.cs +358 -358
- package/content/.morph/examples/micro-saas/decisions.md +246 -246
- package/content/.morph/examples/micro-saas/spec.md +236 -236
- package/content/.morph/examples/micro-saas/tasks.md +150 -150
- package/content/.morph/examples/multi-agent/README.md +309 -309
- package/content/.morph/examples/multi-agent/contracts.cs +433 -433
- package/content/.morph/examples/multi-agent/spec.md +479 -479
- package/content/.morph/examples/multi-agent/tasks.md +185 -185
- 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/examples/state-v3.json +188 -0
- package/content/.morph/features/.gitkeep +25 -25
- package/content/.morph/hooks/README.md +190 -239
- package/content/.morph/hooks/pre-commit-agents.sh +24 -24
- package/content/.morph/hooks/pre-commit-all.sh +48 -48
- package/content/.morph/hooks/pre-commit-specs.sh +49 -49
- package/content/.morph/hooks/pre-commit-tests.sh +60 -60
- package/content/.morph/project.md +160 -160
- package/content/.morph/schemas/agent.schema.json +296 -296
- package/content/.morph/schemas/tasks.schema.json +220 -0
- package/content/.morph/specs/.gitkeep +20 -20
- 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/architecture.md +325 -325
- package/content/.morph/standards/azure.md +605 -379
- package/content/.morph/standards/coding.md +377 -377
- package/content/.morph/standards/dotnet10-migration.md +520 -494
- package/content/.morph/standards/fluent-ui-setup.md +590 -590
- package/content/.morph/standards/migration-guide.md +514 -514
- package/content/.morph/standards/passkeys-auth.md +423 -423
- package/content/.morph/standards/vector-search-rag.md +536 -536
- package/content/.morph/state.json +17 -17
- package/content/.morph/templates/FluentDesignTheme.cs +149 -149
- package/content/.morph/templates/MudTheme.cs +281 -281
- package/content/.morph/templates/agent.cs +163 -172
- package/content/.morph/templates/clarify-questions.md +159 -0
- package/content/.morph/templates/component.razor +239 -239
- 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/contracts.cs +217 -217
- package/content/.morph/templates/decisions.md +123 -106
- package/content/.morph/templates/design-system.css +226 -226
- package/content/.morph/templates/infra/.dockerignore.example +89 -89
- package/content/.morph/templates/infra/Dockerfile.example +82 -82
- package/content/.morph/templates/infra/README.md +286 -286
- package/content/.morph/templates/infra/app-insights.bicep +63 -63
- package/content/.morph/templates/infra/app-service.bicep +164 -164
- package/content/.morph/templates/infra/container-app-env.bicep +49 -49
- package/content/.morph/templates/infra/container-app.bicep +156 -156
- package/content/.morph/templates/infra/deploy-checklist.md +426 -0
- package/content/.morph/templates/infra/deploy.ps1 +229 -229
- package/content/.morph/templates/infra/deploy.sh +208 -208
- package/content/.morph/templates/infra/key-vault.bicep +91 -91
- package/content/.morph/templates/infra/main.bicep +189 -189
- package/content/.morph/templates/infra/parameters.dev.json +29 -29
- package/content/.morph/templates/infra/parameters.prod.json +29 -29
- package/content/.morph/templates/infra/parameters.staging.json +29 -29
- package/content/.morph/templates/infra/sql-database.bicep +103 -103
- package/content/.morph/templates/infra/storage.bicep +106 -106
- package/content/.morph/templates/integrations/asaas-client.cs +387 -387
- package/content/.morph/templates/integrations/asaas-webhook.cs +351 -351
- package/content/.morph/templates/integrations/azure-identity-config.cs +288 -288
- package/content/.morph/templates/integrations/clerk-config.cs +258 -258
- package/content/.morph/templates/job.cs +171 -171
- package/content/.morph/templates/migration.cs +83 -83
- package/content/.morph/templates/proposal.md +141 -155
- package/content/.morph/templates/recap.md +94 -105
- package/content/.morph/templates/repository.cs +141 -141
- package/content/.morph/templates/saas/subscription.cs +347 -347
- package/content/.morph/templates/saas/tenant.cs +338 -338
- package/content/.morph/templates/service.cs +139 -139
- package/content/.morph/templates/simulation.md +353 -0
- package/content/.morph/templates/spec.md +149 -148
- package/content/.morph/templates/sprint-status.yaml +68 -68
- package/content/.morph/templates/state.template.json +222 -222
- package/content/.morph/templates/story.md +143 -143
- package/content/.morph/templates/tasks.md +257 -235
- package/content/.morph/templates/test.cs +239 -239
- package/content/.morph/templates/ui-components.md +362 -276
- package/content/.morph/templates/ui-design-system.md +286 -286
- package/content/.morph/templates/ui-flows.md +336 -336
- package/content/.morph/templates/ui-mockups.md +133 -133
- package/content/.morph/test-infra/example.bicep +59 -59
- package/content/CLAUDE.md +150 -442
- package/content/README.md +79 -79
- package/detectors/config-detector.js +223 -223
- package/detectors/conversation-analyzer.js +163 -163
- package/detectors/index.js +84 -84
- package/detectors/standards-generator.js +275 -275
- package/detectors/structure-detector.js +245 -250
- package/docs/README.md +144 -149
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +977 -977
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1048 -1048
- package/docs/api/scripts/collapse.js +38 -38
- package/docs/api/scripts/commonNav.js +28 -28
- package/docs/api/scripts/linenumber.js +25 -25
- package/docs/api/scripts/nav.js +12 -12
- package/docs/api/scripts/polyfill.js +3 -3
- package/docs/api/scripts/prettify/Apache-License-2.0.txt +202 -202
- package/docs/api/scripts/prettify/lang-css.js +2 -2
- package/docs/api/scripts/prettify/prettify.js +28 -28
- package/docs/api/scripts/search.js +98 -98
- package/docs/api/styles/jsdoc.css +776 -776
- package/docs/api/styles/prettify.css +80 -80
- package/docs/examples.md +328 -328
- package/docs/getting-started.md +301 -302
- package/docs/installation.md +361 -361
- package/docs/templates.md +418 -418
- package/docs/validation-checklist.md +265 -266
- package/package.json +80 -80
- package/scripts/postinstall.js +132 -132
- package/src/commands/advance-phase.js +183 -0
- package/src/commands/analyze-blazor-concurrency.js +193 -0
- package/src/commands/create-story.js +351 -351
- package/src/commands/detect-agents.js +139 -0
- package/src/commands/detect.js +104 -104
- package/src/commands/doctor.js +356 -280
- package/src/commands/generate.js +149 -149
- 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/shard-spec.js +224 -224
- package/src/commands/sprint-status.js +250 -250
- package/src/commands/state.js +333 -333
- package/src/commands/sync.js +167 -167
- package/src/commands/task.js +78 -0
- 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/continuous-validator.js +421 -0
- package/src/lib/css-validator.js +352 -0
- package/src/lib/decision-constraint-loader.js +109 -0
- package/src/lib/design-system-generator.js +298 -298
- package/src/lib/learning-system.js +520 -0
- package/src/lib/mockup-generator.js +366 -0
- package/src/lib/recap-generator.js +205 -0
- package/src/lib/state-manager.js +397 -340
- package/src/lib/troubleshoot-grep.js +194 -0
- package/src/lib/troubleshoot-index.js +144 -0
- package/src/lib/ui-detector.js +350 -0
- package/src/lib/validation-runner.js +231 -0
- package/src/lib/validators/architecture-validator.js +387 -0
- package/src/lib/validators/contract-compliance-validator.js +273 -0
- package/src/lib/validators/package-validator.js +360 -0
- package/src/lib/validators/ui-contrast-validator.js +422 -0
- package/src/utils/file-copier.js +179 -139
- package/src/utils/logger.js +32 -32
- package/src/utils/version-checker.js +175 -175
- package/content/.claude/commands/morph-costs.md +0 -206
- package/content/.claude/commands/morph-tasks.md +0 -319
- package/content/.claude/skills/specialists/cost-guardian.md +0 -110
- 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
|
@@ -1,197 +1,197 @@
|
|
|
1
|
-
# PO/PM Advisor
|
|
2
|
-
|
|
3
|
-
Especialista em requisitos, priorização e gestão de produto para clarificar features e ROI.
|
|
4
|
-
|
|
5
|
-
## Responsabilidades
|
|
6
|
-
|
|
7
|
-
1. **Clarificar requisitos** ambíguos ou incompletos
|
|
8
|
-
2. **Priorizar features** por valor de negócio
|
|
9
|
-
3. **Calcular ROI** e esforço estimado
|
|
10
|
-
4. **Definir critérios** de aceitação
|
|
11
|
-
|
|
12
|
-
## Triggers
|
|
13
|
-
|
|
14
|
-
Keywords: `unclear`, `requirements`, `priority`, `ROI`, `mvp`, `scope`, `acceptance criteria`, `user story`
|
|
15
|
-
|
|
16
|
-
## Framework de Clarificação
|
|
17
|
-
|
|
18
|
-
### Perguntas Essenciais
|
|
19
|
-
|
|
20
|
-
Quando receber uma feature request ambígua, faça estas perguntas:
|
|
21
|
-
|
|
22
|
-
1. **Quem?** - Qual o usuário/persona principal?
|
|
23
|
-
2. **O quê?** - O que exatamente deve acontecer?
|
|
24
|
-
3. **Por quê?** - Qual problema resolve? Qual o valor?
|
|
25
|
-
4. **Quando?** - Urgência? Deadline externo?
|
|
26
|
-
5. **Como medir?** - Como saberemos que funcionou?
|
|
27
|
-
|
|
28
|
-
### Template de User Story
|
|
29
|
-
|
|
30
|
-
```markdown
|
|
31
|
-
## User Story: {Nome da Feature}
|
|
32
|
-
|
|
33
|
-
**Como** {persona/usuário},
|
|
34
|
-
**Eu quero** {ação/funcionalidade},
|
|
35
|
-
**Para que** {benefício/valor}.
|
|
36
|
-
|
|
37
|
-
### Critérios de Aceitação
|
|
38
|
-
|
|
39
|
-
**Dado** {contexto inicial},
|
|
40
|
-
**Quando** {ação do usuário},
|
|
41
|
-
**Então** {resultado esperado}.
|
|
42
|
-
|
|
43
|
-
### Fora do Escopo
|
|
44
|
-
|
|
45
|
-
- {Item explicitamente excluído}
|
|
46
|
-
|
|
47
|
-
### Perguntas Pendentes
|
|
48
|
-
|
|
49
|
-
- [ ] {Dúvida não resolvida}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Matriz de Priorização (RICE)
|
|
53
|
-
|
|
54
|
-
| Fator | Descrição | Escala |
|
|
55
|
-
|-------|-----------|--------|
|
|
56
|
-
| **R**each | Quantos usuários impacta | 1-10 |
|
|
57
|
-
| **I**mpact | Quanto impacta cada usuário | 0.25, 0.5, 1, 2, 3 |
|
|
58
|
-
| **C**onfidence | Confiança nas estimativas | 0-100% |
|
|
59
|
-
| **E**ffort | Pessoa-semanas de trabalho | 1+ |
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
RICE Score = (Reach × Impact × Confidence) / Effort
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Exemplo
|
|
66
|
-
|
|
67
|
-
| Feature | Reach | Impact | Confidence | Effort | Score |
|
|
68
|
-
|---------|-------|--------|------------|--------|-------|
|
|
69
|
-
| Login social | 8 | 1 | 80% | 1 | 6.4 |
|
|
70
|
-
| Dashboard | 5 | 2 | 90% | 3 | 3.0 |
|
|
71
|
-
| Export PDF | 3 | 0.5 | 100% | 0.5 | 3.0 |
|
|
72
|
-
| Dark mode | 4 | 0.25 | 100% | 1 | 1.0 |
|
|
73
|
-
|
|
74
|
-
## MVP vs Nice-to-Have
|
|
75
|
-
|
|
76
|
-
### Critérios para MVP
|
|
77
|
-
|
|
78
|
-
1. **Resolve o problema core** do usuário
|
|
79
|
-
2. **Diferencia** da concorrência
|
|
80
|
-
3. **Validável** em 2-4 semanas
|
|
81
|
-
4. **Mensurável** (métricas definidas)
|
|
82
|
-
|
|
83
|
-
### Framework MoSCoW
|
|
84
|
-
|
|
85
|
-
| Categoria | Significado | Exemplo |
|
|
86
|
-
|-----------|-------------|---------|
|
|
87
|
-
| **M**ust have | Essencial, sem isso não funciona | Login, CRUD básico |
|
|
88
|
-
| **S**hould have | Importante, mas não crítico | Filtros avançados |
|
|
89
|
-
| **C**ould have | Desejável se houver tempo | Exportar relatório |
|
|
90
|
-
| **W**on't have | Fora deste release | Integração X |
|
|
91
|
-
|
|
92
|
-
## Estimativa de Esforço
|
|
93
|
-
|
|
94
|
-
### T-Shirt Sizing
|
|
95
|
-
|
|
96
|
-
| Size | Dias | Complexidade |
|
|
97
|
-
|------|------|--------------|
|
|
98
|
-
| XS | 0.5 | Task trivial |
|
|
99
|
-
| S | 1-2 | Feature simples |
|
|
100
|
-
| M | 3-5 | Feature com complexidade |
|
|
101
|
-
| L | 5-10 | Feature complexa |
|
|
102
|
-
| XL | 10+ | Épico, precisa quebrar |
|
|
103
|
-
|
|
104
|
-
### Fatores de Risco
|
|
105
|
-
|
|
106
|
-
Multiplicar estimativa por:
|
|
107
|
-
|
|
108
|
-
| Fator | Multiplicador |
|
|
109
|
-
|-------|---------------|
|
|
110
|
-
| Tecnologia nova | 1.5x |
|
|
111
|
-
| Integração externa | 1.3x |
|
|
112
|
-
| Requisitos vagos | 1.5x |
|
|
113
|
-
| Primeiro da equipe | 1.3x |
|
|
114
|
-
|
|
115
|
-
## Template de ADR (Architecture Decision Record)
|
|
116
|
-
|
|
117
|
-
```markdown
|
|
118
|
-
# ADR-{XXX}: {Título da Decisão}
|
|
119
|
-
|
|
120
|
-
## Status
|
|
121
|
-
{PROPOSED | ACCEPTED | DEPRECATED | SUPERSEDED}
|
|
122
|
-
|
|
123
|
-
## Contexto
|
|
124
|
-
{Situação que requer decisão}
|
|
125
|
-
|
|
126
|
-
## Opções Consideradas
|
|
127
|
-
|
|
128
|
-
### Opção 1: {Nome}
|
|
129
|
-
- Prós: ...
|
|
130
|
-
- Contras: ...
|
|
131
|
-
- Custo: ...
|
|
132
|
-
|
|
133
|
-
### Opção 2: {Nome}
|
|
134
|
-
- Prós: ...
|
|
135
|
-
- Contras: ...
|
|
136
|
-
- Custo: ...
|
|
137
|
-
|
|
138
|
-
## Decisão
|
|
139
|
-
{Opção escolhida e por quê}
|
|
140
|
-
|
|
141
|
-
## Consequências
|
|
142
|
-
- {Implicação positiva}
|
|
143
|
-
- {Implicação negativa}
|
|
144
|
-
- {Trade-off aceito}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Cálculo de ROI
|
|
148
|
-
|
|
149
|
-
```markdown
|
|
150
|
-
## ROI Estimado: {Feature}
|
|
151
|
-
|
|
152
|
-
### Benefícios (anual)
|
|
153
|
-
- Aumento de conversão: R$ X
|
|
154
|
-
- Redução de suporte: R$ Y
|
|
155
|
-
- Economia de tempo: R$ Z
|
|
156
|
-
- **Total Benefícios**: R$ (X+Y+Z)
|
|
157
|
-
|
|
158
|
-
### Custos
|
|
159
|
-
- Desenvolvimento: R$ A (horas × rate)
|
|
160
|
-
- Infraestrutura: R$ B/mês × 12
|
|
161
|
-
- Manutenção: R$ C/ano
|
|
162
|
-
- **Total Custos**: R$ (A+B+C)
|
|
163
|
-
|
|
164
|
-
### ROI
|
|
165
|
-
**ROI = (Benefícios - Custos) / Custos × 100**
|
|
166
|
-
|
|
167
|
-
ROI = (X+Y+Z - A+B+C) / (A+B+C) × 100 = **{N}%**
|
|
168
|
-
|
|
169
|
-
### Payback
|
|
170
|
-
**Meses = Custo Inicial / (Benefício Mensal - Custo Mensal)**
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Red Flags em Requisitos
|
|
174
|
-
|
|
175
|
-
Alertar quando detectar:
|
|
176
|
-
|
|
177
|
-
- "Deve ser igual ao [concorrente X]" sem especificar
|
|
178
|
-
- "Simples" ou "rápido" sem estimativa
|
|
179
|
-
- "Usuários querem..." sem evidência
|
|
180
|
-
- Escopo crescente sem priorização
|
|
181
|
-
- Deadline impossível sem trade-offs
|
|
182
|
-
|
|
183
|
-
## Checklist de Requisitos
|
|
184
|
-
|
|
185
|
-
- [ ] Persona/usuário definido
|
|
186
|
-
- [ ] Problema claramente articulado
|
|
187
|
-
- [ ] Valor de negócio quantificado
|
|
188
|
-
- [ ] Critérios de aceitação escritos
|
|
189
|
-
- [ ] Fora do escopo explícito
|
|
190
|
-
- [ ] Dependências mapeadas
|
|
191
|
-
- [ ] Riscos identificados
|
|
192
|
-
- [ ] Estimativa de esforço
|
|
193
|
-
- [ ] Prioridade definida (RICE/MoSCoW)
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
1
|
+
# PO/PM Advisor
|
|
2
|
+
|
|
3
|
+
Especialista em requisitos, priorização e gestão de produto para clarificar features e ROI.
|
|
4
|
+
|
|
5
|
+
## Responsabilidades
|
|
6
|
+
|
|
7
|
+
1. **Clarificar requisitos** ambíguos ou incompletos
|
|
8
|
+
2. **Priorizar features** por valor de negócio
|
|
9
|
+
3. **Calcular ROI** e esforço estimado
|
|
10
|
+
4. **Definir critérios** de aceitação
|
|
11
|
+
|
|
12
|
+
## Triggers
|
|
13
|
+
|
|
14
|
+
Keywords: `unclear`, `requirements`, `priority`, `ROI`, `mvp`, `scope`, `acceptance criteria`, `user story`
|
|
15
|
+
|
|
16
|
+
## Framework de Clarificação
|
|
17
|
+
|
|
18
|
+
### Perguntas Essenciais
|
|
19
|
+
|
|
20
|
+
Quando receber uma feature request ambígua, faça estas perguntas:
|
|
21
|
+
|
|
22
|
+
1. **Quem?** - Qual o usuário/persona principal?
|
|
23
|
+
2. **O quê?** - O que exatamente deve acontecer?
|
|
24
|
+
3. **Por quê?** - Qual problema resolve? Qual o valor?
|
|
25
|
+
4. **Quando?** - Urgência? Deadline externo?
|
|
26
|
+
5. **Como medir?** - Como saberemos que funcionou?
|
|
27
|
+
|
|
28
|
+
### Template de User Story
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
## User Story: {Nome da Feature}
|
|
32
|
+
|
|
33
|
+
**Como** {persona/usuário},
|
|
34
|
+
**Eu quero** {ação/funcionalidade},
|
|
35
|
+
**Para que** {benefício/valor}.
|
|
36
|
+
|
|
37
|
+
### Critérios de Aceitação
|
|
38
|
+
|
|
39
|
+
**Dado** {contexto inicial},
|
|
40
|
+
**Quando** {ação do usuário},
|
|
41
|
+
**Então** {resultado esperado}.
|
|
42
|
+
|
|
43
|
+
### Fora do Escopo
|
|
44
|
+
|
|
45
|
+
- {Item explicitamente excluído}
|
|
46
|
+
|
|
47
|
+
### Perguntas Pendentes
|
|
48
|
+
|
|
49
|
+
- [ ] {Dúvida não resolvida}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Matriz de Priorização (RICE)
|
|
53
|
+
|
|
54
|
+
| Fator | Descrição | Escala |
|
|
55
|
+
|-------|-----------|--------|
|
|
56
|
+
| **R**each | Quantos usuários impacta | 1-10 |
|
|
57
|
+
| **I**mpact | Quanto impacta cada usuário | 0.25, 0.5, 1, 2, 3 |
|
|
58
|
+
| **C**onfidence | Confiança nas estimativas | 0-100% |
|
|
59
|
+
| **E**ffort | Pessoa-semanas de trabalho | 1+ |
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
RICE Score = (Reach × Impact × Confidence) / Effort
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Exemplo
|
|
66
|
+
|
|
67
|
+
| Feature | Reach | Impact | Confidence | Effort | Score |
|
|
68
|
+
|---------|-------|--------|------------|--------|-------|
|
|
69
|
+
| Login social | 8 | 1 | 80% | 1 | 6.4 |
|
|
70
|
+
| Dashboard | 5 | 2 | 90% | 3 | 3.0 |
|
|
71
|
+
| Export PDF | 3 | 0.5 | 100% | 0.5 | 3.0 |
|
|
72
|
+
| Dark mode | 4 | 0.25 | 100% | 1 | 1.0 |
|
|
73
|
+
|
|
74
|
+
## MVP vs Nice-to-Have
|
|
75
|
+
|
|
76
|
+
### Critérios para MVP
|
|
77
|
+
|
|
78
|
+
1. **Resolve o problema core** do usuário
|
|
79
|
+
2. **Diferencia** da concorrência
|
|
80
|
+
3. **Validável** em 2-4 semanas
|
|
81
|
+
4. **Mensurável** (métricas definidas)
|
|
82
|
+
|
|
83
|
+
### Framework MoSCoW
|
|
84
|
+
|
|
85
|
+
| Categoria | Significado | Exemplo |
|
|
86
|
+
|-----------|-------------|---------|
|
|
87
|
+
| **M**ust have | Essencial, sem isso não funciona | Login, CRUD básico |
|
|
88
|
+
| **S**hould have | Importante, mas não crítico | Filtros avançados |
|
|
89
|
+
| **C**ould have | Desejável se houver tempo | Exportar relatório |
|
|
90
|
+
| **W**on't have | Fora deste release | Integração X |
|
|
91
|
+
|
|
92
|
+
## Estimativa de Esforço
|
|
93
|
+
|
|
94
|
+
### T-Shirt Sizing
|
|
95
|
+
|
|
96
|
+
| Size | Dias | Complexidade |
|
|
97
|
+
|------|------|--------------|
|
|
98
|
+
| XS | 0.5 | Task trivial |
|
|
99
|
+
| S | 1-2 | Feature simples |
|
|
100
|
+
| M | 3-5 | Feature com complexidade |
|
|
101
|
+
| L | 5-10 | Feature complexa |
|
|
102
|
+
| XL | 10+ | Épico, precisa quebrar |
|
|
103
|
+
|
|
104
|
+
### Fatores de Risco
|
|
105
|
+
|
|
106
|
+
Multiplicar estimativa por:
|
|
107
|
+
|
|
108
|
+
| Fator | Multiplicador |
|
|
109
|
+
|-------|---------------|
|
|
110
|
+
| Tecnologia nova | 1.5x |
|
|
111
|
+
| Integração externa | 1.3x |
|
|
112
|
+
| Requisitos vagos | 1.5x |
|
|
113
|
+
| Primeiro da equipe | 1.3x |
|
|
114
|
+
|
|
115
|
+
## Template de ADR (Architecture Decision Record)
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
# ADR-{XXX}: {Título da Decisão}
|
|
119
|
+
|
|
120
|
+
## Status
|
|
121
|
+
{PROPOSED | ACCEPTED | DEPRECATED | SUPERSEDED}
|
|
122
|
+
|
|
123
|
+
## Contexto
|
|
124
|
+
{Situação que requer decisão}
|
|
125
|
+
|
|
126
|
+
## Opções Consideradas
|
|
127
|
+
|
|
128
|
+
### Opção 1: {Nome}
|
|
129
|
+
- Prós: ...
|
|
130
|
+
- Contras: ...
|
|
131
|
+
- Custo: ...
|
|
132
|
+
|
|
133
|
+
### Opção 2: {Nome}
|
|
134
|
+
- Prós: ...
|
|
135
|
+
- Contras: ...
|
|
136
|
+
- Custo: ...
|
|
137
|
+
|
|
138
|
+
## Decisão
|
|
139
|
+
{Opção escolhida e por quê}
|
|
140
|
+
|
|
141
|
+
## Consequências
|
|
142
|
+
- {Implicação positiva}
|
|
143
|
+
- {Implicação negativa}
|
|
144
|
+
- {Trade-off aceito}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Cálculo de ROI
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
## ROI Estimado: {Feature}
|
|
151
|
+
|
|
152
|
+
### Benefícios (anual)
|
|
153
|
+
- Aumento de conversão: R$ X
|
|
154
|
+
- Redução de suporte: R$ Y
|
|
155
|
+
- Economia de tempo: R$ Z
|
|
156
|
+
- **Total Benefícios**: R$ (X+Y+Z)
|
|
157
|
+
|
|
158
|
+
### Custos
|
|
159
|
+
- Desenvolvimento: R$ A (horas × rate)
|
|
160
|
+
- Infraestrutura: R$ B/mês × 12
|
|
161
|
+
- Manutenção: R$ C/ano
|
|
162
|
+
- **Total Custos**: R$ (A+B+C)
|
|
163
|
+
|
|
164
|
+
### ROI
|
|
165
|
+
**ROI = (Benefícios - Custos) / Custos × 100**
|
|
166
|
+
|
|
167
|
+
ROI = (X+Y+Z - A+B+C) / (A+B+C) × 100 = **{N}%**
|
|
168
|
+
|
|
169
|
+
### Payback
|
|
170
|
+
**Meses = Custo Inicial / (Benefício Mensal - Custo Mensal)**
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Red Flags em Requisitos
|
|
174
|
+
|
|
175
|
+
Alertar quando detectar:
|
|
176
|
+
|
|
177
|
+
- "Deve ser igual ao [concorrente X]" sem especificar
|
|
178
|
+
- "Simples" ou "rápido" sem estimativa
|
|
179
|
+
- "Usuários querem..." sem evidência
|
|
180
|
+
- Escopo crescente sem priorização
|
|
181
|
+
- Deadline impossível sem trade-offs
|
|
182
|
+
|
|
183
|
+
## Checklist de Requisitos
|
|
184
|
+
|
|
185
|
+
- [ ] Persona/usuário definido
|
|
186
|
+
- [ ] Problema claramente articulado
|
|
187
|
+
- [ ] Valor de negócio quantificado
|
|
188
|
+
- [ ] Critérios de aceitação escritos
|
|
189
|
+
- [ ] Fora do escopo explícito
|
|
190
|
+
- [ ] Dependências mapeadas
|
|
191
|
+
- [ ] Riscos identificados
|
|
192
|
+
- [ ] Estimativa de esforço
|
|
193
|
+
- [ ] Prioridade definida (RICE/MoSCoW)
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,78 +1,156 @@
|
|
|
1
|
-
# Standards Architect
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
##
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
1
|
+
# Standards Architect
|
|
2
|
+
|
|
3
|
+
> **Layer:** 0 | **Load:** always | **Scope:** All .NET projects (Core Agent)
|
|
4
|
+
|
|
5
|
+
Guardiao dos padroes de codigo, nomenclatura e arquitetura. Valida aderencia aos standards antes de aprovar merges.
|
|
6
|
+
|
|
7
|
+
> **Ref:** `framework/standards/coding.md` for complete C# naming conventions and .editorconfig template.
|
|
8
|
+
> **Ref:** `framework/standards/architecture.md` for Clean Architecture layers, SOLID, service patterns.
|
|
9
|
+
|
|
10
|
+
## Responsabilidades
|
|
11
|
+
|
|
12
|
+
1. **Garantir aderencia aos padroes** definidos em `framework/standards/` e `.morph/project/standards/`
|
|
13
|
+
2. **Validar nomenclatura** contra `coding.md` (PascalCase, _camelCase, etc.)
|
|
14
|
+
3. **Revisar codigo** antes de aprovar merges
|
|
15
|
+
4. **Definir convencoes** de projeto
|
|
16
|
+
5. **Orquestrar validacao:** Standards Architect (naming) -> Code Analyzer (architecture) -> Code Review (runtime patterns)
|
|
17
|
+
|
|
18
|
+
## Triggers
|
|
19
|
+
|
|
20
|
+
Ativado automaticamente em todo projeto MORPH-SPEC (Core Agent).
|
|
21
|
+
|
|
22
|
+
Keywords: `standards`, `naming`, `convention`, `pattern`, `review`, `quality`, `editorconfig`, `style`
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Naming Quick Reference
|
|
27
|
+
|
|
28
|
+
> Full reference: `framework/standards/coding.md`
|
|
29
|
+
|
|
30
|
+
| Element | Convention | Example |
|
|
31
|
+
|---------|-----------|---------|
|
|
32
|
+
| Classes, Methods, Properties | PascalCase | `OrderService`, `GetOrderAsync` |
|
|
33
|
+
| Interfaces | `I` + PascalCase | `IOrderService` |
|
|
34
|
+
| Constants | PascalCase | `DefaultPageSize`, `MaxRetryCount` |
|
|
35
|
+
| Private fields | `_camelCase` | `_repository`, `_logger` |
|
|
36
|
+
| Parameters, locals | camelCase | `orderId`, `orderTotal` |
|
|
37
|
+
| Enums | PascalCase | `OrderStatus.PendingPayment` |
|
|
38
|
+
| Async methods | PascalCase + `Async` | `ProcessPaymentAsync` |
|
|
39
|
+
|
|
40
|
+
**CRITICAL:** Constants use PascalCase, NOT UPPER_SNAKE_CASE. This follows Microsoft .NET guidelines.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Instant-Fail Rules (Severity: Error)
|
|
45
|
+
|
|
46
|
+
These rules MUST be satisfied. Code that violates them cannot be merged.
|
|
47
|
+
|
|
48
|
+
| # | Rule | Signal | Ref |
|
|
49
|
+
|---|------|--------|-----|
|
|
50
|
+
| 1 | **Constants in ALL_CAPS** | `MAX_RETRY_COUNT` instead of `MaxRetryCount` | coding.md |
|
|
51
|
+
| 2 | **Hungarian notation** | `strName`, `iCount`, `btnSubmit` | coding.md |
|
|
52
|
+
| 3 | **Missing CancellationToken** | Async method without `ct` parameter | coding.md |
|
|
53
|
+
| 4 | **`.Result` or `.Wait()`** | Synchronous blocking on async (deadlock) | coding.md |
|
|
54
|
+
| 5 | **Scoped DbContext in background** | Direct `DbContext` in Task.Run/Hangfire | blazor-efcore.md |
|
|
55
|
+
| 6 | **Empty catch block** | `catch { }` or `catch (Exception) { }` | coding.md |
|
|
56
|
+
| 7 | **Domain referencing Infrastructure** | `using MyApp.Infrastructure` in Domain project | architecture.md |
|
|
57
|
+
| 8 | **Hardcoded secrets** | Connection strings, API keys in code | architecture.md |
|
|
58
|
+
| 9 | **Missing `sealed`** | Non-abstract class without `sealed` | coding.md |
|
|
59
|
+
| 10 | **Generic `Exception` throw** | `throw new Exception("...")` | coding.md |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Warning Rules (Severity: Warning)
|
|
64
|
+
|
|
65
|
+
| # | Rule | Signal |
|
|
66
|
+
|---|------|--------|
|
|
67
|
+
| 1 | Method > 30 lines | Needs extraction |
|
|
68
|
+
| 2 | Class > 300 lines | SRP violation, split |
|
|
69
|
+
| 3 | > 4 constructor parameters | Consider grouping or splitting |
|
|
70
|
+
| 4 | Missing structured logging | Service method without `ILogger` usage |
|
|
71
|
+
| 5 | `string.Format` or `$""` in log | Use message templates |
|
|
72
|
+
| 6 | Abbreviations in names | `repo`, `ctx`, `mgr` (use full words) |
|
|
73
|
+
| 7 | Missing `null` check | Parameter not validated at boundary |
|
|
74
|
+
| 8 | Unused `using` | Dead imports |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Enforcement
|
|
79
|
+
|
|
80
|
+
### .editorconfig
|
|
81
|
+
|
|
82
|
+
Every project MUST have an `.editorconfig` in the root. Template in `coding.md`.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Validate naming rules at build time
|
|
86
|
+
dotnet build /warnaserror:IDE1006
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Validation Workflow
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
1. Standards Architect → Naming, style, conventions (coding.md)
|
|
93
|
+
2. Code Analyzer → Architecture, clean code, duplication (architecture.md)
|
|
94
|
+
3. Code Review Checklist → Runtime patterns: async, DI, logging (code-review.md)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
This pipeline runs:
|
|
98
|
+
- **Automatically** at FASE 5 completion and at every checkpoint (every 3 tasks)
|
|
99
|
+
- **Manually** when requested via `review`, `analyze`, `check standards`
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Estrutura de Projeto
|
|
104
|
+
|
|
105
|
+
> Full reference: `framework/standards/architecture.md`
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
src/
|
|
109
|
+
├── {Project}.Domain/ # Entidades, Value Objects, Enums
|
|
110
|
+
├── {Project}.Application/ # Services, DTOs, Interfaces
|
|
111
|
+
├── {Project}.Infrastructure/ # EF Core, External Services
|
|
112
|
+
├── {Project}.Web/ # Blazor, API Controllers
|
|
113
|
+
└── tests/ # Unit, Integration tests
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Padroes Blazor
|
|
119
|
+
|
|
120
|
+
```razor
|
|
121
|
+
@* Componentes: PascalCase.razor *@
|
|
122
|
+
@* Parameters: [Parameter] obrigatorio *@
|
|
123
|
+
@* EventCallbacks: On{Event}Async *@
|
|
124
|
+
|
|
125
|
+
<OrderList Orders="@_orders" OnSelectAsync="HandleSelectAsync" />
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Documentacao de Referencia
|
|
131
|
+
|
|
132
|
+
- `framework/standards/coding.md` — C# naming, style, .editorconfig
|
|
133
|
+
- `framework/standards/architecture.md` — Clean Architecture, SOLID, DI
|
|
134
|
+
- `framework/standards/blazor-efcore.md` — DbContext, Repository Factory
|
|
135
|
+
- `framework/standards/blazor-pitfalls.md` — Common Blazor issues
|
|
136
|
+
- [Microsoft C# Coding Conventions](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions)
|
|
137
|
+
- [.NET Naming Guidelines](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/naming-guidelines)
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Checklist de Revisao
|
|
142
|
+
|
|
143
|
+
- [ ] Nomenclatura segue `coding.md` (PascalCase constants, _camelCase fields)
|
|
144
|
+
- [ ] `.editorconfig` presente no projeto
|
|
145
|
+
- [ ] Async/await com CancellationToken
|
|
146
|
+
- [ ] Nullable reference types habilitado
|
|
147
|
+
- [ ] DI registrado corretamente (lifetimes corretos)
|
|
148
|
+
- [ ] Logs estruturados com `ILogger<T>` (message templates)
|
|
149
|
+
- [ ] Exceptions tratadas adequadamente (Result pattern para business)
|
|
150
|
+
- [ ] Classes `sealed` por padrao
|
|
151
|
+
- [ ] Codigo sem warnings (IDE1006 enforced)
|
|
152
|
+
- [ ] Arquitetura segue `architecture.md` (layers, SOLID)
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
*MORPH-SPEC by Polymorphism Tech*
|