@polymorphism-tech/morph-spec 3.0.1 → 3.2.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 (316) hide show
  1. package/CLAUDE.md +561 -63
  2. package/LICENSE +72 -72
  3. package/README.md +275 -79
  4. package/bin/detect-agents.js +3 -1
  5. package/bin/morph-spec.js +60 -1
  6. package/bin/render-template.js +61 -14
  7. package/bin/semantic-detect-agents.js +2 -1
  8. package/bin/{task-manager.js → task-manager.cjs} +113 -8
  9. package/bin/validate-agents-skills.js +10 -4
  10. package/bin/validate-agents.js +4 -3
  11. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +977 -977
  12. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1048 -1048
  13. package/docs/api/scripts/collapse.js +38 -38
  14. package/docs/api/scripts/commonNav.js +28 -28
  15. package/docs/api/scripts/linenumber.js +25 -25
  16. package/docs/api/scripts/nav.js +12 -12
  17. package/docs/api/scripts/polyfill.js +3 -3
  18. package/docs/api/scripts/prettify/Apache-License-2.0.txt +202 -202
  19. package/docs/api/scripts/prettify/lang-css.js +2 -2
  20. package/docs/api/scripts/prettify/prettify.js +28 -28
  21. package/docs/api/scripts/search.js +98 -98
  22. package/docs/api/styles/jsdoc.css +776 -776
  23. package/docs/api/styles/prettify.css +80 -80
  24. package/docs/cli-auto-detection.md +219 -0
  25. package/docs/examples.md +328 -328
  26. package/docs/getting-started.md +3 -3
  27. package/docs/llm-interaction-config.md +735 -0
  28. package/docs/templates.md +418 -418
  29. package/docs/troubleshooting.md +269 -0
  30. package/package.json +7 -3
  31. package/scripts/postinstall.js +132 -132
  32. package/scripts/reorganize-skills.cjs +1 -1
  33. package/scripts/validate-agents-structure.cjs +1 -1
  34. package/scripts/validate-skills.cjs +2 -2
  35. package/src/commands/advance-phase.js +93 -2
  36. package/src/commands/analyze-blazor-concurrency.js +193 -193
  37. package/src/commands/approve.js +221 -0
  38. package/src/commands/capture-pattern.js +121 -0
  39. package/src/commands/create-story.js +5 -2
  40. package/src/commands/deploy.js +780 -780
  41. package/src/commands/detect-agents.js +4 -2
  42. package/src/commands/generate.js +276 -149
  43. package/src/commands/init.js +37 -0
  44. package/src/commands/lint-fluent.js +352 -352
  45. package/src/commands/migrate-state.js +158 -0
  46. package/src/commands/rollback-phase.js +185 -185
  47. package/src/commands/search-patterns.js +126 -0
  48. package/src/commands/session-summary.js +291 -291
  49. package/src/commands/shard-spec.js +224 -224
  50. package/src/commands/spawn-team.js +172 -0
  51. package/src/commands/sprint-status.js +250 -250
  52. package/src/commands/task.js +3 -3
  53. package/src/commands/troubleshoot.js +222 -222
  54. package/src/commands/update.js +36 -0
  55. package/src/commands/upgrade.js +346 -0
  56. package/src/commands/validate-blazor-state.js +210 -210
  57. package/src/commands/validate-blazor.js +156 -156
  58. package/src/commands/validate-css.js +84 -84
  59. package/src/commands/validate-phase.js +221 -221
  60. package/src/generator/.gitkeep +0 -0
  61. package/src/generator/config-generator.js +206 -0
  62. package/src/generator/templates/config.json.template +40 -0
  63. package/src/generator/templates/project.md.template +67 -0
  64. package/src/lib/blazor-concurrency-analyzer.js +288 -288
  65. package/src/lib/blazor-state-validator.js +291 -291
  66. package/src/lib/blazor-validator.js +374 -374
  67. package/src/lib/checkpoint-hooks.js +258 -0
  68. package/src/lib/context-generator.js +7 -4
  69. package/src/lib/css-validator.js +352 -352
  70. package/src/lib/design-system-generator.js +298 -298
  71. package/src/lib/hook-executor.js +2 -1
  72. package/src/lib/learning-system.js +520 -520
  73. package/src/lib/metadata-extractor.js +380 -0
  74. package/src/lib/mockup-generator.js +366 -366
  75. package/src/lib/phase-state-machine.js +214 -0
  76. package/src/lib/stack-resolver.js +148 -0
  77. package/src/lib/standards-context-injector.js +4 -3
  78. package/src/lib/state-manager.js +120 -0
  79. package/src/lib/team-orchestrator.js +2 -1
  80. package/src/lib/template-data-sources.js +325 -0
  81. package/src/lib/troubleshoot-grep.js +204 -194
  82. package/src/lib/troubleshoot-index.js +144 -144
  83. package/src/lib/ui-detector.js +350 -350
  84. package/src/lib/validation-runner.js +2 -1
  85. package/src/lib/validators/architecture-validator.js +387 -387
  86. package/src/lib/validators/content-validator.js +351 -0
  87. package/src/lib/validators/package-validator.js +360 -360
  88. package/src/lib/validators/ui-contrast-validator.js +422 -422
  89. package/src/llm/.gitkeep +0 -0
  90. package/src/llm/analyzer.js +215 -0
  91. package/src/llm/environment-detector.js +43 -0
  92. package/src/llm/few-shot-examples.js +216 -0
  93. package/src/llm/project-config-schema.json +188 -0
  94. package/src/llm/prompt-builder.js +96 -0
  95. package/src/llm/schema-validator.js +121 -0
  96. package/src/orchestrator.js +206 -0
  97. package/src/sanitizer/.gitkeep +0 -0
  98. package/src/sanitizer/context-sanitizer.js +221 -0
  99. package/src/sanitizer/patterns.js +163 -0
  100. package/src/scanner/.gitkeep +0 -0
  101. package/src/scanner/project-scanner.js +242 -0
  102. package/src/types/index.js +477 -0
  103. package/src/ui/.gitkeep +0 -0
  104. package/src/ui/diff-display.js +91 -0
  105. package/src/ui/interactive-wizard.js +96 -0
  106. package/src/ui/user-review.js +211 -0
  107. package/src/ui/wizard-questions.js +190 -0
  108. package/src/utils/file-copier.js +3 -1
  109. package/src/utils/logger.js +32 -32
  110. package/src/utils/version-checker.js +175 -175
  111. package/src/writer/.gitkeep +0 -0
  112. package/src/writer/file-writer.js +86 -0
  113. package/{content → stacks/blazor-azure}/.azure/README.md +2 -2
  114. package/{content → stacks/blazor-azure}/.azure/pipelines/pipeline-variables.yml +1 -1
  115. package/{content → stacks/blazor-azure}/.azure/pipelines/prod-pipeline.yml +1 -1
  116. package/{content → stacks/blazor-azure}/.azure/pipelines/staging-pipeline.yml +1 -1
  117. package/{content → stacks/blazor-azure}/.claude/commands/morph-preflight.md +227 -227
  118. package/{content → stacks/blazor-azure}/.claude/commands/morph-troubleshoot.md +122 -122
  119. package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-setup.md +1 -1
  120. package/{content → stacks/blazor-azure}/.morph/docs/workflows/enforcement-pipeline.md +3 -3
  121. package/{content → stacks/blazor-azure}/.morph/hooks/README.md +12 -12
  122. package/{content → stacks/blazor-azure}/.morph/standards/agent-teams-workflow.md +2 -2
  123. package/{content → stacks/blazor-azure}/.morph/standards/migration-guide.md +2 -2
  124. package/{content → stacks/blazor-azure}/.morph/templates/infra/deploy-checklist.md +426 -426
  125. package/stacks/nextjs-supabase/.claude/skills/level-2-domains/backend/dotnet-supabase.md +244 -0
  126. package/stacks/nextjs-supabase/.claude/skills/level-2-domains/frontend/nextjs-supabase.md +335 -0
  127. package/stacks/nextjs-supabase/.claude/skills/level-2-domains/infrastructure/easypanel-deployer.md +189 -0
  128. package/stacks/nextjs-supabase/.claude/skills/level-2-domains/integrations/supabase-expert.md +170 -0
  129. package/stacks/nextjs-supabase/.morph/config/agents.json +345 -0
  130. package/stacks/nextjs-supabase/.morph/config/config.template.json +92 -0
  131. package/stacks/nextjs-supabase/.morph/docs/easypanel-setup.md +169 -0
  132. package/stacks/nextjs-supabase/.morph/docs/supabase-mcp-setup.md +247 -0
  133. package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/README.md +697 -0
  134. package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/spec.md +85 -0
  135. package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/tasks.md +86 -0
  136. package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/README.md +498 -0
  137. package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/decisions.md +121 -0
  138. package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/spec.md +138 -0
  139. package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/tasks.md +162 -0
  140. package/stacks/nextjs-supabase/.morph/project.md +168 -0
  141. package/stacks/nextjs-supabase/.morph/standards/easypanel-deploy.md +191 -0
  142. package/stacks/nextjs-supabase/.morph/standards/nextjs-patterns.md +193 -0
  143. package/stacks/nextjs-supabase/.morph/standards/supabase-auth.md +171 -0
  144. package/stacks/nextjs-supabase/.morph/standards/supabase-pgvector.md +164 -0
  145. package/stacks/nextjs-supabase/.morph/standards/supabase-rls.md +179 -0
  146. package/stacks/nextjs-supabase/.morph/standards/supabase-storage.md +148 -0
  147. package/stacks/nextjs-supabase/.morph/templates/contracts.cs +173 -0
  148. package/stacks/nextjs-supabase/.morph/templates/contracts.ts +168 -0
  149. package/stacks/nextjs-supabase/.morph/templates/decisions.md +115 -0
  150. package/stacks/nextjs-supabase/.morph/templates/dockerfile-api.dockerfile +38 -0
  151. package/stacks/nextjs-supabase/.morph/templates/dockerfile-web.dockerfile +48 -0
  152. package/stacks/nextjs-supabase/.morph/templates/proposal.md +145 -0
  153. package/stacks/nextjs-supabase/.morph/templates/recap.md +134 -0
  154. package/stacks/nextjs-supabase/.morph/templates/rls-policy.sql +57 -0
  155. package/stacks/nextjs-supabase/.morph/templates/spec.md +231 -0
  156. package/stacks/nextjs-supabase/.morph/templates/supabase-migration.sql +100 -0
  157. package/stacks/nextjs-supabase/.morph/templates/tasks.md +257 -0
  158. package/stacks/nextjs-supabase/CLAUDE.md +149 -0
  159. package/stacks/nextjs-supabase/README.md +112 -0
  160. /package/{content → stacks/blazor-azure}/.azure/docs/azure-devops-setup.md +0 -0
  161. /package/{content → stacks/blazor-azure}/.azure/docs/branch-strategy.md +0 -0
  162. /package/{content → stacks/blazor-azure}/.azure/docs/local-development.md +0 -0
  163. /package/{content → stacks/blazor-azure}/.azure/pipelines/templates/build-dotnet.yml +0 -0
  164. /package/{content → stacks/blazor-azure}/.azure/pipelines/templates/deploy-app-service.yml +0 -0
  165. /package/{content → stacks/blazor-azure}/.azure/pipelines/templates/deploy-container-app.yml +0 -0
  166. /package/{content → stacks/blazor-azure}/.azure/pipelines/templates/infra-deploy.yml +0 -0
  167. /package/{content → stacks/blazor-azure}/.claude/commands/morph-apply.md +0 -0
  168. /package/{content → stacks/blazor-azure}/.claude/commands/morph-archive.md +0 -0
  169. /package/{content → stacks/blazor-azure}/.claude/commands/morph-deploy.md +0 -0
  170. /package/{content → stacks/blazor-azure}/.claude/commands/morph-infra.md +0 -0
  171. /package/{content → stacks/blazor-azure}/.claude/commands/morph-proposal.md +0 -0
  172. /package/{content → stacks/blazor-azure}/.claude/commands/morph-status.md +0 -0
  173. /package/{content → stacks/blazor-azure}/.claude/settings.local.json +0 -0
  174. /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/README.md +0 -0
  175. /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/code-review.md +0 -0
  176. /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/morph-checklist.md +0 -0
  177. /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/simulation-checklist.md +0 -0
  178. /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/README.md +0 -0
  179. /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/morph-replicate.md +0 -0
  180. /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-clarify.md +0 -0
  181. /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-design.md +0 -0
  182. /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-tasks.md +0 -0
  183. /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-uiux.md +0 -0
  184. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/README.md +0 -0
  185. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/ai-agents/ai-system-architect.md +0 -0
  186. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/po-pm-advisor.md +0 -0
  187. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/prompt-engineer.md +0 -0
  188. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/seo-growth-hacker.md +0 -0
  189. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/standards-architect.md +0 -0
  190. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/dotnet-senior.md +0 -0
  191. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/ef-modeler.md +0 -0
  192. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/hangfire-orchestrator.md +0 -0
  193. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/ms-agent-expert.md +0 -0
  194. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/frontend/blazor-builder.md +0 -0
  195. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/frontend/nextjs-expert.md +0 -0
  196. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/frontend/ui-ux-designer.md +0 -0
  197. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/azure-architect.md +0 -0
  198. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/azure-deploy-specialist.md +0 -0
  199. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/bicep-architect.md +0 -0
  200. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/container-specialist.md +0 -0
  201. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/devops-engineer.md +0 -0
  202. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/asaas-financial.md +0 -0
  203. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/azure-identity.md +0 -0
  204. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/clerk-auth.md +0 -0
  205. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/resend-email.md +0 -0
  206. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/quality/code-analyzer.md +0 -0
  207. /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/quality/testing-specialist.md +0 -0
  208. /package/{content → stacks/blazor-azure}/.claude/skills/level-3-technologies/README.md +0 -0
  209. /package/{content → stacks/blazor-azure}/.claude/skills/level-4-patterns/README.md +0 -0
  210. /package/{content → stacks/blazor-azure}/.morph/.morphversion +0 -0
  211. /package/{content → stacks/blazor-azure}/.morph/archive/.gitkeep +0 -0
  212. /package/{content → stacks/blazor-azure}/.morph/config/agents.json +0 -0
  213. /package/{content → stacks/blazor-azure}/.morph/config/config.template.json +0 -0
  214. /package/{content → stacks/blazor-azure}/.morph/docs/STORY-DRIVEN-DEVELOPMENT.md +0 -0
  215. /package/{content → stacks/blazor-azure}/.morph/docs/workflows/design-impl.md +0 -0
  216. /package/{content → stacks/blazor-azure}/.morph/docs/workflows/fast-track.md +0 -0
  217. /package/{content → stacks/blazor-azure}/.morph/docs/workflows/full-morph.md +0 -0
  218. /package/{content → stacks/blazor-azure}/.morph/docs/workflows/standard.md +0 -0
  219. /package/{content → stacks/blazor-azure}/.morph/docs/workflows/ui-refresh.md +0 -0
  220. /package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/README.md +0 -0
  221. /package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/contracts.ts +0 -0
  222. /package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/spec.md +0 -0
  223. /package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/tasks.md +0 -0
  224. /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/README.md +0 -0
  225. /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/contracts.cs +0 -0
  226. /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/decisions.md +0 -0
  227. /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/spec.md +0 -0
  228. /package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/tasks.md +0 -0
  229. /package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/README.md +0 -0
  230. /package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/contracts.cs +0 -0
  231. /package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/spec.md +0 -0
  232. /package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/tasks.md +0 -0
  233. /package/{content → stacks/blazor-azure}/.morph/examples/scheduled-reports/decisions.md +0 -0
  234. /package/{content → stacks/blazor-azure}/.morph/examples/scheduled-reports/proposal.md +0 -0
  235. /package/{content → stacks/blazor-azure}/.morph/examples/scheduled-reports/spec.md +0 -0
  236. /package/{content → stacks/blazor-azure}/.morph/examples/state-v3.json +0 -0
  237. /package/{content → stacks/blazor-azure}/.morph/features/.gitkeep +0 -0
  238. /package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-agents.sh +0 -0
  239. /package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-all.sh +0 -0
  240. /package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-specs.sh +0 -0
  241. /package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-tests.sh +0 -0
  242. /package/{content → stacks/blazor-azure}/.morph/hooks/task-completed.js +0 -0
  243. /package/{content → stacks/blazor-azure}/.morph/hooks/teammate-idle.js +0 -0
  244. /package/{content → stacks/blazor-azure}/.morph/project.md +0 -0
  245. /package/{content → stacks/blazor-azure}/.morph/schemas/agent.schema.json +0 -0
  246. /package/{content → stacks/blazor-azure}/.morph/schemas/tasks.schema.json +0 -0
  247. /package/{content → stacks/blazor-azure}/.morph/specs/.gitkeep +0 -0
  248. /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-blazor-ui.md +0 -0
  249. /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-production.md +0 -0
  250. /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-setup.md +0 -0
  251. /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-workflows.md +0 -0
  252. /package/{content → stacks/blazor-azure}/.morph/standards/architecture.md +0 -0
  253. /package/{content → stacks/blazor-azure}/.morph/standards/azure.md +0 -0
  254. /package/{content → stacks/blazor-azure}/.morph/standards/coding.md +0 -0
  255. /package/{content → stacks/blazor-azure}/.morph/standards/dotnet10-migration.md +0 -0
  256. /package/{content → stacks/blazor-azure}/.morph/standards/fluent-ui-setup.md +0 -0
  257. /package/{content → stacks/blazor-azure}/.morph/standards/passkeys-auth.md +0 -0
  258. /package/{content → stacks/blazor-azure}/.morph/standards/vector-search-rag.md +0 -0
  259. /package/{content → stacks/blazor-azure}/.morph/state.json +0 -0
  260. /package/{content → stacks/blazor-azure}/.morph/templates/CONTEXT-FEATURE.md +0 -0
  261. /package/{content → stacks/blazor-azure}/.morph/templates/CONTEXT.md +0 -0
  262. /package/{content → stacks/blazor-azure}/.morph/templates/FluentDesignTheme.cs +0 -0
  263. /package/{content → stacks/blazor-azure}/.morph/templates/MudTheme.cs +0 -0
  264. /package/{content → stacks/blazor-azure}/.morph/templates/agent.cs +0 -0
  265. /package/{content → stacks/blazor-azure}/.morph/templates/clarify-questions.md +0 -0
  266. /package/{content → stacks/blazor-azure}/.morph/templates/component.razor +0 -0
  267. /package/{content → stacks/blazor-azure}/.morph/templates/contracts/Commands.cs +0 -0
  268. /package/{content → stacks/blazor-azure}/.morph/templates/contracts/Entities.cs +0 -0
  269. /package/{content → stacks/blazor-azure}/.morph/templates/contracts/Queries.cs +0 -0
  270. /package/{content → stacks/blazor-azure}/.morph/templates/contracts/README.md +0 -0
  271. /package/{content → stacks/blazor-azure}/.morph/templates/contracts.cs +0 -0
  272. /package/{content → stacks/blazor-azure}/.morph/templates/decisions.md +0 -0
  273. /package/{content → stacks/blazor-azure}/.morph/templates/design-system.css +0 -0
  274. /package/{content → stacks/blazor-azure}/.morph/templates/infra/.dockerignore.example +0 -0
  275. /package/{content → stacks/blazor-azure}/.morph/templates/infra/Dockerfile.example +0 -0
  276. /package/{content → stacks/blazor-azure}/.morph/templates/infra/README.md +0 -0
  277. /package/{content → stacks/blazor-azure}/.morph/templates/infra/app-insights.bicep +0 -0
  278. /package/{content → stacks/blazor-azure}/.morph/templates/infra/app-service.bicep +0 -0
  279. /package/{content → stacks/blazor-azure}/.morph/templates/infra/azure-pipelines-deploy.yml +0 -0
  280. /package/{content → stacks/blazor-azure}/.morph/templates/infra/container-app-env.bicep +0 -0
  281. /package/{content → stacks/blazor-azure}/.morph/templates/infra/container-app.bicep +0 -0
  282. /package/{content → stacks/blazor-azure}/.morph/templates/infra/deploy.ps1 +0 -0
  283. /package/{content → stacks/blazor-azure}/.morph/templates/infra/deploy.sh +0 -0
  284. /package/{content → stacks/blazor-azure}/.morph/templates/infra/key-vault.bicep +0 -0
  285. /package/{content → stacks/blazor-azure}/.morph/templates/infra/main.bicep +0 -0
  286. /package/{content → stacks/blazor-azure}/.morph/templates/infra/parameters.dev.json +0 -0
  287. /package/{content → stacks/blazor-azure}/.morph/templates/infra/parameters.prod.json +0 -0
  288. /package/{content → stacks/blazor-azure}/.morph/templates/infra/parameters.staging.json +0 -0
  289. /package/{content → stacks/blazor-azure}/.morph/templates/infra/sql-database.bicep +0 -0
  290. /package/{content → stacks/blazor-azure}/.morph/templates/infra/storage.bicep +0 -0
  291. /package/{content → stacks/blazor-azure}/.morph/templates/integrations/asaas-client.cs +0 -0
  292. /package/{content → stacks/blazor-azure}/.morph/templates/integrations/asaas-webhook.cs +0 -0
  293. /package/{content → stacks/blazor-azure}/.morph/templates/integrations/azure-identity-config.cs +0 -0
  294. /package/{content → stacks/blazor-azure}/.morph/templates/integrations/clerk-config.cs +0 -0
  295. /package/{content → stacks/blazor-azure}/.morph/templates/job.cs +0 -0
  296. /package/{content → stacks/blazor-azure}/.morph/templates/migration.cs +0 -0
  297. /package/{content → stacks/blazor-azure}/.morph/templates/proposal.md +0 -0
  298. /package/{content → stacks/blazor-azure}/.morph/templates/recap.md +0 -0
  299. /package/{content → stacks/blazor-azure}/.morph/templates/repository.cs +0 -0
  300. /package/{content → stacks/blazor-azure}/.morph/templates/saas/subscription.cs +0 -0
  301. /package/{content → stacks/blazor-azure}/.morph/templates/saas/tenant.cs +0 -0
  302. /package/{content → stacks/blazor-azure}/.morph/templates/service.cs +0 -0
  303. /package/{content → stacks/blazor-azure}/.morph/templates/simulation.md +0 -0
  304. /package/{content → stacks/blazor-azure}/.morph/templates/spec.md +0 -0
  305. /package/{content → stacks/blazor-azure}/.morph/templates/sprint-status.yaml +0 -0
  306. /package/{content → stacks/blazor-azure}/.morph/templates/state.template.json +0 -0
  307. /package/{content → stacks/blazor-azure}/.morph/templates/story.md +0 -0
  308. /package/{content → stacks/blazor-azure}/.morph/templates/tasks.md +0 -0
  309. /package/{content → stacks/blazor-azure}/.morph/templates/test.cs +0 -0
  310. /package/{content → stacks/blazor-azure}/.morph/templates/ui-components.md +0 -0
  311. /package/{content → stacks/blazor-azure}/.morph/templates/ui-design-system.md +0 -0
  312. /package/{content → stacks/blazor-azure}/.morph/templates/ui-flows.md +0 -0
  313. /package/{content → stacks/blazor-azure}/.morph/templates/ui-mockups.md +0 -0
  314. /package/{content → stacks/blazor-azure}/.morph/test-infra/example.bicep +0 -0
  315. /package/{content → stacks/blazor-azure}/CLAUDE.md +0 -0
  316. /package/{content → stacks/blazor-azure}/README.md +0 -0
