@polymorphism-tech/morph-spec 11.1.1 → 11.3.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 (166) hide show
  1. package/README.md +3 -2
  2. package/bin/morph-spec.js +13 -23
  3. package/docs/CHEATSHEET.md +3 -3
  4. package/docs/QUICKSTART.md +1 -1
  5. package/framework/CLAUDE.md +3 -1
  6. package/framework/MORPH.md +8 -3
  7. package/framework/agents.json +4 -4
  8. package/framework/docs/CLI.md +28 -18
  9. package/framework/evals/review-checklist.md +35 -18
  10. package/framework/hooks/README.md +18 -11
  11. package/framework/hooks/claude-code/core/README.md +2 -2
  12. package/framework/hooks/claude-code/core/chain.js +9 -25
  13. package/framework/hooks/claude-code/core/comment-guard.js +3 -9
  14. package/framework/hooks/claude-code/core/conventional-commit.js +3 -3
  15. package/framework/hooks/claude-code/core/graph-refresh-kick.js +6 -6
  16. package/framework/hooks/claude-code/core/masked-exit.js +4 -3
  17. package/framework/hooks/claude-code/core/pre-bash-denylist.js +2 -2
  18. package/framework/hooks/claude-code/core/protect-spec-files.js +2 -4
  19. package/framework/hooks/claude-code/core/stack-changed.js +5 -4
  20. package/framework/hooks/claude-code/core/validate-completion.js +15 -12
  21. package/framework/hooks/shared/contract.js +22 -1
  22. package/framework/hooks/shared/git-paths.js +6 -0
  23. package/framework/hooks/shared/graph-freshness.js +3 -3
  24. package/framework/hooks/shared/graph-refresh.js +5 -10
  25. package/framework/hooks/shared/hook-response.js +1 -18
  26. package/framework/hooks/shared/payload-utils.js +12 -1
  27. package/framework/hooks/shared/phase-utils.js +4 -52
  28. package/framework/hooks/shared/report-progress.js +1 -1
  29. package/framework/mcp/registry.json +16 -32
  30. package/framework/rules/ai-agents-standards.md +9 -1
  31. package/framework/rules/dotnet-templates.md +32 -33
  32. package/framework/rules/gsap-standards.md +8 -0
  33. package/framework/rules/infrastructure-standards.md +9 -9
  34. package/framework/rules/mcp-standards.md +10 -0
  35. package/framework/rules/neon-standards.md +4 -4
  36. package/framework/rules/nextjs-templates.md +10 -11
  37. package/framework/rules/ui-design.md +2 -2
  38. package/framework/schemas/config.schema.json +11 -0
  39. package/framework/skills/core/create-umbraco-lp/SKILL.md +1 -1
  40. package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +1 -1
  41. package/framework/skills/core/morph-apply/SKILL.md +6 -4
  42. package/framework/skills/core/morph-plan/SKILL.md +1 -1
  43. package/framework/skills/core/morph-uiux/SKILL.md +5 -5
  44. package/framework/standards/STANDARDS.json +8 -4
  45. package/framework/standards/STANDARDS.meta.json +1 -1
  46. package/framework/standards/ai-agents/agent-archetypes.md +1 -1
  47. package/framework/standards/ai-agents/middleware-patterns.md +0 -2
  48. package/framework/standards/ai-agents/prompt-sources.md +2 -2
  49. package/framework/standards/ai-agents/providers/model-registry.md +9 -12
  50. package/framework/standards/ai-agents/rag-custom-pgvector.md +2 -9
  51. package/framework/standards/frontend/design-system/ai-image-generation.md +1 -1
  52. package/framework/standards/infrastructure/docker/local-compose-isolation.md +2 -2
  53. package/framework/standards/integration/mcp/mcp-tools.md +125 -267
  54. package/framework/templates/README.md +52 -82
  55. package/framework/templates/REGISTRY.json +1 -281
  56. package/framework/templates/code/sql/ai-agents/agent-prompts-migration.sql.template +3 -4
  57. package/framework/templates/context/design-system.md +1 -1
  58. package/framework/templates/docs/plan.md +2 -2
  59. package/framework/templates/dotnet/ai-kit/src/Morph.AiKit/Providers/model-registry.v2.json +1 -1
  60. package/framework/templates/dotnet/ai-kit/tests/Morph.AiKit.Tests/MediaDisclosureTests.cs +1 -1
  61. package/framework/templates/dotnet/ai-kit/tests/Morph.AiKit.Tests/Morph.AiKit.Tests.csproj +3 -5
  62. package/framework/templates/frontend/nextjs/gsap-scroll-section.tsx.hbs +13 -17
  63. package/framework/templates/infrastructure/docker/docker-compose.template.yml +15 -16
  64. package/framework/templates/infrastructure/github/README.md +10 -13
  65. package/package.json +7 -16
  66. package/src/commands/graph/build.js +2 -2
  67. package/src/commands/mcp/manual-setup.js +95 -0
  68. package/src/commands/mcp/mcp-setup.js +26 -192
  69. package/src/commands/project/doctor.js +48 -142
  70. package/src/commands/project/env.js +2 -1
  71. package/src/commands/project/init-contract.js +2 -2
  72. package/src/commands/project/init.js +34 -294
  73. package/src/commands/project/stack-scan.js +6 -14
  74. package/src/commands/project/stack-set.js +3 -1
  75. package/src/commands/project/standards.js +1 -2
  76. package/src/commands/project/update.js +87 -205
  77. package/src/commands/scaffold/scaffold.js +43 -5
  78. package/src/commands/validation/check.js +12 -10
  79. package/src/commands/validation/prove-red.js +61 -22
  80. package/src/core/paths/output-schema.js +8 -27
  81. package/src/core/templates/template-registry.js +8 -43
  82. package/src/core/templates/template-renderer.js +3 -200
  83. package/src/lib/ai/ai-checks.js +1 -1
  84. package/src/lib/ai/ai-project-scan.js +2 -5
  85. package/src/lib/ai/code-audit.js +3 -8
  86. package/src/lib/ai/registry-audit.js +2 -1
  87. package/src/lib/check/signals.js +25 -7
  88. package/src/lib/config/project-config.js +3 -2
  89. package/src/lib/contract/apply.js +2 -1
  90. package/src/lib/contract/defaults.js +2 -2
  91. package/src/lib/contract/merge.js +1 -0
  92. package/src/lib/contract/scan.js +5 -5
  93. package/src/lib/detectors/claude-config-detector.js +44 -98
  94. package/src/lib/detectors/mcp-config.js +2 -1
  95. package/src/lib/diff/diff-lines.js +4 -9
  96. package/src/lib/generators/scaffold-generator.js +5 -17
  97. package/src/lib/git/default-branch.js +5 -13
  98. package/src/lib/graph/graph-health.js +1 -1
  99. package/src/lib/graph/graph-loader.js +2 -1
  100. package/src/lib/graph/graphifyignore.js +5 -5
  101. package/src/lib/graph/sanitize.js +2 -2
  102. package/src/lib/installers/effects.js +0 -13
  103. package/src/lib/installers/install-manifest.js +56 -0
  104. package/src/lib/installers/mcp-installer.js +16 -19
  105. package/src/lib/installers/memory-installer.js +5 -8
  106. package/src/lib/installers/rules-installer.js +9 -15
  107. package/src/lib/installers/stack-assets.js +54 -7
  108. package/src/lib/installers/stack-sync.js +16 -16
  109. package/src/lib/installers/stack-tooling.js +4 -3
  110. package/src/lib/json-file.js +9 -0
  111. package/src/lib/plan/artifact-vocabulary.js +1 -1
  112. package/src/lib/plan/checks.js +4 -3
  113. package/src/lib/plan/media.js +6 -6
  114. package/src/lib/plan/plan-parser.js +6 -11
  115. package/src/lib/review-reports.js +13 -18
  116. package/src/lib/scan/worktree-dirs.js +1 -3
  117. package/src/lib/specs/adr-index.js +4 -4
  118. package/src/lib/specs/revocations.js +3 -3
  119. package/src/lib/stack/stack-scan.js +4 -4
  120. package/src/lib/standards/registry.js +1 -1
  121. package/src/lib/standards/verified-against.js +3 -3
  122. package/src/lib/tests-audit/audit.js +3 -3
  123. package/src/lib/text.js +5 -0
  124. package/src/scripts/global-install.js +41 -19
  125. package/src/scripts/setup-infra.js +68 -187
  126. package/src/utils/agents-installer.js +21 -60
  127. package/src/utils/claude-md-injector.js +16 -50
  128. package/src/utils/claude-settings-manager.js +29 -27
  129. package/src/utils/file-copier.js +3 -4
  130. package/src/utils/hooks-installer.js +83 -62
  131. package/src/utils/skills-installer.js +18 -78
  132. package/src/utils/version-checker.js +2 -31
  133. package/CLAUDE.md +0 -118
  134. package/framework/commands/create-umbraco-lp.md +0 -37
  135. package/framework/commands/migrate-lp-to-umbraco.md +0 -35
  136. package/framework/commands/morph-apply.md +0 -14
  137. package/framework/hooks/shared/spawn-command.js +0 -23
  138. package/framework/templates/CLAUDE.md.core.guide.md +0 -29
  139. package/framework/templates/CLAUDE.md.core.template +0 -22
  140. package/framework/templates/IDE-SNIPPETS.md +0 -262
  141. package/framework/templates/code/dotnet/ai-agents/AgentBootstrap.cs.template +0 -26
  142. package/framework/templates/code/dotnet/ai-agents/EmbeddingService.cs.template +0 -28
  143. package/framework/templates/code/dotnet/ai-agents/ModelRegistry.cs.template +0 -99
  144. package/framework/templates/code/dotnet/ai-agents/ResilientToolMiddleware.cs.template +0 -40
  145. package/framework/templates/code/dotnet/ai-agents/VectorSearchTool.cs.template +0 -54
  146. package/framework/templates/code/dotnet/ai-agents/model-registry.json.template +0 -53
  147. package/framework/templates/code/dotnet/contracts/README.md +0 -74
  148. package/framework/templates/code/dotnet/database/vector-entity.cs +0 -49
  149. package/framework/templates/code/sql/ai-agents/pgvector-embeddings-migration.sql.template +0 -91
  150. package/framework/templates/code/sql/postgresql-migration.template.sql +0 -108
  151. package/framework/templates/code/typescript/contracts.ts +0 -140
  152. package/framework/templates/context/ARCHITECTURE.md +0 -106
  153. package/framework/templates/examples/design-system-examples.md +0 -354
  154. package/framework/templates/infrastructure/docker/Dockerfile.template +0 -58
  155. package/framework/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +0 -45
  156. package/framework/templates/infrastructure/github/actions/health-check/action.yml.hbs +0 -27
  157. package/framework/templates/integrations/asaas-client.cs +0 -332
  158. package/framework/templates/integrations/asaas-webhook.cs +0 -290
  159. package/framework/templates/integrations/neon-auth-config.cs +0 -170
  160. package/framework/templates/ui/design-system.css +0 -226
  161. package/src/commands/context/context-refresh.js +0 -63
  162. package/src/lib/detectors/index.js +0 -178
  163. package/src/lib/generators/architecture-scanner.js +0 -543
  164. package/src/lib/generators/settings-generator.js +0 -97
  165. package/src/lib/graph/god-nodes.js +0 -65
  166. package/src/lib/installers/templates-reconcile.js +0 -26
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "version": "4.0.0",
3
- "description": "Centralized MCP registry with phase relevance and install configuration for morph-spec workflows",
3
+ "description": "MCP registry: stack relevance and install configuration",
4
4
  "mcps": {
5
5
  "context7": {
6
- "phases": ["plan", "implement"],
7
6
  "tools": ["resolve-library-id", "query-docs"],
8
7
  "serverNames": ["context7", "plugin_context7_context7"],
9
8
  "detection": "enabledPlugins includes context7 or mcpServers includes context7",
@@ -21,8 +20,8 @@
21
20
  "transport": "stdio",
22
21
  "config": {
23
22
  "type": "stdio",
24
- "command": "cmd",
25
- "args": ["/c", "npx", "-y", "@upstash/context7-mcp@latest"]
23
+ "command": "npx",
24
+ "args": ["-y", "@upstash/context7-mcp@latest"]
26
25
  },
27
26
  "credentials": [],
28
27
  "prerequisites": [],
@@ -32,7 +31,6 @@
32
31
  }
33
32
  },
