@polymorphism-tech/morph-spec 3.2.0 → 4.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 (319) hide show
  1. package/CLAUDE.md +352 -7
  2. package/README.md +1 -14
  3. package/bin/detect-agents.js +1 -1
  4. package/bin/morph-spec.js +122 -34
  5. package/bin/validate.js +1 -1
  6. package/docs/getting-started.md +0 -5
  7. package/docs/v3.0/AGENTS.md +521 -0
  8. package/docs/v3.0/ANALYSIS.md +555 -0
  9. package/docs/v3.0/ARCHITECTURE.md +436 -0
  10. package/docs/v3.0/EXECUTION-FLOW.md +1304 -0
  11. package/docs/v3.0/FEATURES.md +688 -0
  12. package/docs/v3.0/README.md +231 -0
  13. package/docs/v3.0/ROADMAP.md +801 -0
  14. package/docs/validation-checklist.md +0 -1
  15. package/package.json +1 -1
  16. package/src/commands/agents/index.js +4 -0
  17. package/src/commands/{spawn-team.js → agents/spawn-team.js} +172 -172
  18. package/src/commands/{create-story.js → feature/create-story.js} +357 -354
  19. package/src/commands/feature/index.js +6 -0
  20. package/src/commands/{shard-spec.js → feature/shard-spec.js} +2 -2
  21. package/src/commands/{sprint-status.js → feature/sprint-status.js} +1 -1
  22. package/src/commands/{generate-context.js → generation/generate-context.js} +40 -40
  23. package/src/commands/{generate.js → generation/generate.js} +4 -4
  24. package/src/commands/generation/index.js +5 -0
  25. package/src/commands/index.js +16 -0
  26. package/src/commands/{capture-pattern.js → learning/capture-pattern.js} +121 -121
  27. package/src/commands/learning/index.js +5 -0
  28. package/src/commands/{detect-agents.js → project/detect-agents.js} +178 -178
  29. package/src/commands/project/detect-workflow.js +174 -0
  30. package/src/commands/{detect.js → project/detect.js} +104 -104
  31. package/src/commands/{doctor.js → project/doctor.js} +356 -356
  32. package/src/commands/project/index.js +10 -0
  33. package/src/commands/{init.js → project/init.js} +305 -295
  34. package/src/commands/{sync.js → project/sync.js} +167 -167
  35. package/src/commands/{update.js → project/update.js} +240 -240
  36. package/src/commands/{advance-phase.js → state/advance-phase.js} +416 -357
  37. package/src/commands/{approve.js → state/approve.js} +221 -221
  38. package/src/commands/state/index.js +8 -0
  39. package/src/commands/{rollback-phase.js → state/rollback-phase.js} +185 -185
  40. package/src/commands/{state.js → state/state.js} +334 -334
  41. package/src/commands/{validate-phase.js → state/validate-phase.js} +221 -221
  42. package/src/commands/tasks/index.js +4 -0
  43. package/src/commands/{task.js → tasks/task.js} +78 -78
  44. package/src/commands/templates/index.js +8 -0
  45. package/src/commands/templates/template-customize.js +101 -0
  46. package/src/commands/templates/template-list.js +128 -0
  47. package/src/commands/templates/template-render.js +95 -0
  48. package/src/commands/templates/template-show.js +131 -0
  49. package/src/commands/templates/template-validate.js +91 -0
  50. package/src/commands/utils/index.js +7 -0
  51. package/src/commands/{session-summary.js → utils/session-summary.js} +291 -291
  52. package/src/commands/{troubleshoot.js → utils/troubleshoot.js} +222 -222
  53. package/src/commands/{analyze-blazor-concurrency.js → validation/analyze-blazor-concurrency.js} +193 -193
  54. package/src/commands/validation/index.js +8 -0
  55. package/src/commands/{lint-fluent.js → validation/lint-fluent.js} +352 -352
  56. package/src/commands/{validate-blazor-state.js → validation/validate-blazor-state.js} +210 -210
  57. package/src/commands/{validate-blazor.js → validation/validate-blazor.js} +156 -156
  58. package/src/commands/{validate-css.js → validation/validate-css.js} +84 -84
  59. package/src/core/index.js +10 -0
  60. package/src/core/registry/command-registry.js +302 -0
  61. package/src/core/registry/index.js +8 -0
  62. package/src/core/registry/validator-registry.js +204 -0
  63. package/src/core/state/index.js +8 -0
  64. package/src/{lib → core/state}/phase-state-machine.js +214 -214
  65. package/src/{lib → core/state}/state-manager.js +572 -534
  66. package/src/core/templates/index.js +9 -0
  67. package/src/core/templates/template-registry.js +335 -0
  68. package/src/core/templates/template-renderer.js +477 -0
  69. package/src/core/templates/template-validator.js +296 -0
  70. package/src/core/workflows/index.js +7 -0
  71. package/src/core/workflows/workflow-detector.js +354 -0
  72. package/src/lib/{complexity-analyzer.js → analysis/complexity-analyzer.js} +441 -441
  73. package/src/lib/analysis/index.js +7 -0
  74. package/src/lib/{checkpoint-hooks.js → checkpoints/checkpoint-hooks.js} +258 -258
  75. package/src/lib/checkpoints/index.js +7 -0
  76. package/src/lib/detectors/config-detector.js +223 -223
  77. package/src/lib/detectors/conversation-analyzer.js +163 -163
  78. package/src/lib/{design-system-detector.js → detectors/design-system-detector.js} +187 -187
  79. package/src/lib/detectors/index.js +87 -84
  80. package/src/lib/detectors/standards-generator.js +275 -275
  81. package/src/lib/detectors/structure-detector.js +245 -245
  82. package/src/lib/{context-generator.js → generators/context-generator.js} +526 -516
  83. package/src/lib/generators/index.js +10 -0
  84. package/src/lib/{metadata-extractor.js → generators/metadata-extractor.js} +387 -380
  85. package/src/lib/{recap-generator.js → generators/recap-generator.js} +205 -205
  86. package/src/lib/learning/index.js +7 -0
  87. package/src/lib/orchestration/index.js +7 -0
  88. package/src/lib/{team-orchestrator.js → orchestration/team-orchestrator.js} +323 -323
  89. package/src/lib/stacks/index.js +7 -0
  90. package/src/lib/{stack-resolver.js → stacks/stack-resolver.js} +180 -148
  91. package/src/lib/standards/index.js +7 -0
  92. package/src/lib/{standards-context-injector.js → standards/standards-context-injector.js} +298 -288
  93. package/src/lib/troubleshooting/index.js +8 -0
  94. package/src/lib/{troubleshoot-grep.js → troubleshooting/troubleshoot-grep.js} +204 -204
  95. package/src/lib/{troubleshoot-index.js → troubleshooting/troubleshoot-index.js} +144 -144
  96. package/src/lib/validators/architecture/architecture-validator.js +387 -0
  97. package/src/lib/validators/architecture/index.js +7 -0
  98. package/src/lib/validators/architecture-validator.js +40 -367
  99. package/src/lib/{blazor-concurrency-analyzer.js → validators/blazor/blazor-concurrency-analyzer.js} +277 -288
  100. package/src/lib/{blazor-state-validator.js → validators/blazor/blazor-state-validator.js} +279 -291
  101. package/src/lib/{blazor-validator.js → validators/blazor/blazor-validator.js} +369 -374
  102. package/src/lib/validators/blazor/index.js +9 -0
  103. package/src/lib/validators/content/content-validator.js +351 -0
  104. package/src/lib/validators/content/index.js +7 -0
  105. package/src/lib/validators/content-validator.js +164 -351
  106. package/src/lib/validators/{contract-compliance-validator.js → contracts/contract-compliance-validator.js} +273 -273
  107. package/src/lib/validators/contracts/index.js +7 -0
  108. package/src/lib/{css-validator.js → validators/css/css-validator.js} +352 -352
  109. package/src/lib/validators/css/index.js +7 -0
  110. package/src/lib/validators/{design-system-validator.js → design-system/design-system-validator.js} +231 -231
  111. package/src/lib/validators/design-system/index.js +7 -0
  112. package/src/lib/validators/package-validator.js +41 -340
  113. package/src/lib/validators/packages/index.js +7 -0
  114. package/src/lib/validators/packages/package-validator.js +360 -0
  115. package/src/lib/validators/shared/index.js +12 -0
  116. package/src/lib/validators/shared/issue-counter.js +18 -0
  117. package/src/lib/validators/shared/result-formatter.js +124 -0
  118. package/src/lib/{spec-validator.js → validators/spec-validator.js} +258 -258
  119. package/src/lib/validators/ui/index.js +7 -0
  120. package/src/lib/validators/ui/ui-contrast-validator.js +422 -0
  121. package/src/lib/validators/ui-contrast-validator.js +31 -409
  122. package/src/lib/{validation-runner.js → validators/validation-runner.js} +286 -284
  123. package/src/ui/wizard-questions.js +0 -2
  124. package/src/utils/color-utils.js +70 -0
  125. package/src/utils/file-copier.js +188 -189
  126. package/src/utils/process-handler.js +97 -0
  127. package/stacks/blazor-azure/.claude/skills/level-2-domains/ai-agents/ai-system-architect.md +3 -3
  128. package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/api-designer.md +59 -0
  129. package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/dotnet-senior.md +45 -255
  130. package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/ef-modeler.md +33 -88
  131. package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/ms-agent-expert.md +25 -89
  132. package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/hangfire-orchestrator.md +64 -0
  133. package/stacks/blazor-azure/.morph/config/agents.json +879 -764
  134. package/stacks/blazor-azure/.morph/hooks/{pre-commit-tests.sh → pre-commit/tests-csharp.sh} +3 -2
  135. package/stacks/blazor-azure/.morph/templates/infrastructure/github/workflows/cd-prod.yml.hbs +41 -0
  136. package/stacks/blazor-azure/.morph/templates/infrastructure/github/workflows/cd-staging.yml.hbs +24 -0
  137. package/stacks/blazor-azure/.morph/templates/infrastructure/github/workflows/ci-build.yml.hbs +23 -0
  138. package/stacks/nextjs-supabase/.claude/commands/morph-apply.md +221 -0
  139. package/stacks/nextjs-supabase/.claude/commands/morph-archive.md +79 -0
  140. package/stacks/nextjs-supabase/.claude/commands/morph-deploy.md +529 -0
  141. package/stacks/nextjs-supabase/.claude/commands/morph-infra.md +209 -0
  142. package/stacks/nextjs-supabase/.claude/commands/morph-preflight.md +227 -0
  143. package/stacks/nextjs-supabase/.claude/commands/morph-proposal.md +122 -0
  144. package/stacks/nextjs-supabase/.claude/commands/morph-status.md +86 -0
  145. package/stacks/nextjs-supabase/.claude/commands/morph-troubleshoot.md +122 -0
  146. package/stacks/nextjs-supabase/.claude/settings.local.json +6 -0
  147. package/stacks/nextjs-supabase/.claude/skills/level-2-domains/integrations/supabase-expert.md +30 -150
  148. package/stacks/nextjs-supabase/.morph/config/agents.json +345 -345
  149. package/stacks/nextjs-supabase/.morph/hooks/pre-commit/tests-typescript.sh +61 -0
  150. package/stacks/nextjs-supabase/.morph/templates/infrastructure/github/workflows/cd-prod.yml.hbs +22 -0
  151. package/stacks/nextjs-supabase/.morph/templates/infrastructure/github/workflows/cd-staging.yml.hbs +22 -0
  152. package/stacks/nextjs-supabase/.morph/templates/infrastructure/github/workflows/ci-build.yml.hbs +35 -0
  153. package/stacks/nextjs-supabase/README.md +6 -15
  154. package/bin/render-template.js +0 -349
  155. package/bin/semantic-detect-agents.js +0 -247
  156. package/bin/validate-agents-skills.js +0 -257
  157. package/bin/validate-agents.js +0 -70
  158. package/bin/validate-phase.js +0 -263
  159. package/docs/examples.md +0 -328
  160. package/scripts/reorganize-skills.cjs +0 -175
  161. package/scripts/validate-agents-structure.cjs +0 -52
  162. package/scripts/validate-skills.cjs +0 -180
  163. package/src/commands/deploy.js +0 -780
  164. package/src/lib/continuous-validator.js +0 -421
  165. package/src/lib/decision-constraint-loader.js +0 -109
  166. package/src/lib/design-system-scaffolder.js +0 -299
  167. package/src/lib/hook-executor.js +0 -257
  168. package/src/lib/mockup-generator.js +0 -366
  169. package/src/lib/ui-detector.js +0 -350
  170. package/src/llm/schema-validator.js +0 -121
  171. package/src/sanitizer/.gitkeep +0 -0
  172. package/src/scanner/.gitkeep +0 -0
  173. package/src/types/index.js +0 -477
  174. package/src/ui/.gitkeep +0 -0
  175. package/src/writer/.gitkeep +0 -0
  176. package/stacks/blazor-azure/.azure/README.md +0 -293
  177. package/stacks/blazor-azure/.azure/docs/azure-devops-setup.md +0 -454
  178. package/stacks/blazor-azure/.azure/docs/branch-strategy.md +0 -398
  179. package/stacks/blazor-azure/.azure/docs/local-development.md +0 -515
  180. package/stacks/blazor-azure/.azure/pipelines/pipeline-variables.yml +0 -34
  181. package/stacks/blazor-azure/.azure/pipelines/prod-pipeline.yml +0 -319
  182. package/stacks/blazor-azure/.azure/pipelines/staging-pipeline.yml +0 -234
  183. package/stacks/blazor-azure/.azure/pipelines/templates/build-dotnet.yml +0 -75
  184. package/stacks/blazor-azure/.azure/pipelines/templates/deploy-app-service.yml +0 -94
  185. package/stacks/blazor-azure/.azure/pipelines/templates/deploy-container-app.yml +0 -120
  186. package/stacks/blazor-azure/.azure/pipelines/templates/infra-deploy.yml +0 -90
  187. package/stacks/blazor-azure/.claude/settings.local.json +0 -15
  188. package/stacks/blazor-azure/.morph/docs/STORY-DRIVEN-DEVELOPMENT.md +0 -392
  189. package/stacks/blazor-azure/.morph/docs/workflows/design-impl.md +0 -37
  190. package/stacks/blazor-azure/.morph/docs/workflows/enforcement-pipeline.md +0 -668
  191. package/stacks/blazor-azure/.morph/docs/workflows/fast-track.md +0 -29
  192. package/stacks/blazor-azure/.morph/docs/workflows/full-morph.md +0 -76
  193. package/stacks/blazor-azure/.morph/docs/workflows/standard.md +0 -44
  194. package/stacks/blazor-azure/.morph/docs/workflows/ui-refresh.md +0 -39
  195. package/stacks/blazor-azure/.morph/examples/api-nextjs/README.md +0 -241
  196. package/stacks/blazor-azure/.morph/examples/api-nextjs/contracts.ts +0 -307
  197. package/stacks/blazor-azure/.morph/examples/api-nextjs/spec.md +0 -399
  198. package/stacks/blazor-azure/.morph/examples/api-nextjs/tasks.md +0 -168
  199. package/stacks/blazor-azure/.morph/examples/micro-saas/README.md +0 -125
  200. package/stacks/blazor-azure/.morph/examples/micro-saas/contracts.cs +0 -358
  201. package/stacks/blazor-azure/.morph/examples/micro-saas/decisions.md +0 -246
  202. package/stacks/blazor-azure/.morph/examples/micro-saas/spec.md +0 -236
  203. package/stacks/blazor-azure/.morph/examples/micro-saas/tasks.md +0 -150
  204. package/stacks/blazor-azure/.morph/examples/multi-agent/README.md +0 -309
  205. package/stacks/blazor-azure/.morph/examples/multi-agent/contracts.cs +0 -433
  206. package/stacks/blazor-azure/.morph/examples/multi-agent/spec.md +0 -479
  207. package/stacks/blazor-azure/.morph/examples/multi-agent/tasks.md +0 -185
  208. package/stacks/blazor-azure/.morph/examples/scheduled-reports/decisions.md +0 -158
  209. package/stacks/blazor-azure/.morph/examples/scheduled-reports/proposal.md +0 -95
  210. package/stacks/blazor-azure/.morph/examples/scheduled-reports/spec.md +0 -267
  211. package/stacks/blazor-azure/.morph/examples/state-v3.json +0 -188
  212. package/stacks/blazor-azure/.morph/hooks/README.md +0 -348
  213. package/stacks/blazor-azure/.morph/hooks/pre-commit-agents.sh +0 -24
  214. package/stacks/blazor-azure/.morph/hooks/pre-commit-all.sh +0 -48
  215. package/stacks/blazor-azure/.morph/hooks/pre-commit-specs.sh +0 -49
  216. package/stacks/blazor-azure/.morph/hooks/task-completed.js +0 -73
  217. package/stacks/blazor-azure/.morph/hooks/teammate-idle.js +0 -68
  218. package/stacks/blazor-azure/.morph/standards/agent-framework-blazor-ui.md +0 -359
  219. package/stacks/blazor-azure/.morph/standards/agent-framework-production.md +0 -410
  220. package/stacks/blazor-azure/.morph/standards/agent-framework-setup.md +0 -413
  221. package/stacks/blazor-azure/.morph/standards/agent-framework-workflows.md +0 -349
  222. package/stacks/blazor-azure/.morph/standards/agent-teams-workflow.md +0 -474
  223. package/stacks/blazor-azure/.morph/standards/architecture.md +0 -325
  224. package/stacks/blazor-azure/.morph/standards/azure.md +0 -605
  225. package/stacks/blazor-azure/.morph/standards/coding.md +0 -377
  226. package/stacks/blazor-azure/.morph/standards/dotnet10-migration.md +0 -520
  227. package/stacks/blazor-azure/.morph/standards/fluent-ui-setup.md +0 -590
  228. package/stacks/blazor-azure/.morph/standards/migration-guide.md +0 -514
  229. package/stacks/blazor-azure/.morph/standards/passkeys-auth.md +0 -423
  230. package/stacks/blazor-azure/.morph/standards/vector-search-rag.md +0 -536
  231. package/stacks/blazor-azure/.morph/templates/CONTEXT-FEATURE.md +0 -276
  232. package/stacks/blazor-azure/.morph/templates/CONTEXT.md +0 -170
  233. package/stacks/blazor-azure/.morph/templates/FluentDesignTheme.cs +0 -149
  234. package/stacks/blazor-azure/.morph/templates/MudTheme.cs +0 -281
  235. package/stacks/blazor-azure/.morph/templates/agent.cs +0 -163
  236. package/stacks/blazor-azure/.morph/templates/clarify-questions.md +0 -159
  237. package/stacks/blazor-azure/.morph/templates/component.razor +0 -239
  238. package/stacks/blazor-azure/.morph/templates/contracts/Commands.cs +0 -74
  239. package/stacks/blazor-azure/.morph/templates/contracts/Entities.cs +0 -25
  240. package/stacks/blazor-azure/.morph/templates/contracts/Queries.cs +0 -74
  241. package/stacks/blazor-azure/.morph/templates/contracts/README.md +0 -74
  242. package/stacks/blazor-azure/.morph/templates/contracts.cs +0 -217
  243. package/stacks/blazor-azure/.morph/templates/decisions.md +0 -123
  244. package/stacks/blazor-azure/.morph/templates/design-system.css +0 -226
  245. package/stacks/blazor-azure/.morph/templates/infra/.dockerignore.example +0 -89
  246. package/stacks/blazor-azure/.morph/templates/infra/Dockerfile.example +0 -82
  247. package/stacks/blazor-azure/.morph/templates/infra/README.md +0 -286
  248. package/stacks/blazor-azure/.morph/templates/infra/app-insights.bicep +0 -63
  249. package/stacks/blazor-azure/.morph/templates/infra/app-service.bicep +0 -164
  250. package/stacks/blazor-azure/.morph/templates/infra/azure-pipelines-deploy.yml +0 -480
  251. package/stacks/blazor-azure/.morph/templates/infra/container-app-env.bicep +0 -49
  252. package/stacks/blazor-azure/.morph/templates/infra/container-app.bicep +0 -156
  253. package/stacks/blazor-azure/.morph/templates/infra/deploy-checklist.md +0 -426
  254. package/stacks/blazor-azure/.morph/templates/infra/deploy.ps1 +0 -229
  255. package/stacks/blazor-azure/.morph/templates/infra/deploy.sh +0 -208
  256. package/stacks/blazor-azure/.morph/templates/infra/key-vault.bicep +0 -91
  257. package/stacks/blazor-azure/.morph/templates/infra/main.bicep +0 -189
  258. package/stacks/blazor-azure/.morph/templates/infra/parameters.dev.json +0 -29
  259. package/stacks/blazor-azure/.morph/templates/infra/parameters.prod.json +0 -29
  260. package/stacks/blazor-azure/.morph/templates/infra/parameters.staging.json +0 -29
  261. package/stacks/blazor-azure/.morph/templates/infra/sql-database.bicep +0 -103
  262. package/stacks/blazor-azure/.morph/templates/infra/storage.bicep +0 -106
  263. package/stacks/blazor-azure/.morph/templates/integrations/asaas-client.cs +0 -387
  264. package/stacks/blazor-azure/.morph/templates/integrations/asaas-webhook.cs +0 -351
  265. package/stacks/blazor-azure/.morph/templates/integrations/azure-identity-config.cs +0 -288
  266. package/stacks/blazor-azure/.morph/templates/integrations/clerk-config.cs +0 -258
  267. package/stacks/blazor-azure/.morph/templates/job.cs +0 -171
  268. package/stacks/blazor-azure/.morph/templates/migration.cs +0 -83
  269. package/stacks/blazor-azure/.morph/templates/proposal.md +0 -141
  270. package/stacks/blazor-azure/.morph/templates/recap.md +0 -94
  271. package/stacks/blazor-azure/.morph/templates/repository.cs +0 -141
  272. package/stacks/blazor-azure/.morph/templates/saas/subscription.cs +0 -347
  273. package/stacks/blazor-azure/.morph/templates/saas/tenant.cs +0 -338
  274. package/stacks/blazor-azure/.morph/templates/service.cs +0 -139
  275. package/stacks/blazor-azure/.morph/templates/simulation.md +0 -353
  276. package/stacks/blazor-azure/.morph/templates/spec.md +0 -149
  277. package/stacks/blazor-azure/.morph/templates/sprint-status.yaml +0 -68
  278. package/stacks/blazor-azure/.morph/templates/state.template.json +0 -222
  279. package/stacks/blazor-azure/.morph/templates/story.md +0 -143
  280. package/stacks/blazor-azure/.morph/templates/tasks.md +0 -257
  281. package/stacks/blazor-azure/.morph/templates/test.cs +0 -239
  282. package/stacks/blazor-azure/.morph/templates/ui-components.md +0 -362
  283. package/stacks/blazor-azure/.morph/templates/ui-design-system.md +0 -286
  284. package/stacks/blazor-azure/.morph/templates/ui-flows.md +0 -336
  285. package/stacks/blazor-azure/.morph/templates/ui-mockups.md +0 -133
  286. package/stacks/nextjs-supabase/.morph/docs/easypanel-setup.md +0 -169
  287. package/stacks/nextjs-supabase/.morph/docs/supabase-mcp-setup.md +0 -247
  288. package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/README.md +0 -697
  289. package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/spec.md +0 -85
  290. package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/tasks.md +0 -86
  291. package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/README.md +0 -498
  292. package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/decisions.md +0 -121
  293. package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/spec.md +0 -138
  294. package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/tasks.md +0 -162
  295. package/stacks/nextjs-supabase/.morph/standards/easypanel-deploy.md +0 -191
  296. package/stacks/nextjs-supabase/.morph/standards/nextjs-patterns.md +0 -193
  297. package/stacks/nextjs-supabase/.morph/standards/supabase-auth.md +0 -171
  298. package/stacks/nextjs-supabase/.morph/standards/supabase-pgvector.md +0 -164
  299. package/stacks/nextjs-supabase/.morph/standards/supabase-rls.md +0 -179
  300. package/stacks/nextjs-supabase/.morph/standards/supabase-storage.md +0 -148
  301. package/stacks/nextjs-supabase/.morph/templates/contracts.cs +0 -173
  302. package/stacks/nextjs-supabase/.morph/templates/contracts.ts +0 -168
  303. package/stacks/nextjs-supabase/.morph/templates/decisions.md +0 -115
  304. package/stacks/nextjs-supabase/.morph/templates/dockerfile-api.dockerfile +0 -38
  305. package/stacks/nextjs-supabase/.morph/templates/dockerfile-web.dockerfile +0 -48
  306. package/stacks/nextjs-supabase/.morph/templates/proposal.md +0 -145
  307. package/stacks/nextjs-supabase/.morph/templates/recap.md +0 -134
  308. package/stacks/nextjs-supabase/.morph/templates/rls-policy.sql +0 -57
  309. package/stacks/nextjs-supabase/.morph/templates/spec.md +0 -231
  310. package/stacks/nextjs-supabase/.morph/templates/supabase-migration.sql +0 -100
  311. package/stacks/nextjs-supabase/.morph/templates/tasks.md +0 -257
  312. /package/src/commands/{search-patterns.js → learning/search-patterns.js} +0 -0
  313. /package/src/commands/{migrate-state.js → utils/migrate-state.js} +0 -0
  314. /package/src/commands/{upgrade.js → utils/upgrade.js} +0 -0
  315. /package/src/{lib → core/templates}/template-data-sources.js +0 -0
  316. /package/src/lib/{design-system-generator.js → generators/design-system-generator.js} +0 -0
  317. /package/src/lib/{learning-system.js → learning/learning-system.js} +0 -0
  318. /package/{src/generator → stacks/blazor-azure/.morph/templates}/.gitkeep +0 -0
  319. /package/{src/llm → stacks/nextjs-supabase/.morph/templates}/.gitkeep +0 -0