package/LICENSE CHANGED
@@ -1,72 +1,72 @@
1
- Proprietary License
2
-
3
- Copyright (c) 2024-2025 Polymorphism Tech
4
- All rights reserved.
5
-
6
- MORPH-SPEC Framework - Proprietary Software License
7
-
8
- 1. GRANT OF LICENSE
9
-
10
- Subject to the terms and conditions of this License, Polymorphism Tech ("Licensor")
11
- grants you a limited, non-exclusive, non-transferable license to:
12
-
13
- a) Install and use the MORPH-SPEC CLI tool for personal or commercial projects
14
- b) Use the generated templates and code in your own projects
15
- c) Modify generated code for your specific use cases
16
-
17
- 2. RESTRICTIONS
18
-
19
- You may NOT:
20
-
21
- a) Redistribute, sell, lease, or sublicense the MORPH-SPEC framework itself
22
- b) Modify, decompile, reverse engineer, or create derivative works of the framework
23
- c) Remove or modify any copyright notices or proprietary markings
24
- d) Use the framework to create competing products or services
25
- e) Publicly fork or redistribute the source code
26
- f) Share access credentials to private repositories
27
-
28
- 3. OWNERSHIP
29
-
30
- The MORPH-SPEC framework, including all code, documentation, templates, and
31
- associated materials, remains the exclusive property of Polymorphism Tech.
32
-
33
- 4. GENERATED CODE
34
-
35
- Code and projects generated using MORPH-SPEC are yours to use, modify, and
36
- distribute as you see fit, including commercial use.
37
-
38
- 5. SUPPORT AND UPDATES
39
-
40
- - CLI tool updates are provided via npm registry
41
- - Support is available at: support@polymorphism.tech
42
- - Documentation updates are included with each release
43
-
44
- 6. WARRANTY DISCLAIMER
45
-
46
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
49
-
50
- 7. LIMITATION OF LIABILITY
51
-
52
- IN NO EVENT SHALL POLYMORPHISM TECH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
53
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
54
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55
- SOFTWARE.
56
-
57
- 8. TERMINATION
58
-
59
- This license is effective until terminated. Your rights under this license will
60
- terminate automatically without notice if you fail to comply with any term of
61
- this license.
62
-
63
- 9. CONTACT
64
-
65
- For licensing inquiries, custom licenses, or commercial support:
66
- Email: contact@polymorphism.com.br
67
- Website: https://polymorphism.com.br
68
-
69
- ---
70
-
71
- MORPH-SPEC v2.0.0
72
- by Polymorphism Tech
1
+ Proprietary License
2
+
3
+ Copyright (c) 2024-2025 Polymorphism Tech
4
+ All rights reserved.
5
+
6
+ MORPH-SPEC Framework - Proprietary Software License
7
+
8
+ 1. GRANT OF LICENSE
9
+
10
+ Subject to the terms and conditions of this License, Polymorphism Tech ("Licensor")
11
+ grants you a limited, non-exclusive, non-transferable license to:
12
+
13
+ a) Install and use the MORPH-SPEC CLI tool for personal or commercial projects
14
+ b) Use the generated templates and code in your own projects
15
+ c) Modify generated code for your specific use cases
16
+
17
+ 2. RESTRICTIONS
18
+
19
+ You may NOT:
20
+
21
+ a) Redistribute, sell, lease, or sublicense the MORPH-SPEC framework itself
22
+ b) Modify, decompile, reverse engineer, or create derivative works of the framework
23
+ c) Remove or modify any copyright notices or proprietary markings
24
+ d) Use the framework to create competing products or services
25
+ e) Publicly fork or redistribute the source code
26
+ f) Share access credentials to private repositories
27
+
28
+ 3. OWNERSHIP
29
+
30
+ The MORPH-SPEC framework, including all code, documentation, templates, and
31
+ associated materials, remains the exclusive property of Polymorphism Tech.
32
+
33
+ 4. GENERATED CODE
34
+
35
+ Code and projects generated using MORPH-SPEC are yours to use, modify, and
36
+ distribute as you see fit, including commercial use.
37
+
38
+ 5. SUPPORT AND UPDATES
39
+
40
+ - CLI tool updates are provided via npm registry
41
+ - Support is available at: support@polymorphism.tech
42
+ - Documentation updates are included with each release
43
+
44
+ 6. WARRANTY DISCLAIMER
45
+
46
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
49
+
50
+ 7. LIMITATION OF LIABILITY
51
+
52
+ IN NO EVENT SHALL POLYMORPHISM TECH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
53
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
54
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55
+ SOFTWARE.
56
+
57
+ 8. TERMINATION
58
+
59
+ This license is effective until terminated. Your rights under this license will
60
+ terminate automatically without notice if you fail to comply with any term of
61
+ this license.
62
+
63
+ 9. CONTACT
64
+
65
+ For licensing inquiries, custom licenses, or commercial support:
66
+ Email: contact@polymorphism.com.br
67
+ Website: https://polymorphism.com.br
68
+
69
+ ---
70
+
71
+ MORPH-SPEC v2.0.0
72
+ by Polymorphism Tech
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <h1 align="center">MORPH-SPEC</h1>
2
2
 