34
33
  "playwright": {
35
- "phases": ["uiux", "implement"],
36
34
  "tools": ["browser_navigate", "browser_snapshot", "browser_take_screenshot", "browser_console_messages", "browser_click", "browser_resize"],
37
35
  "serverNames": ["playwright", "plugin_playwright_playwright"],
38
36
  "detection": "mcpServers includes playwright or enabledPlugins includes playwright",
@@ -50,8 +48,8 @@
50
48
  "transport": "stdio",
51
49
  "config": {
52
50
  "type": "stdio",
53
- "command": "cmd",
54
- "args": ["/c", "npx", "-y", "@playwright/mcp@latest"]
51
+ "command": "npx",
52
+ "args": ["-y", "@playwright/mcp@latest"]
55
53
  },
56
54
  "credentials": [],
57
55
  "prerequisites": [],
@@ -61,7 +59,6 @@
61
59
  }
62
60
  },
63
61
  "vercel": {
64
- "phases": ["implement"],
65
62
  "tools": ["search_docs", "list_projects", "get_deployments", "get_deployment_logs", "manage_env_vars"],
66
63
  "detection": "mcpServers includes vercel",
67
64
  "fallback": "Bash `vercel` CLI commands",
@@ -82,13 +79,12 @@
82
79
  },
83
80
  "credentials": [],
84
81
  "prerequisites": [],
85
- "stackRelevance": ["nextjs", "nextjs-neon", "vercel"],
82
+ "stackRelevance": ["nextjs"],
86
83
  "warnings": ["Uses OAuth — you will be prompted to authenticate via browser when first connecting."],
87
- "setupGuide": "Run: claude mcp add --transport http vercel https://mcp.vercel.com"
84
+ "setupGuide": "Run: claude mcp add --transport http --scope project vercel https://mcp.vercel.com"
88
85
  }
89
86
  },
90
87
  "asaas": {
91
- "phases": ["plan", "implement"],
92
88
  "tools": ["enumerate_endpoints", "get_endpoint_schema", "generate_code_example", "execute_api_call", "search_docs"],
93
89
  "detection": "mcpServers includes asaas",
94
90
  "fallback": "WebFetch https://docs.asaas.com for API documentation",
@@ -111,11 +107,10 @@
111
107
  "prerequisites": [],
112
108
  "stackRelevance": ["asaas"],
113
109
  "warnings": ["API call execution requires your Asaas access_token. Doc search works without authentication."],
114
- "setupGuide": "Run: claude mcp add --transport http asaas https://docs.asaas.com/mcp"
110
+ "setupGuide": "Run: claude mcp add --transport http --scope project asaas https://docs.asaas.com/mcp"
115
111
  }
