@polymorphism-tech/morph-spec 4.3.4 → 4.3.5

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 (164) hide show
  1. package/.morph/.morphversion +5 -0
  2. package/.morph/config/agents.json +948 -0
  3. package/.morph/config/config.json +9 -9
  4. package/.morph/project/context/README.md +17 -0
  5. package/.morph/project/context/detection-log.md +16 -0
  6. package/.morph/project/standards/inferred.md +59 -0
  7. package/.morph/standards/ai-agents/blazor-ui.md +364 -0
  8. package/.morph/standards/ai-agents/production.md +415 -0
  9. package/.morph/standards/ai-agents/setup.md +418 -0
  10. package/.morph/standards/ai-agents/team-orchestration.md +479 -0
  11. package/.morph/standards/ai-agents/workflows.md +354 -0
  12. package/.morph/standards/architecture/ddd/aggregates.md +120 -0
  13. package/.morph/standards/architecture/ddd/entities.md +99 -0
  14. package/.morph/standards/architecture/ddd/value-objects.md +124 -0
  15. package/.morph/standards/backend/api/minimal-api.md +494 -0
  16. package/.morph/standards/backend/api/rest.md +492 -0
  17. package/.morph/standards/backend/api/validation.md +88 -0
  18. package/.morph/standards/backend/authentication/passkeys.md +428 -0
  19. package/.morph/standards/backend/database/ef-core.md +199 -0
  20. package/.morph/standards/backend/database/migrations.md +393 -0
  21. package/.morph/standards/backend/database/postgresql/database.md +352 -0
  22. package/.morph/standards/backend/database/repository-patterns.md +528 -0
  23. package/.morph/standards/backend/database/vector-search-rag.md +541 -0
  24. package/.morph/standards/backend/dotnet/async.md +366 -0
  25. package/.morph/standards/backend/dotnet/core.md +117 -0
  26. package/.morph/standards/backend/dotnet/di.md +439 -0
  27. package/.morph/standards/backend/dotnet/program-cs-checklist.md +92 -0
  28. package/.morph/standards/backend/integrations/asaas/asaas-api.md +216 -0
  29. package/.morph/standards/backend/integrations/clerk/clerk-auth.md +290 -0
  30. package/.morph/standards/backend/integrations/hangfire/hangfire-jobs.md +350 -0
  31. package/.morph/standards/backend/integrations/resend/resend-email.md +385 -0
  32. package/.morph/standards/context/analytics.md +96 -0
  33. package/.morph/standards/context/bundles.md +110 -0
  34. package/.morph/standards/context/priming.md +78 -0
  35. package/.morph/standards/core/architecture.md +185 -0
  36. package/.morph/standards/core/coding.md +214 -0
  37. package/.morph/standards/core/git-branching-strategy.md +403 -0
  38. package/.morph/standards/core/git.md +185 -0
  39. package/.morph/standards/core/testing.md +295 -0
  40. package/.morph/standards/data/nosql/blob-storage.md +102 -0
  41. package/.morph/standards/data/nosql/cache/redis.md +97 -0
  42. package/.morph/standards/data/nosql/cosmos-db.md +118 -0
  43. package/.morph/standards/data/vector-search/azure-ai-search.md +121 -0
  44. package/.morph/standards/data/vector-search/rag-chunking.md +104 -0
  45. package/.morph/standards/frontend/blazor/design-checklist.md +222 -0
  46. package/.morph/standards/frontend/blazor/fluent-ui-setup.md +595 -0
  47. package/.morph/standards/frontend/blazor/fluent-ui.md +137 -0
  48. package/.morph/standards/frontend/blazor/html-conversion.md +184 -0
  49. package/.morph/standards/frontend/blazor/lifecycle.md +195 -0
  50. package/.morph/standards/frontend/blazor/pitfalls.md +198 -0
  51. package/.morph/standards/frontend/blazor/state.md +191 -0
  52. package/.morph/standards/frontend/design-system/animations.md +151 -0
  53. package/.morph/standards/frontend/design-system/naming.md +64 -0
  54. package/.morph/standards/frontend/nextjs/nextjs-patterns.md +198 -0
  55. package/.morph/standards/infrastructure/azure/azure.md +624 -0
  56. package/.morph/standards/infrastructure/azure/bicep/bicep-patterns.md +422 -0
  57. package/.morph/standards/infrastructure/azure/devops/azure-devops-setup.md +516 -0
  58. package/.morph/standards/infrastructure/azure/devops/local-development.md +520 -0
  59. package/.morph/standards/infrastructure/azure/services/functions.md +486 -0
  60. package/.morph/standards/infrastructure/azure/services/service-bus.md +459 -0
  61. package/.morph/standards/infrastructure/azure/services/storage.md +407 -0
  62. package/.morph/standards/infrastructure/docker/easypanel-deploy.md +196 -0
  63. package/.morph/standards/infrastructure/supabase/mcp-setup.md +252 -0
  64. package/.morph/standards/infrastructure/supabase/supabase-auth.md +176 -0
  65. package/.morph/standards/infrastructure/supabase/supabase-pgvector.md +169 -0
  66. package/.morph/standards/infrastructure/supabase/supabase-rls.md +184 -0
  67. package/.morph/standards/infrastructure/supabase/supabase-storage.md +153 -0
  68. package/.morph/standards/integration/api/graphql.md +91 -0
  69. package/.morph/standards/integration/api/grpc.md +114 -0
  70. package/.morph/standards/integration/api/rest-design.md +95 -0
  71. package/.morph/standards/integration/event-driven/cqrs.md +101 -0
  72. package/.morph/standards/integration/event-driven/event-sourcing.md +124 -0
  73. package/.morph/standards/integration/event-driven/service-bus.md +95 -0
  74. package/.morph/standards/observability/logging.md +131 -0
  75. package/.morph/standards/observability/metrics.md +121 -0
  76. package/.morph/standards/observability/monitoring.md +114 -0
  77. package/.morph/standards/observability/tracing.md +132 -0
  78. package/.morph/standards/workflows/parallel-execution.md +112 -0
  79. package/.morph/standards/workflows/thread-management.md +113 -0
  80. package/.morph/templates/.idea/morph-templates.xml +92 -0
  81. package/.morph/templates/.vscode/morph-templates.code-snippets +186 -0
  82. package/.morph/templates/IDE-SNIPPETS.md +266 -0
  83. package/.morph/templates/README.md +814 -0
  84. package/.morph/templates/REGISTRY.json +1677 -0
  85. package/.morph/templates/code/dotnet/backend/repository.cs +141 -0
  86. package/.morph/templates/code/dotnet/backend/service.cs +139 -0
  87. package/.morph/templates/code/dotnet/contracts/Commands.cs +74 -0
  88. package/.morph/templates/code/dotnet/contracts/Entities.cs +25 -0
  89. package/.morph/templates/code/dotnet/contracts/Queries.cs +74 -0
  90. package/.morph/templates/code/dotnet/contracts/README.md +74 -0
  91. package/.morph/templates/code/dotnet/contracts/api-contracts.cs +173 -0
  92. package/.morph/templates/code/dotnet/contracts/contracts.cs +217 -0
  93. package/.morph/templates/code/dotnet/database/migration.cs +83 -0
  94. package/.morph/templates/code/dotnet/frontend/component.razor +239 -0
  95. package/.morph/templates/code/dotnet/jobs/agent.cs +163 -0
  96. package/.morph/templates/code/dotnet/jobs/job.cs +171 -0
  97. package/.morph/templates/code/dotnet/test.cs +239 -0
  98. package/.morph/templates/code/sql/rls-policy.sql +57 -0
  99. package/.morph/templates/code/sql/supabase-migration.sql +100 -0
  100. package/.morph/templates/code/sql/supabase-migration.template.sql +113 -0
  101. package/.morph/templates/code/typescript/contracts.ts +168 -0
  102. package/.morph/templates/context/CONTEXT-FEATURE.md +276 -0
  103. package/.morph/templates/context/CONTEXT.md +181 -0
  104. package/.morph/templates/docs/proposal.md +182 -0
  105. package/.morph/templates/docs/spec.md +149 -0
  106. package/.morph/templates/examples/design-system-examples.md +357 -0
  107. package/.morph/templates/examples/spec-examples.md +90 -0
  108. package/.morph/templates/feature/decisions.md +187 -0
  109. package/.morph/templates/feature/recap.md +146 -0
  110. package/.morph/templates/feature/tasks.md +199 -0
  111. package/.morph/templates/infrastructure/azure/Dockerfile.example +82 -0
  112. package/.morph/templates/infrastructure/azure/README.md +286 -0
  113. package/.morph/templates/infrastructure/azure/app-insights.bicep +63 -0
  114. package/.morph/templates/infrastructure/azure/app-service.bicep +164 -0
  115. package/.morph/templates/infrastructure/azure/container-app-env.bicep +49 -0
  116. package/.morph/templates/infrastructure/azure/container-app.bicep +156 -0
  117. package/.morph/templates/infrastructure/azure/deploy-checklist.md +426 -0
  118. package/.morph/templates/infrastructure/azure/deploy.ps1 +229 -0
  119. package/.morph/templates/infrastructure/azure/deploy.sh +208 -0
  120. package/.morph/templates/infrastructure/azure/key-vault.bicep +91 -0
  121. package/.morph/templates/infrastructure/azure/main.bicep +189 -0
  122. package/.morph/templates/infrastructure/azure/parameters.dev.json +29 -0
  123. package/.morph/templates/infrastructure/azure/parameters.prod.json +29 -0
  124. package/.morph/templates/infrastructure/azure/parameters.staging.json +29 -0
  125. package/.morph/templates/infrastructure/azure/sql-database.bicep +103 -0
  126. package/.morph/templates/infrastructure/azure/storage.bicep +106 -0
  127. package/.morph/templates/infrastructure/docker/Dockerfile.template +58 -0
  128. package/.morph/templates/infrastructure/docker/docker-compose.template.yml +67 -0
  129. package/.morph/templates/infrastructure/docker/dockerfile-api.dockerfile +38 -0
  130. package/.morph/templates/infrastructure/docker/dockerfile-web.dockerfile +48 -0
  131. package/.morph/templates/infrastructure/docker/easypanel.template.json +54 -0
  132. package/.morph/templates/infrastructure/github/README.md +593 -0
  133. package/.morph/templates/infrastructure/github/actions/azure-auth/action.yml.hbs +22 -0
  134. package/.morph/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +45 -0
  135. package/.morph/templates/infrastructure/github/actions/health-check/action.yml.hbs +27 -0
  136. package/.morph/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +61 -0
  137. package/.morph/templates/infrastructure/github/workflows/deploy-easypanel.yml.hbs +31 -0
  138. package/.morph/templates/infrastructure/github/workflows/docker-build-push.yml.hbs +59 -0
  139. package/.morph/templates/infrastructure/github/workflows/dotnet-build.yml.hbs +39 -0
  140. package/.morph/templates/integrations/asaas-client.cs +387 -0
  141. package/.morph/templates/integrations/asaas-webhook.cs +351 -0
  142. package/.morph/templates/integrations/azure-identity-config.cs +288 -0
  143. package/.morph/templates/integrations/clerk-config.cs +258 -0
  144. package/.morph/templates/meta-prompts/fusion/fusion-agent.md +76 -0
  145. package/.morph/templates/meta-prompts/fusion/fusion-aggregator.md +100 -0
  146. package/.morph/templates/meta-prompts/hops/hop-retry.md +78 -0
  147. package/.morph/templates/meta-prompts/hops/hop-validation.md +97 -0
  148. package/.morph/templates/meta-prompts/hops/hop-wrapper.md +36 -0
  149. package/.morph/templates/meta-prompts/parallel-workers/parallel-coordinator.md +113 -0
  150. package/.morph/templates/meta-prompts/parallel-workers/parallel-worker.md +80 -0
  151. package/.morph/templates/meta-prompts/squad-leaders/backend-squad.md +90 -0
  152. package/.morph/templates/meta-prompts/squad-leaders/frontend-squad.md +126 -0
  153. package/.morph/templates/meta-prompts/squad-leaders/squad-leader.md +43 -0
  154. package/.morph/templates/meta-prompts/validators/checkpoint-validator.md +107 -0
  155. package/.morph/templates/meta-prompts/validators/pre-commit-validator.md +95 -0
  156. package/.morph/templates/saas/subscription.cs +347 -0
  157. package/.morph/templates/saas/tenant.cs +338 -0
  158. package/.morph/templates/state.template.json +17 -0
  159. package/.morph/templates/ui/FluentDesignTheme.cs +149 -0
  160. package/.morph/templates/ui/MudTheme.cs +281 -0
  161. package/.morph/templates/ui/design-system.css +226 -0
  162. package/bin/morph-spec.js +1 -1
  163. package/package.json +1 -1
  164. package/src/commands/project/update.js +100 -13