3
3
  <p align="center">
4
- <strong>Desenvolvimento orientado por especificações com agentes AI</strong><br>
4
+ <strong>Framework de desenvolvimento spec-driven com 30 agentes AI especializados</strong><br>
5
5
  <em>by Polymorphism Tech</em>
6
6
  </p>
7
7
 
@@ -20,7 +20,7 @@
20
20
  </p>
21
21
 
22
22
  <p align="center">
23
- <strong>📚 Guias de Uso:</strong>
23
+ <strong>Guias de Uso:</strong>
24
24
  <a href="QUICKSTART.md">Quick Start</a> •
25
25
  <a href="CHEATSHEET.md">Cheat Sheet</a> •
26
26
  <a href="docs/README.md">API Docs</a>
@@ -32,11 +32,80 @@
32
32
 
33
33
  **M**ethodical **O**rchestration for **R**eliable **P**roduction-ready **SPEC**-driven development
34
34
 
35
- MORPH-SPEC é um framework de desenvolvimento orientado por especificações com **17 agentes AI especializados**. Cada agente tem expertise em tecnologias específicas e segue workflows estruturados para entregar código production-ready.
35
+ MORPH-SPEC é um framework de desenvolvimento orientado por especificações com **30 agentes AI especializados** organizados em 4 tiers hierárquicos. Cada agente tem expertise em tecnologias específicas e segue workflows estruturados para entregar código production-ready.
36
36
 