116
112
  },
117
113
  "shadcn": {
118
- "phases": ["uiux", "implement"],
119
114
  "tools": ["get_project_registries", "list_items_in_registries", "search_items_in_registries", "view_items_in_registries", "get_item_examples_from_registries", "get_add_command_for_items", "get_audit_checklist"],
120
115
  "serverNames": ["shadcn"],
121
116
  "detection": "mcpServers includes shadcn",
@@ -133,12 +128,12 @@
133
128
  "transport": "stdio",
134
129
  "config": {
135
130
  "type": "stdio",
136
- "command": "cmd",
137
- "args": ["/c", "npx", "-y", "shadcn@latest", "mcp"]
131
+ "command": "npx",
132
+ "args": ["-y", "shadcn@latest", "mcp"]
138
133
  },
139
134
  "credentials": [],
140
135
  "prerequisites": [],
141
- "stackRelevance": ["next", "nextjs", "nextjs-neon", "react", "vite"],
136
+ "stackRelevance": ["nextjs", "react"],
142
137
  "warnings": ["The server reads components.json from the directory Claude Code starts in. In a monorepo where the frontend is a subfolder, the CLI fallback run from that folder is the reliable path."],
143
138
  "setupGuide": null
144
139
  },
@@ -156,7 +151,6 @@
156
151
  }
157
152
  },
158
153
  "morph-assets": {
159
- "phases": ["uiux", "implement"],
160
154
  "tools": ["generate_image", "edit_image", "continue_editing", "generate_video", "generate_loop_video", "get_video", "media_tool", "list_models", "library", "usage"],
161
155
  "serverNames": ["morph-assets"],
162
156
  "detection": "mcpServers includes morph-assets",
@@ -192,7 +186,7 @@
192
186
  "Local morph-HUB checkout with mcps/morph-assets built, exposed via the MORPH_HUB env var",
193
187
  "ffmpeg on PATH for media_tool (scrub frames, poster, concat, compress)"
194
188
  ],
195
- "stackRelevance": ["next", "nextjs", "react", "vite", "astro"],
189
+ "stackRelevance": ["nextjs", "react"],
196
190
  "warnings": [
197
191
  "Internal Polymorphism MCP, not published to npm. Requires a local morph-HUB checkout. Replaces the former gemini-image and seedance MCPs.",
198
192
  "Paid per generation. Every call estimates cost first; dryRun only estimates. Above US$2, over the project budget or with unknown price it returns CONFIRMATION_REQUIRED + confirmToken: get human approval, then repeat the same call with the token.",
@@ -204,7 +198,6 @@
204
198
  }
205
199
  },
206
200
  "graphify": {
207
- "phases": ["plan", "implement", "review"],
208
201
  "tools": ["query_graph", "get_node", "get_neighbors", "get_community", "god_nodes", "graph_stats", "shortest_path", "list_prs", "get_pr_impact", "triage_prs"],
209
202
  "detection": "graphify-out/graph.json exists in the project root (written by morph-spec graph build, or by the graphify post-commit hook)",
210
203
  "fallback": "Comportamento atual: Grep/Glob/Read. O grafo é um subconjunto estrito do grep — no eval não encontrou um único arquivo que o grep perderia — então cair para grep não perde recall, só devolve mais ruído",
@@ -239,7 +232,6 @@
239
232
  }
240
233
  },
241
234
  "neon": {
242
- "phases": ["plan", "implement"],
243
235
  "tools": ["list_projects", "describe_table_schema", "get_database_tables", "run_sql", "explain_sql_statement", "prepare_database_migration", "complete_database_migration", "compare_database_schema", "create_branch", "list_branches", "get_connection_string", "list_slow_queries", "prepare_query_tuning", "complete_query_tuning", "create_snapshot", "search_docs", "get_doc"],
244
236
  "serverNames": ["neon", "Neon"],
245
237
  "detection": "mcpServers includes neon (case-insensitive)",
@@ -250,7 +242,7 @@
250
242
  "testCall": "Call list_projects with limit 1",
251
243
  "testParams": { "limit": 1 },
252
244
  "successIndicator": "Returns the project list (possibly empty)",
253
- "failureHint": "Neon MCP not responding. Re-run the OAuth flow: claude mcp add --transport http neon https://mcp.neon.tech/mcp"
245
+ "failureHint": "Neon MCP not responding. Re-run the OAuth flow: claude mcp add --transport http --scope project neon https://mcp.neon.tech/mcp"
254
246
  },
255
247
  "install": {
256
248
  "autoInstall": true,
@@ -263,11 +255,10 @@
263
255
  "prerequisites": [],
264
256
  "stackRelevance": ["neon"],
265
257
  "warnings": ["OAuth against your Neon account on first use. The server can delete branches and projects: keep destructive calls behind a human, and point agents at a branch, never at production."],
266
- "setupGuide": "Run: claude mcp add --transport http neon https://mcp.neon.tech/mcp"
258
+ "setupGuide": "Run: claude mcp add --transport http --scope project neon https://mcp.neon.tech/mcp"
267
259
  }
268
260
  },
269
261
  "microsoft-learn": {
270
- "phases": ["plan", "implement"],
271
262
  "tools": ["microsoft_docs_search", "microsoft_docs_fetch", "microsoft_code_sample_search"],
272
263
  "serverNames": ["microsoft-learn", "plugin_microsoft-docs_microsoft-learn"],
273
264
  "detection": "mcpServers includes microsoft-learn or enabledPlugins includes microsoft-docs",
@@ -280,7 +271,7 @@
280
271
  "query": "EF Core 10 what is new"
281
272
  },
282
273
  "successIndicator": "Returns Microsoft Learn excerpts with contentUrl",
283
- "failureHint": "Microsoft Learn MCP not responding. Re-add it: claude mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcp"
274
+ "failureHint": "Microsoft Learn MCP not responding. Re-add it: claude mcp add --transport http --scope project microsoft-learn https://learn.microsoft.com/api/mcp"
284
275
  },
285
276
  "install": {
286
277
  "autoInstall": true,
@@ -293,15 +284,8 @@
293
284
  "prerequisites": [],
294
285
  "stackRelevance": ["dotnet"],
295
286
  "warnings": [],
296
- "setupGuide": "Run: claude mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcp"
287
+ "setupGuide": "Run: claude mcp add --transport http --scope project microsoft-learn https://learn.microsoft.com/api/mcp"
297
288
  }
298
289
  }
299
- },
300
- "_phaseMatrixNote": "Keys must be the v5 phases from framework/phases.json. The v4 keys 'design' and 'tasks' both collapsed into 'plan'; 'review' was absent entirely, so a project in review resolved to undefined. Stack-scoped MCPs (asaas, neon, microsoft-learn) stay out of this matrix on purpose — only universal ones are listed.",
301
- "phaseMatrix": {
302
- "plan": ["context7", "graphify"],
303
- "uiux": ["playwright", "context7", "morph-assets"],
304
- "implement": ["context7", "playwright", "vercel", "morph-assets", "graphify"],
305
- "review": ["playwright", "context7", "graphify"]
306
290
  }
307
291
  }
@@ -66,4 +66,12 @@ stacks:
66
66
  | `ai-agents/llm-runtime-defaults.md` | knobs de runtime da chamada — timeout, retry, `strict` JSON schema, temperatura/reasoning |
67
67
  | `ai-agents/durable-workflows-hitl.md` | workflow durável e human-in-the-loop — checkpoint, `RequestPort`, aprovação de tool |
