@polymorphism-tech/morph-spec 4.11.1 → 4.13.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.
Files changed (317) hide show
  1. package/README.md +21 -29
  2. package/bin/morph-spec.js +41 -24
  3. package/bin/task-manager.js +962 -1341
  4. package/bin/validate.js +1 -1
  5. package/claude-plugin.json +1 -1
  6. package/docs/CHEATSHEET.md +10 -11
  7. package/docs/QUICKSTART.md +15 -15
  8. package/framework/CLAUDE.md +5 -2
  9. package/framework/agents/README.md +3 -4
  10. package/framework/agents/ai-agents/ai-system-architect.md +6 -10
  11. package/framework/agents/architecture/seo-growth-hacker.md +166 -326
  12. package/framework/agents/architecture/standards-architect.md +21 -31
  13. package/framework/agents/backend/dotnet-senior.md +160 -86
  14. package/framework/agents/backend/ef-modeler.md +2 -6
  15. package/framework/agents/backend/hangfire-orchestrator.md +8 -9
  16. package/framework/agents/backend/ms-agent-expert.md +1 -1
  17. package/framework/agents/frontend/nextjs-expert.md +198 -133
  18. package/framework/agents/frontend/ui-ux-designer.md +226 -267
  19. package/framework/agents/infrastructure/infra-architect.md +191 -27
  20. package/framework/agents/integrations/clerk-auth.md +19 -26
  21. package/framework/agents/integrations/hangfire-integration.md +1 -4
  22. package/framework/agents.json +226 -1454
  23. package/framework/commands/morph-apply.md +4 -4
  24. package/framework/commands/morph-preflight.md +4 -26
  25. package/framework/commands/morph-proposal.md +19 -19
  26. package/framework/commands/morph-status.md +2 -2
  27. package/framework/commands/morph-troubleshoot.md +6 -13
  28. package/framework/hooks/README.md +1 -6
  29. package/framework/hooks/claude-code/post-tool-use/agent-complete.js +122 -0
  30. package/framework/hooks/claude-code/post-tool-use/validator-feedback.js +4 -6
  31. package/framework/hooks/claude-code/pre-compact/save-morph-context.js +12 -7
  32. package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +2 -2
  33. package/framework/hooks/claude-code/pre-tool-use/protect-spec-files.js +2 -2
  34. package/framework/hooks/claude-code/pre-tool-use/task-tracking-guard.js +5 -10
  35. package/framework/hooks/claude-code/session-start/inject-morph-context.js +63 -30
  36. package/framework/hooks/claude-code/session-start/resume-context.js +77 -0
  37. package/framework/hooks/claude-code/statusline.py +4 -5
  38. package/framework/hooks/claude-code/stop/validate-completion.js +4 -4
  39. package/framework/hooks/claude-code/user-prompt/enrich-prompt.js +8 -8
  40. package/framework/hooks/shared/compact-restore.js +28 -5
  41. package/framework/hooks/shared/dispatch-helpers.js +17 -0
  42. package/framework/hooks/shared/phase-utils.js +4 -8
  43. package/framework/hooks/shared/state-reader.js +34 -3
  44. package/framework/phases.json +7 -45
  45. package/framework/rules/ai-agents-standards.md +15 -0
  46. package/framework/rules/asaas-standards.md +13 -0
  47. package/framework/rules/clerk-standards.md +13 -0
  48. package/framework/rules/csharp-standards.md +8 -4
  49. package/framework/rules/data-standards.md +18 -0
  50. package/framework/rules/dotnet-templates.md +87 -0
  51. package/framework/rules/frontend-standards.md +13 -13
  52. package/framework/rules/hangfire-standards.md +13 -0
  53. package/framework/rules/infrastructure-standards.md +27 -16
  54. package/framework/rules/morph-workflow.md +73 -13
  55. package/framework/rules/nextjs-standards.md +1 -0
  56. package/framework/rules/nextjs-templates.md +40 -0
  57. package/framework/rules/resend-standards.md +12 -0
  58. package/framework/rules/supabase-standards.md +29 -0
  59. package/framework/skills/README.md +6 -8
  60. package/framework/skills/level-0-meta/mcp-registry.json +21 -99
  61. package/framework/{standards/ai-agents/team-orchestration.md → skills/level-0-meta/morph-agent-teams/SKILL.md} +472 -479
  62. package/framework/skills/level-0-meta/morph-brainstorming/SKILL.md +28 -1
  63. package/framework/skills/level-0-meta/morph-checklist/SKILL.md +2 -2
  64. package/framework/skills/level-0-meta/morph-code-review/SKILL.md +1 -5
  65. package/framework/skills/level-0-meta/morph-code-review/scripts/scan-csharp.mjs +1 -1
  66. package/framework/skills/level-0-meta/morph-frontend-review/SKILL.md +23 -41
  67. package/framework/skills/level-0-meta/morph-init/SKILL.md +18 -14
  68. package/framework/skills/level-0-meta/morph-parallel-dispatch/SKILL.md +225 -0
  69. package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +20 -0
  70. package/framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md +4 -8
  71. package/framework/skills/level-0-meta/morph-tool-usage-guide/references/tools-per-phase.md +15 -59
  72. package/framework/skills/level-0-meta/morph-verification-before-completion/SKILL.md +7 -19
  73. package/framework/skills/level-0-meta/morph-verification-before-completion/scripts/check-phase-outputs.mjs +8 -8
  74. package/framework/skills/level-1-workflows/README.md +1 -1
  75. package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +49 -50
  76. package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +58 -124
  77. package/framework/skills/level-1-workflows/morph-phase-design/references/architecture-analysis-guide.md +5 -50
  78. package/framework/skills/level-1-workflows/morph-phase-design/references/spec-example.md +1 -1
  79. package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +127 -159
  80. package/framework/skills/level-1-workflows/morph-phase-implement/prompts/implementer-prompt.md +4 -3
  81. package/framework/skills/level-1-workflows/morph-phase-implement/prompts/spec-reviewer-prompt.md +2 -2
  82. package/framework/skills/level-1-workflows/morph-phase-implement/references/recap-example.md +1 -1
  83. package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +17 -13
  84. package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +22 -40
  85. package/framework/skills/level-1-workflows/morph-phase-tasks/references/task-planning-patterns.md +0 -2
  86. package/framework/skills/level-1-workflows/morph-phase-tasks/references/tasks-example.md +5 -5
  87. package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +275 -61
  88. package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +1 -1
  89. package/framework/squad-templates/backend-only.json +6 -6
  90. package/framework/squad-templates/frontend-only.json +17 -8
  91. package/framework/squad-templates/full-stack.json +29 -24
  92. package/framework/standards/STANDARDS.json +1021 -2338
  93. package/framework/standards/backend/dotnet/fluent-validation-vsa.md +200 -0
  94. package/framework/standards/backend/dotnet/result-pattern.md +213 -0
  95. package/framework/standards/backend/dotnet/scalar-ui.md +172 -0
  96. package/framework/standards/backend/dotnet/scrutor.md +158 -0
  97. package/framework/standards/backend/dotnet/vsa-handler-patterns.md +274 -0
  98. package/framework/standards/frontend/nextjs/motion-patterns.md +1 -1
  99. package/framework/standards/infrastructure/supabase/mcp-setup.md +83 -193
  100. package/framework/standards/integration/mcp/mcp-tools.md +91 -77
  101. package/framework/templates/IDE-SNIPPETS.md +2 -6
  102. package/framework/templates/README.md +709 -814
  103. package/framework/templates/REGISTRY.json +223 -762
  104. package/framework/templates/code/dotnet/abstractions/api-endpoint.cs +7 -0
  105. package/framework/templates/code/dotnet/abstractions/error.cs +60 -0
  106. package/framework/templates/code/dotnet/abstractions/handler.cs +12 -0
  107. package/framework/templates/code/dotnet/abstractions/result.cs +74 -0
  108. package/framework/templates/code/dotnet/backend/repository.cs +148 -141
  109. package/framework/templates/code/dotnet/constants/api-tags.cs +6 -0
  110. package/framework/templates/code/dotnet/exceptions/exception-handler.cs +32 -0
  111. package/framework/templates/code/dotnet/extensions/database-extensions.cs +20 -0
  112. package/framework/templates/code/dotnet/extensions/handler-registration.cs +38 -0
  113. package/framework/templates/code/dotnet/extensions/health-checks.cs +24 -0
  114. package/framework/templates/code/dotnet/extensions/map-endpoints.cs +35 -0
  115. package/framework/templates/code/dotnet/extensions/result-extensions.cs +29 -0
  116. package/framework/templates/code/dotnet/feature/endpoint.cs.hbs +21 -0
  117. package/framework/templates/code/dotnet/feature/entity.cs.hbs +8 -0
  118. package/framework/templates/code/dotnet/feature/errors.cs.hbs +8 -0
  119. package/framework/templates/code/dotnet/feature/handler.cs.hbs +24 -0
  120. package/framework/templates/code/dotnet/feature/request.cs.hbs +4 -0
  121. package/framework/templates/code/dotnet/feature/response.cs.hbs +4 -0
  122. package/framework/templates/code/dotnet/feature/validator.cs.hbs +15 -0
  123. package/framework/templates/code/dotnet/jobs/job.cs +21 -17
  124. package/framework/templates/code/dotnet/pipelines/logging-decorator.cs +31 -0
  125. package/framework/templates/code/dotnet/pipelines/validation-decorator.cs +97 -0
  126. package/framework/templates/code/dotnet/test.cs +192 -106
  127. package/framework/templates/context/ARCHITECTURE.md +89 -0
  128. package/framework/templates/context/CONTEXT-FEATURE.md +2 -2
  129. package/framework/templates/context/CONTEXT.md +180 -181
  130. package/framework/templates/context/design-system.md +342 -211
  131. package/framework/templates/docs/onboarding.md +2 -3
  132. package/framework/templates/docs/proposal.md +171 -182
  133. package/framework/templates/docs/spec.md +1 -3
  134. package/framework/templates/docs/ui-components.md +0 -72
  135. package/framework/templates/examples/design-system-examples.md +4 -4
  136. package/framework/templates/feature/decisions.md +0 -66
  137. package/framework/templates/feature/recap.md +1 -2
  138. package/framework/templates/infrastructure/github/README.md +56 -593
  139. package/framework/templates/integrations/clerk-config.cs +0 -41
  140. package/framework/templates/meta-prompts/parallel-workers/parallel-worker.md +2 -2
  141. package/framework/templates/meta-prompts/squad-leaders/backend-squad.md +1 -2
  142. package/framework/templates/meta-prompts/squad-leaders/frontend-squad.md +83 -126
  143. package/framework/templates/meta-prompts/validators/pre-commit-validator.md +2 -2
  144. package/framework/templates/project/validate.js +2 -4
  145. package/framework/templates/ui/design-system.css +1 -1
  146. package/framework/workflows/README.md +8 -8
  147. package/framework/workflows/configs/fast-track.json +51 -0
  148. package/framework/workflows/configs/full.json +68 -0
  149. package/framework/workflows/configs/standard.json +7 -3
  150. package/framework/workflows/docs/STORY-DRIVEN-DEVELOPMENT.md +1 -1
  151. package/framework/workflows/docs/enforcement-pipeline.md +18 -19
  152. package/framework/workflows/docs/full-morph.md +69 -76
  153. package/framework/workflows/docs/standard.md +49 -44
  154. package/framework/workflows/docs/ui-refresh.md +1 -1
  155. package/package.json +3 -3
  156. package/src/commands/agents/dispatch-agents.js +55 -116
  157. package/src/commands/context/context-refresh.js +79 -0
  158. package/src/commands/mcp/mcp-setup.js +28 -6
  159. package/src/commands/phase/phase-reset.js +1 -1
  160. package/src/commands/project/doctor.js +10 -32
  161. package/src/commands/project/init.js +32 -1
  162. package/src/commands/project/status.js +6 -12
  163. package/src/commands/scaffold/scaffold.js +131 -0
  164. package/src/commands/scope/escalate.js +1 -1
  165. package/src/commands/state/advance-phase.js +15 -29
  166. package/src/commands/state/state.js +20 -5
  167. package/src/commands/tasks/task.js +0 -30
  168. package/src/commands/validation/validate-feature.js +3 -10
  169. package/src/core/paths/output-schema.js +12 -13
  170. package/src/core/state/phase-state-machine.js +211 -217
  171. package/src/core/state/state-manager.js +9 -9
  172. package/src/lib/agents/agents-manager.js +2 -2
  173. package/src/lib/agents/output-collector.js +1 -2
  174. package/src/lib/detectors/design-system-detector.js +4 -4
  175. package/src/lib/detectors/index.js +1 -11
  176. package/src/lib/generators/architecture-scanner.js +640 -0
  177. package/src/lib/generators/context-generator.js +3 -3
  178. package/src/lib/generators/design-system-generator.js +508 -298
  179. package/src/lib/generators/index.js +12 -10
  180. package/src/lib/generators/metadata-extractor.js +386 -387
  181. package/src/lib/generators/recap-generator.js +4 -4
  182. package/src/lib/generators/scaffold-generator.js +317 -0
  183. package/src/lib/generators/settings-generator.js +0 -1
  184. package/src/lib/phase-chain/phase-validator.js +64 -42
  185. package/src/lib/stack/stack-profile.js +2 -2
  186. package/src/lib/standards/digest-builder.js +72 -285
  187. package/src/lib/tasks/task-parser.js +11 -5
  188. package/src/lib/validators/architecture/architecture-validator.js +259 -387
  189. package/src/lib/validators/content/content-validator.js +287 -287
  190. package/src/lib/validators/css/css-validator.js +340 -352
  191. package/src/lib/validators/design-system/design-system-validator.js +11 -5
  192. package/src/lib/validators/packages/package-validator.js +347 -360
  193. package/src/lib/validators/shared/issue-counter.js +14 -18
  194. package/src/lib/validators/validation-runner.js +3 -19
  195. package/src/scripts/setup-infra.js +1 -1
  196. package/src/utils/agents-installer.js +24 -3
  197. package/src/utils/file-copier.js +1 -0
  198. package/src/utils/hooks-installer.js +21 -19
  199. package/src/utils/skills-installer.js +178 -178
  200. package/framework/agents/architecture/prompt-engineer.md +0 -195
  201. package/framework/agents/backend/api-designer.md +0 -106
  202. package/framework/agents/frontend/blazor-builder.md +0 -229
  203. package/framework/agents/frontend/nextjs-ui-specialist.md +0 -218
  204. package/framework/agents/infrastructure/azure-architect.md +0 -150
  205. package/framework/agents/infrastructure/azure-deploy-specialist.md +0 -707
  206. package/framework/agents/infrastructure/bicep-architect.md +0 -132
  207. package/framework/agents/infrastructure/container-specialist.md +0 -137
  208. package/framework/agents/infrastructure/devops-engineer.md +0 -126
  209. package/framework/agents/integrations/azure-identity.md +0 -148
  210. package/framework/agents/quality/code-analyzer.md +0 -239
  211. package/framework/agents/quality/testing-specialist.md +0 -130
  212. package/framework/hooks/claude-code/notification/approval-reminder.js +0 -57
  213. package/framework/hooks/claude-code/post-tool-use/context-refresh.js +0 -109
  214. package/framework/hooks/claude-code/post-tool-use/skill-reminder.js +0 -78
  215. package/framework/index/troubleshooting-index.json +0 -184
  216. package/framework/rules/testing-standards.md +0 -14
  217. package/framework/skills/level-0-meta/morph-replicate/SKILL.md +0 -230
  218. package/framework/skills/level-0-meta/morph-replicate/references/blazor-html-mapping.md +0 -70
  219. package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +0 -256
  220. package/framework/skills/level-1-workflows/morph-phase-clarify/references/clarifications-example.md +0 -117
  221. package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +0 -269
  222. package/framework/standards/ai-agents/blazor-ui.md +0 -364
  223. package/framework/standards/architecture/ddd/aggregates.md +0 -120
  224. package/framework/standards/architecture/ddd/bounded-contexts.md +0 -105
  225. package/framework/standards/architecture/ddd/complexity-levels.md +0 -108
  226. package/framework/standards/architecture/ddd/entities.md +0 -99
  227. package/framework/standards/architecture/ddd/ubiquitous-language.md +0 -58
  228. package/framework/standards/architecture/ddd/value-objects.md +0 -124
  229. package/framework/standards/backend/api/minimal-api.md +0 -494
  230. package/framework/standards/backend/api/rest.md +0 -492
  231. package/framework/standards/backend/authentication/passkeys.md +0 -428
  232. package/framework/standards/backend/database/ef-core.md +0 -199
  233. package/framework/standards/backend/database/migrations.md +0 -393
  234. package/framework/standards/backend/database/repository-patterns.md +0 -528
  235. package/framework/standards/backend/dotnet/async.md +0 -366
  236. package/framework/standards/backend/dotnet/core.md +0 -117
  237. package/framework/standards/backend/dotnet/di.md +0 -439
  238. package/framework/standards/backend/dotnet/program-cs-checklist.md +0 -92
  239. package/framework/standards/context/analytics.md +0 -96
  240. package/framework/standards/context/bundles.md +0 -110
  241. package/framework/standards/context/priming.md +0 -78
  242. package/framework/standards/core/architecture.md +0 -185
  243. package/framework/standards/core/coding.md +0 -214
  244. package/framework/standards/core/git-branching-strategy.md +0 -403
  245. package/framework/standards/core/git.md +0 -185
  246. package/framework/standards/core/testing.md +0 -295
  247. package/framework/standards/data/nosql/blob-storage.md +0 -102
  248. package/framework/standards/data/vector-search/azure-ai-search.md +0 -121
  249. package/framework/standards/frontend/blazor/design-checklist.md +0 -222
  250. package/framework/standards/frontend/blazor/fluent-ui-setup.md +0 -595
  251. package/framework/standards/frontend/blazor/fluent-ui.md +0 -137
  252. package/framework/standards/frontend/blazor/html-conversion.md +0 -184
  253. package/framework/standards/frontend/blazor/lifecycle.md +0 -195
  254. package/framework/standards/frontend/blazor/pitfalls.md +0 -198
  255. package/framework/standards/frontend/blazor/state.md +0 -191
  256. package/framework/standards/frontend/design-system/aesthetic-direction.md +0 -213
  257. package/framework/standards/infrastructure/azure/azure.md +0 -624
  258. package/framework/standards/infrastructure/azure/bicep/bicep-patterns.md +0 -422
  259. package/framework/standards/infrastructure/azure/devops/azure-devops-setup.md +0 -516
  260. package/framework/standards/infrastructure/azure/devops/local-development.md +0 -520
  261. package/framework/standards/infrastructure/azure/services/functions.md +0 -486
  262. package/framework/standards/infrastructure/azure/services/service-bus.md +0 -459
  263. package/framework/standards/infrastructure/azure/services/storage.md +0 -407
  264. package/framework/standards/infrastructure/vercel/vercel-database.md +0 -106
  265. package/framework/standards/integration/api/graphql.md +0 -91
  266. package/framework/standards/integration/api/grpc.md +0 -114
  267. package/framework/standards/integration/api/rest-design.md +0 -95
  268. package/framework/standards/integration/event-driven/cqrs.md +0 -101
  269. package/framework/standards/integration/event-driven/event-sourcing.md +0 -124
  270. package/framework/standards/integration/event-driven/service-bus.md +0 -95
  271. package/framework/standards/observability/logging.md +0 -131
  272. package/framework/standards/observability/metrics.md +0 -121
  273. package/framework/standards/observability/monitoring.md +0 -114
  274. package/framework/standards/observability/tracing.md +0 -132
  275. package/framework/standards/workflows/parallel-execution.md +0 -112
  276. package/framework/standards/workflows/thread-management.md +0 -113
  277. package/framework/templates/code/dotnet/backend/service.cs +0 -139
  278. package/framework/templates/code/dotnet/contracts/Commands.cs +0 -74
  279. package/framework/templates/code/dotnet/contracts/Entities.cs +0 -25
  280. package/framework/templates/code/dotnet/contracts/Queries.cs +0 -74
  281. package/framework/templates/code/dotnet/contracts/api-contracts.cs +0 -173
  282. package/framework/templates/code/dotnet/contracts/contracts-level1.cs +0 -69
  283. package/framework/templates/code/dotnet/contracts/contracts-level2.cs +0 -86
  284. package/framework/templates/code/dotnet/contracts/contracts-level3.cs +0 -41
  285. package/framework/templates/code/dotnet/frontend/component.razor +0 -239
  286. package/framework/templates/infrastructure/azure/Dockerfile.example +0 -82
  287. package/framework/templates/infrastructure/azure/README.md +0 -286
  288. package/framework/templates/infrastructure/azure/app-insights.bicep +0 -63
  289. package/framework/templates/infrastructure/azure/app-service.bicep +0 -164
  290. package/framework/templates/infrastructure/azure/container-app-env.bicep +0 -49
  291. package/framework/templates/infrastructure/azure/container-app.bicep +0 -156
  292. package/framework/templates/infrastructure/azure/deploy-checklist.md +0 -426
  293. package/framework/templates/infrastructure/azure/deploy.ps1 +0 -229
  294. package/framework/templates/infrastructure/azure/deploy.sh +0 -208
  295. package/framework/templates/infrastructure/azure/key-vault.bicep +0 -91
  296. package/framework/templates/infrastructure/azure/main.bicep +0 -189
  297. package/framework/templates/infrastructure/azure/parameters.dev.json +0 -29
  298. package/framework/templates/infrastructure/azure/parameters.prod.json +0 -29
  299. package/framework/templates/infrastructure/azure/parameters.staging.json +0 -29
  300. package/framework/templates/infrastructure/azure/sql-database.bicep +0 -103
  301. package/framework/templates/infrastructure/azure/storage.bicep +0 -106
  302. package/framework/templates/infrastructure/github/actions/azure-auth/action.yml.hbs +0 -22
  303. package/framework/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +0 -61
  304. package/framework/templates/integrations/azure-identity-config.cs +0 -288
  305. package/framework/templates/project-structure/dotnet-ddd.md +0 -70
  306. package/framework/templates/saas/subscription.cs +0 -347
  307. package/framework/templates/saas/tenant.cs +0 -338
  308. package/framework/templates/ui/FluentDesignTheme.cs +0 -149
  309. package/framework/templates/ui/MudTheme.cs +0 -281
  310. package/framework/workflows/configs/nodejs-cli.json +0 -40
  311. package/src/commands/standards/context-budget.js +0 -89
  312. package/src/lib/standards/index.js +0 -7
  313. package/src/lib/standards/standards-context-injector.js +0 -302
  314. package/src/lib/validators/blazor/blazor-concurrency-analyzer.js +0 -316
  315. package/src/lib/validators/blazor/blazor-state-validator.js +0 -279
  316. package/src/lib/validators/blazor/blazor-validator.js +0 -369
  317. package/src/lib/validators/blazor/index.js +0 -9