@@ -1,94 +0,0 @@
1
- # ==============================================================================
2
- # MORPH-SPEC - Deploy App Service Template
3
- # Reusable template for deploying to Azure App Service
4
- # ==============================================================================
5
-
6
- parameters:
7
- - name: azureSubscription
8
- type: string
9
- - name: appServiceName
10
- type: string
11
- - name: resourceGroupName
12
- type: string
13
- - name: slotName
14
- type: string
15
- default: ''
16
- - name: package
17
- type: string
18
- default: '$(Pipeline.Workspace)/drop/**/*.zip'
19
- - name: healthCheckUrl
20
- type: string
21
- default: '/health'
22
- - name: healthCheckTimeout
23
- type: number
24
- default: 300
25
-
26
- steps:
27
- - task: AzureWebApp@1
28
- displayName: 'Deploy to App Service'
29
- inputs:
30
- azureSubscription: '${{ parameters.azureSubscription }}'
31
- appType: 'webAppLinux'
32
- appName: '${{ parameters.appServiceName }}'
33
- ${{ if ne(parameters.slotName, '') }}:
34
- deployToSlotOrASE: true
35
- resourceGroupName: '${{ parameters.resourceGroupName }}'
36
- slotName: '${{ parameters.slotName }}'
37
- package: '${{ parameters.package }}'
38
- runtimeStack: 'DOTNETCORE|8.0'
39
-
40
- - task: AzureAppServiceSettings@1
41
- displayName: 'Configure App Settings'
42
- inputs:
43
- azureSubscription: '${{ parameters.azureSubscription }}'
44
- appName: '${{ parameters.appServiceName }}'
45
- ${{ if ne(parameters.slotName, '') }}:
46
- resourceGroupName: '${{ parameters.resourceGroupName }}'
47
- slotName: '${{ parameters.slotName }}'
48
- appSettings: |
49
- [
50
- {
51
- "name": "ASPNETCORE_ENVIRONMENT",
52
- "value": "Production",
53
- "slotSetting": false
54
- },
55
- {
56
- "name": "WEBSITE_TIME_ZONE",
57
- "value": "E. South America Standard Time",
58
- "slotSetting": false
59
- }
60
- ]
61
-
62
- - task: PowerShell@2
63
- displayName: 'Health check'
64
- inputs:
65
- targetType: 'inline'
66
- script: |
67
- $appUrl = "https://${{ parameters.appServiceName }}.azurewebsites.net"
68
- $healthUrl = "$appUrl${{ parameters.healthCheckUrl }}"
69
- $timeout = ${{ parameters.healthCheckTimeout }}
70
- $elapsed = 0
71
- $interval = 10
72
-
73
- Write-Host "Waiting for app to be healthy at: $healthUrl"
74
- Write-Host "Timeout: $timeout seconds"
75
-
76
- while ($elapsed -lt $timeout) {
77
- try {
78
- $response = Invoke-WebRequest -Uri $healthUrl -UseBasicParsing -TimeoutSec 5
79
- if ($response.StatusCode -eq 200) {
80
- Write-Host "✅ App is healthy!"
81
- Write-Host "Response: $($response.Content)"
82
- exit 0
83
- }
84
- }
85
- catch {
86
- Write-Host "⏳ Waiting... ($elapsed/$timeout seconds)"
87
- }
88
-
89
- Start-Sleep -Seconds $interval
90
- $elapsed += $interval
91
- }
92
-
93
- Write-Error "❌ Health check failed after $timeout seconds"
94
- exit 1
@@ -1,120 +0,0 @@
1
- # ==============================================================================
2
- # MORPH-SPEC - Deploy Container App Template
3
- # Reusable template for deploying to Azure Container Apps
4
- # ==============================================================================
5
-
6
- parameters:
7
- - name: azureSubscription
8
- type: string
9
- - name: containerAppName
10
- type: string
11
- - name: resourceGroupName
12
- type: string
13
- - name: containerRegistry
14
- type: string
15
- - name: imageName
16
- type: string
17
- - name: imageTag
18
- type: string
19
- - name: acrServiceConnection
20
- type: string
21
- - name: healthCheckUrl
22
- type: string
23
- default: '/health'
24
- - name: healthCheckTimeout
25
- type: number
26
- default: 300
27
-
28
- steps:
29
- - task: Docker@2
30
- displayName: 'Build and push container image'
31
- inputs:
32
- containerRegistry: '${{ parameters.acrServiceConnection }}'
33
- repository: '${{ parameters.imageName }}'
34
- command: 'buildAndPush'
35
- Dockerfile: '$(dockerfilePath)'
36
- tags: |
37
- ${{ parameters.imageTag }}
38
- latest
39
-
40
- - task: AzureCLI@2
41
- displayName: 'Update Container App'
42
- inputs:
43
- azureSubscription: '${{ parameters.azureSubscription }}'
44
- scriptType: 'bash'
45
- scriptLocation: 'inlineScript'
46
- inlineScript: |
47
- echo "Updating Container App: ${{ parameters.containerAppName }}"
48
- echo "Image: ${{ parameters.containerRegistry }}/${{ parameters.imageName }}:${{ parameters.imageTag }}"
49
-
50
- az containerapp update \
51
- --name ${{ parameters.containerAppName }} \
52
- --resource-group ${{ parameters.resourceGroupName }} \
53
- --image ${{ parameters.containerRegistry }}/${{ parameters.imageName }}:${{ parameters.imageTag }} \
54
- --output table
55
-
56
- echo "✅ Container App updated successfully"
57
-
58
- - task: AzureCLI@2
59
- displayName: 'Get Container App FQDN'
60
- name: getUrl
61
- inputs:
62
- azureSubscription: '${{ parameters.azureSubscription }}'
63
- scriptType: 'bash'
64
- scriptLocation: 'inlineScript'
65
- inlineScript: |
66
- FQDN=$(az containerapp show \
67
- --name ${{ parameters.containerAppName }} \
68
- --resource-group ${{ parameters.resourceGroupName }} \
69
- --query properties.configuration.ingress.fqdn -o tsv)
70
-
71
- echo "Container App URL: https://$FQDN"
72
- echo "##vso[task.setvariable variable=containerAppUrl;isOutput=true]https://$FQDN"
73
-
74
- - task: PowerShell@2
75
- displayName: 'Health check'
76
- inputs:
77
- targetType: 'inline'
78
- script: |
79
- $appUrl = "$(getUrl.containerAppUrl)"
80
- $healthUrl = "$appUrl${{ parameters.healthCheckUrl }}"
81
- $timeout = ${{ parameters.healthCheckTimeout }}
82
- $elapsed = 0
83
- $interval = 10
84
-
85
- Write-Host "Waiting for Container App to be healthy at: $healthUrl"
86
- Write-Host "Timeout: $timeout seconds"
87
-
88
- while ($elapsed -lt $timeout) {
89
- try {
90
- $response = Invoke-WebRequest -Uri $healthUrl -UseBasicParsing -TimeoutSec 5
91
- if ($response.StatusCode -eq 200) {
92
- Write-Host "✅ Container App is healthy!"
93
- Write-Host "Response: $($response.Content)"
94
- exit 0
95
- }
96
- }
97
- catch {
98
- Write-Host "⏳ Waiting... ($elapsed/$timeout seconds)"
99
- }
100
-
101
- Start-Sleep -Seconds $interval
102
- $elapsed += $interval
103
- }
104
-
105
- Write-Error "❌ Health check failed after $timeout seconds"
106
- exit 1
107
-
108
- - task: AzureCLI@2
109
- displayName: 'Show Container App revision'
110
- inputs:
111
- azureSubscription: '${{ parameters.azureSubscription }}'
112
- scriptType: 'bash'
113
- scriptLocation: 'inlineScript'
114
- inlineScript: |
115
- echo "📊 Active revisions:"
116
- az containerapp revision list \
117
- --name ${{ parameters.containerAppName }} \
118
- --resource-group ${{ parameters.resourceGroupName }} \
119
- --query "[?properties.active].{Name:name, Created:properties.createdTime, Replicas:properties.replicas, Traffic:properties.trafficWeight}" \
120
- --output table
@@ -1,90 +0,0 @@
1
- # ==============================================================================
2
- # MORPH-SPEC - Infrastructure Deploy Template
3
- # Reusable template for deploying Azure infrastructure via Bicep
4
- # ==============================================================================
5
-
6
- parameters:
7
- - name: azureSubscription
8
- type: string
9
- - name: resourceGroupName
10
- type: string
11
- - name: location
12
- type: string
13
- - name: environment
14
- type: string
15
- - name: appName
16
- type: string
17
- - name: hostingType
18
- type: string
19
- - name: bicepTemplateFile
20
- type: string
21
- - name: parametersFile
22
- type: string
23
-
24
- steps:
25
- - task: AzureCLI@2
26
- displayName: 'Create resource group if not exists'
27
- inputs:
28
- azureSubscription: '${{ parameters.azureSubscription }}'
29
- scriptType: 'bash'
30
- scriptLocation: 'inlineScript'
31
- inlineScript: |
32
- az group create \
33
- --name ${{ parameters.resourceGroupName }} \
34
- --location ${{ parameters.location }} \
35
- --tags \
36
- environment=${{ parameters.environment }} \
37
- application=${{ parameters.appName }} \
38
- managedBy=bicep \
39
- framework=morph-spec
40
-
41
- - task: AzureResourceManagerTemplateDeployment@3
42
- displayName: 'Deploy Bicep template'
43
- name: infraDeploy
44
- inputs:
45
- deploymentScope: 'Resource Group'
46
- azureResourceManagerConnection: '${{ parameters.azureSubscription }}'
47
- subscriptionId: '$(SUBSCRIPTION_ID)'
48
- action: 'Create Or Update Resource Group'
49
- resourceGroupName: '${{ parameters.resourceGroupName }}'
50
- location: '${{ parameters.location }}'
51
- templateLocation: 'Linked artifact'
52
- csmFile: '${{ parameters.bicepTemplateFile }}'
53
- csmParametersFile: '${{ parameters.parametersFile }}'
54
- overrideParameters: |
55
- -appName ${{ parameters.appName }}
56
- -environment ${{ parameters.environment }}
57
- -location ${{ parameters.location }}
58
- -hostingType ${{ parameters.hostingType }}
59
- deploymentMode: 'Incremental'
60
- deploymentOutputs: 'infraOutputs'
61
-
62
- - task: PowerShell@2
63
- displayName: 'Parse deployment outputs'
64
- inputs:
65
- targetType: 'inline'
66
- script: |
67
- $outputs = '$(infraOutputs)' | ConvertFrom-Json
68
-
69
- Write-Host "📊 Deployment Outputs:"
70
- $outputs.PSObject.Properties | ForEach-Object {
71
- $name = $_.Name
72
- $value = $_.Value.value
73
- Write-Host " $name = $value"
74
-
75
- # Set as pipeline variables
76
- Write-Host "##vso[task.setvariable variable=$name;isOutput=true]$value"
77
- }
78
-
79
- - task: AzureCLI@2
80
- displayName: 'Show deployed resources'
81
- inputs:
82
- azureSubscription: '${{ parameters.azureSubscription }}'
83
- scriptType: 'bash'
84
- scriptLocation: 'inlineScript'
85
- inlineScript: |
86
- echo "📦 Resources in ${{ parameters.resourceGroupName }}:"
87
- az resource list \
88
- --resource-group ${{ parameters.resourceGroupName }} \
89
- --query "[].{Name:name, Type:type, Location:location}" \
90
- --output table
@@ -1,15 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(dotnet:*)",
5
- "Bash(git:*)",
6
- "Read",
7
- "Write",
8
- "Edit",
9
- "Glob",
10
- "Grep"
11
- ],
12
- "deny": []
13
- },
14
- "model": "claude-sonnet-4-20250514"
15
- }
@@ -1,392 +0,0 @@
1
- # Story-Driven Development - Guia do Usuário
2
-
3
- > **O que você faz quando implementa uma feature usando MORPH-SPEC**
4
-
5
- ---
6
-
7
- ## 📋 Você Está Aqui
8
-
9
- Você acabou de terminar as fases 0-4 do MORPH:
10
- - ✅ Criou `spec.md` (especificação técnica)
11
- - ✅ Criou `contracts.cs` (interfaces/DTOs)
12
- - ✅ Criou `tasks.json` (lista de tasks)
13
- - ✅ Aprovou tudo
14
-
15
- **Agora você vai implementar. Este guia mostra como.**
16
-
17
- ---
18
-
19
- ## 🚀 Passo a Passo Completo
20
-
21
- ### Cenário: Feature "scheduled-reports" com 10 tasks
22
-
23
- ```bash
24
- # ============================================================================
25
- # ETAPA 1: PREPARAÇÃO (1x por feature)
26
- # ============================================================================
27
-
28
- # 1.1 - Dividir spec.md em partes menores (opcional, mas recomendado)
29
- morph-spec story shard scheduled-reports
30
-
31
- # Isso cria:
32
- # .morph/project/outputs/scheduled-reports/spec/
33
- # ├── index.md
34
- # ├── entity-design.md
35
- # ├── service-layer.md
36
- # └── ui-components.md
37
-
38
- # 1.2 - Criar primeira story
39
- morph-spec story create scheduled-reports SR-001 \
40
- --title "Create ScheduledReport entity" \
41
- --tasks "Create entity,Configure EF mapping,Create migration,Write tests"
42
-
43
- # Isso cria:
44
- # .morph/project/outputs/scheduled-reports/stories/SR-001.md
45
- # (arquivo com TODO o contexto que você precisa)
46
-
47
- # 1.3 - Criar demais stories
48
- morph-spec story create scheduled-reports SR-002 \
49
- --title "Implement ReportService" \
50
- --tasks "Create interface,Implement service,Add DI,Write tests"
51
-
52
- morph-spec story create scheduled-reports SR-003 \
53
- --title "Create report UI component" \
54
- --tasks "Create razor component,Add to router,Style with Fluent UI"
55
-
56
- # ... criar SR-004, SR-005, etc.
57
-
58
- # 1.4 - Ver todas as stories criadas
59
- morph-spec story status scheduled-reports show
60
-
61
- # Output:
62
- # 📊 Sprint Status: scheduled-reports
63
- # Progress: 0% (0/10 stories done)
64
- # Stories:
65
- # ✅ SR-001: Create ScheduledReport entity (ready)
66
- # ✅ SR-002: Implement ReportService (ready)
67
- # ✅ SR-003: Create report UI component (ready)
68
- # ...
69
-
70
-
71
- # ============================================================================
72
- # ETAPA 2: IMPLEMENTAR STORY SR-001 (repetir para cada story)
73
- # ============================================================================
74
-
75
- # 2.1 - Marcar que você vai começar a trabalhar nela
76
- morph-spec story status scheduled-reports start SR-001
77
-
78
- # 2.2 - Abrir a story
79
- cat .morph/project/outputs/scheduled-reports/stories/SR-001.md
80
-
81
- # Você vai ver:
82
- # - Context (resumo do que fazer)
83
- # - Dev Notes (dicas automáticas tipo "use Primary Constructor")
84
- # - Tasks (lista de tarefas)
85
- # - Acceptance Criteria (como validar se tá certo)
86
-
87
- # 2.3 - Ler SÓ a parte relevante do spec (não o spec inteiro)
88
- cat .morph/project/outputs/scheduled-reports/spec/entity-design.md
89
-
90
- # 2.4 - Implementar o código
91
- # (você vai escrever o código da entity, testes, etc.)
92
-
93
- # 2.5 - Editar a story para adicionar suas notas
94
- nano .morph/project/outputs/scheduled-reports/stories/SR-001.md
95
-
96
- # Procurar a seção "### Dev Notes (Added by Dev Agent)"
97
- # Adicionar algo tipo:
98
- ### Dev Notes (Added by Dev Agent)
99
- ```
100
- ✅ Implementado ScheduledReport.cs (linha 12)
101
- ✅ EF mapping em ReportDbContext.cs (linha 45)
102
- ✅ Migration: 20251209_AddScheduledReports.cs
103
- ✅ Testes: ScheduledReportTests.cs (12 tests)
104
- ⚠️ RecurrencePattern usa regex complexo
105
- ```
106
-
107
- # 2.6 - Marcar que terminou e está pronto para revisar
108
- morph-spec story status scheduled-reports qa SR-001
109
-
110
- # 2.7 - Commitar código
111
- git add .
112
- git commit -m "feat(SR-001): create ScheduledReport entity"
113
-
114
-
115
- # ============================================================================
116
- # ETAPA 3: REVISAR STORY SR-001 (QA)
117
- # ============================================================================
118
-
119
- # 3.1 - Ver status
120
- morph-spec story status scheduled-reports show
121
-
122
- # Output:
123
- # 👀 SR-001: Create ScheduledReport entity (ready_for_qa)
124
-
125
- # 3.2 - Abrir a story (agora com as notas do Dev)
126
- cat .morph/project/outputs/scheduled-reports/stories/SR-001.md
127
-
128
- # Você vai ver as Dev Notes que foram adicionadas:
129
- # "✅ Implementado ScheduledReport.cs (linha 12)"
130
- # "⚠️ RecurrencePattern usa regex complexo"
131
-
132
- # 3.3 - Revisar o código
133
- cat src/Domain/Entities/ScheduledReport.cs
134
- cat tests/Unit/ScheduledReportTests.cs
135
-
136
- # 3.4 - Se precisar refatorar, refatore
137
-
138
- # 3.5 - Editar a story para adicionar notas de revisão
139
- nano .morph/project/outputs/scheduled-reports/stories/SR-001.md
140
-
141
- # Procurar a seção "### QA Notes (Added by QA Agent)"
142
- # Adicionar algo tipo:
143
- ### QA Notes (Added by QA Agent)
144
- ```
145
- ✅ Código OK, segue padrões
146
- ✅ Refatorei ValidateRecurrence() (linha 89)
147
- ✅ Adicionei 3 testes de edge cases
148
- ✅ Todos os acceptance criteria validados
149
- ```
150
-
151
- # 3.6 - Marcar como concluída
152
- morph-spec story status scheduled-reports done SR-001
153
-
154
- # Output:
155
- # ✅ Story SR-001 marked as DONE
156
- # 📋 Next Story: SR-002
157
-
158
- # 3.7 - Commitar mudanças (se fez refactoring)
159
- git add .
160
- git commit -m "refactor(SR-001): extract ValidateRecurrence method"
161
-
162
-
163
- # ============================================================================
164
- # ETAPA 4: PRÓXIMA STORY (SR-002)
165
- # ============================================================================
166
-
167
- # Repetir ETAPA 2 e 3 para SR-002:
168
- morph-spec story status scheduled-reports start SR-002
169
- cat .morph/project/outputs/scheduled-reports/stories/SR-002.md
170
- cat .morph/project/outputs/scheduled-reports/spec/service-layer.md
171
- # ... implementar ...
172
- # ... adicionar Dev Notes ...
173
- morph-spec story status scheduled-reports qa SR-002
174
- # ... revisar ...
175
- # ... adicionar QA Notes ...
176
- morph-spec story status scheduled-reports done SR-002
177
-
178
- # Repetir para SR-003, SR-004, ..., SR-010
179
-
180
-
181
- # ============================================================================
182
- # ETAPA 5: FINALIZAÇÃO
183
- # ============================================================================
184
-
185
- # Ver progresso geral
186
- morph-spec story status scheduled-reports show
187
-
188
- # Output:
189
- # 📊 Sprint Status: scheduled-reports
190
- # Progress: 100% (10/10 stories done)
191
- # 🎉 All stories completed!
192
-
193
- # Pronto! Feature implementada.
194
- ```
195
-
196
- ---
197
-
198
- ## 📝 Comandos que Você Usa
199
-
200
- ### Criar stories (início da feature)
201
- ```bash
202
- morph-spec story shard <feature-name>
203
- morph-spec story create <feature-name> <story-id> --title "..." --tasks "..."
204
- ```
205
-
206
- ### Ver status
207
- ```bash
208
- morph-spec story status <feature-name> show
209
- ```
210
-
211
- ### Marcar que vai começar
212
- ```bash
213
- morph-spec story status <feature-name> start <story-id>
214
- ```
215
-
216
- ### Marcar que terminou (vai para QA)
217
- ```bash
218
- morph-spec story status <feature-name> qa <story-id>
219
- ```
220
-
221
- ### Marcar como concluída
222
- ```bash
223
- morph-spec story status <feature-name> done <story-id>
224
- ```
225
-
226
- ### Ver próxima story
227
- ```bash
228
- morph-spec story status <feature-name> next
229
- ```
230
-
231
- ---
232
-
233
- ## 🔄 Seu Dia a Dia
234
-
235
- ### Segunda-feira: Criar as stories
236
- ```bash
237
- morph-spec story shard my-feature
238
- morph-spec story create my-feature MF-001 --title "..." --tasks "..."
239
- morph-spec story create my-feature MF-002 --title "..." --tasks "..."
240
- morph-spec story create my-feature MF-003 --title "..." --tasks "..."
241
- ```
242
-
243
- ### Terça-feira: Implementar MF-001
244
- ```bash
245
- morph-spec story status my-feature start MF-001
246
- cat .morph/project/outputs/my-feature/stories/MF-001.md
247
- cat .morph/project/outputs/my-feature/spec/entity-design.md
248
- # [implementar código]
249
- # [adicionar Dev Notes na story]
250
- morph-spec story status my-feature qa MF-001
251
- git commit ...
252
- ```
253
-
254
- ### Terça à tarde: Revisar MF-001
255
- ```bash
256
- cat .morph/project/outputs/my-feature/stories/MF-001.md # ver Dev Notes
257
- # [revisar código]
258
- # [adicionar QA Notes na story]
259
- morph-spec story status my-feature done MF-001
260
- git commit ...
261
- ```
262
-
263
- ### Quarta-feira: Implementar MF-002
264
- ```bash
265
- morph-spec story status my-feature start MF-002
266
- # ... repetir workflow
267
- ```
268
-
269
- ---
270
-
271
- ## ❓ Perguntas Comuns
272
-
273
- ### "Preciso shardar o spec?"
274
- **Não é obrigatório.** Só recomendado se seu `spec.md` for grande (5+ seções).
275
-
276
- Se for pequeno, pule o `shard-spec.js` e vá direto para `create-story.js`.
277
-
278
- ---
279
-
280
- ### "Quantas tasks por story?"
281
- **4-8 tasks** é ideal. Se tiver mais, quebre em sub-stories.
282
-
283
- Exemplo:
284
- - ❌ Ruim: Story com 20 tasks (muito grande)
285
- - ✅ Bom: Story com 5 tasks (1 dia de trabalho)
286
-
287
- ---
288
-
289
- ### "O que são Dev Notes e QA Notes?"
290
- **Dev Notes:** Você (Dev) escreve o que implementou, para o QA saber.
291
-
292
- **QA Notes:** Você (QA) escreve o que revisou/refatorou.
293
-
294
- **Exemplo:**
295
- ```markdown
296
- ### Dev Notes (Added by Dev Agent)
297
- ```
298
- ✅ Implementei X.cs na pasta Domain/
299
- ⚠️ Cuidado: usa regex complexo na linha 67
300
- ```
301
-
302
- ### QA Notes (Added by QA Agent)
303
- ```
304
- ✅ Revisei e está OK
305
- ✅ Refatorei método ValidateX() para ficar mais claro
306
- ```
307
- ```
308
-
309
- ---
310
-
311
- ### "Onde adiciono Dev/QA Notes?"
312
- **No arquivo da story.**
313
-
314
- 1. Abra: `.morph/project/outputs/my-feature/stories/MF-001.md`
315
- 2. Procure a seção `### Dev Notes (Added by Dev Agent)`
316
- 3. Substitua `[VOCÊ VAI PREENCHER AQUI APÓS IMPLEMENTAR]` pelas suas notas
317
- 4. Salve
318
-
319
- ---
320
-
321
- ### "E se eu esquecer de adicionar Dev Notes?"
322
- Sem problema. Edite a story manualmente:
323
-
324
- ```bash
325
- nano .morph/project/outputs/my-feature/stories/MF-001.md
326
- # Adicione as notas na seção correta
327
- # Salve
328
- ```
329
-
330
- ---
331
-
332
- ### "Posso implementar várias stories na mesma sessão?"
333
- **Não recomendado.**
334
-
335
- Cada story = nova sessão do Claude (se usar Claude Code).
336
-
337
- Por quê? Evita confusão e economiza tokens.
338
-
339
- ---
340
-
341
- ## ✅ Checklist Rápido
342
-
343
- **No início da feature:**
344
- - [ ] Roda `shard-spec.js` (opcional)
345
- - [ ] Roda `create-story.js` para cada story
346
- - [ ] Roda `show` para ver todas criadas
347
-
348
- **Para cada story:**
349
- - [ ] `start` → Marcar que vai começar
350
- - [ ] Ler story file (`.morph/project/outputs/.../stories/XX.md`)
351
- - [ ] Ler spec shard (`.morph/project/outputs/.../spec/xxx.md`)
352
- - [ ] Implementar código
353
- - [ ] Adicionar Dev Notes na story
354
- - [ ] `qa` → Marcar que terminou
355
- - [ ] Commit código
356
- - [ ] Revisar código
357
- - [ ] Adicionar QA Notes na story
358
- - [ ] `done` → Marcar como concluída
359
- - [ ] Commit mudanças
360
-
361
- **No final:**
362
- - [ ] `show` → Ver que 100% completo
363
- - [ ] Todas stories têm Dev Notes e QA Notes preenchidas
364
-
365
- ---
366
-
367
- ## 📚 Referência Rápida
368
-
369
- ```bash
370
- # Ver ajuda de qualquer comando
371
- morph-spec story --help
372
- morph-spec story shard --help
373
- morph-spec story create --help
374
- morph-spec story status --help
375
-
376
- # Estrutura de pastas (após criar stories)
377
- .morph/project/outputs/my-feature/
378
- ├── spec/ # Spec dividido em partes
379
- │ ├── index.md
380
- │ ├── entity-design.md
381
- │ └── service-layer.md
382
- ├── stories/ # Stories auto-contidas
383
- │ ├── MF-001.md
384
- │ ├── MF-002.md
385
- │ └── MF-003.md
386
- └── sprint-status.yaml # Progresso automático
387
- ```
388
-
389
- ---
390
-
391
- *MORPH-SPEC Framework - Guia do Usuário*
392
- *Use este guia como referência rápida durante o desenvolvimento*