@polymorphism-tech/morph-spec 11.2.0 → 11.3.1

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 (109) hide show
  1. package/README.md +3 -2
  2. package/bin/morph-spec.js +7 -7
  3. package/docs/CHEATSHEET.md +1 -1
  4. package/docs/QUICKSTART.md +1 -1
  5. package/framework/CLAUDE.md +1 -1
  6. package/framework/MORPH.md +2 -2
  7. package/framework/agents.json +4 -4
  8. package/framework/docs/CLI.md +19 -11
  9. package/framework/evals/review-checklist.md +26 -2
  10. package/framework/hooks/README.md +3 -2
  11. package/framework/hooks/claude-code/core/graph-refresh-kick.js +2 -2
  12. package/framework/mcp/registry.json +15 -15
  13. package/framework/rules/ai-agents-standards.md +9 -1
  14. package/framework/rules/gsap-standards.md +8 -0
  15. package/framework/rules/mcp-standards.md +10 -0
  16. package/framework/schemas/config.schema.json +7 -0
  17. package/framework/skills/core/create-umbraco-lp/SKILL.md +1 -1
  18. package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +1 -1
  19. package/framework/skills/core/morph-apply/SKILL.md +4 -3
  20. package/framework/skills/core/morph-plan/SKILL.md +1 -1
  21. package/framework/skills/core/morph-uiux/SKILL.md +1 -1
  22. package/framework/standards/STANDARDS.json +8 -4
  23. package/framework/standards/STANDARDS.meta.json +1 -1
  24. package/framework/standards/ai-agents/agent-archetypes.md +1 -1
  25. package/framework/standards/ai-agents/middleware-patterns.md +0 -2
  26. package/framework/standards/ai-agents/prompt-sources.md +2 -2
  27. package/framework/standards/ai-agents/providers/model-registry.md +9 -12
  28. package/framework/standards/ai-agents/rag-custom-pgvector.md +2 -9
  29. package/framework/standards/frontend/design-system/ai-image-generation.md +1 -1
  30. package/framework/standards/infrastructure/docker/local-compose-isolation.md +2 -2
  31. package/framework/standards/integration/mcp/mcp-tools.md +124 -266
  32. package/framework/templates/README.md +52 -82
  33. package/framework/templates/REGISTRY.json +0 -206
  34. package/framework/templates/code/sql/ai-agents/agent-prompts-migration.sql.template +3 -4
  35. package/framework/templates/context/design-system.md +1 -1
  36. package/framework/templates/docs/plan.md +1 -1
  37. package/framework/templates/dotnet/ai-kit/src/Morph.AiKit/Providers/model-registry.v2.json +1 -1
  38. package/framework/templates/dotnet/ai-kit/tests/Morph.AiKit.Tests/MediaDisclosureTests.cs +1 -1
  39. package/framework/templates/dotnet/ai-kit/tests/Morph.AiKit.Tests/Morph.AiKit.Tests.csproj +2 -4
  40. package/framework/templates/frontend/nextjs/gsap-scroll-section.tsx.hbs +13 -17
  41. package/framework/templates/infrastructure/github/README.md +10 -13
  42. package/package.json +9 -3
  43. package/src/commands/mcp/manual-setup.js +95 -0
  44. package/src/commands/mcp/mcp-setup.js +23 -191
  45. package/src/commands/project/doctor.js +6 -16
  46. package/src/commands/project/init-contract.js +2 -2
  47. package/src/commands/project/init.js +15 -133
  48. package/src/commands/project/stack-scan.js +6 -14
  49. package/src/commands/project/stack-set.js +1 -1
  50. package/src/commands/project/standards.js +1 -2
  51. package/src/commands/project/update.js +52 -66
  52. package/src/commands/scaffold/scaffold.js +28 -7
  53. package/src/lib/ai/ai-project-scan.js +1 -4
  54. package/src/lib/ai/code-audit.js +1 -6
  55. package/src/lib/ai/registry-audit.js +2 -1
  56. package/src/lib/config/project-config.js +3 -2
  57. package/src/lib/contract/apply.js +2 -1
  58. package/src/lib/contract/merge.js +1 -0
  59. package/src/lib/contract/scan.js +5 -5
  60. package/src/lib/detectors/claude-config-detector.js +45 -47
  61. package/src/lib/detectors/mcp-config.js +2 -1
  62. package/src/lib/diff/diff-lines.js +2 -7
  63. package/src/lib/graph/graph-loader.js +2 -1
  64. package/src/lib/graph/graphifyignore.js +2 -1
  65. package/src/lib/installers/install-manifest.js +56 -0
  66. package/src/lib/installers/mcp-installer.js +14 -5
  67. package/src/lib/installers/rules-installer.js +9 -15
  68. package/src/lib/installers/stack-assets.js +42 -21
  69. package/src/lib/installers/stack-sync.js +12 -12
  70. package/src/lib/installers/stack-tooling.js +4 -3
  71. package/src/lib/json-file.js +9 -0
  72. package/src/lib/plan/artifact-vocabulary.js +1 -1
  73. package/src/lib/plan/checks.js +3 -2
  74. package/src/lib/plan/media.js +3 -3
  75. package/src/lib/plan/plan-parser.js +5 -10
  76. package/src/lib/review-reports.js +5 -4
  77. package/src/lib/stack/stack-scan.js +1 -1
  78. package/src/lib/standards/verified-against.js +1 -1
  79. package/src/lib/tests-audit/audit.js +1 -1
  80. package/src/lib/text.js +5 -0
  81. package/src/scripts/setup-infra.js +22 -33
  82. package/src/utils/agents-installer.js +13 -30
  83. package/src/utils/claude-md-injector.js +16 -50
  84. package/src/utils/claude-settings-manager.js +2 -2
  85. package/src/utils/file-copier.js +3 -4
  86. package/src/utils/hooks-installer.js +55 -20
  87. package/src/utils/skills-installer.js +18 -78
  88. package/framework/templates/IDE-SNIPPETS.md +0 -262
  89. package/framework/templates/code/dotnet/ai-agents/AgentBootstrap.cs.template +0 -26
  90. package/framework/templates/code/dotnet/ai-agents/EmbeddingService.cs.template +0 -28
  91. package/framework/templates/code/dotnet/ai-agents/ModelRegistry.cs.template +0 -99
  92. package/framework/templates/code/dotnet/ai-agents/ResilientToolMiddleware.cs.template +0 -40
  93. package/framework/templates/code/dotnet/ai-agents/VectorSearchTool.cs.template +0 -54
  94. package/framework/templates/code/dotnet/ai-agents/model-registry.json.template +0 -53
  95. package/framework/templates/code/dotnet/contracts/README.md +0 -74
  96. package/framework/templates/code/dotnet/database/vector-entity.cs +0 -49
  97. package/framework/templates/code/sql/ai-agents/pgvector-embeddings-migration.sql.template +0 -91
  98. package/framework/templates/code/sql/postgresql-migration.template.sql +0 -108
  99. package/framework/templates/code/typescript/contracts.ts +0 -140
  100. package/framework/templates/examples/design-system-examples.md +0 -354
  101. package/framework/templates/infrastructure/docker/Dockerfile.template +0 -58
  102. package/framework/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +0 -45
  103. package/framework/templates/infrastructure/github/actions/health-check/action.yml.hbs +0 -27
  104. package/framework/templates/integrations/asaas-client.cs +0 -332
  105. package/framework/templates/integrations/asaas-webhook.cs +0 -290
  106. package/framework/templates/integrations/neon-auth-config.cs +0 -170
  107. package/framework/templates/ui/design-system.css +0 -226
  108. package/src/lib/detectors/index.js +0 -153
  109. package/src/lib/installers/templates-reconcile.js +0 -26