37
- **Stacks suportadas:** .NET/Blazor, .NET/Next.js
38
- **Infraestrutura:** Azure Bicep (IaC)
37
+ **Stacks suportadas:** .NET 10/Blazor, .NET 10/Next.js, Node.js, Monorepos
38
+ **Infraestrutura:** Azure Bicep (IaC) + Docker
39
39
  **Ferramenta:** Claude Code
40
+ **Validação:** Pipeline automático de enforcement com gates por fase
41
+ **Auto-Detecção:** ✨ LLM-powered context detection (v3.1+)
42
+
43
+ ---
44
+
45
+ ## 🚀 Novidade v3.0: LLM Interaction Enhancements
46
+
47
+ MORPH-SPEC v3.0 torna o framework **explícito e orientado** para Claude Code com 8 melhorias fundamentais:
48
+
49
+ ### 1. **Approval Gates** (Portões de Aprovação)
50
+ - ✅ Rastreamento explícito de aprovações em `state.json`
51
+ - 🚫 Bloqueio de transições de fase até aprovação explícita
52
+ - 📝 Comandos: `approve`, `reject`, `approval-status`
53
+
54
+ ### 2. **Checkpoint Automation** (Validação Automática)
55
+ - 🔍 Auto-validação a cada 3 tasks (T003, T006, T009...)
56
+ - 🛡️ 4 validators: architecture, packages, security, design-system
57
+ - 🚧 Bloqueia progresso se falhas detectadas
58
+
59
+ ### 3. **Stricter Phase Validation** (Validação Estrita)
60
+ - 🎯 State machine com transições válidas
61
+ - 📋 Validação de conteúdo (spec.md, tasks.json)
62
+ - 5️⃣ Sistema de 5 gates de validação
63
+
64
+ ### 4. **Agent Team Spawning** (Spawning de Agentes)
65
+ - 🤖 Detecção automática quando spawnar (5+ agents, 15+ files, multi-domain)
66
+ - 🏗️ Comando `spawn-team` gera configs para Task tool
67
+ - 📄 Templates prontos para agent context
68
+
69
+ ### 5. **Metadata Generation** (Geração de Metadados)
70
+ - 📊 Auto-gera `metadata.json` após cada task
71
+ - ⚡ Reduz uso de tokens em 60-80%
72
+ - 🔗 Links rápidos para spec, tasks, decisões
73
+
74
+ ### 6. **Learning System** (Sistema de Aprendizado)
75
+ - 📚 11 patterns pré-configurados (389 linhas)
76
+ - 🔎 Busca: `search-patterns "{keyword}"`
77
+ - 📝 Captura: `capture-pattern {feature} success "Description"`
78
+
79
+ ### 7. **MCP Template Enhancement** (Templates Dinâmicos)
80
+ - 🌐 17 placeholders com dados do projeto
81
+ - 📈 Injeta: files, coverage, compliance, commits
82
+ - 🎨 Templates: `proposal-with-mcp.md`, `spec-with-mcp.md`
83
+
84
+ ### 8. **Interactive Decisions** (Decisões Estruturadas)
85
+ - 💬 Templates para AskUserQuestion
86
+ - 🎯 6 padrões documentados (scope, architecture, validation, etc.)
87
+ - 📖 Guia completo em `.morph/templates/decision-prompts.md`
88
+
89
+ **Configuração:** `.morph/config/llm-interaction.json` com 3 presets (strict, lightweight, no-guardrails)
90
+
91
+ **Documentação:** [docs/llm-interaction-config.md](docs/llm-interaction-config.md)
92
+
93
+ **Migration:** `npx morph-spec upgrade --preset strict`
94
+
95
+ ---
96
+
97
+ ## ✨ Novidade v3.1: Auto-Detecção Inteligente
98
+
99
+ MORPH-SPEC agora **detecta automaticamente** o contexto do seu projeto usando Claude Code:
100
+
101
+ - 🤖 **LLM Analysis**: Analisa package.json, .csproj, README, estrutura de pastas
102
+ - 🎯 **90%+ Accuracy**: Few-shot learning com exemplos reais (Next.js, Blazor, Monorepo)
103
+ - 🔒 **Privacy-First**: Processamento local, zero chamadas externas de API
104
+ - 🛡️ **Secret Sanitization**: Redação automática de API keys, passwords, tokens
105
+ - 🧙 **Wizard Fallback**: Wizard interativo de 7 perguntas se LLM falhar
106
+ - ⚡ **Zero Manual Work**: Gera `.morph/project.md` e `config.json` em segundos
107
+
108
+ **Saiba mais:** [docs/cli-auto-detection.md](docs/cli-auto-detection.md)
40
109
 