@@ -1,184 +0,0 @@
1
- {
2
- "version": "1.0.0",
3
- "lastUpdated": "2025-01-25",
4
- "problems": [
5
- {
6
- "id": "efcore-pending-changes",
7
- "title": "PendingModelChangesWarning no EF Core 10",
8
- "keywords": ["PendingModelChanges", "migration", "EF Core", "database update", "pending", "model changed"],
9
- "errorPattern": "PendingModelChangesException|pending changes|model.*has pending changes",
10
- "file": "framework/standards/backend/database/ef-core.md",
11
- "section": "Migrations - .NET 10 PendingModelChangesWarning",
12
- "severity": "critical",
13
- "scope": "blazor-azure,nextjs-supabase",
14
- "category": "efcore",
15
- "cause": "EF Core 10 lança exceção se modelo mudou desde última migration.",
16
- "solution": "dotnet ef migrations add <Name> antes de database update"
17
- },
18
- {
19
- "id": "dbcontext-concurrent",
20
- "title": "DbContext Concurrency Error",
21
- "keywords": ["DbContext", "concurrent", "second operation", "Task.Run", "background", "thread"],
22
- "errorPattern": "A second operation was started|concurrently using the same instance",
23
- "file": "framework/standards/backend/database/ef-core.md",
24
- "section": "The Problem: DbContext Concurrency",
25
- "severity": "critical",
26
- "scope": "blazor-azure,nextjs-supabase",
27
- "category": "efcore",
28
- "cause": "DbContext scoped está sendo usado em operações paralelas/background.",
29
- "solution": "Usar IDbContextFactory para operações em background"
30
- },
31
- {
32
- "id": "navigation-include-empty",
33
- "title": "Include() retorna coleção vazia",
34
- "keywords": ["Include", "HasMany", "navigation", "empty", "vazia", "collection", "ICollection"],
35
- "errorPattern": "Items\\.Count == 0|collection.*empty|Include.*not working",
36
- "file": "framework/standards/backend/database/ef-core.md",
37
- "section": "Navigation Properties - Correct Configuration",
38
- "severity": "high",
39
- "scope": "blazor-azure,nextjs-supabase",
40
- "category": "efcore",
41
- "cause": "HasMany<T>() sem navigation property causa Include() falhar silenciosamente.",
42
- "solution": "Usar HasMany(x => x.Property) em vez de HasMany<T>()"
43
- },
44
- {
45
- "id": "azure-identity-conflict",
46
- "title": "Azure.Identity Version Conflict",
47
- "keywords": ["Azure.Identity", "NU1605", "downgrade", "version", "conflict", "package"],
48
- "errorPattern": "NU1605.*Azure\\.Identity|package downgrade.*Azure\\.Identity",
49
- "file": "framework/standards/infrastructure/azure/azure.md",
50
- "section": "Package Version Conflicts",
51
- "severity": "high",
52
- "scope": "blazor-azure",
53
- "category": "azure",
54
- "cause": "Dependências transitivas puxam versões diferentes do Azure.Identity.",
55
- "solution": "<PackageReference Include=\"Azure.Identity\" Version=\"1.14.2\" />"
56
- },
57
- {
58
- "id": "keyvault-di-fail",
59
- "title": "Key Vault não carrega em Development",
60
- "keywords": ["KeyVault", "IsDevelopment", "DI", "secrets", "not registered", "service"],
61
- "errorPattern": "IBlobStorageService.*not registered|IPaymentService.*not registered|service.*not registered",
62
- "file": "framework/standards/infrastructure/azure/azure.md",
63
- "section": "Key Vault Configuration",
64
- "severity": "critical",
65
- "scope": "blazor-azure",
66
- "category": "azure",
67
- "cause": "Key Vault condicionado ao ambiente (!IsDevelopment) não carrega secrets.",
68
- "solution": "Não condicionar Key Vault ao ambiente - carregar sempre que URI existir"
69
- },
70
- {
71
- "id": "credential-slow",
72
- "title": "DefaultAzureCredential lento no container",
73
- "keywords": ["DefaultAzureCredential", "slow", "timeout", "container", "startup", "30 seconds"],
74
- "errorPattern": "timeout|30 seconds|startup.*slow|credential.*timeout",
75
- "file": "framework/standards/infrastructure/azure/azure.md",
76
- "section": "DefaultAzureCredential Optimization",
77
- "severity": "medium",
78
- "scope": "blazor-azure",
79
- "category": "azure",
80
- "cause": "DefaultAzureCredential tenta múltiplos métodos de autenticação sequencialmente.",
81
- "solution": "Desabilitar credenciais não usadas com ExcludeXxxCredential = true"
82
- },
83
- {
84
- "id": "containerapp-not-updating",
85
- "title": "Container App não atualiza após push",
86
- "keywords": ["Container App", "revision", "not updating", "old version", "push", "deploy"],
87
- "errorPattern": "old version|not updating|same image",
88
- "file": "framework/standards/infrastructure/azure/azure.md",
89
- "section": "Container App Deployment Issues",
90
- "severity": "medium",
91
- "scope": "blazor-azure",
92
- "category": "azure",
93
- "cause": "Mesmo digest de imagem não triggera nova revisão.",
94
- "solution": "Usar DEPLOY_TIMESTAMP=$(date +%s) para forçar nova revisão"
95
- },
96
- {
97
- "id": "migrations-not-applied",
98
- "title": "Invalid object name - Tabela não existe",
99
- "keywords": ["Invalid object name", "table", "migration", "not applied", "database"],
100
- "errorPattern": "Invalid object name|table.*does not exist|object.*not found",
101
- "file": "framework/standards/backend/database/ef-core.md",
102
- "section": "Auto-Migration on Startup",
103
- "severity": "high",
104
- "scope": "blazor-azure,nextjs-supabase",
105
- "category": "efcore",
106
- "cause": "Migrations não foram aplicadas ao banco de dados.",
107
- "solution": "Rodar dotnet ef database update ou adicionar auto-migration no startup"
108
- },
109
- {
110
- "id": "di-httpcontext",
111
- "title": "HttpContext null em background thread",
112
- "keywords": ["HttpContext", "null", "background", "Task.Run", "accessor"],
113
- "errorPattern": "HttpContext.*null|IHttpContextAccessor.*null",
114
- "file": "framework/standards/frontend/blazor/pitfalls.md",
115
- "section": "Dependency Injection Pattern",
116
- "severity": "critical",
117
- "scope": "blazor-azure",
118
- "category": "blazor",
119
- "cause": "HttpContext não está disponível em threads background.",
120
- "solution": "Capturar dados do HttpContext antes de iniciar Task.Run"
121
- },
122
- {
123
- "id": "jsruntime-prerender",
124
- "title": "JSRuntime error during prerendering",
125
- "keywords": ["JSRuntime", "prerender", "JavaScript", "interop", "OnInitializedAsync"],
126
- "errorPattern": "JavaScript interop.*prerendering|JSRuntime.*not available",
127
- "file": "framework/standards/frontend/blazor/pitfalls.md",
128
- "section": "JSRuntime Lifecycle",
129
- "severity": "high",
130
- "scope": "blazor-azure",
131
- "category": "blazor",
132
- "cause": "JSRuntime não disponível durante prerendering.",
133
- "solution": "Usar OnAfterRenderAsync com firstRender check"
134
- },
135
- {
136
- "id": "static-files-404",
137
- "title": "Static files retornando 404",
138
- "keywords": ["static files", "wwwroot", "CSS", "JS", "404", "assets"],
139
- "errorPattern": "static.*404|wwwroot.*not found|css.*404|js.*404",
140
- "file": "framework/standards/frontend/blazor/pitfalls.md",
141
- "section": "Static Files",
142
- "severity": "high",
143
- "scope": "blazor-azure",
144
- "category": "blazor",
145
- "cause": "UseStaticFiles() não configurado ou arquivos não em wwwroot.",
146
- "solution": "Adicionar app.UseStaticFiles() e verificar caminho dos arquivos"
147
- },
148
- {
149
- "id": "rendermode-mismatch",
150
- "title": "Componente não renderiza interativamente",
151
- "keywords": ["RenderMode", "InteractiveServer", "static", "onclick", "not working"],
152
- "errorPattern": "@onclick.*not working|button.*not responding|interactive.*not working",
153
- "file": "framework/standards/frontend/blazor/pitfalls.md",
154
- "section": "RenderModes",
155
- "severity": "high",
156
- "scope": "blazor-azure",
157
- "category": "blazor",
158
- "cause": "Componente está em modo estático mas precisa de interatividade.",
159
- "solution": "Adicionar @rendermode InteractiveServer no componente"
160
- }
161
- ],
162
- "categories": {
163
- "blazor": {
164
- "name": "Blazor Server/WASM",
165
- "description": "Problemas com componentes Blazor, lifecycle, renderização"
166
- },
167
- "efcore": {
168
- "name": "Entity Framework Core",
169
- "description": "Problemas com DbContext, migrations, queries"
170
- },
171
- "azure": {
172
- "name": "Azure Infrastructure",
173
- "description": "Problemas com Azure services, deploy, identity"
174
- },
175
- "auth": {
176
- "name": "Authentication/Authorization",
177
- "description": "Problemas com login, tokens, claims"
178
- },
179
- "deploy": {
180
- "name": "Deployment/CI-CD",
181
- "description": "Problemas com build, deploy, pipelines"
182
- }
183
- }
184
- }
@@ -1,14 +0,0 @@
1
- ---
2
- paths:
3
- - "tests/**"
4
- - "**/*.test.*"
5
- - "**/*.spec.*"
6
- - "**/*Tests.cs"
7
- stacks:
8
- - dotnet
9
- - blazor
10
- ---
11
-
12
- # Testing Standards
13
-
14
- @.morph/framework/standards/core/testing.md
@@ -1,230 +0,0 @@
1
- ---
2
- name: morph-replicate
3
- description: Simplified workflow for converting HTML prototypes into functional Blazor components, extracting design patterns and mapping HTML elements to Fluent UI/MudBlazor equivalents. Use when an approved HTML prototype exists and needs conversion to Blazor without a full MORPH-SPEC spec pipeline.
4
- user-invocable: true
5
- argument-hint: "[feature-name] [prototype-path]"
6
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
- stacks:
8
- - blazor
9
- ---
10
-
11
- # MORPH Replicate — HTML to Blazor Conversion
12
-
13
- > Simplified workflow for replicating HTML prototypes in Blazor.
14
- > Use when you have a ready HTML prototype and need to convert it to functional Blazor code.
15
-
16
- ## Command
17
-
18
- ```bash
19
- /morph-replicate {feature-name} {prototype-path}
20
- ```
21
-
22
- **Example:**
23
- ```bash
24
- /morph-replicate ui-redesign prototipo/
25
- ```
26
-
27
- ---
28
-
29
- ## Simplified Workflow
30
-
31
- ### PHASE 1: PROTOTYPE ANALYSIS
32
-
33
- 1. **Read all HTML files in `{prototype-path}/`**
34
- ```bash
35
- # Find all HTML files
36
- glob: {prototype-path}/**/*.html
37
- glob: {prototype-path}/**/code.html # Common prototype pattern
38
- ```
39
-
40
- 2. **Extract patterns from each file:**
41
- - Layout (grid, flexbox, structure)
42
- - Components (cards, buttons, forms, modals)
43
- - Colors (extract from inline styles and CSS)
44
- - Fonts (font-family, sizes)
45
- - Spacing (padding, margin, gap)
46
- - CSS classes used
47
-
48
- 3. **Generate HTML → Blazor mapping:**
49
-
50
- **Read the reference file first:** `references/blazor-html-mapping.md` — this contains the complete mapping table for HTML→Fluent UI and HTML→MudBlazor conversions. Load it before generating the prototype-specific mapping.
51
-
52
- Then document the relevant mappings for this specific prototype, citing the reference:
53
- ```markdown
54
- ## HTML → Blazor Mapping (this prototype)
55
- > Source: references/blazor-html-mapping.md
56
- - <HTML element> → <BlazorComponent>
57
- ```
58
-
59
- 4. **Generate list of CSS classes to create:**
60
- ```markdown
61
- ## Required CSS Classes
62
-
63
- - [ ] .page-layout
64
- - [ ] .home-hero
65
- - [ ] .card-premium
66
- - [ ] .checkout-form
67
- - [ ] .modal-overlay
68
- - [ ] .animate-slideInUp
69
- ```
70
-
71
- **PAUSE:** Approve mapping and CSS list
72
-
73
- ---
74
-
75
- ### PHASE 2: TASKS (Screen List)
76
-
77
- Generate screen list to implement in correct order:
78
-
79
- ```markdown
80
- ## Implementation Tasks
81
-
82
- ### T001: Setup Design System
83
- - Create/update wwwroot/css/design-system.css
84
- - Add all listed CSS classes
85
- - Validate with `morph-spec validate`
86
-
87
- ### T002: {Screen Name 1}
88
- - Read: {prototype-path}/{screen1}.html
89
- - Create/Update: Pages/{Screen1}.razor
90
- - Components: FluentCard, FluentButton, etc.
91
- - CSS: .home-hero, .card-premium
92
-
93
- ### T003: {Screen Name 2}
94
- - Read: {prototype-path}/{screen2}.html
95
- - Create/Update: Pages/{Screen2}.razor
96
- - ...
97
-
98
- ### TXXX: Final Validation
99
- - Full build
100
- - `morph-spec validate`
101
- - Test responsiveness
102
- ```
103
-
104
- **PAUSE:** Approve task list
105
-
106
- ---
107
-
108
- ### PHASE 3: IMPLEMENT (Per Screen)
109
-
110
- For each screen, follow this flow:
111
-
112
- 1. **Read prototype HTML**
113
- ```
114
- Read: {prototype-path}/{screen}.html
115
- ```
116
-
117
- 2. **Read current .razor file** (if exists)
118
- ```
119
- Read: Pages/{Screen}.razor
120
- ```
121
-
122
- 3. **Rewrite .razor using Fluent UI/MudBlazor**
123
- - Keep prototype layout structure
124
- - Replace HTML elements with Blazor components
125
- - Apply design-system CSS classes
126
-
127
- 4. **Add CSS to design-system.css**
128
- - If new class was used in .razor
129
- - Follow naming pattern (prefix by page)
130
-
131
- 5. **Build to validate**
132
- ```bash
133
- dotnet build
134
- ```
135
-
136
- 6. **Validate CSS**
137
- ```bash
138
- morph-spec validate src/MyApp.Web
139
- ```
140
-
141
- ---
142
-
143
- ## Outputs
144
-
145
- All outputs go in `.morph/features/{feature-name}/5-implement/`:
146
-
147
- | File | Location | Description |
148
- |---------|----------|-----------|
149
- | `.razor` files | Project source (Pages/, Components/, Shared/) | Converted pages |
150
- | `design-system.css` | `wwwroot/css/design-system.css` | Updated CSS |
151
- | `recap.md` | `.morph/features/{feature-name}/5-implement/recap.md` | Implementation summary |
152
-
153
- After completion, mark the output:
154
- ```bash
155
- morph-spec state mark-output {feature-name} recap
156
- ```
157
-
158
- **Does NOT generate:** proposal.md, spec.md, contracts.cs, tasks.md
159
-
160
- ---
161
-
162
- ## Execution Example
163
-
164
- ```markdown
165
- /morph-replicate checkout-redesign prototipo/checkout/
166
-
167
- 📁 Analyzing prototype in prototipo/checkout/...
168
-
169
- **Files found:**
170
- - step1-cart.html
171
- - step2-payment.html
172
- - step3-confirmation.html
173
-
174
- **Extracted patterns:**
175
-
176
- Colors:
177
- - Primary: #FF6B35
178
- - Secondary: #2D3047
179
- - Background: #FAFAFA
180
-
181
- CSS classes to create:
182
- - [ ] .checkout-layout
183
- - [ ] .checkout-steps
184
- - [ ] .checkout-form
185
- - [ ] .checkout-summary
186
- - [ ] .payment-options
187
- - [ ] .confirmation-message
188
-
189
- HTML → Blazor Mapping:
190
- - form.checkout-form → EditForm + FluentTextField
191
- - div.payment-card → FluentCard
192
- - button.btn-pay → FluentButton Accent
193
-
194
- ---
195
-
196
- ⛔ **MANDATORY PAUSE**
197
-
198
- **Next steps:**
199
- 1. ✅ Approve and generate implementation tasks
200
- 2. 🔄 Adjust mapping
201
- 3. 📋 See more component details
202
- ```
203
-
204
- ---
205
-
206
- ## When to Use
207
-
208
- - ✅ HTML prototype ready (hand-coded, exported, etc.)
209
- - ✅ Design already approved by client
210
- - ✅ Visual conversion only (no new business logic)
211
- - ✅ Existing Blazor code to update
212
-
213
- ## When NOT to Use
214
-
215
- - ❌ New feature with complex logic (use FULL MORPH)
216
- - ❌ Azure infrastructure needed (use FULL MORPH)
217
- - ❌ No prototype defined (use STANDARD or FULL MORPH)
218
-
219
- ---
220
-
221
- ## References
222
-
223
- - **Ref:** `framework/standards/frontend/blazor/html-conversion.md`
224
- - **Ref:** `framework/standards/frontend/design-system/naming.md`
225
- - **Ref:** `framework/standards/frontend/design-system/animations.md`
226
- - **Ref:** `framework/standards/frontend/blazor/fluent-ui.md`
227
-
228
- ---
229
-
230
- *MORPH-SPEC by Polymorphism Tech*
@@ -1,70 +0,0 @@
1
- # HTML → Blazor Component Mapping Reference
2
-
3
- > Reference for converting HTML prototype elements to Fluent UI / MudBlazor equivalents.
4
- > Used during FASE 1 of the `/morph-replicate` workflow.
5
-
6
- ## Common Component Mappings
7
-
8
- | HTML Pattern | Fluent UI Equivalent | MudBlazor Equivalent |
9
- |---|---|---|
10
- | `<button class="btn-primary">` | `<FluentButton Appearance="Appearance.Accent">` | `<MudButton Variant="Variant.Filled" Color="Color.Primary">` |
11
- | `<button class="btn-secondary">` | `<FluentButton Appearance="Appearance.Outline">` | `<MudButton Variant="Variant.Outlined">` |
12
- | `<div class="card">` | `<FluentCard>` | `<MudCard>` |
13
- | `<input type="text">` | `<FluentTextField>` | `<MudTextField>` |
14
- | `<input type="search">` | `<FluentSearch>` | `<MudTextField Adornment="Adornment.Start" AdornmentIcon="Icons.Material.Filled.Search">` |
15
- | `<select>` | `<FluentSelect>` | `<MudSelect>` |
16
- | `<input type="checkbox">` | `<FluentCheckbox>` | `<MudCheckBox>` |
17
- | `<input type="radio">` | `<FluentRadio>` | `<MudRadio>` |
18
- | `<div class="modal">` | `<FluentDialog>` | `<MudDialog>` |
19
- | `<nav>` / `<ul class="nav">` | `<FluentNavMenu>` | `<MudNavMenu>` |
20
- | `<table>` | `<FluentDataGrid>` | `<MudTable>` |
21
- | `<div class="spinner">` | `<FluentProgressRing>` | `<MudProgressCircular>` |
22
- | `<div class="progress-bar">` | `<FluentProgress>` | `<MudProgressLinear>` |
23
- | `<span class="badge">` | `<FluentBadge>` | `<MudChip>` |
24
- | `<div class="alert">` | `<FluentMessageBar>` | `<MudAlert>` |
25
- | `<form>` | `<EditForm>` | `<EditForm>` |
26
- | `<div class="tooltip">` | `<FluentTooltip>` | `<MudTooltip>` |
27
- | `<img>` | `<FluentIcon>` (for icons) / `<img>` | `<MudImage>` / `<img>` |
28
- | `<div class="tabs">` | `<FluentTabs>` | `<MudTabs>` |
29
- | `<details>/<summary>` | `<FluentAccordion>` | `<MudExpansionPanel>` |
30
-
31
- ## Layout Mappings
32
-
33
- | HTML Layout Pattern | Blazor/CSS Approach |
34
- |---|---|
35
- | `display: grid` | Keep as CSS grid (no Fluent/MudBlazor equivalent) |
36
- | `display: flex` | Keep as CSS flexbox |
37
- | `class="container"` | Keep as CSS class in design-system.css |
38
- | `class="row col-*"` | Keep as CSS or use CSS grid |
39
- | `class="sidebar"` | `<FluentBodyContent>` or custom CSS layout |
40
-
41
- ## Form Patterns
42
-
43
- | HTML Form Pattern | Blazor Equivalent |
44
- |---|---|
45
- | `<input required>` | FluentValidation rule + `<FluentValidationMessage>` |
46
- | `<input pattern="...">` | FluentValidation `Matches()` rule |
47
- | `<input min/max>` | FluentValidation `InclusiveBetween()` rule |
48
- | Form submission | `<EditForm OnValidSubmit="HandleSubmit">` |
49
- | Error display | `<FluentValidationSummary>` or `<DataAnnotationsValidator>` |
50
-
51
- ## Animation Mappings
52
-
53
- | CSS Animation Class | Blazor Approach |
54
- |---|---|
55
- | `animate-fadeIn` | CSS class in design-system.css (keep as-is) |
56
- | `animate-slideInUp` | CSS class in design-system.css (keep as-is) |
57
- | `animate-pulse` | CSS class or `<FluentProgressRing>` |
58
-
59
- > For animation standards, see: `framework/standards/frontend/design-system/animations.md`
60
-
61
- ## Decision Guide
62
-
63
- When a direct component mapping doesn't exist:
64
- 1. **Check Fluent UI docs** — it may have a less obvious equivalent
65
- 2. **Use HTML wrapper** — wrap plain HTML in a `<div>` with design-system CSS classes
66
- 3. **Create a custom Razor component** — when the design is project-specific and reused across pages
67
- 4. **Keep as HTML** — for one-off layout elements that don't need a component
68
-
69
- > For full Fluent UI reference: `framework/standards/frontend/blazor/fluent-ui.md`
70
- > For MudBlazor reference: `framework/standards/frontend/blazor/html-conversion.md`