@@ -1,354 +0,0 @@
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: Component library overrides
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
- =========================================================================== */
54
-
55
-
56
- /* ===========================================================================
57
- SECAO 1-99: TOKENS E VARIAVEIS CSS
58
- =========================================================================== */
59
-
60
- :root {
61
- /* Cores Primarias */
62
- --primary: #3b82f6;
63
- --primary-hover: #2563eb;
64
- --primary-active: #1d4ed8;
65
-
66
- /* Cores Secundarias */
67
- --secondary: #6b7280;
68
- --secondary-hover: #4b5563;
69
-
70
- /* Cores Semanticas */
71
- --success: #10b981;
72
- --warning: #f59e0b;
73
- --error: #ef4444;
74
- --info: #06b6d4;
75
-
76
- /* Neutros */
77
- --neutral-50: #f9fafb;
78
- --neutral-100: #f3f4f6;
79
- --neutral-200: #e5e7eb;
80
- --neutral-300: #d1d5db;
81
- --neutral-400: #9ca3af;
82
- --neutral-500: #6b7280;
83
- --neutral-600: #4b5563;
84
- --neutral-700: #374151;
85
- --neutral-800: #1f2937;
86
- --neutral-900: #111827;
87
-
88
- /* Tipografia */
89
- --font-family: 'Inter', system-ui, -apple-system, sans-serif;
90
- --font-family-mono: 'JetBrains Mono', monospace;
91
-
92
- --font-size-xs: 0.75rem; /* 12px */
93
- --font-size-sm: 0.875rem; /* 14px */
94
- --font-size-base: 1rem; /* 16px */
95
- --font-size-lg: 1.125rem; /* 18px */
96
- --font-size-xl: 1.25rem; /* 20px */
97
- --font-size-2xl: 1.5rem; /* 24px */
98
- --font-size-3xl: 1.875rem; /* 30px */
99
- --font-size-4xl: 2.25rem; /* 36px */
100
-
101
- /* Espacamento (base 4px) */
102
- --space-1: 0.25rem; /* 4px */
103
- --space-2: 0.5rem; /* 8px */
104
- --space-3: 0.75rem; /* 12px */
105
- --space-4: 1rem; /* 16px */
106
- --space-5: 1.25rem; /* 20px */
107
- --space-6: 1.5rem; /* 24px */
108
- --space-8: 2rem; /* 32px */
109
- --space-10: 2.5rem; /* 40px */
110
- --space-12: 3rem; /* 48px */
111
-
112
- /* Border Radius */
113
- --radius-sm: 0.25rem; /* 4px */
114
- --radius-md: 0.5rem; /* 8px */
115
- --radius-lg: 0.75rem; /* 12px */
116
- --radius-xl: 1rem; /* 16px */
117
- --radius-full: 9999px;
118
-
119
- /* Sombras */
120
- --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
121
- --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
122
- --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
123
- --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
124
-
125
- /* Transicoes */
126
- --transition-fast: 150ms ease;
127
- --transition-normal: 300ms ease;
128
- --transition-slow: 500ms ease;
129
-
130
- /* Z-Index */
131
- --z-dropdown: 1000;
132
- --z-sticky: 1020;
133
- --z-fixed: 1030;
134
- --z-modal-backdrop: 1040;
135
- --z-modal: 1050;
136
- --z-popover: 1060;
137
- --z-tooltip: 1070;
138
- }
139
-
140
-
141
- /* ===========================================================================
142
- SECAO 100-199: RESET E BASE STYLES
143
- =========================================================================== */
144
-
145
- /* ... */
146
-
147
-
148
- /* ===========================================================================
149
- SECAO 200-299: TIPOGRAFIA
150
- =========================================================================== */
151
-
152
- /* ... */
153
-
154
-
155
- /* ===========================================================================
156
- SECAO 300-399: LAYOUT E CONTAINERS
157
- =========================================================================== */
158
-
159
- .page-layout {
160
- min-height: 100vh;
161
- display: flex;
162
- flex-direction: column;
163
- }
164
-
165
- .page-content {
166
- flex: 1;
167
- padding: var(--space-6);
168
- }
169
-
170
- .container {
171
- width: 100%;
172
- max-width: 1280px;
173
- margin: 0 auto;
174
- padding: 0 var(--space-4);
175
- }
176
-
177
-
178
- /* ===========================================================================
179
- SECAO 400-499: COMPONENTES BASE
180
- =========================================================================== */
181
-
182
- /* Botoes */
183
- .btn-primary { /* ... */ }
184
- .btn-secondary { /* ... */ }
185
-
186
- /* Cards */
187
- .card { /* ... */ }
188
- .card-premium { /* ... */ }
189
-
190
- /* Inputs */
191
- .input { /* ... */ }
192
-
193
-
194
- /* ===========================================================================
195
- SECAO 500-599: COMPONENTES COMPOSTOS
196
- =========================================================================== */
197
-
198
- /* Forms */
199
- .form-group { /* ... */ }
200
- .form-label { /* ... */ }
201
-
202
- /* Tables */
203
- .data-table { /* ... */ }
204
-
205
-
206
- /* ===========================================================================
207
- SECAO 600-699: NAVEGACAO
208
- =========================================================================== */
209
-
210
- .page-header-nav { /* ... */ }
211
- .page-footer { /* ... */ }
212
- .sidebar { /* ... */ }
213
-
214
-
215
- /* ===========================================================================
216
- SECAO 700-799: PAGINAS ESPECIFICAS
217
- =========================================================================== */
218
-
219
- /* Home */
220
- .home-hero { /* ... */ }
221
- .home-features { /* ... */ }
222
-
223
- /* Checkout */
224
- .checkout-form { /* ... */ }
225
- .checkout-summary { /* ... */ }
226
-
227
-
228
- /* ===========================================================================
229
- SECAO 800-849: MODAIS E OVERLAYS
230
- =========================================================================== */
231
-
232
- .modal-overlay {
233
- position: fixed;
234
- inset: 0;
235
- background: rgba(0, 0, 0, 0.5);
236
- backdrop-filter: blur(4px);
237
- z-index: var(--z-modal-backdrop);
238
- }
239
-
240
- .modal-container {
241
- position: fixed;
242
- top: 50%;
243
- left: 50%;
244
- transform: translate(-50%, -50%);
245
- z-index: var(--z-modal);
246
- }
247
-
248
-
249
- /* ===========================================================================
250
- SECAO 850-899: ANIMACOES E KEYFRAMES
251
- =========================================================================== */
252
-
253
- @keyframes slideInUp {
254
- from {
255
- opacity: 0;
256
- transform: translateY(20px);
257
- }
258
- to {
259
- opacity: 1;
260
- transform: translateY(0);
261
- }
262
- }
263
-
264
- @keyframes scaleIn {
265
- from {
266
- opacity: 0;
267
- transform: scale(0.95);
268
- }
269
- to {
270
- opacity: 1;
271
- transform: scale(1);
272
- }
273
- }
274
-
275
- .animate-slideInUp {
276
- animation: slideInUp var(--transition-normal) forwards;
277
- }
278
-
279
- .animate-scaleIn {
280
- animation: scaleIn var(--transition-fast) forwards;
281
- }
282
-
283
- /* Stagger delays para animacoes em sequencia */
284
- .stagger-1 { animation-delay: 0.1s; }
285
- .stagger-2 { animation-delay: 0.2s; }
286
- .stagger-3 { animation-delay: 0.3s; }
287
- .stagger-4 { animation-delay: 0.4s; }
288
- .stagger-5 { animation-delay: 0.5s; }
289
-
290
-
291
- /* ===========================================================================
292
- SECAO 900-949: RESPONSIVO E MEDIA QUERIES
293
- =========================================================================== */
294
-
295
- @media (max-width: 768px) {
296
- /* Tablet e Mobile */
297
- }
298
-
299
- @media (max-width: 480px) {
300
- /* Mobile */
301
- }
302
-
303
-
304
- /* ===========================================================================
305
- SECAO 950-979: UTILITIES E HELPERS
306
- =========================================================================== */
307
-
308
- .sr-only {
309
- position: absolute;
310
- width: 1px;
311
- height: 1px;
312
- padding: 0;
313
- margin: -1px;
314
- overflow: hidden;
315
- clip: rect(0, 0, 0, 0);
316
- white-space: nowrap;
317
- border: 0;
318
- }
319
-
320
-
321
- /* ===========================================================================
322
- SECAO 980-989: COMPONENT LIBRARY OVERRIDES
323
- =========================================================================== */
324
-
325
- /* shadcn/ui overrides */
326
- .shadcn-card {
327
- /* Customizacoes */
328
- }
329
-
330
-
331
- /* ===========================================================================
332
- SECAO 990-999: HOTFIXES E TEMPORARIOS
333
- =========================================================================== */
334
-
335
- /* TODO: Remover apos fix no componente X */
336
- ```
337
-
338
- ## Uso
339
-
340
- 1. Copie o header para o inicio do seu `design-system.css`
341
- 2. Substitua `{PROJECT_NAME}` pelo nome do seu projeto
342
- 3. Adicione suas classes CSS nas secoes apropriadas
343
- 4. Mantenha o indice atualizado conforme adiciona novas secoes
344
-
345
- ## Beneficios
346
-
347
- - **Navegacao rapida:** Use Ctrl+G (go to line) para pular para secoes
348
- - **Organizacao clara:** Cada tipo de componente em sua secao
349
- - **Facil manutencao:** Encontre onde adicionar novos estilos
350
- - **Evita conflitos:** Prefixos por pagina previnem colisoes
351
-
352
- ---
353
-
354
- *Template MORPH-SPEC by Polymorphism Tech*
@@ -1,58 +0,0 @@
1
- # Multi-stage Dockerfile for Next.js Production Build
2
- # Optimized for Next.js 15 with App Router
3
-
4
- FROM node:20-alpine AS base
5
-
6
- # Install dependencies only when needed
7
- FROM base AS deps
8
- RUN apk add --no-cache libc6-compat
9
- WORKDIR /app
10
-
11
- # Copy package files
12
- COPY package.json package-lock.json* ./
13
- RUN npm ci
14
-
15
- # Rebuild the source code only when needed
16
- FROM base AS builder
17
- WORKDIR /app
18
- COPY --from=deps /app/node_modules ./node_modules
19
- COPY . .
20
-
21
- # Set build-time environment variables
22
- ENV NEXT_TELEMETRY_DISABLED 1
23
-
24
- # Build Next.js application
25
- RUN npm run build
26
-
27
- # Production image, copy all the files and run next
28
- FROM base AS runner
29
- WORKDIR /app
30
-
31
- ENV NODE_ENV production
32
- ENV NEXT_TELEMETRY_DISABLED 1
33
-
34
- # Create nextjs user
35
- RUN addgroup --system --gid 1001 nodejs
36
- RUN adduser --system --uid 1001 nextjs
37
-
38
- # Copy built application
39
- COPY --from=builder /app/public ./public
40
-
41
- # Set the correct permission for prerender cache
42
- RUN mkdir .next
43
- RUN chown nextjs:nodejs .next
44
-
45
- # Automatically leverage output traces to reduce image size
46
- # https://nextjs.org/docs/advanced-features/output-file-tracing
47
- COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
48
- COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
49
-
50
- USER nextjs
51
-
52
- EXPOSE 3000
53
-
54
- ENV PORT 3000
55
- ENV HOSTNAME "0.0.0.0"
56
-
57
- # Run Next.js server
58
- CMD ["node", "server.js"]
@@ -1,45 +0,0 @@
1
- name: 'Build & Push Docker Image'
2
- description: 'Build multi-stage Docker image and push to registry'
3
- inputs:
4
- registry:
5
- description: 'Docker registry URL'
6
- required: true
7
- image-name:
8
- description: 'Docker image name'
9
- required: true
10
- dockerfile-path:
11
- description: 'Path to Dockerfile'
12
- required: false
13
- default: 'Dockerfile'
14
- build-context:
15
- description: 'Docker build context'
16
- required: false
17
- default: '.'
18
- outputs:
19
- image-tag:
20
- description: 'Full image tag with registry'
21
- value: ${{{{ steps.build.outputs.tags }}}}
22
-
23
- runs:
24
- using: 'composite'
25
- steps:
26
- - name: Set up Docker Buildx
27
- uses: docker/setup-buildx-action@v3
28
-
29
- - name: Login to Registry
30
- uses: docker/login-action@v3
31
- with:
32
- registry: ${{{{ inputs.registry }}}}
33
- username: ${{{{ secrets.REGISTRY_USERNAME }}}}
34
- password: ${{{{ secrets.REGISTRY_PASSWORD }}}}
35
-
36
- - name: Build and push
37
- id: build
38
- uses: docker/build-push-action@v5
39
- with:
40
- context: ${{{{ inputs.build-context }}}}
41
- file: ${{{{ inputs.dockerfile-path }}}}
42
- push: true
43
- tags: ${{{{ inputs.registry }}}}/${{{{ inputs.image-name }}}}:${{{{ github.sha }}}}
44
- cache-from: type=gha
45
- cache-to: type=gha,mode=max
@@ -1,27 +0,0 @@
1
- name: 'Health Check'
2
- description: 'Poll health endpoint until ready'
3
- inputs:
4
- url:
5
- description: 'Health check URL'
6
- required: true
7
- timeout:
8
- description: 'Timeout in seconds'
9
- required: false
10
- default: '300'
11
- interval:
12
- description: 'Polling interval in seconds'
13
- required: false
14
- default: '5'
15
-
16
- runs:
17
- using: 'composite'
18
- steps:
19
- - name: Wait for health
20
- shell: bash
21
- run: |
22
- RETRIES=$(($${{{{ inputs.timeout }}}} / ${{{{ inputs.interval }}}}))
23
- curl --retry $RETRIES \
24
- --retry-delay ${{{{ inputs.interval }}}} \
25
- --retry-connrefused \
26
- --fail \
27
- ${{{{ inputs.url }}}}