41
110
  ---
42
111
 
@@ -67,7 +136,7 @@ morph-spec init
67
136
  ```
68
137
 
69
138
  <details>
70
- <summary><strong>⚠️ Windows + nvm-windows: Comando não reconhecido?</strong></summary>
139
+ <summary><strong>Windows + nvm-windows: Comando não reconhecido?</strong></summary>
71
140
 
72
141
  Se você usa **nvm-windows** para gerenciar versões do Node.js, o npm **não** adiciona automaticamente os pacotes globais ao PATH. Este é um [problema conhecido do nvm-windows](https://github.com/coreybutler/nvm-windows/issues/391).
73
142
 
@@ -115,13 +184,19 @@ Veja também: [Troubleshooting](#troubleshooting)
115
184
 
116
185
  | Comando | Descrição |
117
186
  |---------|-----------|
118
- | `morph-spec init` | Inicializa MORPH no diretório atual |
187
+ | `morph-spec init` | Inicializa MORPH e **detecta automaticamente** o contexto do projeto ✨ |
188
+ | `morph-spec init --wizard` | Inicializa com wizard manual (sem auto-detecção LLM) |
189
+ | `morph-spec init --skip-detection` | Inicializa sem detectar contexto (configuração manual) |
119
190
  | `morph-spec init --force` | Sobrescreve instalação existente |
120
- | `morph-spec update` | Atualiza projeto para versão mais recente |
191
+ | `morph-spec update` | Atualiza projeto e **re-analisa contexto** automaticamente |
192
+ | `morph-spec update --wizard` | Atualiza com wizard manual |
193
+ | `morph-spec update --skip-detection` | Atualiza sem re-analisar contexto |
121
194
  | `morph-spec update --templates` | Atualiza apenas templates |
122
195
  | `morph-spec update --standards` | Atualiza apenas standards |
123
196
  | `morph-spec doctor` | Verifica saúde e versões da instalação |
124
197
 
198
+ > ✨ **Novo em v3.1+:** Auto-detecção inteligente de stack, arquitetura e infraestrutura usando Claude Code!
199
+
125
200
  ### Verificar Instalação
126
201
 
127
202
  ```bash