68
68
  | `ai-agents/vector-data-extensions.md` | abstração `Microsoft.Extensions.VectorData` e conectores (pgvector, ingestão) |
69
- | `integration/mcp/mcp-tools.md` | integração MCP cross-domain (fora do escopo MAF) |
69
+
70
+ ## Templates de agente
71
+
72
+ | Template | Id | Purpose |
73
+ |----------|------|---------|
74
+ | Prompt Repository | `maf-prompt-repository` | `AgentPrompt` + `PromptRepository` com cache, a implementação de `ai-agents-prompt-sources` |
75
+ | Agent Prompts Migration | `maf-agent-prompts-migration` | tabela `agent_prompts` versionada, com o índice parcial de `is_active` |
76
+
77
+ Templates live in the morph-spec package, not in the project: print one with `morph-spec scaffold show <id>` and adapt it to your project structure. A standard that cites `templates/dotnet/ai-kit/<file>` points into the compiling reference solution: `morph-spec scaffold show ai-kit` lists its files, `morph-spec scaffold show ai-kit <file>` prints one.
@@ -8,8 +8,7 @@ stacks:
8
8
 
9
9
  # .NET Code Templates
10
10
 
11
- When implementing .NET features, use these templates as reference patterns.
12
- Read the template file to see the exact pattern, then generate code following it.
11
+ When implementing .NET features, use these templates as reference patterns. They live in the morph-spec package, not in the project: `morph-spec scaffold show <id>` prints one.
13
12
 
14
13
  ## Scaffold (preferred for new slices)
15
14
 
@@ -30,58 +29,58 @@ morph-spec scaffold dotnet book get-all-books
30
29
 
31
30
  Generates 7 files: endpoint, handler, request, response, validator + entity, errors (shared at feature level). Entity/errors auto-skipped if they already exist.
32
31
 
33
- **Adding a single file to an existing slice:** read its `.hbs` template (table below) and write the file following it — `scaffold` generates whole slices only, and there is no single-file render command.
32
+ **Adding a single file to an existing slice:** print its template (`morph-spec scaffold show <id>`, ids below) and write the file following it — `scaffold dotnet` generates whole slices only.
34
33
 
35
34
  ## VSA Feature Templates (Vertical Slice Architecture)
36
35
 
37
36
  For each new feature slice, follow the patterns in these templates:
38
37
 
39
- | Template | Path | Purpose |
38
+ | Template | Id | Purpose |
40
39
  |----------|------|---------|
41
- | Endpoint | `.morph/framework/templates/code/dotnet/feature/endpoint.cs.hbs` | IApiEndpoint with MapEndpoint() |
42
- | Handler | `.morph/framework/templates/code/dotnet/feature/handler.cs.hbs` | IHandler<TRequest, TResponse> |
43
- | Request | `.morph/framework/templates/code/dotnet/feature/request.cs.hbs` | record DTO |
44
- | Response | `.morph/framework/templates/code/dotnet/feature/response.cs.hbs` | record DTO |
45
- | Validator | `.morph/framework/templates/code/dotnet/feature/validator.cs.hbs` | FluentValidation AbstractValidator |
46
- | Entity | `.morph/framework/templates/code/dotnet/feature/entity.cs.hbs` | Domain entity |
47
- | Errors | `.morph/framework/templates/code/dotnet/feature/errors.cs.hbs` | Error factory |
40
+ | Endpoint | `dotnet-feature-endpoint` | IApiEndpoint with MapEndpoint() |
41
+ | Handler | `dotnet-feature-handler` | IHandler<TRequest, TResponse> |
42
+ | Request | `dotnet-feature-request` | record DTO |
43
+ | Response | `dotnet-feature-response` | record DTO |
44
+ | Validator | `dotnet-feature-validator` | FluentValidation AbstractValidator |
45
+ | Entity | `dotnet-feature-entity` | Domain entity |
46
+ | Errors | `dotnet-feature-errors` | Error factory |
48
47
 
49
48
  ## Base Abstractions (read once per project setup)
50
49
 
51
- | Template | Path | Purpose |
50
+ | Template | Id | Purpose |
52
51
  |----------|------|---------|
53
- | IHandler | `.morph/framework/templates/code/dotnet/abstractions/handler.cs` | Handler interface |
54
- | Result<T> | `.morph/framework/templates/code/dotnet/abstractions/result.cs` | Railway-oriented result |
55
- | Error | `.morph/framework/templates/code/dotnet/abstractions/error.cs` | Error types |
56
- | IApiEndpoint | `.morph/framework/templates/code/dotnet/abstractions/api-endpoint.cs` | Endpoint interface |
52
+ | IHandler | `dotnet-abstractions-handler` | Handler interface |
53
+ | Result<T> | `dotnet-abstractions-result` | Railway-oriented result |
54
+ | Error | `dotnet-abstractions-error` | Error types |
55
+ | IApiEndpoint | `dotnet-abstractions-api-endpoint` | Endpoint interface |
57
56
 
58
57
  ## Extensions & Pipeline (read once per project setup)
59
58
 
60
- | Template | Path | Purpose |
59
+ | Template | Id | Purpose |
61
60
  |----------|------|---------|
62
- | Handler Registration | `.morph/framework/templates/code/dotnet/extensions/handler-registration.cs` | Scrutor auto-discovery |
63
- | Map Endpoints | `.morph/framework/templates/code/dotnet/extensions/map-endpoints.cs` | IApiEndpoint discovery |
64
- | Result Extensions | `.morph/framework/templates/code/dotnet/extensions/result-extensions.cs` | Match() pattern |
65
- | Database Config | `.morph/framework/templates/code/dotnet/extensions/database-extensions.cs` | EF Core + Npgsql |
66
- | Health Checks | `.morph/framework/templates/code/dotnet/extensions/health-checks.cs` | Health endpoints |
67
- | Validation Decorator | `.morph/framework/templates/code/dotnet/pipelines/validation-decorator.cs` | FluentValidation pipeline |
68
- | Logging Decorator | `.morph/framework/templates/code/dotnet/pipelines/logging-decorator.cs` | Duration tracking |
69
- | Exception Handler | `.morph/framework/templates/code/dotnet/exceptions/exception-handler.cs` | ProblemDetails |
70
- | API Tags | `.morph/framework/templates/code/dotnet/constants/api-tags.cs` | Scalar/Swagger groups |
61
+ | Handler Registration | `dotnet-extensions-handler-registration` | Scrutor auto-discovery |
62
+ | Map Endpoints | `dotnet-extensions-map-endpoints` | IApiEndpoint discovery |
63
+ | Result Extensions | `dotnet-extensions-result-extensions` | Match() pattern |
64
+ | Database Config | `dotnet-extensions-database` | EF Core + Npgsql |
65
+ | Health Checks | `dotnet-extensions-health-checks` | Health endpoints |
66
+ | Validation Decorator | `dotnet-pipelines-validation-decorator` | FluentValidation pipeline |
67
+ | Logging Decorator | `dotnet-pipelines-logging-decorator` | Duration tracking |
68
+ | Exception Handler | `dotnet-exceptions-handler` | ProblemDetails |
69
+ | API Tags | `dotnet-constants-api-tags` | Scalar/Swagger groups |
71
70
 
72
71
  ## Specialized Templates
73
72
 
74
- | Template | Path | Purpose |
73
+ | Template | Id | Purpose |
75
74
  |----------|------|---------|