@@ -0,0 +1,149 @@
1
+ # Feature Specification: {{titleCase FEATURE_NAME}}
2
+
3
+ | Field | Value |
4
+ |-------|-------|
5
+ | **ID** | {{FEATURE_NAME}} |
6
+ | **Status** | Draft / In Review / Approved / In Progress / Done |
7
+ | **Created** | {{DATE}} |
8
+ | **Stack** | {{STACK}} |
9
+ | **Complexity** | Low / Medium / High |
10
+ | **Estimated Cost** | $X/month |
11
+ | **Agents** | Core: All / Specialists: {list} |
12
+
13
+ ---
14
+
15
+ ## Overview
16
+
17
+ **Problem:** {What problem this feature solves}
18
+
19
+ **Solution:** {High-level solution}
20
+
21
+ **Success Criteria:**
22
+ - [ ] {Criterion 1}
23
+ - [ ] {Criterion 2}
24
+
25
+ ---
26
+
27
+ ## Requirements
28
+
29
+ **Functional:** FR1: {desc} | FR2: {desc} | FR3: {desc}
30
+
31
+ **Non-Functional:** NFR1: Performance - {target} | NFR2: Reliability - {target}
32
+
33
+ ---
34
+
35
+ ## User Stories
36
+
37
+ ### US001: {Title}
38
+ **As** {user type} **I want** {feature} **so that** {benefit}
39
+
40
+ **Acceptance Criteria:** 1. {criterion} 2. {criterion}
41
+
42
+ **Edge Cases:** {edge case}: {handling}
43
+
44
+ ---
45
+
46
+ ## Technical Design
47
+
48
+ ### Stack
49
+ | Component | Technology |
50
+ |-----------|------------|
51
+ | Frontend | {Blazor Server / Next.js} |
52
+ | Backend | .NET 10 / C# 14 |
53
+ | Database | {Azure SQL / Cosmos DB} |
54
+
55
+ ### Data Model
56
+
57
+ #### {EntityName}
58
+ | Column | Type | Constraints |
59
+ |--------|------|-------------|
60
+ | Id | Guid | PK |
61
+ | {Property} | {Type} | {Constraints} |
62
+ | CreatedAt | datetime2 | Default: GETUTCDATE() |
63
+
64
+ ### Contracts
65
+
66
+ > **Ref:** `framework/standards/blazor-efcore.md` for background operations
67
+
68
+ ```csharp
69
+ public interface I{{pascalCase FEATURE_NAME}}Service
70
+ {
71
+ Task<{{pascalCase FEATURE_NAME}}Dto> GetByIdAsync(int id);
72
+ Task<{{pascalCase FEATURE_NAME}}Dto> CreateAsync(Create{{pascalCase FEATURE_NAME}}Request request);
73
+ }
74
+ ```
75
+
76
+ **Contracts Workflow:** Generate `contracts.cs` FIRST → validate names → reference in spec → approve with user.
77
+
78
+ **Validation Checklist:**
79
+ - [ ] Property names are descriptive (not generic "Data", "Value")
80
+ - [ ] Records use correct types (Stream vs byte[], Guid vs string)
81
+ - [ ] Response DTOs have all properties needed for UI
82
+ - [ ] Request DTOs have implicit validations (required, nullable)
83
+
84
+ ---
85
+
86
+ ## UI/UX Design (if front-end)
87
+
88
+ ### Wireframes
89
+ ```
90
+ {ASCII wireframe per screen - include states: loading, error, empty}
91
+ ```
92
+
93
+ ### User Flow
94
+ 1. {Step} → {System response}
95
+
96
+ ---
97
+
98
+ ## Flows
99
+
100
+ ### {Flow Name}
101
+ **Trigger:** {what starts this flow}
102
+ 1. {Actor} {action} → {system response}
103
+ 2. If {condition}: Path A / Else: Path B
104
+ **End State:** {final state}
105
+
106
+ ---
107
+
108
+ ## Cost Estimate
109
+
110
+ | Resource | SKU | Monthly Cost | Justification |
111
+ |----------|-----|--------------|---------------|
112
+ | {Resource} | {SKU} | ${X} | {Why} |
113
+ | **Total** | | **${X}/month** | |
114
+
115
+ ---
116
+
117
+ ## ADRs (Architectural Decision Records)
118
+
119
+ ### ADR-001: {Decision Title}
120
+ **Status:** Proposed / Accepted
121
+ **Context:** {Why decide now}
122
+ **Decision:** {What we chose}
123
+ **Alternatives:** 1. {Alt} (pros/cons) 2. {Alt} (pros/cons)
124
+ **Trade-offs:** {key trade-offs}
125
+
126
+ ---
127
+
128
+ ## Security
129
+
130
+ | Action | Required Policy |
131
+ |--------|-----------------|
132
+ | View | CanView{Feature} |
133
+ | Create | CanManage{Feature} |
134
+
135
+ ## Risks
136
+
137
+ | Risk | Impact | Mitigation |
138
+ |------|--------|------------|
139
+ | {Risk} | {H/M/L} | {Mitigation} |
140
+
141
+ ## Out of Scope
142
+ - {Item}
143
+
144
+ ## Definition of Done
145
+ - [ ] Code implemented
146
+ - [ ] Tests >80% coverage
147
+ - [ ] Code review approved
148
+ - [ ] Deploy to staging
149
+ - [ ] Recap.md generated
@@ -0,0 +1,357 @@
1
+ # Design System CSS Index Template
2
+
3
+ > Template de indice estruturado para arquivos CSS grandes.
4
+ > Copie este header para o inicio do seu `design-system.css`.
5
+
6
+ ## Indice Padrao
7
+
8
+ ```css
9
+ /* ===========================================================================
10
+ {PROJECT_NAME} Design System
11
+ ===========================================================================
12
+
13
+ Indice de Secoes
14
+ ================
15
+
16
+ 1-99: Tokens e Variaveis CSS
17
+ 100-199: Reset e Base Styles
18
+ 200-299: Tipografia
19
+ 300-399: Layout e Containers
20
+ 400-499: Componentes Base (buttons, inputs, cards)
21
+ 500-599: Componentes Compostos (forms, tables, lists)
22
+ 600-699: Navegacao (header, sidebar, footer, menus)
23
+ 700-799: Paginas Especificas
24
+ 800-849: Modais e Overlays
25
+ 850-899: Animacoes e Keyframes
26
+ 900-949: Responsivo e Media Queries
27
+ 950-979: Utilities e Helpers
28
+ 980-989: Overrides de Fluent UI / MudBlazor
29
+ 990-999: Hotfixes e Temporarios
30
+
31
+ Convencoes de Nomenclatura
32
+ ==========================
33
+
34
+ Prefixo por Pagina:
35
+ - .home-* : Pagina inicial
36
+ - .checkout-* : Pagina de checkout
37
+ - .dashboard-* : Pagina de dashboard
38
+ - .auth-* : Paginas de autenticacao
39
+
40
+ Prefixo por Componente:
41
+ - .btn-* : Botoes
42
+ - .card-* : Cards
43
+ - .modal-* : Modais
44
+ - .form-* : Formularios
45
+ - .nav-* : Navegacao
46
+
47
+ Sufixos de Estado:
48
+ - *--active : Estado ativo
49
+ - *--disabled : Estado desabilitado
50
+ - *--loading : Estado de loading
51
+ - *--error : Estado de erro
52
+
53
+ Validacao:
54
+ morph-spec validate-css src/MyApp.Web
55
+
56
+ =========================================================================== */
57
+
58
+
59
+ /* ===========================================================================
60
+ SECAO 1-99: TOKENS E VARIAVEIS CSS
61
+ =========================================================================== */
62
+
63
+ :root {
64
+ /* Cores Primarias */
65
+ --primary: #3b82f6;
66
+ --primary-hover: #2563eb;
67
+ --primary-active: #1d4ed8;
68
+
69
+ /* Cores Secundarias */
70
+ --secondary: #6b7280;
71
+ --secondary-hover: #4b5563;
72
+
73
+ /* Cores Semanticas */
74
+ --success: #10b981;
75
+ --warning: #f59e0b;
76
+ --error: #ef4444;
77
+ --info: #06b6d4;
78
+
79
+ /* Neutros */
80
+ --neutral-50: #f9fafb;
81
+ --neutral-100: #f3f4f6;
82
+ --neutral-200: #e5e7eb;
83
+ --neutral-300: #d1d5db;
84
+ --neutral-400: #9ca3af;
85
+ --neutral-500: #6b7280;
86
+ --neutral-600: #4b5563;
87
+ --neutral-700: #374151;
88
+ --neutral-800: #1f2937;
89
+ --neutral-900: #111827;
90
+
91
+ /* Tipografia */
92
+ --font-family: 'Inter', system-ui, -apple-system, sans-serif;
93
+ --font-family-mono: 'JetBrains Mono', monospace;
94
+
95
+ --font-size-xs: 0.75rem; /* 12px */
96
+ --font-size-sm: 0.875rem; /* 14px */
97
+ --font-size-base: 1rem; /* 16px */
98
+ --font-size-lg: 1.125rem; /* 18px */
99
+ --font-size-xl: 1.25rem; /* 20px */
100
+ --font-size-2xl: 1.5rem; /* 24px */
101
+ --font-size-3xl: 1.875rem; /* 30px */
102
+ --font-size-4xl: 2.25rem; /* 36px */
103
+
104
+ /* Espacamento (base 4px) */
105
+ --space-1: 0.25rem; /* 4px */
106
+ --space-2: 0.5rem; /* 8px */
107
+ --space-3: 0.75rem; /* 12px */
108
+ --space-4: 1rem; /* 16px */
109
+ --space-5: 1.25rem; /* 20px */
110
+ --space-6: 1.5rem; /* 24px */
111
+ --space-8: 2rem; /* 32px */
112
+ --space-10: 2.5rem; /* 40px */
113
+ --space-12: 3rem; /* 48px */
114
+
115
+ /* Border Radius */
116
+ --radius-sm: 0.25rem; /* 4px */
117
+ --radius-md: 0.5rem; /* 8px */
118
+ --radius-lg: 0.75rem; /* 12px */
119
+ --radius-xl: 1rem; /* 16px */
120
+ --radius-full: 9999px;
121
+
122
+ /* Sombras */
123
+ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
124
+ --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
125
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
126
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
127
+
128
+ /* Transicoes */
129
+ --transition-fast: 150ms ease;
130
+ --transition-normal: 300ms ease;
131
+ --transition-slow: 500ms ease;
132
+
133
+ /* Z-Index */
134
+ --z-dropdown: 1000;
135
+ --z-sticky: 1020;
136
+ --z-fixed: 1030;
137
+ --z-modal-backdrop: 1040;
138
+ --z-modal: 1050;
139
+ --z-popover: 1060;
140
+ --z-tooltip: 1070;
141
+ }
142
+
143
+
144
+ /* ===========================================================================
145
+ SECAO 100-199: RESET E BASE STYLES
146
+ =========================================================================== */
147
+
148
+ /* ... */
149
+
150
+
151
+ /* ===========================================================================
152
+ SECAO 200-299: TIPOGRAFIA
153
+ =========================================================================== */
154
+
155
+ /* ... */
156
+
157
+
158
+ /* ===========================================================================
159
+ SECAO 300-399: LAYOUT E CONTAINERS
160
+ =========================================================================== */
161
+
162
+ .page-layout {
163
+ min-height: 100vh;
164
+ display: flex;
165
+ flex-direction: column;
166
+ }
167
+
168
+ .page-content {
169
+ flex: 1;
170
+ padding: var(--space-6);
171
+ }
172
+
173
+ .container {
174
+ width: 100%;
175
+ max-width: 1280px;
176
+ margin: 0 auto;
177
+ padding: 0 var(--space-4);
178
+ }
179
+
180
+
181
+ /* ===========================================================================
182
+ SECAO 400-499: COMPONENTES BASE
183
+ =========================================================================== */
184
+
185
+ /* Botoes */
186
+ .btn-primary { /* ... */ }
187
+ .btn-secondary { /* ... */ }
188
+
189
+ /* Cards */
190
+ .card { /* ... */ }
191
+ .card-premium { /* ... */ }
192
+
193
+ /* Inputs */
194
+ .input { /* ... */ }
195
+
196
+
197
+ /* ===========================================================================
198
+ SECAO 500-599: COMPONENTES COMPOSTOS
199
+ =========================================================================== */
200
+
201
+ /* Forms */
202
+ .form-group { /* ... */ }
203
+ .form-label { /* ... */ }
204
+
205
+ /* Tables */
206
+ .data-table { /* ... */ }
207
+
208
+
209
+ /* ===========================================================================
210
+ SECAO 600-699: NAVEGACAO
211
+ =========================================================================== */
212
+
213
+ .page-header-nav { /* ... */ }
214
+ .page-footer { /* ... */ }
215
+ .sidebar { /* ... */ }
216
+
217
+
218
+ /* ===========================================================================
219
+ SECAO 700-799: PAGINAS ESPECIFICAS
220
+ =========================================================================== */
221
+
222
+ /* Home */
223
+ .home-hero { /* ... */ }
224
+ .home-features { /* ... */ }
225
+
226
+ /* Checkout */
227
+ .checkout-form { /* ... */ }
228
+ .checkout-summary { /* ... */ }
229
+
230
+
231
+ /* ===========================================================================
232
+ SECAO 800-849: MODAIS E OVERLAYS
233
+ =========================================================================== */
234
+
235
+ .modal-overlay {
236
+ position: fixed;
237
+ inset: 0;
238
+ background: rgba(0, 0, 0, 0.5);
239
+ backdrop-filter: blur(4px);
240
+ z-index: var(--z-modal-backdrop);
241
+ }
242
+
243
+ .modal-container {
244
+ position: fixed;
245
+ top: 50%;
246
+ left: 50%;
247
+ transform: translate(-50%, -50%);
248
+ z-index: var(--z-modal);
249
+ }
250
+
251
+
252
+ /* ===========================================================================
253
+ SECAO 850-899: ANIMACOES E KEYFRAMES
254
+ =========================================================================== */
255
+
256
+ @keyframes slideInUp {
257
+ from {
258
+ opacity: 0;
259
+ transform: translateY(20px);
260
+ }
261
+ to {
262
+ opacity: 1;
263
+ transform: translateY(0);
264
+ }
265
+ }
266
+
267
+ @keyframes scaleIn {
268
+ from {
269
+ opacity: 0;
270
+ transform: scale(0.95);
271
+ }
272
+ to {
273
+ opacity: 1;
274
+ transform: scale(1);
275
+ }
276
+ }
277
+
278
+ .animate-slideInUp {
279
+ animation: slideInUp var(--transition-normal) forwards;
280
+ }
281
+
282
+ .animate-scaleIn {
283
+ animation: scaleIn var(--transition-fast) forwards;
284
+ }
285
+
286
+ /* Stagger delays para animacoes em sequencia */
287
+ .stagger-1 { animation-delay: 0.1s; }
288
+ .stagger-2 { animation-delay: 0.2s; }
289
+ .stagger-3 { animation-delay: 0.3s; }
290
+ .stagger-4 { animation-delay: 0.4s; }
291
+ .stagger-5 { animation-delay: 0.5s; }
292
+
293
+
294
+ /* ===========================================================================
295
+ SECAO 900-949: RESPONSIVO E MEDIA QUERIES
296
+ =========================================================================== */
297
+
298
+ @media (max-width: 768px) {
299
+ /* Tablet e Mobile */
300
+ }
301
+
302
+ @media (max-width: 480px) {
303
+ /* Mobile */
304
+ }
305
+
306
+
307
+ /* ===========================================================================
308
+ SECAO 950-979: UTILITIES E HELPERS
309
+ =========================================================================== */
310
+
311
+ .sr-only {
312
+ position: absolute;
313
+ width: 1px;
314
+ height: 1px;
315
+ padding: 0;
316
+ margin: -1px;
317
+ overflow: hidden;
318
+ clip: rect(0, 0, 0, 0);
319
+ white-space: nowrap;
320
+ border: 0;
321
+ }
322
+
323
+
324
+ /* ===========================================================================
325
+ SECAO 980-989: OVERRIDES DE FLUENT UI / MUDBLAZOR
326
+ =========================================================================== */
327
+
328
+ /* Fluent UI overrides */
329
+ .fluent-card {
330
+ /* Customizacoes */
331
+ }
332
+
333
+
334
+ /* ===========================================================================
335
+ SECAO 990-999: HOTFIXES E TEMPORARIOS
336
+ =========================================================================== */
337
+
338
+ /* TODO: Remover apos fix no componente X */
339
+ ```
340
+
341
+ ## Uso
342
+
343
+ 1. Copie o header para o inicio do seu `design-system.css`
344
+ 2. Substitua `{PROJECT_NAME}` pelo nome do seu projeto
345
+ 3. Adicione suas classes CSS nas secoes apropriadas
346
+ 4. Mantenha o indice atualizado conforme adiciona novas secoes
347
+
348
+ ## Beneficios
349
+
350
+ - **Navegacao rapida:** Use Ctrl+G (go to line) para pular para secoes
351
+ - **Organizacao clara:** Cada tipo de componente em sua secao
352
+ - **Facil manutencao:** Encontre onde adicionar novos estilos
353
+ - **Evita conflitos:** Prefixos por pagina previnem colisoes
354
+
355
+ ---
356
+
357
+ *Template MORPH-SPEC v2.2.0 by Polymorphism Tech*
@@ -0,0 +1,90 @@
1
+ # Spec Template Reference
2
+
3
+ > **Layer:** 3 | **Load:** on-demand | **Keywords:** spec, specification, template
4
+
5
+ **Use the stack's `.morph/templates/spec.md` as the canonical template.**
6
+
7
+ This file contains extended examples for each spec section.
8
+
9
+ ---
10
+
11
+ ## Example: Entity (Pseudo-code)
12
+
13
+ ```csharp
14
+ class ProcessingJob {
15
+ Guid Id
16
+ string OriginalPhotoUrl // Azure Blob URL, max 500 chars
17
+ string? ProcessedPhotoUrl // Nullable, populated after processing
18
+ ProcessingStatus Status // Enum: Pending, Processing, Completed, Failed
19
+ DateTime CreatedAt
20
+ ICollection<ExecutionLog> Logs // 1:N relationship
21
+ }
22
+
23
+ enum ProcessingStatus {
24
+ Pending = 0, Processing = 1, Completed = 2, // Normal flow
25
+ Failed = 100 // Error states (high values)
26
+ }
27
+ ```
28
+
29
+ ## Example: Command (Pseudo-code)
30
+
31
+ ```csharp
32
+ UploadPhotoCommand {
33
+ Input: IFormFile photo, string? email
34
+ Output: Guid jobId
35
+
36
+ Handler:
37
+ 1. Validate file (size <= 10MB, type in [.jpg, .png])
38
+ 2. Upload to Azure Blob Storage
39
+ 3. Create ProcessingJob entity (status = Pending)
40
+ 4. Enqueue Hangfire background job
41
+ 5. Return jobId
42
+ }
43
+ ```
44
+
45
+ ## Example: API Endpoints
46
+
47
+ ```csharp
48
+ PhotoProcessingController {
49
+ POST /api/upload → multipart/form-data → { jobId: Guid }
50
+ GET /api/status/{id} → jobId → { status, progress, createdAt }
51
+ GET /api/download/{id} → jobId → Redirect to Blob URL or 404
52
+ }
53
+ ```
54
+
55
+ ## Example: Flow
56
+
57
+ ```
58
+ Upload Flow (Actor: User)
59
+ 1. User selects photo → System validates (size, type) → If invalid: show error
60
+ 2. User sees preview → clicks "Upload"
61
+ 3. System creates ProcessingJob → uploads to Blob → enqueues Hangfire job → returns jobId
62
+ 4. System navigates to /processing/{jobId} → polls every 5s
63
+ End State: User on progress page, job processing in background
64
+ ```
65
+
66
+ ## Example: ADR
67
+
68
+ ### ADR-001: Use Hangfire for Background Jobs
69
+ **Status:** Accepted
70
+ **Context:** Need background processing for AI photo transformation (30-120s).
71
+ **Decision:** Hangfire (self-hosted).
72
+ **Alternatives:**
73
+ 1. Azure Functions — serverless, auto-scaling, but cold start + $10/mo for 50k jobs
74
+ 2. Hangfire — zero cost, simpler, but scales with app
75
+ 3. Quartz.NET — more features, but steeper learning curve
76
+ **Trade-offs:** Simplicity vs Features (Hangfire sufficient for MVP)
77
+
78
+ ## Example: Cost Estimate
79
+
80
+ | Resource | SKU | Monthly | Justification |
81
+ |----------|-----|---------|---------------|
82
+ | Blob Storage | LRS | $0.02 | Store photos, low redundancy OK |
83
+ | Azure SQL | Basic | $4.99 | < 100k jobs/month |
84
+ | Container App | Consumption | $0.49 | Scale to zero |
85
+ | Hangfire | Self-hosted | $0.00 | In-process |
86
+ | **Total** | | **~$5.50** | |
87
+
88
+ ---
89
+
90
+ *MORPH-SPEC by Polymorphism Tech*