@@ -129,9 +204,9 @@ morph-spec doctor
129
204
  ```
130
205
 
131
206
  O comando `doctor` verifica:
132
- - Versão do CLI (se está atualizada)
133
- - Versão do MORPH no projeto
134
- - Estrutura de arquivos e configurações
207
+ - Versão do CLI (se está atualizada)
208
+ - Versão do MORPH no projeto
209
+ - Estrutura de arquivos e configurações
135
210
 
136
211
  Ou abra seu projeto no Claude Code e execute:
137
212
  ```
@@ -171,12 +246,12 @@ npx @polymorphism-tech/morph-spec@latest update
171
246
  ### 3. O que é atualizado?
172
247
 
173
248
  O comando `update` sincroniza:
174
- - Templates (`.morph/templates/`)
175
- - Standards (`.morph/standards/`)
176
- - Agentes (`.morph/config/agents.json`)
177
- - Comandos Claude (`.claude/commands/`)
178
- - Skills (`.claude/skills/`)
179
- - Instruções (CLAUDE.md)
249
+ - Templates (`.morph/templates/`)
250
+ - Standards (`.morph/standards/`)
251
+ - Agentes (`.morph/config/agents.json`)
252
+ - Comandos Claude (`.claude/commands/`)
253
+ - Skills (`.claude/skills/`)
254
+ - Instruções (CLAUDE.md)
180
255
 
181
256
  **Importante:** Seu `config.json` é preservado!
182
257
 
@@ -209,7 +284,7 @@ Revise os arquivos gerados e aprove (ou peça ajustes).
209
284
  /morph-apply minha-feature
210
285
  ```
211
286
 
212
- O MORPH implementa task por task, com testes a cada etapa.
287
+ O MORPH implementa task por task, com validação automática a cada etapa.
213
288
 
214
289
  ### 5. Arquivar
215
290
 
@@ -225,74 +300,191 @@ Move a feature concluída para o arquivo.
225
300
 
226
301
  ```
227
302
  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
228
- SETUP ─▶ │ DESIGN │ ─▶ │ CLARIFY │ ─▶ │ TASKS │ ─▶ │IMPLEMENT │
303
+ PROPOSAL -> │ DESIGN │ -> │ CLARIFY │ -> │ TASKS │ -> │IMPLEMENT │
229
304
  │ │ │ │ │ │ │ │ │ │
230
305
  │ Contexto │ │ Spec + │ │ Q&A + │ │ Quebra │ │ Executa │
231
- │ + Agents │ │Contracts │ │ Edges │ │ Tasks │ │ + Testa
306
+ │ + Agents │ │Contracts │ │ Edges │ │ Tasks │ │ + Valida
232
307
  └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