76
- | Migration | `.morph/framework/templates/code/dotnet/database/migration.cs` | EF Core migration |
77
- | Hangfire Job | `.morph/framework/templates/code/dotnet/jobs/job.cs` | Background job |
78
- | MAF Agent | `.morph/framework/templates/code/dotnet/jobs/agent.cs` | MS Agent Framework |
79
- | Unit Test | `.morph/framework/templates/code/dotnet/test.cs` | xUnit AAA test |
80
- | Contracts VSA | `.morph/framework/templates/code/dotnet/contracts/contracts-vsa.cs` | Full slice contracts |
75
+ | Migration | `dotnet-database-migration` | EF Core migration |
76
+ | Hangfire Job | `dotnet-jobs-hangfire` | Background job |
77
+ | MAF Agent | `dotnet-jobs-agent` | MS Agent Framework |
78
+ | Unit Test | `dotnet-backend-test` | xUnit AAA test |
79
+ | Contracts VSA | `dotnet-contracts-vsa` | Full slice contracts |
81
80
 
82
81
  ## Usage
83
82
 
84
- 1. **Read the template** to see the exact pattern
83
+ 1. **Print the template** (`morph-spec scaffold show <id>`) to see the exact pattern
85
84
  2. **Generate code following the same structure** (naming, namespaces, imports)
86
85
  3. Or scaffold a whole VSA slice from the templates at once:
87
86
  `morph-spec scaffold dotnet <feature> <slice-name>`
@@ -16,3 +16,11 @@ stacks:
16
16
  - **frontend-gsap-plugins** (`frontend/gsap/gsap-plugins.md`) — Todo plugin é gratuito no pacote público `gsap` (`npm install gsap @gsap/react`); o registry privado `@gsap/shockingly` é obsoleto. Flip: `getState()` → muda o DOM → `Flip.from(...)`. SplitText com `autoSplit: true`, animando em `onSplit`. MorphSVG exige `<path>`; DrawSVG exige stroke visível; Draggable com inércia exige InertiaPlugin.
17
17
 
18
18
  > Resumo injetado quando você lê ou edita um arquivo casado por `paths:`. Texto completo: `morph-spec standards --find "<id>"` e leia só a seção necessária de `.morph/framework/standards/<path>`.
19
+
20
+ ## GSAP Templates
21
+
22
+ | Template | Id | Purpose |
23
+ |----------|------|---------|
24
+ | Scroll Section | `gsap-scroll-section` | Seção `'use client'` com `useGSAP`, ScrollTrigger e `gsap.matchMedia()` para reduced-motion |
25
+
26
+ Templates live in the morph-spec package, not in the project: print one with `morph-spec scaffold show <id>` and adapt it to your project structure.
@@ -19,14 +19,14 @@ stacks:
19
19
 
20
20
  ## Infrastructure Templates
21
21
 
22
- | Template | Path | Purpose |
22
+ | Template | Id | Purpose |
23
23
  |----------|------|---------|
24
- | .NET API Dockerfile | `.morph/framework/templates/infrastructure/docker/dockerfile-api.dockerfile` | Multi-stage .NET |
25
- | Next.js Dockerfile | `.morph/framework/templates/infrastructure/docker/dockerfile-web.dockerfile` | Multi-stage Next.js |
26
- | Docker Compose | `.morph/framework/templates/infrastructure/docker/docker-compose.template.yml` | Local dev env — one isolated stack per worktree (ports from the block, no `container_name`) |
27
- | Coolify Config | `.morph/framework/templates/infrastructure/docker/coolify.template.json` | Deployment config |
28
- | .NET Build CI | `.morph/framework/templates/infrastructure/github/workflows/dotnet-build.yml.hbs` | CI workflow |
29
- | Docker Push CI | `.morph/framework/templates/infrastructure/github/workflows/docker-build-push.yml.hbs` | Build & push |
30
- | Deploy Coolify | `.morph/framework/templates/infrastructure/github/workflows/deploy-coolify.yml.hbs` | CD via SSH |
24
+ | .NET API Dockerfile | `docker-dockerfile-api` | Multi-stage .NET |
25
+ | Next.js Dockerfile | `docker-dockerfile-web` | Multi-stage Next.js |
26
+ | Docker Compose | `docker-compose` | Local dev env — one isolated stack per worktree (ports from the block, no `container_name`) |
27
+ | Coolify Config | `coolify-config` | Deployment config |
28
+ | .NET Build CI | `github-workflow-dotnet-build` | CI workflow |
29
+ | Docker Push CI | `github-workflow-docker-build-push` | Build & push |
30
+ | Deploy Coolify | `github-workflow-deploy-coolify` | CD via SSH |
31
31
 
32
- Read the template and adapt to your project structure.
32
+ Templates live in the morph-spec package, not in the project: print one with `morph-spec scaffold show <id>` and adapt it to your project structure.
@@ -0,0 +1,10 @@
1
+ ---
2
+ paths:
3
+ - "**/.mcp.json"
4
+ ---
5
+
6
+ # MCP Standards
7
+
8
+ - **integration-mcp-mcp-tools** (`integration/mcp/mcp-tools.md`) — Qual MCP serve a qual trabalho da feature, e o que o substitui: context7 (docs de biblioteca), playwright (navegar, snapshot, screenshot em 1280/390), graphify (prefira `morph-spec graph explain|affected`), microsoft-learn (.NET), neon (schema e dry-run de migration em branch descartável, nunca produção), shadcn (catálogo de componentes). GitHub é sempre o `gh`, nunca MCP. O nome da tool depende de onde o servidor está configurado (`mcp__context7__…` no `.mcp.json`, `mcp__plugin_context7_context7__…` no plugin); tool adiada carrega por `ToolSearch`. MCP ausente nunca bloqueia: todo servidor tem fallback nativo ou por CLI. Instalar e conferir: `morph-spec mcp setup --list`, `morph-spec doctor --mcp`.
9
+
10
+ > Resumo injetado quando você lê ou edita um arquivo casado por `paths:`. Texto completo: `morph-spec standards --find "<id>"` e leia só a seção necessária de `.morph/framework/standards/<path>`.
@@ -19,9 +19,9 @@ stacks:
19
19
 
20
20
  ## SQL Templates
21
21
 
22
- | Template | Path | Purpose |
22
+ | Template | Id | Purpose |
23
23
  |----------|------|---------|
24
- | PostgreSQL Migration | `.morph/framework/templates/code/sql/postgresql-migration.sql` | Database migration |
25
- | PostgreSQL RLS Policy | `.morph/framework/templates/code/sql/postgresql-rls-policy.sql` | Row-level security |
24
+ | PostgreSQL Migration | `sql-postgresql-migration` | Database migration |
25
+ | PostgreSQL RLS Policy | `sql-rls-policy` | Row-level security |
26
26
 
27
- Read the template and adapt to your project structure.
27
+ Templates live in the morph-spec package, not in the project: print one with `morph-spec scaffold show <id>` and adapt it to your project structure.
@@ -8,8 +8,7 @@ stacks:
8
8
 
9
9
  # Next.js Code Templates
10
10
 
11
- When implementing Next.js features, use these templates as reference patterns.
12
- Read the template file to see the exact pattern, then generate code following it.
11
+ When implementing Next.js features, use these templates as reference patterns. They live in the morph-spec package, not in the project: `morph-spec scaffold show <id>` prints one.
13
12
 
14
13
  ## Scaffold (preferred for new features)
15
14
 
@@ -27,14 +26,14 @@ morph-spec scaffold nextjs user-profile
27
26
 
28
27
  Generates 4 files: page (Server Component), list component, form component, TanStack Query hook.
29
28
 
30
- **Adding a single file to an existing feature:** read its `.hbs` template (table below) and write the file following it — `scaffold` generates whole features only, and there is no single-file render command.
29
+ **Adding a single file to an existing feature:** print its template (`morph-spec scaffold show <id>`, ids below) and write the file following it — `scaffold nextjs` generates whole features only.
31
30
 
32
- | Template | Path | Purpose |
31
+ | Template | Id | Purpose |
33
32
  |----------|------|---------|
34
- | Server Page | `.morph/framework/templates/frontend/nextjs/page.tsx.hbs` | App Router server component |
35
- | Client Component | `.morph/framework/templates/frontend/nextjs/client-component.tsx.hbs` | `'use client'` component |
36
- | Feature Form | `.morph/framework/templates/frontend/nextjs/feature-form.tsx.hbs` | react-hook-form + Zod + shadcn |
37
- | Custom Hook | `.morph/framework/templates/frontend/nextjs/use-feature.ts.hbs` | TanStack Query hook |
38
- | Env Config | `.morph/framework/templates/frontend/nextjs/env.mjs.hbs` | T3 Env validation |
39
- | TypeScript Config | `.morph/framework/templates/frontend/nextjs/tsconfig.json.hbs` | Path aliases |
40
- | Dockerfile | `.morph/framework/templates/frontend/nextjs/Dockerfile.nextjs.hbs` | Multi-stage build |
33
+ | Server Page | `nextjs-page` | App Router server component |
34
+ | Client Component | `nextjs-client-component` | `'use client'` component |
35
+ | Feature Form | `nextjs-feature-form` | react-hook-form + Zod + shadcn |
36
+ | Custom Hook | `nextjs-use-feature` | TanStack Query hook |
37
+ | Env Config | `nextjs-env-mjs` | T3 Env validation |
38
+ | TypeScript Config | `nextjs-tsconfig` | Path aliases |
39
+ | Dockerfile | `nextjs-dockerfile` | Multi-stage build |
@@ -15,7 +15,7 @@ stacks:
15
15
 
16
16
  # Régua de design
17
17
 
18
- Vale para o desenho na fase uiux e para todo código de UI na implementação.
18
+ Vale para o desenho das telas (`morph-uiux`) e para todo código de UI na implementação.
19
19
 
20
20
  **Duas réguas ao mesmo tempo.** O sistema — tokens de cor, espaço e tipografia, componentes reutilizáveis, estados default/hover/focus/disabled/loading/error, WCAG AA — e a estética, que separa um design correto de um design aprovado. Régua estética: o standard `frontend-design-system-art-direction`.
21
21
 
@@ -25,7 +25,7 @@ Vale para o desenho na fase uiux e para todo código de UI na implementação.
25
25
  - **Movimento com intenção:** a ferramenta mais leve que entrega o efeito (CSS transition/`@keyframes` → animação por scroll em CSS → Motion → GSAP com ScrollTrigger). 60 fps, só `transform` e `opacity`. `prefers-reduced-motion` tem versão estática digna, composta, não só a animação desligada.
26
26
  - **Acabamento:** camadas, luz (gradiente radial, trama discreta), vidro com moderação, sombra com a cor do tema, ritmo tipográfico (escala modular, tracking negativo no display), microinteração em foco, hover e envio.
27
27
  - **Tela de dados:** lista pagina, ordena e filtra no servidor e tem os três estados (vazio, carregando, erro). Uma ação primária por tela; erro diz o que fazer a seguir; conteúdo gerado por IA marcado como tal.
28
- - **Reuso:** componente se busca antes de se escrever: `.morph/context/design-system.md` e o código do projeto, depois o catálogo (standard `frontend-nextjs-components`, seção "Catalog First": `npx shadcn@latest search @shadcn …` ou o MCP `shadcn`). A origem de cada um (`projeto`, `registry`, `novo` com o motivo) vai na tabela `### Componentes` do `mockups.md`. O bloco pronto é esqueleto: tokens e composição são da direção escolhida. Token novo precisa de justificativa.
28
+ - **Reuso:** componente se busca antes de se escrever: `.morph/context/design-system.md` (quando existe; quem o cria é a skill `morph-uiux`) e o código do projeto, depois o catálogo (standard `frontend-nextjs-components`, seção "Catalog First": `npx shadcn@latest search @shadcn …` ou o MCP `shadcn`). A origem de cada um (`projeto`, `registry`, `novo` com o motivo) vai na tabela `### Componentes` do `mockups.md`. O bloco pronto é esqueleto: tokens e composição são da direção escolhida. Token novo precisa de justificativa.
29
29
  - **Proibido:** número ou dado inventado em tela real, cópia de marca de terceiros, efeito que quebra contraste AA.
30
30
 
31
31
  Standards: `frontend-design-system-art-direction`, `frontend-design-system-premium-finish`, `frontend-design-system-animations`, `frontend-nextjs-motion-patterns`, `frontend-nextjs-testing`. Por superfície (`marketing-site`, `admin-app`, `brand-moment`): `.claude/skills/morph-uiux/surfaces.json`. Texto inteiro: `morph-spec standards --show <id>`.
@@ -29,6 +29,17 @@
29
29
  },
30
30
  "description": "Dependency tags the init scan read from the manifests (ef, hangfire, maf, neon, gsap, umbraco, docker...). Joined with stack and integrations to choose the rules and skills installed."
31
31
  },