233
- ⛔ ⛔
234
- Aprovação Aprovação
308
+ | | |
309
+ Spec Gate Design System Validation
310
+ (C# checks) Gate Pipeline
235
311
  ```
236
312
 
237
313
  **Pontos de aprovação:** O MORPH para em 2 momentos para você revisar antes de continuar.
238
314
 
315
+ **Gates de validação (v3):**
316
+ - **Spec Gate** (Design -> Clarify): Valida contratos C# — CancellationToken, PascalCase, async suffix, sealed classes, records para DTOs
317
+ - **Design System Gate** (Tasks -> Implement): Bloqueia se features de UI não tiverem design system definido
318
+ - **Validation Pipeline** (cada task done): Roda validators baseados nos agentes ativos da feature
319
+
239
320
  ---
240
321
 
241
- ## Comandos Claude Code
322
+ ## Novidades v3 — Validation Pipeline
323
+
324
+ O v3 transforma MORPH de ferramentas isoladas em um **pipeline integrado de validação**:
325
+
326
+ | Feature | O que faz | Comando |
327
+ |---------|-----------|---------|
328
+ | **Validation Pipeline** | Roda validators automaticamente ao completar tasks | `morph-spec task done` |
329
+ | **Standards Injection** | Carrega standards relevantes por agente automaticamente | `morph-spec detect-agents --json` |
330
+ | **Design System Gate** | Bloqueia FASE 5 se features UI não tiverem design system | `morph-spec phase advance` |
331
+ | **Spec Validation** | Valida contratos C# na FASE 2, antes de implementar | `morph-spec phase advance` |
332
+ | **Decision Constraints** | ADRs em decisions.md configuram validators automaticamente | Automático |
333
+ | **Auto Recap** | Gera recap.md a partir de dados reais do projeto | `morph-spec generate recap` |
334
+ | **Smart Phase Advance** | Avança fases com gates de validação obrigatórios | `morph-spec phase advance` |
335
+
336
+ **Fluxo de dados:**
337
+ ```
338
+ agents.json (30 agentes)
339
+ |-> detect-agents -> state.json (agentes ativos)
340
+ |-> standards-context-injector -> standards por agente
341
+ |-> validation-runner -> validators por agente
342
+ decisions.md (ADRs)
343
+ |-> decision-constraint-loader -> constraints para validators
344
+ ```
345
+
346
+ ---
347
+
348
+ ## Comandos
349
+
350
+ ### Claude Code (Slash Commands)
242
351
 
243
352
  | Comando | Descrição |
244
353
  |---------|-----------|
245
- | `/morph-proposal <nome>` | Cria nova feature |
246
- | `/morph-apply <nome>` | Implementa feature aprovada |
354
+ | `/morph-proposal <nome>` | Cria nova feature (fases 0-4 com pausas) |
355
+ | `/morph-apply <nome>` | Implementa feature aprovada (fase 5) |
247
356
  | `/morph-status` | Mostra status do projeto |
248
357
  | `/morph-archive <nome>` | Arquiva feature concluída |
249
358
  | `/morph-infra <ação>` | Gerencia infraestrutura (init, validate, deploy) |
250
- | `/morph-costs` | Estima custos Azure |
359
+ | `/morph-preflight` | Validação pre-deploy Azure |
360
+ | `/morph-troubleshoot <erro>` | Busca soluções para erros |
361
+
362
+ ### CLI Completo
363
+
364
+ | Comando | Descrição |
365
+ |---------|-----------|
366
+ | **Setup** | |
367
+ | `morph-spec init` | Inicializa MORPH no diretório |
368
+ | `morph-spec update` | Atualiza para versão mais recente |
369
+ | `morph-spec doctor` | Verifica saúde da instalação |
370
+ | `morph-spec detect` | Detecta stack, arquitetura, patterns |
371
+ | `morph-spec detect-agents <input>` | Detecta agentes + complexidade + standards |
372
+ | **Fases e Tasks** | |
373
+ | `morph-spec phase advance <feature>` | Avança fase com gates de validação |
374
+ | `morph-spec validate-phase <feature> <phase>` | Valida pré-requisitos de uma fase |
375
+ | `morph-spec task done <feature> <ids>` | Completa tasks (roda validação antes) |
376
+ | `morph-spec task start <feature> <id>` | Marca task como in_progress |
377
+ | `morph-spec task next <feature>` | Mostra próxima task sugerida |
378
+ | `morph-spec rollback <feature> <phase>` | Rollback para fase anterior |
379
+ | **Geração** | |
380
+ | `morph-spec generate design-system <md>` | Gera CSS + temas C# de ui-design-system.md |
381
+ | `morph-spec generate recap <feature>` | Gera recap.md automático |
382
+ | `morph-spec generate context [feature]` | Gera CONTEXT.md para Claude Code |
383
+ | **Validação** | |
384
+ | `morph-spec validate [validator]` | Validação de código (packages, architecture, contrast) |
385
+ | `morph-spec validate-blazor [path]` | Valida patterns Fluent UI Blazor |
386
+ | `morph-spec validate-blazor-state [path]` | Valida session state Blazor |
387
+ | `morph-spec validate-css [path]` | Valida classes CSS em Razor files |
388
+ | `morph-spec analyze-blazor-concurrency [path]` | Detecta concurrency issues em DbContext |
389
+ | `morph-spec lint-fluent [path]` | Lint de patterns Fluent UI |
390
+ | **State** | |
391
+ | `morph-spec state list` | Lista todas as features |
392
+ | `morph-spec state get <feature>` | Detalhes de uma feature |
393
+ | `morph-spec state set <feature> <key> <value>` | Atualiza propriedade |
394
+ | `morph-spec state checkpoint <feature> "nota"` | Cria checkpoint |
395
+ | **Story-Driven** | |
396
+ | `morph-spec story create <feature> <id>` | Cria story com Dev Notes |
397
+ | `morph-spec story shard <feature>` | Divide spec em shards (90% token savings) |
398
+ | `morph-spec story status <feature> <action>` | Gerencia sprint status |
399
+ | **Learning** | |
400
+ | `morph-spec learn analyze` | Aprende com histórico do projeto |
401
+ | `morph-spec learn insights` | Mostra patterns aprendidos |
402
+ | `morph-spec learn suggest [category]` | Sugestões por categoria |
403
+ | **Outros** | |
404
+ | `morph-spec troubleshoot <keywords>` | Busca soluções para erros |
405
+ | `morph-spec session-summary <feature>` | Resumo da sessão atual |
406
+ | `morph-spec sync` | Sincroniza standards de decisions |
251
407
 
252
408
  ---
253
409
 
254
410
  ## Agentes
255
411
 
256
- ### Sempre Ativos
412
+ MORPH-SPEC possui **30 agentes** organizados em 4 tiers hierárquicos com squads:
413
+
414
+ ### Tier 1 — Orchestrators (3)
415
+
416
+ | Agente | Função | Ativação |
417
+ |--------|--------|----------|
418
+ | **Standards Architect** | Chief Architect, padrões e consistência | Sempre ativo |
419
+ | **AI System Architect** | Arquitetura de sistemas multi-agente | Por keyword |
420
+ | **PO/PM Advisor** | Requisitos, ROI, business value | Por keyword |
421
+
422
+ ### Tier 2 — Domain Leaders (3)
257
423
 
258
- | Agente | Função |
259
- |--------|--------|
260
- | 📐 **Standards Architect** | Padrões de código e consistência |
261
- | ☁️ **Azure Architect** | Infraestrutura cloud e IaC |
262
- | 💰 **Cost Guardian** | Controle de custos |
424
+ | Agente | Squad | Ativação |
425
+ |--------|-------|----------|
426
+ | **Dotnet Senior** | Backend (10 specialists) | Sempre ativo |
427
+ | **Azure Architect** | Infraestrutura (5 specialists) | Sempre ativo |
428
+ | **UI/UX Designer** | Frontend (3 specialists) | Por keyword |
263
429
 
264
- ### Por Stack
430
+ ### Tier 3 — Specialists (23)
431
+
432
+ <details>
433
+ <summary><strong>Backend Squad (10)</strong></summary>
265
434
 
266
435
  | Agente | Keywords |
267
436
  |--------|----------|
268
- | 🔥 **Blazor Builder** | blazor, razor, component |
269
- | ⚛️ **NextJS Expert** | nextjs, react, frontend |
437
+ | **EF Modeler** | database, entity, migration, ef core |
438
+ | **Event Architect** | event, service bus, cqrs, real-time |
439
+ | **API Designer** | rest, graphql, grpc, openapi |
440
+ | **NoSQL/Cache Expert** | cosmos, redis, cache, blob storage |
441
+ | **DDD Expert** | ddd, aggregate, bounded context |
442
+ | **Hangfire Orchestrator** | scheduled, job, background, cron |
443
+ | **MS Agent Expert** | agent, ai, microsoft agent framework, mcp, a2a |
444
+ | **Asaas Financial** | asaas, pix, boleto, payment |
445
+ | **Clerk Auth** | clerk, login, signup, oauth |
446
+ | **Resend Email** | resend, email, transactional email |
447
+ </details>
270
448
 
271
- ### Especialistas
449
+ <details>
450
+ <summary><strong>Frontend Squad (3)</strong></summary>
272
451
 
273
452
  | Agente | Keywords |
274
453
  |--------|----------|
275
- | 🗄️ **EF Modeler** | database, entity, migration |
276
- | 🤖 **MS Agent Expert** | agent, ai, semantic kernel |
277
- | **Hangfire Orchestrator** | scheduled, job, background |
278
- | 🎨 **UI/UX Designer** | wizard, dashboard, complex form |
279
- | 📋 **PO/PM Advisor** | unclear, requirements, ROI |
454
+ | **Blazor Builder** | blazor, razor, component, fluent ui |
455
+ | **NextJS Expert** | nextjs, react, shadcn, server actions |
456
+ | **CSS Specialist** | css, design system, theme, design tokens |
457
+ </details>
280
458
 
281
- ### Integrações
459
+ <details>
460
+ <summary><strong>Infrastructure Squad (5)</strong></summary>
282
461
 
283
462
  | Agente | Keywords |
284
463
  |--------|----------|
285
- | 💳 **Asaas Financial** | asaas, pix, boleto, payment |
286
- | 🔐 **Clerk Auth** | clerk, auth, login |
287
- | 🆔 **Azure Identity** | identity, entra, microsoft auth |
464
+ | **Bicep Architect** | bicep, iac, infra, provision |
465
+ | **DevOps Engineer** | pipeline, ci/cd, deploy, github actions |
466
+ | **Container Specialist** | docker, container, container apps |
467
+ | **Observability Expert** | monitoring, logging, tracing, app insights |
468
+ | **Azure Identity** | identity, entra, passkeys, managed identity |
469
+ </details>
288
470
 
289
- ### Infraestrutura
471
+ <details>
472
+ <summary><strong>Quality Squad (5)</strong></summary>
290
473
 
291
474
  | Agente | Keywords |
292
475
  |--------|----------|
293
- | 🏗️ **Bicep Architect** | bicep, iac, infra |
294
- | 🚀 **DevOps Engineer** | pipeline, ci/cd, deploy |
295
- | 📦 **Container Specialist** | docker, container |
476
+ | **Testing Specialist** | test, unit, integration, e2e, xunit, bunit |
477
+ | **Code Analyzer** | analyze, review, refactor, clean code, solid |
478
+ | **Troubleshooting Expert** | debug, troubleshoot, root cause, diagnose |
479
+ | **Load Testing Expert** | load test, k6, stress test, scalability |
480
+ | **Documentation Specialist** | readme, api docs, deployment guide |
481
+ </details>
482
+
483
+ ### Tier 4 — Validators (1)
484
+
485
+ | Agente | Função | Ativação |
486
+ |--------|--------|----------|
487
+ | **Security Expert** | SQL injection, XSS, secrets, CSRF | Sempre ativo (hooks) |
296
488
 
297
489
  ---
298
490
 
@@ -300,9 +492,9 @@ Move a feature concluída para o arquivo.
300
492
 
301
493
  | Exemplo | Descrição |
302
494
  |---------|-----------|
303
- | [micro-saas](content/.morph/examples/micro-saas/) | SaaS completo com Blazor + Asaas billing |
304
- | [api-nextjs](content/.morph/examples/api-nextjs/) | .NET API + Next.js frontend |
305
- | [multi-agent](content/.morph/examples/multi-agent/) | Sistema multi-agente com Semantic Kernel |
495
+ | [micro-saas](stacks/blazor-azure/.morph/examples/micro-saas/) | SaaS completo com Blazor + Asaas billing |
496
+ | [api-nextjs](stacks/blazor-azure/.morph/examples/api-nextjs/) | .NET API + Next.js frontend |
497
+ | [multi-agent](stacks/blazor-azure/.morph/examples/multi-agent/) | Sistema multi-agente com Microsoft Agent Framework |
306
498
 
307
499
  Cada exemplo inclui: `README.md`, `spec.md`, `contracts.cs`, `tasks.md`, `decisions.md`
308
500
 
@@ -318,11 +510,15 @@ seu-projeto/
318
510
  ├── .morph/
319
511
  │ ├── config/ # Configurações
320
512
  │ │ ├── config.json
321
- │ │ └── agents.json
322
- │ ├── standards/ # Padrões de código
513
+ │ │ └── agents.json # 30 agentes em 4 tiers
514
+ │ ├── standards/ # Padrões de código (26 arquivos)
323
515
  │ │ ├── coding.md
324
516
  │ │ ├── architecture.md
325
- │ │ └── azure.md
517
+ │ │ ├── azure.md
518
+ │ │ ├── blazor-*.md # Lifecycle, state, pitfalls, EF Core
519
+ │ │ ├── css-*.md # Naming, animations
520
+ │ │ ├── agent-framework-*.md # Setup, workflows, production, blazor-ui
521
+ │ │ └── ...
326
522
  │ ├── templates/ # Templates de código e IaC
327
523
  │ │ ├── infra/
328
524
  │ │ ├── integrations/
@@ -332,7 +528,7 @@ seu-projeto/
332
528
  │ └── archive/ # Features concluídas
333
529
  └── .claude/
334
530
  ├── commands/ # Slash commands
335
- └── skills/ # Skills dos agentes
531
+ └── skills/ # Skills dos agentes (31+ arquivos)
336
532
  ```
337
533
 
338
534
  ---
@@ -365,7 +561,7 @@ O MORPH segue a filosofia **"Free tier first"**:
365
561
 
366
562
  ---
367
563
 
368
- ## 🔧 Troubleshooting
564
+ ## Troubleshooting
369
565
 
370
566
  ### Comando `morph-spec` não encontrado
371
567
 
@@ -409,10 +605,10 @@ morph-spec --version
409
605
  ### `morph-spec doctor` reporta problemas
410
606
 
411
607
  **O que o doctor verifica:**
412
- - Versão do CLI (atualizada?)
413
- - Versão do MORPH no projeto
414
- - Comando morph-spec no PATH
415
- - Estrutura de arquivos (.morph/, CLAUDE.md, etc.)
608
+ - Versão do CLI (atualizada?)
609
+ - Versão do MORPH no projeto
610
+ - Comando morph-spec no PATH
611
+ - Estrutura de arquivos (.morph/, CLAUDE.md, etc.)
416
612
 
417
613
  **Se reportar "morph-spec not in PATH":**
418
614
  1. Use `npx` como alternativa (sempre funciona)
@@ -465,12 +661,12 @@ morph-spec <comando> --help # Ajuda de comando específico
465
661
  ```
466
662
 
467
663
  **Suporte:**
468
- - 📧 Email: support@polymorphism.com.br
469
- - 🐛 Issues: [GitHub](https://github.com/lucasPolymorphism/morph-spec-framework/issues)
664
+ - Email: support@polymorphism.com.br
665
+ - Issues: [GitHub](https://github.com/lucasPolymorphism/morph-spec-framework/issues)
470
666
 
471
667
  ---
472
668
 
473
- ## 📄 Licença e Distribuição
669
+ ## Licença e Distribuição
474
670
 
475
671
  **Repositório:** Privado (código fonte protegido)
476
672
  **Package npm:** Público e gratuito via `@polymorphism-tech/morph-spec`
@@ -480,16 +676,16 @@ morph-spec <comando> --help # Ajuda de comando específico
480
676
  O MORPH-SPEC framework é software proprietário da Polymorphism Tech. Veja [LICENSE](LICENSE) para detalhes.
481
677
 
482
678
  **Você PODE:**
483
- - Usar o CLI tool gratuitamente
484
- - Gerar projetos para uso pessoal ou comercial
485
- - Modificar código gerado pelos templates
486
- - Distribuir seus projetos criados com MORPH-SPEC
679
+ - Usar o CLI tool gratuitamente
680
+ - Gerar projetos para uso pessoal ou comercial
681
+ - Modificar código gerado pelos templates
682
+ - Distribuir seus projetos criados com MORPH-SPEC
487
683
 
488
684
  **Você NÃO PODE:**
489
- - Redistribuir ou vender o framework
490
- - Criar produtos derivados competidores
491
- - Modificar ou fazer engenharia reversa do framework
492
- - Remover avisos de copyright
685
+ - Redistribuir ou vender o framework
686
+ - Criar produtos derivados competidores
687
+ - Modificar ou fazer engenharia reversa do framework
688
+ - Remover avisos de copyright
493
689
 
494
690
  ### Código Gerado
495
691
 
@@ -497,18 +693,18 @@ Todo código gerado usando MORPH-SPEC é **100% seu** para usar como quiser, inc
497
693
 
498
694
  ### Suporte
499
695
 
500
- - 📧 Email: support@polymorphism.com.br
501
- - 🌐 Website: https://polymorphism.com.br
502
- - 📦 npm: [@polymorphism-tech/morph-spec](https://www.npmjs.com/package/@polymorphism-tech/morph-spec)
696
+ - Email: support@polymorphism.com.br
697
+ - Website: https://polymorphism.com.br
698
+ - npm: [@polymorphism-tech/morph-spec](https://www.npmjs.com/package/@polymorphism-tech/morph-spec)
503
699
 
504
700
  ---
505
701
 
506
702
  ## Links
507
703
 
508
- - 📦 [npm Package](https://www.npmjs.com/package/@polymorphism-tech/morph-spec)
509
- - 📚 [Documentação](docs/)
510
- - 💡 [Exemplos](content/.morph/examples/)
511
- - 🌐 [Polymorphism Tech](https://polymorphism.com.br)
704
+ - [npm Package](https://www.npmjs.com/package/@polymorphism-tech/morph-spec)
705
+ - [Documentação](docs/)
706
+ - [Exemplos](stacks/blazor-azure/.morph/examples/)
707
+ - [Polymorphism Tech](https://polymorphism.com.br)
512
708
 
513
709
  ---
514
710