32
+ "integrations": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string"
36
+ },
37
+ "description": "Tags declared outside the init scan: what `stack-set --with` chose and what `update` saw in the files that the manifests do not show. Kept apart from `tags` on purpose: `tags` carries a fingerprint in `_generated`, and a value written there by anything but the scan would read as a hand edit and stop following it."
38
+ },
39
+ "baseBranch": {
40
+ "type": "string",
41
+ "description": "Long-lived integration branch the features start from and are measured against. Absent: origin/HEAD, then main, then master. MORPH_BASE_BRANCH overrides it."
42
+ },
32
43
  "frontendPath": {
33
44
  "type": "string",
34
45
  "description": "Folder of the frontend, relative to the project root, where the UI catalog (shadcn) lives. Absent: the root."
@@ -4,7 +4,7 @@ description: Guia a criação de uma landing page nova ponta-a-ponta a partir do
4
4
  version: core
5
5
  when_to_use: Use quando for iniciar um novo projeto de LP com o template Umbraco genérico
6
6
  user-invocable: true
7
- cliVersion: "11.1.1"
7
+ cliVersion: "11.3.0"
8
8
  stacks:
9
9
  - umbraco
10
10
  ---
@@ -4,7 +4,7 @@ description: Migra uma landing page existente (React/Vite, Next.js estático ou
4
4
  version: core
5
5
  when_to_use: Use quando o usuário pedir "use /migrate-lp-to-umbraco {projeto}" ou descrever a necessidade de migrar uma LP para Umbraco
6
6
  user-invocable: true
7
- cliVersion: "11.1.1"
7
+ cliVersion: "11.3.0"
8
8
  stacks:
9
9
  - umbraco
10
10
  ---
@@ -4,7 +4,7 @@ description: Implementa o plano de uma feature morph-spec nesta sessão — prov
4
4
  version: core
5
5
  when_to_use: Use com o plano validado pelo plan-check ("/morph-apply", "implementar a feature", "implementa o plano"), inclusive disparado por um orquestrador depois da morph-plan
6
6
  user-invocable: true
7
- cliVersion: "11.1.1"
7
+ cliVersion: "11.3.0"
8
8
  ---
9
9
 
10
10
  # morph-apply
@@ -31,12 +31,14 @@ Formato do `report.md`: `| Cn | cenário | status | evidência |` (`pendente` /
31
31
  ## 3. Testes do contrato e revisão
32
32
 
33
33
  1. `morph-spec check --tier full` verde (e `--tier e2e` quando o contrato tem e2e e algum `Cn` é `prova: e2e`).
34
- 2. **Revisão em contexto novo, uma rodada só:** despache na mesma resposta `morph-verifier` e `morph-reviewer` (e `morph-security` quando o diff toca acesso, dado pessoal, envio a pessoas reais ou pagamento), cada um com o slug, a base do diff e o caminho do `checks.json`. Eles só leem e executam; gravam `4-review/{verifier,reviewer,security}.md`. Leia o arquivo, não a mensagem final.
35
- 3. Achado com gravidade alta e que se repete: corrija, rode `check --tier full` de novo e cite a correção em `## Notas` — o `FIX` da persona continua no relatório, então o resultado sai `precisa-humano` e alguém confere a correção. Achado isolado ou de estilo: anote, não corrija. Nunca uma segunda rodada de revisão.
34
+ 2. **Commit antes da revisão:** as personas julgam um commit, não a árvore. Commite o que falta; `sha` é o `git rev-parse HEAD` e `base` o `git merge-base HEAD <branch base>`.
35
+ 3. **Revisão em contexto novo:** despache na mesma resposta `morph-verifier` e `morph-reviewer` (e `morph-security` quando o `check` acusou `risco`: dados, pessoas, acesso ou infra), cada um com o slug, `base`, `sha`, o caminho do `checks.json`, o arquivo de relatório dele em `4-review/` e, com app no ar, a URL. Eles só leem e executam; gravam `4-review/{verifier,reviewer,security}.md`. Leia o arquivo, não a mensagem final.
36
+ 4. **Todo achado vira correção nesta feature:** bloqueador e nota, dos três relatórios, num commit só. O que você não corrige ganha uma linha em `## Notas` com o porquê (o fato do revisor está errado, e a prova; a decisão não é sua, e o `Cn` fica `bloqueado`); bloqueador `irreversivel` vai ao dono sem correção. Rode `check --tier full` de novo e commite.
37
+ 5. **Confirmação, uma vez, só se houve commit de correção:** despache de novo as mesmas personas com o `sha` novo e `confirma: <sha que elas revisaram>` (ao verificador, também os `Cn` que a correção tocou). Cada uma lê só o que mudou e acrescenta `## Confirmação` ao próprio relatório. O que a confirmação trouxer (bloqueador aberto ou novo, `Cn` não provado) não tem terceira volta: sai no `## Resultado` como `precisa-humano`. Nota nova da confirmação: só anote.
36
38
 
37
39
  ## 4. Fechar
38
40
 
39
- `morph-spec check --tier full --report`: grava `## Resultado` no `report.md` com `status: pronto` ou `status: precisa-humano` e os motivos (risco por categoria, degrau, PR grande, testes vermelhos, preso no mesmo erro, cenários propostos, `Cn` bloqueado, revisão ausente, pedindo correção ou com `Cn` não provado). Quem abre o PR é o orquestrador (rascunho com a label `precisa-humano` quando for o caso); no terminal, `gh pr create` é seu.
41
+ Com tudo commitado (o `--report` lê só `base...HEAD`; o que ficou fora vira `nao-commitado`), `morph-spec check --tier full --report`: grava `## Resultado` no `report.md` com `status: pronto` ou `status: precisa-humano` e os motivos (risco por categoria, degrau, plano ou PR grande, testes vermelhos ou não rodados, preso no mesmo erro, cenários propostos, `Cn` bloqueado ou pendente, trabalho fora do commit, revisão ausente, pedindo correção ou com `Cn` não provado). Quem abre o PR é o orquestrador (rascunho com a label `precisa-humano` quando for o caso); no terminal, `gh pr create` é seu.
40
42
 
41
43
  Ao dono, uma linha por cenário (`Cenário 3: <título> — feito.`) e o resultado, nunca `C3` sozinho.
42
44
 
@@ -4,7 +4,7 @@ description: Transforma uma issue ou um pedido no plano da feature — confronta
4
4
  version: core
5
5
  when_to_use: Use quando uma feature, bug ou chore começar ("/morph-plan", "/morph-plan <link da issue>", "vamos planejar X"), inclusive disparado por um orquestrador a partir de uma issue com a label agente
6
6
  user-invocable: true
7
- cliVersion: "11.1.1"
7
+ cliVersion: "11.3.0"
8
8
  ---
9
9
 
10
10
  # morph-plan
@@ -4,7 +4,7 @@ description: Conduz o desenho de telas de uma feature com plano validado — ren
4
4
  version: core
5
5
  when_to_use: Use quando a feature cria ou altera UI e há uma pessoa para escolher as telas, depois do plan-check e antes de /morph-apply. Em modo autônomo não roda — escolher tela é decisão humana.
6
6
  user-invocable: true
7
- cliVersion: "11.1.1"
7
+ cliVersion: "11.3.0"
8
8
  stacks:
9
9
  - nextjs
10
10
  - react
@@ -19,8 +19,8 @@ A régua de sistema e de estética chega sozinha: a rule `ui-design` carrega qua
19
19
 
20
20
  ## 1. Insumos
21
21
 
22
- - `2-plan/plan.md` — problema e cenários de tela, referidos pelo id (`C3`); ao dono, pelo nome (`Cenário 3: <título>`). Esta fase **nunca** edita `plan.md` nem `checks.json`.
23
- - `.morph/context/design-system.md` — o design system vivo; toda decisão de token ou componente parte dele e dos tokens reais do CSS do projeto.
22
+ - `2-plan/plan.md` — problema e cenários de tela, referidos pelo id (`C3`); ao dono, pelo nome (`Cenário 3: <título>`). Esta skill **nunca** edita `plan.md` nem `checks.json`.
23
+ - `.morph/context/design-system.md` — o design system do projeto; toda decisão de token ou componente parte dele e dos tokens reais do CSS do projeto. Nada o cria sozinho: se não existe, crie-o agora a partir dos tokens do CSS ou do tema do projeto, na forma de `morph-spec scaffold show context-design-system`.
24
24
  - `config.json` → `project.stack` decide a tecnologia (`nextjs` → Tailwind + shadcn + Motion). Nunca suponha Next.js.
25
25
  - O catálogo, antes de desenhar: o que o projeto já tem (`npx shadcn@latest info --json`, na pasta do `components.json`) e o que os registries oferecem para cada tela (`npx shadcn@latest search @shadcn <os do components.json> -q "<termo>"`, ou `search_items_in_registries` do MCP `shadcn`; o `@shadcn` embutido só entra na busca se nomeado). Uma direção parte do bloco que existe; o standard `frontend-nextjs-components` ("Catalog First") diz quais registries valem. Sem shadcn no projeto, a busca é no código e no design system.
26
26
  - A superfície de cada tela (`marketing-site` | `admin-app` | `brand-moment`, em `surfaces.json`) diz quais standards abrir.
@@ -81,10 +81,10 @@ Apresente aberto, não descrito: abra cada protótipo no navegador e cite a dire
81
81
  ```
82
82
  question: "Aprovar as telas de {nome}?
83
83
  Você aprova: <cada tela e a direção escolhida, numa frase>
84
- Se aprovar: as telas travam e a construção segue por elas
84
+ Se aprovar: a construção segue por estas telas; mudar depois pede nova aprovação
85
85
  Provado: <checklist de tela completo, prints em computador e celular>
86
86
  Não provado: <o que só a construção mostra; ou nada>"
87
87
  options: "aprovado, prosseguir" | "preciso ajustar" | "cancelar"
88
88
  ```
89
89
 
90
- Aprovado: escreva `**Aprovado por:** <quem>, <data>` no topo do `1-design/mockups.md`; daí em diante `1-design/` trava e retrabalho volta a esta pergunta. Diga que `/morph-apply` está pronto.
90
+ Aprovado: escreva `**Aprovado por:** <quem>, <data>` no topo do `1-design/mockups.md`; daí em diante não edite `1-design/`: mudança de tela é nova aprovação, por esta mesma pergunta. Diga que `/morph-apply` está pronto.
@@ -1637,7 +1637,7 @@
1637
1637
  "teardown": "#tearing-down",
1638
1638
  "skeleton": "#minimal-compose-skeleton"
1639
1639
  },
1640
- "digest": "Every worktree runs its OWN compose stack (own project, own postgres, own volumes). morph-spec env derives everything from the branch name, no registry: COMPOSE_PROJECT_NAME = the branch, and a block of 10 ports at 4000 + slot*10 (slot = hash of the branch) — PORT +0, API_PORT +1 (ASPNETCORE_URLS on .NET), POSTGRES_PORT +2, REDIS_PORT +3; morph-spec check runs the contract tests with the same env. Publish via ${VAR:-default}:container, never a fixed host port, never container_name (not prefixed by the project → collides). Stable POSTGRES_DB, healthcheck on every service, DATABASE_URL with an in-network default, playwright.config reads PLAYWRIGHT_BASE_URL or PORT. Never a layout port in a committed .env (a copy from a sibling worktree repoints the stack). A compose that reads a port by ANOTHER name (PG_PORT) declares it in config.json e2e.portEnvNames ({\"postgres\": \"PG_PORT\"}) and gets the same value. Whoever removes the worktree runs docker compose -p <project> down --remove-orphans -v first (--rmi local drops only built images)."
1640
+ "digest": "Every worktree runs its OWN compose stack (own project, own postgres, own volumes). morph-spec env derives everything from the branch name, no registry: COMPOSE_PROJECT_NAME = the branch, and a block of 10 ports at 4000 + slot*10 (slot = hash of the branch) — PORT +0, API_PORT +1 (ASPNETCORE_URLS on .NET), POSTGRES_PORT +2, REDIS_PORT +3; morph-spec check runs the contract tests with the same env. Publish via ${VAR:-default}:container, never a fixed host port, never container_name (not prefixed by the project → collides). Stable POSTGRES_DB, healthcheck on every service, DATABASE_URL with an in-network default, playwright.config builds baseURL from PORT. Never a layout port in a committed .env (a copy from a sibling worktree repoints the stack). A compose that reads a port by ANOTHER name (PG_PORT) declares it in config.json e2e.portEnvNames ({\"postgres\": \"PG_PORT\"}) and gets the same value. Whoever removes the worktree runs docker compose -p <project> down --remove-orphans -v first (--rmi local drops only built images)."
1641
1641
  },
1642
1642
  {
1643
1643
  "id": "infrastructure-neon-pgvector",
@@ -1693,10 +1693,14 @@
1693
1693
  "*"
1694
1694
  ],
1695
1695
  "anchors": {
1696
- "tools": "#mcp-providers-by-phase",
1697
- "setup": "#mcp-availability-detection"
1696
+ "servers": "#the-servers",
1697
+ "setup": "#mcp-availability-detection",
1698
+ "byWork": "#mcp-by-kind-of-work",
1699
+ "assets": "#morph-assets-ai-image-and-video-generation",
1700
+ "playwright": "#playwright-page-automation",
1701
+ "neon": "#neon-schema-and-migrations"
1698
1702
  },
1699
- "digest": "MCP tools extend Claude with external data and actions. Tools are synchronous request-response with typed inputSchema. Resources provide read-only data access. Prompts are reusable templates. Register MCP servers in .claude/settings.json. Prefer @context7 for live library docs. Tool names follow where the server is configured: mcp__context7__query-docs from .mcp.json, mcp__plugin_context7_context7__query-docs from the plugin; a deferred tool loads via ToolSearch. Test tools with MCP Inspector before integrating."
1703
+ "digest": "Which MCP server serves which work on a feature, and its fallback. Registry servers: context7 (library docs: resolve-library-id then query-docs), playwright (navigate, snapshot, screenshot, console, resize), graphify (raw graph; prefer morph-spec graph explain|affected, else grep), microsoft-learn (.NET docs), neon (schema, migration dry-run on a throwaway branch; destructive tools only behind a human, never production), shadcn (read-only component catalog), vercel, asaas, morph-assets (paid image/video, CONFIRMATION_REQUIRED + confirmToken from a human). GitHub is always the gh CLI, never an MCP; Docker and Azure are their CLIs. Tool names follow where the server is configured: mcp__context7__query-docs from .mcp.json, mcp__plugin_context7_context7__query-docs from the plugin; a deferred tool loads via ToolSearch. A missing MCP never blocks: every server has a native or CLI fallback. Planning uses docs and graph, screen design uses shadcn and Playwright at 1280/390, the verifier proves e2e scenarios with Playwright."
1700
1704
  },
1701
1705
  {
1702
1706
  "id": "frontend-admin-app-data-table",
@@ -1101,7 +1101,7 @@
1101
1101
  "MCP server",
1102
1102
  "MCP client"
1103
1103
  ],
1104
- "verifiedAgainst": "Claude Code 2.1.282 MCP tooling — context7, Playwright (as plugin and as a project MCP server); GitHub via `gh` CLI; Neon via its MCP or `neon`; Microsoft Learn MCP (`https://learn.microsoft.com/api/mcp`, tools listed by `tools/list` on 2026-10-17).",
1104
+ "verifiedAgainst": "Claude Code 2.1.282 MCP tooling — context7, Playwright (as plugin and as a project MCP server); GitHub via `gh` CLI; Neon via its MCP or `neon`; Microsoft Learn MCP (`https://learn.microsoft.com/api/mcp`, tools listed by `tools/list` on 2026-10-17); servers, tool lists and `serverNames` read from the morph-spec MCP registry 4.0.0.",
1105
1105
  "provedBy": []
1106
1106
  },
1107
1107
  "frontend-admin-app-data-table": {
@@ -128,7 +128,7 @@ não escolhe o histórico; escolher "chat com histórico" não escolhe as fases.
128
128
  | Agente de batch no caminho síncrono de uma requisição | Latência de LLM no p99 do endpoint, sem retry e sem visibilidade | Job assíncrono |
129
129
  | Imagem descrita numa chamada e tipada noutra | Duas chamadas pagas, e o erro de descrição deixa de ser rastreável | Uma chamada multimodal com `RunAsync<T>` |
130
130
  | Projeção papel → `ChatMessage` em dois arquivos | Os dois divergem, e o bug aparece como "o agente esqueceu" | Uma projeção, pura e testável |
131
- | Escolher o arquétipo na implementação | A forma muda o desenho das tasks; escolhida depois, ela vira refactor | Escolha na fase de plano, e registre em `plan.md` (`## Decisões`) |
131
+ | Escolher o arquétipo na implementação | A forma muda o desenho dos cenários; escolhida depois, ela vira refactor | Escolha na fase de plano, e registre em `plan.md` (`## Decisões`) |
132
132
 
133
133
  ---
134
134
 
@@ -142,8 +142,6 @@ async ValueTask<object?> ResilientToolMiddleware(
142
142
  }
143
143
  ```
144
144
 
145
- Template completo com registro e stub de anti-hallucination: `templates/code/dotnet/ai-agents/ResilientToolMiddleware.cs.template`.
146
-
147
145
  ---
148
146
 
149
147
  ## Pattern: anti-hallucination