@polymorphism-tech/morph-spec 9.8.0 → 10.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/CLAUDE.md +12 -10
  2. package/README.md +4 -4
  3. package/bin/morph-spec.js +40 -43
  4. package/claude-plugin.json +1 -1
  5. package/docs/CHEATSHEET.md +28 -36
  6. package/docs/QUICKSTART.md +31 -191
  7. package/framework/CLAUDE.md +24 -30
  8. package/framework/MORPH.md +47 -123
  9. package/framework/agents.json +6 -374
  10. package/framework/commands/morph-apply.md +1 -1
  11. package/framework/commands/morph-archive.md +4 -3
  12. package/framework/commands/morph-hotfix.md +8 -30
  13. package/framework/commands/morph-infra.md +2 -2
  14. package/framework/commands/morph-media.md +10 -9
  15. package/framework/commands/morph-preflight.md +3 -3
  16. package/framework/commands/morph-review.md +15 -0
  17. package/framework/commands/morph-status.md +1 -1
  18. package/framework/docs/CLI.md +84 -95
  19. package/framework/evals/review-checklist.md +45 -53
  20. package/framework/hooks/README.md +4 -4
  21. package/framework/hooks/claude-code/core/README.md +1 -1
  22. package/framework/hooks/claude-code/core/denylist.json +4 -4
  23. package/framework/hooks/claude-code/core/gate-guard.js +9 -0
  24. package/framework/hooks/claude-code/core/masked-exit.js +49 -0
  25. package/framework/hooks/claude-code/core/state-sync.js +4 -1
  26. package/framework/hooks/claude-code/core/telemetry-log.js +1 -2
  27. package/framework/hooks/claude-code/core/test-budget.js +10 -70
  28. package/framework/hooks/claude-code/core/validate-completion.js +11 -24
  29. package/framework/hooks/claude-code/core/worktree-context.js +5 -22
  30. package/framework/hooks/claude-code/core/worktree-create.js +6 -45
  31. package/framework/hooks/claude-code/core/worktree-env-inject.js +2 -10
  32. package/framework/hooks/shared/e2e-check.js +0 -0
  33. package/framework/hooks/shared/gate-event.js +2 -2
  34. package/framework/hooks/shared/graph-refresh.js +20 -3
  35. package/framework/hooks/shared/heavy-command.js +32 -1
  36. package/framework/hooks/shared/heavy-config.js +1 -1
  37. package/framework/hooks/shared/next-step.js +63 -24
  38. package/framework/hooks/shared/phase-utils.js +6 -9
  39. package/framework/hooks/shared/report-progress.js +86 -0
  40. package/framework/hooks/shared/state-reader.js +3 -2
  41. package/framework/hooks/statusline.js +332 -0
  42. package/framework/mcp/registry.json +4 -4
  43. package/framework/phases.json +32 -10
  44. package/framework/rules/ai-agents-standards.md +10 -2
  45. package/framework/rules/csharp-standards.md +4 -0
  46. package/framework/rules/data-standards.md +1 -1
  47. package/framework/rules/ef-standards.md +20 -0
  48. package/framework/rules/frontend-standards.md +1 -1
  49. package/framework/rules/hangfire-standards.md +1 -1
  50. package/framework/rules/implement-report.md +25 -0
  51. package/framework/rules/infrastructure-standards.md +2 -0
  52. package/framework/rules/neon-auth-standards.md +1 -1
  53. package/framework/rules/neon-standards.md +3 -3
  54. package/framework/rules/nextjs-standards.md +7 -0
  55. package/framework/rules/plan-grammar.md +53 -0
  56. package/framework/rules/ui-design.md +27 -0
  57. package/framework/schemas/config.schema.json +11 -18
  58. package/framework/schemas/feature.schema.json +7 -1
  59. package/framework/skills/core/create-umbraco-lp/SKILL.md +1 -1
  60. package/framework/skills/core/create-umbraco-lp/references/umbraco-lp-patterns.md +1 -1
  61. package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +2 -2
  62. package/framework/skills/core/morph-apply/SKILL.md +39 -166
  63. package/framework/skills/core/morph-apply/references/debugging.md +8 -0
  64. package/framework/skills/core/morph-apply/references/hotfix.md +42 -0
  65. package/framework/skills/core/morph-apply/references/machine.md +29 -0
  66. package/framework/skills/core/{morph-media/SKILL.md → morph-apply/references/media.md} +11 -74
  67. package/framework/skills/core/morph-apply/references/review.md +65 -0
  68. package/framework/skills/core/morph-plan/SKILL.md +49 -109
  69. package/framework/skills/core/morph-plan/references/critique.md +43 -0
  70. package/framework/skills/core/morph-plan/references/interview.md +37 -0
  71. package/framework/skills/core/morph-uiux/SKILL.md +47 -64
  72. package/framework/skills/core/morph-uiux/surfaces.json +32 -0
  73. package/framework/standards/STANDARDS.json +51 -28
  74. package/framework/standards/STANDARDS.meta.json +16 -19
  75. package/framework/standards/ai-agents/agent-session.md +2 -3
  76. package/framework/standards/ai-agents/context-providers.md +2 -2
  77. package/framework/standards/ai-agents/durable-workflows-hitl.md +2 -2
  78. package/framework/standards/ai-agents/providers/model-registry.md +2 -2
  79. package/framework/standards/ai-agents/rag-custom-pgvector.md +7 -6
  80. package/framework/standards/ai-agents/setup.md +1 -1
  81. package/framework/standards/ai-agents/tool-adapters.md +2 -2
  82. package/framework/standards/architecture/stack-baseline.md +70 -0
  83. package/framework/standards/backend/database/postgresql/database.md +22 -1
  84. package/framework/standards/backend/dotnet/vsa-handler-patterns.md +33 -1
  85. package/framework/standards/backend/integrations/hangfire/hangfire-jobs.md +2 -1
  86. package/framework/standards/backend/integrations/neon-auth/neon-auth.md +12 -13
  87. package/framework/standards/frontend/design-system/ai-image-generation.md +51 -12
  88. package/framework/standards/frontend/design-system/ai-video-generation.md +50 -4
  89. package/framework/standards/frontend/design-system/art-direction.md +2 -2
  90. package/framework/standards/frontend/scroll-driven/frame-scrub.md +12 -2
  91. package/framework/standards/frontend/scroll-driven/scroll-components.md +76 -4
  92. package/framework/standards/infrastructure/docker/local-compose-isolation.md +2 -2
  93. package/framework/standards/infrastructure/neon/neon-pgvector.md +62 -20
  94. package/framework/standards/infrastructure/neon/neon-platform.md +61 -0
  95. package/framework/standards/infrastructure/neon/neon-setup.md +14 -13
  96. package/framework/standards/integration/mcp/mcp-tools.md +20 -20
  97. package/framework/templates/REGISTRY.json +1 -2
  98. package/framework/templates/context/ARCHITECTURE.md +1 -1
  99. package/framework/templates/docs/plan.md +15 -12
  100. package/framework/templates/docs/ui-mockups.md +17 -105
  101. package/framework/templates/infrastructure/docker/docker-compose.template.yml +1 -1
  102. package/package.json +1 -1
  103. package/src/commands/e2e/e2e.js +88 -23
  104. package/src/commands/graph/diff.js +74 -0
  105. package/src/commands/graph/status.js +1 -1
  106. package/src/commands/observability/cost.js +2 -4
  107. package/src/commands/observability/telemetry.js +1 -1
  108. package/src/commands/project/doctor.js +23 -39
  109. package/src/commands/project/fleet.js +5 -6
  110. package/src/commands/project/init.js +63 -36
  111. package/src/commands/project/stack-scan.js +3 -42
  112. package/src/commands/project/stack-set.js +26 -0
  113. package/src/commands/project/status.js +12 -13
  114. package/src/commands/project/update.js +39 -3
  115. package/src/commands/project/worktree.js +3 -14
  116. package/src/commands/state/advance.js +17 -17
  117. package/src/commands/state/approve.js +0 -6
  118. package/src/commands/state/archive.js +27 -1
  119. package/src/commands/state/auto-approval.js +2 -2
  120. package/src/commands/state/create.js +1 -6
  121. package/src/commands/state/gate-check.js +38 -31
  122. package/src/commands/state/gate-decision.js +3 -2
  123. package/src/commands/state/next.js +1 -0
  124. package/src/commands/state/recap.js +67 -0
  125. package/src/commands/state/report-check.js +36 -178
  126. package/src/commands/validation/plan-check.js +16 -11
  127. package/src/commands/validation/validate-feature.js +3 -3
  128. package/src/commands/validation/verify.js +3 -6
  129. package/src/core/paths/output-schema.js +3 -3
  130. package/src/core/state/state-manager.js +2 -4
  131. package/src/dashboard/app/components/CommandPalette.jsx +2 -5
  132. package/src/dashboard/app/components/GatePauses.jsx +116 -0
  133. package/src/dashboard/app/components/SessionMap.jsx +77 -0
  134. package/src/dashboard/app/pages/Activity.jsx +4 -0
  135. package/src/dashboard/app/pages/AgentMap.jsx +1 -2
  136. package/src/dashboard/app/pages/FeatureDetail.jsx +129 -186
  137. package/src/dashboard/app/pages/Features.jsx +7 -7
  138. package/src/dashboard/app/pages/PhasePipeline.jsx +1 -1
  139. package/src/dashboard/app/pages/Portfolio.jsx +40 -5
  140. package/src/dashboard/scanner/activity-scanner.js +29 -0
  141. package/src/dashboard/scanner/agents-scanner.js +11 -14
  142. package/src/dashboard/scanner/features-scanner.js +45 -24
  143. package/src/dashboard/scanner/project-api.js +11 -2
  144. package/src/dashboard/scanner/skills-scanner.js +11 -1
  145. package/src/lib/detectors/index.js +1 -1
  146. package/src/lib/e2e/applicability.js +3 -1
  147. package/src/lib/git/tree-state.js +1 -16
  148. package/src/lib/graph/diff-tree.js +127 -0
  149. package/src/lib/graph/graphify-runtime.js +12 -5
  150. package/src/lib/installers/memory-installer.js +3 -3
  151. package/src/lib/installers/rules-installer.js +57 -0
  152. package/src/lib/installers/stack-assets.js +17 -0
  153. package/src/lib/installers/stack-sync.js +219 -0
  154. package/src/lib/plan/checks.js +61 -109
  155. package/src/lib/plan/critique.js +28 -0
  156. package/src/lib/plan/media.js +42 -0
  157. package/src/lib/plan/plan-html.js +125 -0
  158. package/src/lib/plan/plan-parser.js +34 -45
  159. package/src/lib/recap/piper.js +36 -0
  160. package/src/lib/recap/recap.js +232 -0
  161. package/src/lib/review-reports.js +28 -4
  162. package/src/lib/risk-detector.js +90 -11
  163. package/src/lib/specs/screen-checklist.js +33 -48
  164. package/src/lib/stack/dotnet-build-ignores.js +8 -9
  165. package/src/lib/telemetry/metrics.js +27 -29
  166. package/src/lib/validators/reuse/reuse-validator.js +1 -9
  167. package/src/lib/validators/verify-runner.js +0 -7
  168. package/src/lib/worktree/fleet-scanner.js +7 -20
  169. package/src/lib/worktree/worktree-audit.js +0 -37
  170. package/src/scripts/setup-infra.js +15 -50
  171. package/src/utils/agents-installer.js +27 -201
  172. package/src/utils/hooks-installer.js +11 -95
  173. package/framework/hooks/claude-code/core/warn-bash-source-write.js +0 -23
  174. package/framework/hooks/claude-code/statusline.py +0 -699
  175. package/framework/hooks/claude-code/statusline.sh +0 -11
  176. package/framework/hooks/shared/agent-reap.js +0 -74
  177. package/framework/hooks/shared/slice-progress.js +0 -110
  178. package/framework/skills/core/morph-hotfix/SKILL.md +0 -133
  179. package/framework/skills/core/morph-machine/SKILL.md +0 -46
  180. package/framework/skills/core/morph-review/SKILL.md +0 -129
  181. package/framework/skills/core/morph-standards/SKILL.md +0 -52
  182. package/framework/standards/PROVENANCE.json +0 -119
  183. package/framework/standards/infrastructure/neon/neon-pgrag.md +0 -243
  184. package/src/commands/project/worktree-reap.js +0 -34
  185. package/src/commands/state/handoff.js +0 -65
  186. package/src/commands/validation/mutate.js +0 -263
  187. package/src/commands/validation/scout-check.js +0 -28
  188. package/src/lib/generators/handoff-generator.js +0 -172
  189. package/src/lib/mutation/adapters.js +0 -79
  190. package/src/lib/mutation/commands.js +0 -61
  191. package/src/lib/mutation/dotnet-introspection.js +0 -281
  192. package/src/lib/mutation/manifest.js +0 -144
  193. package/src/lib/mutation/plan.js +0 -44
  194. package/src/lib/mutation/report.js +0 -68
  195. package/src/lib/mutation/runner.js +0 -301
  196. package/src/lib/mutation/schemata.js +0 -60
  197. package/src/lib/mutation/snapshot.js +0 -65
  198. package/src/lib/mutation/subset.js +0 -109
  199. package/src/lib/mutation/trx.js +0 -50
  200. package/src/lib/scout/scout-check.js +0 -293
  201. package/src/lib/validators/traceability-check.js +0 -103
  202. package/src/lib/worktree/agent-reaper.js +0 -247
@@ -1,103 +1,86 @@
1
1
  ---
2
2
  name: morph-uiux
3
- description: Conduz a fase opcional de UI/UX de uma feature com plano aprovado — design system, mockups com checklist de tela, componentes e fluxos — despachando a persona ui-designer, e apresenta o Gate uiux antes da implementação.
3
+ description: Conduz a fase de UI/UX de uma feature com plano aprovado — renderiza 2-3 opções navegáveis por tela, abre no navegador para o usuário escolher, refina a escolhida em protótipo com prints 1280/390, preenche o checklist de tela e apresenta o Gate uiux.
4
4
  version: core
5
- when_to_use: Use quando o ramo de design for tomado (morph-spec advance {feature} --design, depois do gate do plano) e antes de /morph-apply
5
+ when_to_use: Use quando o ramo de design for tomado (morph-spec advance {feature} --design), antes de /morph-apply
6
6
  user-invocable: true
7
- cliVersion: "9.8.0"
7
+ cliVersion: "10.1.1"
8
8
  ---
9
9
 
10
10
  # morph-uiux
11
11
 
12
- Entra depois do gate do plano, quando a `morph-plan` §6 decidiu que a feature cria ou altera superfície de UI (componente, página, tela, estilo, fluxo de navegação). Sai com `1-design/` aprovado; o próximo passo é `/morph-apply {feature}`.
12
+ Entra depois do gate do plano, quando a feature cria ou altera UI. Sai com `1-design/` aprovado; próximo passo `/morph-apply {feature}`. Você desenha nesta sessão — o que decidir aqui é o que vai implementar depois.
13
+
14
+ A régua de sistema e de estética chega sozinha: a rule `ui-design` carrega quando você abre um arquivo de `1-design/` ou de UI. Carregue `frontend-design:frontend-design` se a sessão a tiver.
13
15
 
14
16
  ## 1. Insumos
15
17
 
16
- - `2-plan/plan.md` — problema, cenários e as fatias de UI (`persona: ui-designer`, com `superfície:`). O plano está congelado: esta fase **nunca** edita `plan.md` nem `checks.json`; refere as fatias pelo id (`F2`).
17
- - `.morph/context/design-system.md` — o design system **vivo**: toda decisão de token ou componente parte dele. Ausente, o `advance --design` já o escreveu a partir do template do pacote como forma de partida.
18
- - `.morph/config/config.json` → `project.stack` decide a tecnologia (`nextjs` → Tailwind + shadcn + Framer Motion; outro stack, o equivalente idiomático). Nunca suponha Next.js.
19
- - `2-plan/stack-scan.md`, se existir.
18
+ - `2-plan/plan.md` — problema e cenários de tela, referidos pelo id (`C3`). Esta fase **nunca** edita `plan.md` nem `checks.json`.
19
+ - `.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.
20
+ - `config.json` → `project.stack` decide a tecnologia (`nextjs` → Tailwind + shadcn + Motion). Nunca suponha Next.js.
21
+ - A superfície de cada tela (`marketing-site` | `admin-app` | `brand-moment`, em `surfaces.json`) diz quais standards abrir.
20
22
 
21
- ## 2. Princípios (não são opcionais)
23
+ ## 2. Opções — o usuário escolhe vendo, não lendo
22
24
 
23
- - WCAG AA e todos os estados de componente interativo (default/hover/focus/disabled/loading/error), não só o caminho feliz.
24
- - Reusa token e componente existentes antes de criar; token novo precisa de justificativa. Sistemas, não telas isoladas.
25
- - Tarefa principal da tela em até 3 interações, uma ação primária por tela, voltar/cancelar sempre à vista. Erro diz o que fazer a seguir; conteúdo gerado por IA aparece marcado como tal.
26
- - **Toda tela sai com o checklist de tela preenchido.** O `advance --design` já escreveu `1-design/mockups.md` a partir do template do pacote, a fonte única dos dez itens (tabela `### Checklist de tela` dentro de cada `## Tela:`). "Não se aplica" vale se escrito; `…`, vazio ou "a definir" reprovam. Design sem tela nova ou alterada (só componente ou estilo): apague o `1-design/mockups.md` semeado. É o checklist que faz a lista de 2 000 linhas paginar: o verificador do Gate 3 cobra cada item decidido em `## Checklist de tela`. Tela de dados segue os standards de `admin-app` (lista/tabela, formulário, feedback, estrutura de página); login, onboarding, primeira tela, estado vazio de destaque e sucesso são `brand-moment`.
27
- - **Conformidade não basta: a régua estética vale junto.** Direção escrita antes de componente (`1-design/direcao.md`: conceito, metáfora, o que torna a tela memorável, o que ela não pode parecer; 2 ou 3 direções para tela nova ou momento de marca), celular desenhado e não derivado, movimento com versão estática digna. A régua é o standard `frontend-design-system-art-direction`.
28
- - **Toda tela nova ou alterada tem protótipo renderizado e conferido por print.** `1-design/prototipos/{tela}.html` autossuficiente, com os tokens reais do projeto (lidos do CSS de tokens), desktop e celular lado a lado, controles animado/estático/pausar; prints `{tela}-1280.png` e `{tela}-390.png` ao lado, saídos do laço de autocrítica. A `## Tela:` aponta o protótipo na linha `**Protótipo:**`.
25
+ Para cada tela nova ou alterada, `1-design/opcoes/{tela}.html`: **uma página com 2 ou 3 direções distintas**, alternáveis por abas, cada uma com:
29
26
 
30
- ## 3. Dispatch
27
+ - o conceito em uma frase e o que a torna memorável, no topo da aba;
28
+ - desktop (1280) e celular (390) lado a lado em moldura de aparelho, com conteúdo realista (nunca lorem ipsum nem métrica inventada);
29
+ - controles animado/estático; `prefers-reduced-motion` respeitado;
30
+ - os tokens reais do projeto; uma direção pode propor tokens novos, marcados como tal.
31
31
 
32
- Despache `subagent_type: "morph-ui-designer"` — persona universal, registrada em todo projeto. Não registrado (instalação antiga): `general-purpose` com o campo `persona` de `.morph/framework/agents.json` colado no prompt, registrando o fallback; resolve com `morph-spec setup-infra --reinstall`. O corpo da persona já carrega o contrato fixo (teto de turnos, relatório `PARCIAL`); o prompt leva só o que varia:
32
+ Direções genuinamente diferentes (layout, hierarquia, densidade, tom), não três variações de cor. Sirva a pasta por HTTP (`npx http-server 1-design -p <porta>` em background), **abra no navegador do usuário** (`start` no Windows, `open` no macOS, `xdg-open` no Linux) e pergunte:
33
33
 
34
34
  ```
35
- Feature [feature]: artefatos de UI/UX em `.morph/features/[feature]/1-design/`.
36
- Plano: `2-plan/plan.md` — fatias de UI [F2 (admin-app), F3 …]. Stack: [project.stack].
37
- Design system: `.morph/context/design-system.md` (tokens e componentes a reusar).
38
-
39
- Nesta ordem, só o aplicável ao escopo:
40
- 1. `1-design/direcao.md` — antes de qualquer componente: conceito em uma frase, metáfora visual,
41
- o que torna a tela memorável, o que ela NÃO pode parecer. Tela nova ou momento de marca:
42
- 2 ou 3 direções distintas, uma recomendada com o porquê (standard `frontend-design-system-art-direction`).
43
- 2. `1-design/design-system.md` (obrigatório: sem ele o `advance` recusa) — tokens (cor, tipografia, espaço, motion) que a feature usa ou acrescenta, lidos do CSS de tokens real do projeto; token novo também reescreve `.morph/context/design-system.md` (§4).
44
- 3. `1-design/prototipos/{tela}.html` por tela nova ou alterada — autossuficiente, tokens reais,
45
- desktop e celular (folha inferior, zona do polegar, 44px) lado a lado em moldura de aparelho,
46
- controles animado/estático/pausar e `prefers-reduced-motion`. Laço de autocrítica: sirva a pasta
47
- por HTTP local (o Playwright MCP recusa `file:`), print em 1280 e em 390 (`{tela}-1280.png`,
48
- `{tela}-390.png` ao lado do HTML), avalie (hierarquia, contraste, ritmo, celular, "parece template?"),
49
- corrija e repita até passar.
50
- 4. `mockups.md` — um `## Tela: <nome>` por tela nova ou alterada, com a fatia que a entrega, a linha
51
- `**Protótipo:** 1-design/prototipos/{tela}.html` e a tabela `### Checklist de tela` que o
52
- `advance --design` já escreveu em `1-design/mockups.md`, cada item decidido.
53
- 5. `components.md` — componentes novos e reusados, com props e estados.
54
- 6. `flows.md` — navegação entre as telas.
55
-
56
- Relatório por artefato em `1-design/reports/[artefato]-report.md`: o que foi feito (2-3 frases),
57
- o artefato, as decisões de design e por quê, o que ficou aberto; o do protótipo lista as rodadas
58
- do laço e o que cada uma corrigiu. É o retorno; a mensagem final é cortesia.
59
- Bash só para consulta (`morph-spec standards --find`, `npx`, screenshot, `git log/diff`) e para o
60
- servidor estático do protótipo (`npx http-server <pasta> -p <porta>` em background; ao fim, encerre
61
- esse processo pelo id do background ou pelo PID dono da porta, nunca por nome de executável):
62
- sem build, teste, `verify`, `approve` ou `advance`.
63
- Não toque `feature.json`, `state.json`, `plan.md` nem `checks.json`.
35
+ AskUserQuestion — header "Direção", question: "Qual direção para {tela}?"
36
+ options: uma por direção (nome curto + o conceito) — a sua recomendação primeiro, com "(Recomendado)"
64
37
  ```
65
38
 
66
- Ao retomar, **leia primeiro** `1-design/reports/*-report.md`. `design-system.md` é o único output obrigatório: sem ele, o `advance` recusa.
39
+ "Outra" com comentário → ajuste a página e pergunte de novo. Componente ou estilo sem tela nova: pule para o §3 com uma opção só.
67
40
 
68
- ## 4. Design system vivo
41
+ ## 3. Protótipo da escolhida
69
42
 
70
- Tokens ou componentes novos: aplique o protocolo da `morph-plan` §2 — **reescreva o corpo** de `.morph/context/design-system.md` (o valor que mudou substitui o antigo na própria seção) e registre no changelog só data e motivo. `1-design/design-system.md` é da feature; `.morph/context/design-system.md` é do projeto.
43
+ `1-design/prototipos/{tela}.html` refina a direção escolhida até o nível de entrega: todos os estados (vazio, carregando, erro, sucesso), foco visível, alvos de 44px no celular. **Seletor de estado** no topo do protótipo: um botão por estado com `data-estado="vazio|carregando|erro"`, e o mesmo estado abre por `?estado=<nome>` na URL — o usuário vê cada estado num clique, sem ler. **Laço de autocrítica:** print em 1280 e em 390 pelo Playwright MCP (ele recusa `file:` — use a URL HTTP), salvos como `{tela}-1280.png` e `{tela}-390.png` ao lado do HTML, mais `{tela}-{estado}-390.png` de cada estado que o checklist diz que se aplica (vazio e carregando pelo item "Estados", erro pelo item "Erro"; "não se aplica" dispensa) — o gate uiux confere o `data-estado` e os prints; avalie (hierarquia, contraste AA, ritmo, celular, "parece template?"), corrija, repita até passar. Ao terminar, encerre o servidor pelo id do background ou pelo PID da porta, nunca por nome de executável.
71
44
 
72
- ## 5. Todo aviso de capacidade tem destino
45
+ ## 4. mockups.md
73
46
 
74
- Antes do gate:
47
+ O `advance --design` já escreveu `1-design/mockups.md` a partir do template — a tabela do checklist mora lá, não copie. Por tela, um `## Tela: <nome>` com:
75
48
 
76
- ```bash
77
- grep -riE "capacidade nova|precisa de backend|dimensionar junto" .morph/features/{feature}/1-design/
78
- ```
49
+ - `**Protótipo:** 1-design/prototipos/{tela}.html` e `**Direção escolhida:**` (qual opção e por quê, numa frase);
50
+ - o `### Checklist de tela` com cada item decidido (`não se aplica` vale se escrito; vazio ou "a definir" reprova);
51
+ - `### Componentes` (novos e reusados, com props e estados) e `### Fluxo` (de onde vem, para onde vai).
52
+
53
+ Sem tela nova ou alterada: apague o `mockups.md` semeado.
54
+
55
+ ## 5. Design system vivo
56
+
57
+ Token ou componente novo aprovado: **reescreva o corpo** de `.morph/context/design-system.md` (o valor novo substitui o antigo na própria seção); o changelog guarda só data e motivo.
79
58
 
80
- Cada ocorrência **nunca fica sem destino**: a fatia do plano que já a cobre (cite o id no mockup), uma exclusão registrada no `mockups.md` com o motivo, ou — se é escopo novo — `morph-spec unapprove {feature} plan`, ajuste do plan.md, `morph-spec plan-check {feature}` e o gate do plano de novo. Sem hits, o passo é um no-op.
59
+ ## 6. Destino de toda capacidade nova
81
60
 
82
- ## 6. Gate uiux
61
+ Uma tela que pede algo que o plano não tem (endpoint, campo, permissão) **nunca fica sem destino**. Antes do gate, varra o que você escreveu:
83
62
 
84
63
  ```
85
- morph-spec gate-check {feature} uiux [--json]
64
+ grep -riE "capacidade nova|precisa de backend|dimensionar junto" .morph/features/{feature}/1-design/
86
65
  ```
87
66
 
88
- O checklist é cobrado por código: tela sem a tabela, item ausente ou não decidido, ou nenhuma `## Tela:` **pausa** o gate nomeando tela e item, e `approve`/`advance` com assinatura `auto` recusam pela mesma regra (só o mockup antigo, telas `## S001:`, é isento). Com o checklist completo, cada tela ainda deve o protótipo: sem a linha `**Protótipo:**`, o HTML ou um dos prints de 1280/390, o gate **pausa** nomeando a tela e o arquivo. Complete o mockup antes de apresentar: não peça aprovação de um design que ainda não decidiu se a lista pagina, nem de um que ninguém renderizou.
67
+ Cada ocorrência vai para o `Cn` do plano que já a cobre, para uma exclusão registrada no `mockups.md`, ou — escopo novo — `morph-spec unapprove {feature} plan`, ajuste, `plan-check` e o gate de novo.
68
+
69
+ ## 7. Gate uiux
70
+
71
+ `morph-spec gate-check {feature} uiux [--json]` cobra por código: tela sem checklist completo, sem `**Protótipo:**`, sem o HTML ou sem os dois prints pausa nomeando o que falta. Complete antes de pedir aprovação.
89
72
 
90
- **Apresente o design aberto, não descrito.** Antes da pergunta do gate, abra cada protótipo no navegador do usuário (sirva `1-design/prototipos/` por HTTP local e abra a URL: `start` no Windows, `open` no macOS, `xdg-open` no Linux) e cite a direção escolhida de `direcao.md` em uma frase. Divergência de design system vista aqui: `--signals '{"designSystemDivergence":true}'`.
73
+ Apresente aberto, não descrito: abra cada protótipo no navegador e cite a direção de cada tela em uma frase. Divergência de design system vista aqui: `--signals '{"designSystemDivergence":true}'`.
91
74
 
92
- **`pause === true`**: `AskUserQuestion`, header "Gate uiux":
75
+ Pausa com `resolver: "session"` não é pergunta: faça o que a `reason` diz e rode o `gate-check` de novo. Checklist ou protótipo incompleto → complete-o. Sem como completar (sem navegador para os prints): `morph-spec gate-decision {feature} uiux --pause true --reason "<o que falta>"`, pausa manual, que é do usuário.
76
+
77
+ `resolver === "human"` → `AskUserQuestion`, header "Gate uiux":
93
78
 
94
79
  ```
95
80
  question: "Gate uiux — Design de {feature} aprovado?{ reason ? ' Sinal: ' + reason : '' }"
96
81
  options: "aprovado, prosseguir" | "preciso ajustar" | "cancelar feature"
97
82
  ```
98
83
 
99
- O hook `state-sync` reconhece "Gate uiux" e grava a aprovação pela feature nomeada. Sem `AskUserQuestion` (headless): `morph-spec advance {feature} --approver <quem>` — sem `--approver`, um terminal não interativo grava `approvedBy: "auto"` num gate que um humano aprovou.
100
-
101
- **`pause === false`**: resumo (tokens novos, N telas, componentes novos/reusados, fluxos) e `morph-spec advance {feature}`.
84
+ O hook `state-sync` grava a aprovação pela feature nomeada. Headless: `morph-spec advance {feature} --approver <quem>` — sem `--approver`, um terminal não interativo grava `approvedBy: "auto"` num gate que um humano devia assinar. `pause === false` → uma linha e `morph-spec advance {feature}`.
102
85
 
103
- Aprovado o gate, os quatro artefatos de `1-design/` travam: retrabalho de design passa pelo gate de novo, nunca por Edit no arquivo travado. Diga ao usuário que `/morph-apply {feature}` está pronto; não despache a apply.
86
+ Aprovado, `1-design/` trava: retrabalho passa pelo gate de novo. Diga que `/morph-apply {feature}` está pronto.
@@ -0,0 +1,32 @@
1
+ {
2
+ "marketing-site": {
3
+ "when": "site de marketing: landing page, institucional, campanha — narrativa, conversão, movimento e SEO",
4
+ "standards": [
5
+ "frontend-design-system-ai-image-generation",
6
+ "frontend-design-system-ai-video-generation",
7
+ "frontend-scroll-driven-frame-scrub",
8
+ "frontend-scroll-driven-smooth-scroll",
9
+ "frontend-scroll-driven-scroll-components",
10
+ "frontend-seo-meta-schema-audit",
11
+ "frontend-gsap-core",
12
+ "frontend-gsap-scrolltrigger",
13
+ "frontend-gsap-plugins"
14
+ ]
15
+ },
16
+ "admin-app": {
17
+ "when": "app de dados: painel administrativo, CRUD, back office, dashboard — lista, tabela, formulário e densidade",
18
+ "standards": [
19
+ "frontend-admin-app-data-table",
20
+ "frontend-admin-app-forms",
21
+ "frontend-admin-app-feedback",
22
+ "frontend-admin-app-page-structure"
23
+ ]
24
+ },
25
+ "brand-moment": {
26
+ "when": "momento de marca dentro do produto: login e auth, onboarding, primeira tela, estado vazio de destaque, sucesso, vitrine — direção, cena e movimento",
27
+ "standards": [
28
+ "frontend-gsap-core",
29
+ "frontend-gsap-scrolltrigger"
30
+ ]
31
+ }
32
+ }
@@ -841,7 +841,7 @@
841
841
  "schema": "#schema-design",
842
842
  "indexes": "#indexes"
843
843
  },
844
- "digest": "Neon PostgreSQL schema rules: snake_case plural tables and snake_case columns, PK 'id uuid primary key' with NO column default -- the app sets it with Guid.CreateVersion7() (rows inserted outside the app pass an explicit id; never gen_random_uuid() defaults for app ids), FK '{table}_id', booleans prefixed is_/has_, indexes 'idx_{table}_{column}'. Always include created_at/updated_at as timestamptz default now() not null, kept fresh by a handle_updated_at trigger. Always enable RLS on user-facing tables, with policies like 'auth.user_id() = user_id' (update takes both using and with check). Migrations via EF Core: dotnet ef migrations add, database update, and migrations script --idempotent to review the SQL; hand-written SQL migrations enable RLS, create indexes and always include a rollback. Index FKs and WHERE/ORDER BY/GROUP BY columns; GIN for full-text search. Select only needed columns, limit results, batch inserts, set a statement timeout, keep RLS policies simple. The Next.js frontend reads through the .NET API (proxy + TanStack Query); @neondatabase/serverless is only for Node-side tooling."
844
+ "digest": "Neon PostgreSQL schema rules: snake_case plural tables and snake_case columns, PK 'id uuid primary key' with NO column default -- the app sets it with Guid.CreateVersion7() (rows inserted outside the app pass an explicit id; never gen_random_uuid() defaults for app ids), FK '{table}_id', booleans prefixed is_/has_, indexes 'idx_{table}_{column}'. Always include created_at/updated_at as timestamptz default now() not null, kept fresh by a handle_updated_at trigger. Always enable RLS on user-facing tables, with policies like 'auth.user_id() = user_id' (update takes both using and with check). Migrations via EF Core: dotnet ef migrations add, database update, and migrations script --idempotent to review the SQL; hand-written SQL migrations enable RLS, create indexes and always include a rollback. Index FKs and WHERE/ORDER BY/GROUP BY columns; GIN for full-text search. Model first: jsonb only for what truly varies per row; what you filter, join, sort or aggregate is a column; the app validates the shape on write. Select only needed columns, limit results, batch inserts, set a statement timeout, keep RLS policies simple. The Next.js frontend reads through the .NET API (proxy + TanStack Query); @neondatabase/serverless is only for Node-side tooling."
845
845
  },
846
846
  {
847
847
  "id": "backend-database-vector-search-rag",
@@ -1055,7 +1055,7 @@
1055
1055
  "rls": "#row-level-security-integration",
1056
1056
  "postmortem": "#known-failure-modes-postmortem"
1057
1057
  },
1058
- "digest": "Use @neondatabase/auth SDK for Next.js. Auth data lives in neon_auth schema — no external provider, no webhooks. Server: createNeonAuth() with NEON_AUTH_BASE_URL + NEON_AUTH_COOKIE_SECRET. Client: createAuthClient(). Pages: AuthView component. Protection: auth.middleware() with runtime='nodejs' (Edge times out minting the session cookie). Register every dev/preview origin in trusted_origins before testing login. Two named prefix constants (BACKEND_API_PREFIX / PROXY_API_PREFIX) — never share one between server-direct and client-proxy calls. Frontend never queries Neon directly for business data by default — only its own auth/session SDK; a Data API bypass requires a plan.md (## Decisões) ADR. .NET: tokens are EdDSA/Ed25519 (OKP) — Microsoft.IdentityModel.Tokens can't verify OKP keys and there's no OIDC discovery; fetch+cache the JWKS yourself and verify signatures manually via BouncyCastle.Cryptography + TokenValidationParameters.SignatureValidator (must return Microsoft.IdentityModel.JsonWebTokens.JsonWebToken, not JwtSecurityToken — else IDX10506). NeonAuth:BaseUrl is mandatory in appsettings.Development.json (public value). RLS: auth.user_id() via pg_session_jwt."
1058
+ "digest": "Use @neon/auth SDK (0.8.1+, renamed from @neondatabase/auth) for Next.js. Auth data lives in neon_auth schema — no external provider, no webhooks. Server: createNeonAuth() with NEON_AUTH_BASE_URL + NEON_AUTH_COOKIE_SECRET. Client: createAuthClient(). Pages: AuthView component. Protection: auth.middleware() with runtime='nodejs' (Edge times out minting the session cookie). Register every dev/preview origin in trusted_origins before testing login. Two named prefix constants (BACKEND_API_PREFIX / PROXY_API_PREFIX) — never share one between server-direct and client-proxy calls. Frontend never queries Neon directly for business data by default — only its own auth/session SDK; a Data API bypass requires a plan.md (## Decisões) ADR. .NET: tokens are EdDSA/Ed25519 (OKP) — Microsoft.IdentityModel.Tokens can't verify OKP keys and there's no OIDC discovery; fetch+cache the JWKS yourself and verify signatures manually via BouncyCastle.Cryptography + TokenValidationParameters.SignatureValidator (must return Microsoft.IdentityModel.JsonWebTokens.JsonWebToken, not JwtSecurityToken — else IDX10506). NeonAuth:BaseUrl is mandatory in appsettings.Development.json (public value). RLS: auth.user_id() via pg_session_jwt."
1059
1059
  },
1060
1060
  {
1061
1061
  "id": "backend-integrations-resend-resend-email",
@@ -1164,9 +1164,12 @@
1164
1164
  "brand-fidelity": "#brand-fidelity-reference-dont-invent",
1165
1165
  "to-video": "#downstream-images-that-become-video",
1166
1166
  "favicon-og": "#the-two-assets-everyone-forgets",
1167
- "variations": "#variations-and-cost"
1167
+ "variations": "#variations-and-cost",
1168
+ "templates": "#category-templates",
1169
+ "principles": "#prompting-principles",
1170
+ "multi-image": "#multi-image-composition"
1168
1171
  },
1169
- "digest": "Guidelines for generating project images with the morph-assets MCP (OpenRouter; default openai/gpt-image-2.5-flare, drafts on mai-image-2.6-flash, gemini-3.1-flash-image for 2K/4K or 6-14 refs; models: [...] compares): when to use AI versus stock versus SVG, prompt patterns, aspect ratios, iterative editing and assets.md format. Core principle is brand fidelity over invention: always pass the client's real assets as references (or @brand with a project) via edit_image rather than generating in a vacuum, never AI-recreate a property developer's architectural render or a physical product (animate or reference the real one), and chain derivatives from an approved hero so the whole set shares light, palette and identity. Frame anything destined to become video WITHOUT a face, because video moderation is stricter (E005), and generate scrub frames at the video's exact ratio with the subject opposite the copy. Always produce the two forgotten assets: a favicon derived from the real logo (never a new one) and a 1200x630 OG share image. Offer two to three genuinely different variations per image (variants returns a contact sheet), varying angle, light or composition since seed is not supported by the GPT Image/Gemini models, and never advance with a weak image because every derivative inherits it. Copy to render goes between double quotes; CONFIRMATION_REQUIRED needs human approval and a confirmToken."
1172
+ "digest": "Guidelines for generating project images with the morph-assets MCP (OpenRouter; default openai/gpt-image-2.5-flare, drafts on mai-image-2.6-flash, gemini-3.1-flash-image for 2K/4K or 6-14 refs; models: [...] compares): when to use AI versus stock versus SVG, prompt patterns, aspect ratios, iterative editing and assets.md format. Core principle is brand fidelity over invention: always pass the client's real assets as references (or @brand with a project) via edit_image rather than generating in a vacuum, never AI-recreate a property developer's architectural render or a physical product (animate or reference the real one), and chain derivatives from an approved hero so the whole set shares light, palette and identity. Frame anything destined to become video WITHOUT a face, because video moderation is stricter (E005), and generate scrub frames at the video's exact ratio with the subject opposite the copy. Always produce the two forgotten assets: a favicon derived from the real logo (never a new one) and a 1200x630 OG share image. Offer two to three genuinely different variations per image (variants returns a contact sheet), varying angle, light or composition since seed is not supported by the GPT Image/Gemini models, and never advance with a weak image because every derivative inherits it. Copy to render goes between double quotes; CONFIRMATION_REQUIRED needs human approval and a confirmToken. Prompts are a layered photo-direction paragraph (subject, action, environment in foreground/mid/background, multi-source lighting, style, mood reference, palette, composition with depth cues, texture), with a skeleton per category (photorealistic, illustration, text rendering, product mockup, minimalist); edits stay one or two sentences and keep the input ratio."
1170
1173
  },
1171
1174
  {
1172
1175
  "id": "frontend-design-system-ai-video-generation",
@@ -1190,9 +1193,11 @@
1190
1193
  "directional": "#section-2-building-directional-footage",
1191
1194
  "moderation": "#section-3-faces-trip-moderation",
1192
1195
  "cost-ladder": "#section-4-the-cost-ladder",
1193
- "prompt-skeleton": "#section-5-prompt-skeleton"
1196
+ "prompt-skeleton": "#section-5-prompt-skeleton",
1197
+ "async": "#section-6-async-contract",
1198
+ "loop-prompt": "#section-7-seamless-loop-prompt-ambient-plane"
1194
1199
  },
1195
- "digest": "The decisive rule: a perfect loop has an end frame identical to its start, which is right for a self-playing ambient background and WRONG for scroll scrubbing, because start and end look the same and the page reads as frozen while the user scrolls. Scroll-driven footage needs directional movement via generate_video with an endImage (push-in/dolly is the most reliable, then reveal, pull-back, slow tilt); avoid orbits and any movement that returns to its origin. Client architectural renders are animated with img2vid, never AI-recreated. Human faces repeatedly trip moderation (E005), so crop the face out of frame (neck down, hands, product) and reserve faces for static image generation. Always climb the cost ladder: seedance-1-5-pro 480p draft to judge framing and movement, then promoteFrom to seedance-2.0 1080p only after approval (same prompt, frames and seed), then re-extract frames with a bumped cache-bust. seedance-2.0-mini does NOT respect endImage and Veo 3.1 Lite/Fast are inconclusive, so scrub only on Seedance 1.5 Pro/2.0 and check the last-frame SSIM QA. Video has no ZDR on OpenRouter: nothing sensitive in the frames. Prompts read like director notes with no hype words, and must reserve a calm dark region for the page copy with the subject on the opposite side. Generation is async via the morph-assets MCP (OpenRouter): a running job is polled with get_video (several ids at once), never by resending generate_video; library reads local history and spends no credits; media_tool extracts scrub frames and posters."
1200
+ "digest": "The decisive rule: a perfect loop has an end frame identical to its start, which is right for a self-playing ambient background and WRONG for scroll scrubbing, because start and end look the same and the page reads as frozen while the user scrolls. Scroll-driven footage needs directional movement via generate_video with an endImage (push-in/dolly is the most reliable, then reveal, pull-back, slow tilt); avoid orbits and any movement that returns to its origin. Client architectural renders are animated with img2vid, never AI-recreated. Human faces repeatedly trip moderation (E005), so crop the face out of frame (neck down, hands, product) and reserve faces for static image generation. Always climb the cost ladder: seedance-1-5-pro 480p draft to judge framing and movement, then promoteFrom to seedance-2.0 1080p only after approval (same prompt, frames and seed), then re-extract frames with a bumped cache-bust. seedance-2.0-mini does NOT respect endImage and Veo 3.1 Lite/Fast are inconclusive, so scrub only on Seedance 1.5 Pro/2.0 and check the last-frame SSIM QA. Video has no ZDR on OpenRouter: nothing sensitive in the frames. Prompts read like director notes with no hype words, and must reserve a calm dark region for the page copy with the subject on the opposite side. Generation is async via the morph-assets MCP (OpenRouter): a running job is polled with get_video (several ids at once), never by resending generate_video; library reads local history and spends no credits; media_tool extracts scrub frames and posters. waitSeconds defaults to 60 with a 110 ceiling while a Seedance job takes about 100-130s, so pass 110 and still expect to poll. An ambient loop prompt has seven mandatory sections (scene, camera returning to its start, action arc with a mid peak, text choreography or 'background plate only', static lighting, loop seal, technical), with the loop direction inferred from the subject type."
1196
1201
  },
1197
1202
  {
1198
1203
  "id": "frontend-design-system-animations",
@@ -1634,26 +1639,6 @@
1634
1639
  },
1635
1640
  "digest": "Every worktree runs its OWN compose stack (project morph-{feature}, own postgres, own volumes). Ports come from the worktree block: PORT +0, API_PORT +1 (ASPNETCORE_URLS on .NET), POSTGRES_PORT +2, REDIS_PORT +3 — 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. A non-isolable compose fails the verify e2e node inside a worktree. finish/delete tear down with --rmi local -v (--keep-volumes drops -v on finish); worktree remove of a morph-task/* branch with -v, of morph/{f} without. An app whose build is expensive in the Docker VM runs as a host process via e2e.hostServices (compose keeps only the dependencies; ports from the block). Cloud DB credentials go in e2e.auth.envFile, never in .morph/worktree.env. A compose that reads a port by ANOTHER name (PG_PORT) is not fed by the block: declare it in config.json e2e.portEnvNames ({\"postgres\": \"PG_PORT\"}) and the harness exports it with the same value in worktree.env, the compose env and the hook."
1636
1641
  },
1637
- {
1638
- "id": "infrastructure-neon-pgrag",
1639
- "name": "neon pgrag",
1640
- "path": "infrastructure/neon/neon-pgrag.md",
1641
- "category": "infrastructure",
1642
- "subcategory": "neon",
1643
- "tags": [
1644
- "infrastructure",
1645
- "neon",
1646
- "pgrag"
1647
- ],
1648
- "stacks": [
1649
- "neon"
1650
- ],
1651
- "anchors": {
1652
- "setup": "#install-pgrag",
1653
- "pipeline": "#full-rag-pipeline-example"
1654
- },
1655
- "digest": "pgrag (Neon `rag` extension family) is EXPERIMENTAL: use it for prototyping and simple SQL-only RAG, not production without testing. Run `SET neon.allow_unstable_extensions='true'` before `CREATE EXTENSION rag CASCADE` (also `rag_bge_small_en_v15`, `rag_jina_reranker_v1_tiny_en`). Local bge-small embeddings are 384 dims, OpenAI text-embedding-3-small is 1536: NEVER mix models in one column or use the local one when the app uses another model (dimension mismatch breaks search). Chunk with `rag.chunks_by_character_count` (1000 chars, 200 overlap); `embedding_for_passage` for documents, `embedding_for_query` for queries; create the pgvector HNSW index (m=16, ef_construction=64) after the initial load; rerank with `rerank_distance` (sort ASC). Keep API keys out of SQL scripts. For production .NET needing custom logic, use a typed MAF tool over pgvector (`ai-agents-rag-custom-pgvector`)."
1656
- },
1657
1642
  {
1658
1643
  "id": "infrastructure-neon-pgvector",
1659
1644
  "name": "neon pgvector",
@@ -1672,7 +1657,7 @@
1672
1657
  "setup": "#enable-pgvector",
1673
1658
  "queries": "#similarity-search"
1674
1659
  },
1675
- "digest": "pgvector on Neon with .NET VSA: packages Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3 + Pgvector.EntityFrameworkCore 0.3.0 (snake_case columns mapped with HasColumnName, no naming-convention package); HasPostgresExtension('vector') in OnModelCreating emits CREATE EXTENSION in the migration. Map the column as Pgvector `Vector` (`vector(1536)` for text-embedding-3-small; EF does not map float[] or ReadOnlyMemory<float>) and call `npgsql.UseVector()` inside UseNpgsql (NpgsqlDataSourceBuilder.UseVector only for raw Npgsql). ALWAYS an HNSW index (HasMethod('hnsw'), vector_cosine_ops, m 16, ef_construction 64); the operator class must match the LINQ function (CosineDistance/L2Distance/MaxInnerProduct) or Postgres seq-scans. Query in the slice handler through ApplicationDbContext: `d.Embedding!.CosineDistance(query)`, filter by distance <= 1 - minSimilarity, OrderBy distance ASC (similarity = 1 - distance, never ORDER BY similarity DESC), return Result; no DocumentRepository, no raw SQL from C# (SQL functions such as match_documents/hybrid search only with a plan.md (## Decisões) justification). Ids from Guid.CreateVersion7() in the handler, never gen_random_uuid() defaults. ef_search (default 40) on the pooled endpoint needs SET LOCAL inside the query's transaction."
1660
+ "digest": "pgvector on Neon with .NET VSA: packages Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3 + Pgvector.EntityFrameworkCore 0.3.0 (snake_case columns mapped with HasColumnName, no naming-convention package); HasPostgresExtension('vector') in OnModelCreating emits CREATE EXTENSION in the migration. Map the column as Pgvector `Vector` (`vector(1536)` for text-embedding-3-small; EF does not map float[] or ReadOnlyMemory<float>) and call `npgsql.UseVector()` inside UseNpgsql (NpgsqlDataSourceBuilder.UseVector only for raw Npgsql). ALWAYS an HNSW index (HasMethod('hnsw'), vector_cosine_ops, m 16, ef_construction 64); the operator class must match the LINQ function (CosineDistance/L2Distance/MaxInnerProduct) or Postgres seq-scans. Query in the slice handler through ApplicationDbContext: `d.Embedding!.CosineDistance(query)`, filter by distance <= 1 - minSimilarity, OrderBy distance ASC (similarity = 1 - distance, never ORDER BY similarity DESC), return Result; no DocumentRepository, no raw SQL from C# (SQL functions such as match_documents/hybrid search only with a plan.md (## Decisões) justification). Ids from Guid.CreateVersion7() in the handler, never gen_random_uuid() defaults. ef_search (default 40) on the pooled endpoint needs SET LOCAL inside the query's transaction. Hybrid search: generated tsvector column with a GIN index plus pgvector, fused by rank with RRF, never a weighted sum of scores; pt-BR content needs a text search configuration with unaccent. On Neon, pg_search is removed, pgrag is deprecated, pgmq and Apache AGE are not in the catalog; lakebase_text (BM25) and lakebase_vector are Neon-only, so they need an ADR."
1676
1661
  },
1677
1662
  {
1678
1663
  "id": "infrastructure-neon-setup",
@@ -1860,7 +1845,7 @@
1860
1845
  "motion": "#section-6-motion-with-intent",
1861
1846
  "prototype": "#section-7-prototype-and-self-review"
1862
1847
  },
1863
- "digest": "Order beats talent: before any component of a new or changed screen, write 1-design/direcao.md with the concept in one sentence, the visual metaphor, what makes it memorable, and what it must NOT look like. New screens and brand moments (login, onboarding, first screen, empty state, success) explore 2-3 DISTINCT directions and recommend one with a product reason. Avoid template tells (raw shadcn look, white card centered on gray, generic icon list, default fonts, flat backgrounds, mobile as stacked desktop, decorative fade-ins, made-up numbers); three or more means raise it. Mobile is composed at 390px on its own (bottom sheet, thumb zone, 44px targets). Motion tells something with the lightest tool (CSS keyframes > scroll-driven CSS > Framer Motion > GSAP), transform/opacity only, and a composed reduced-motion version. Prove it in 1-design/prototipos/{screen}.html with the project REAL tokens, screenshotted at 1280 and 390 and revised until it passes."
1848
+ "digest": "Order beats talent: before any component of a new or changed screen, write the direction (Direção escolhida in 1-design/mockups.md) with the concept in one sentence, the visual metaphor, what makes it memorable, and what it must NOT look like. New screens and brand moments (login, onboarding, first screen, empty state, success) explore 2-3 DISTINCT directions and recommend one with a product reason. Avoid template tells (raw shadcn look, white card centered on gray, generic icon list, default fonts, flat backgrounds, mobile as stacked desktop, decorative fade-ins, made-up numbers); three or more means raise it. Mobile is composed at 390px on its own (bottom sheet, thumb zone, 44px targets). Motion tells something with the lightest tool (CSS keyframes > scroll-driven CSS > Framer Motion > GSAP), transform/opacity only, and a composed reduced-motion version. Prove it in 1-design/prototipos/{screen}.html with the project REAL tokens, screenshotted at 1280 and 390 and revised until it passes."
1864
1849
  },
1865
1850
  {
1866
1851
  "id": "architecture-engineering-lens",
@@ -1930,6 +1915,44 @@
1930
1915
  "not-a-rule": "#o-que-não-é-regra"
1931
1916
  },
1932
1917
  "digest": "Rules with a reason that a machine can see are lint errors, not prose: one eslint.config.mjs at the Next app root, flat config spreading eslint-config-next/core-web-vitals and eslint-config-next/typescript, no new plugin. ESLint 9 (eslint-plugin-import/react peer range; the bundled typescript-eslint wants TypeScript <6.1); Next 16 next build no longer lints; the verify build node runs eslint --quiet on the files the feature changed (legacy lint debt never reddens a feature), from the app root, when eslint.config.* and eslint are present. no-restricted-imports bans framer-motion (one import path, motion/react), zustand/redux/@reduxjs/toolkit (server state is TanStack Query, page and filters in the URL), DB drivers pg/@neondatabase/serverless/@prisma/client/drizzle-orm/postgres (Next never touches the database; the .NET API does), the legacy shadcn @/components/ui/form, and @/features/*/* deep imports outside src/features (use the feature index.ts). import/no-restricted-paths: src/components never imports src/features, src/features never imports src/app, src/hooks never imports the API client (lib/api-client.ts, lib/api). no-restricted-syntax: fetch or apiClient called inside useEffect, and 'use client' in the root app/layout.tsx. import/no-default-export except Next convention files (page, layout, loading, error, not-found, template, default, route, sitemap, robots, icons, OG images) and *.config.*. @typescript-eslint/no-explicit-any error, no-console warn. A new restriction is one line in this file with the reason in its message; a one-off exception is eslint-disable-next-line with the reason. CSS class naming, animation class catalogs, optional className, Zod on props, motion counts and offsets, QueryClient defaults and prop-drilling depth are taste: neither prose nor lint."
1918
+ },
1919
+ {
1920
+ "id": "architecture-stack-baseline",
1921
+ "name": "stack baseline",
1922
+ "path": "architecture/stack-baseline.md",
1923
+ "category": "architecture",
1924
+ "subcategory": null,
1925
+ "tags": [
1926
+ "architecture",
1927
+ "stack",
1928
+ "greenfield"
1929
+ ],
1930
+ "stacks": [
1931
+ "*"
1932
+ ],
1933
+ "anchors": {
1934
+ "stack": "#a-stack",
1935
+ "declare": "#declarar",
1936
+ "forbidden": "#padrões-proibidos",
1937
+ "outside": "#fora-da-stack"
1938
+ },
1939
+ "digest": "Projeto novo começa na stack do Morph INTEIRA (dotnet+nextjs --with neon), mesmo que a primeira feature caiba em menos; recorte ou outra tecnologia só por escolha explícita do usuário:.NET 10 + Vertical Slice (handler + validator + endpoint + errors + tests), EF Core + Neon (Postgres), Result pattern com result.Match(), Microsoft Agent Framework quando houver agentes, Next.js App Router + Tailwind + Motion + Shadcn, Hangfire só com razão real, Docker Compose para as dependências locais. Postgres primeiro: serviço de dados novo (cache, fila, vetor, busca, grafo, banco de documento) pede ADR dizendo por que o Postgres do projeto não cobre; no Neon, pg_search saiu e pgmq e Apache AGE estão fora do catálogo de extensões. Tags: project.stack dotnet|nextjs|dotnet+nextjs; integrations neon, maf, docker. Declare com `morph-spec stack-set <stack> --with <integrações>`, que grava o config.json e instala as rules de domínio; as rules só carregam no início de uma sessão, então a sessão que implementa começa depois. Proibido: exception como fluxo, Service/Manager entre handler e dados, IRepository/IUnitOfWork, SQL cru sem ADR, redeclarar tipo existente. Outra tecnologia é ADR de projeto no plano, sem rule de domínio."
1940
+ },
1941
+ {
1942
+ "id": "infrastructure-neon-platform",
1943
+ "name": "neon platform",
1944
+ "path": "infrastructure/neon/neon-platform.md",
1945
+ "category": "infrastructure",
1946
+ "subcategory": "neon",
1947
+ "tags": [
1948
+ "infrastructure",
1949
+ "neon",
1950
+ "platform"
1951
+ ],
1952
+ "stacks": [
1953
+ "neon"
1954
+ ],
1955
+ "digest": "O que o Neon entrega pronto antes de contratar serviço. A região é fixa e limita o catálogo: Storage, Functions, AI Gateway e Realtime só em us-east-1, us-east-2, eu-central-1 e ap-southeast-1; sa-east-1 tem só Postgres e Auth. Branch descartável com --expires-at (máx. 30 dias) e reset para testar e ensaiar migration; schema diff com neon branches schema-diff ou neon diff; snapshot manual antes de migration com degrau:, com PITR na janela do plano; Object Storage S3-compatible (lifecycle não aplicado); AI Gateway OpenAI-compatible pede ADR por fugir do provider direto; list_slow_queries e prepare_query_tuning para consulta lenta; read replica é eventualmente consistente; IP Allow só no Scale e incompatível com Auth; protected branch contra apagar produção. Não adotar nesta stack: Functions para job .NET, Data API, Realtime (beta), Neon Local (proxy para a nuvem), Private Networking. MCP nunca em produção: o agente trabalha em branch. CLI agora é neon (login: neon login); neonctl ainda funciona."
1933
1956
  }
1934
1957
  ]
1935
1958
  }
@@ -683,7 +683,7 @@
683
683
  "IHandler pattern",
684
684
  "handler endpoint"
685
685
  ],
686
- "verifiedAgainst": ".NET 10 (SDK 10.0.400-preview; minimal APIs, primary constructors, `Guid.CreateVersion7()`). The \"Complete Endpoint Example\" block compiles with `TreatWarningsAsErrors` over the `Result`/`ErrorHttpMapping` of `result-pattern.md` (in `ProjectName.Abstractions`/`ProjectName.Extensions`, reached only through the block's own `using`s); the other blocks are documentary.",
686
+ "verifiedAgainst": ".NET 10 (SDK 10.0.400-preview; minimal APIs, primary constructors, `Guid.CreateVersion7()`). The \"Complete Endpoint Example\" block compiles with `TreatWarningsAsErrors` over the `Result`/`ErrorHttpMapping` of `result-pattern.md` (in `ProjectName.Abstractions`/`ProjectName.Extensions`, reached only through the block's own `using`s); the other blocks are documentary. The \"Queue on Postgres\" claim ran sequentially on PGlite 0.5.13 (PostgreSQL 18): the eligibility predicate and the lease hold, while lock contention needs the integration test the section requires.",
687
687
  "provedBy": []
688
688
  },
689
689
  "backend-integrations-asaas-asaas-api": {
@@ -706,7 +706,7 @@
706
706
  "cron",
707
707
  "fire and forget"
708
708
  ],
709
- "verifiedAgainst": ".NET 10 (SDK 10.0.400-preview) + Hangfire.Core/Hangfire.AspNetCore 1.8.25 + Hangfire.PostgreSql 1.21.1 + Newtonsoft.Json 13.0.4. The startup, job/handler, dashboard-filter and idempotency blocks compile with `TreatWarningsAsErrors`; the Job Types calls compile inside a wrapper method; the per-job DI scope (`AspNetCoreJobActivator` → `IServiceScopeFactory`) and the `PostgreSqlStorageOptions` defaults were read by reflection on those assemblies; the pooled-endpoint limits (LISTEN/NOTIFY, migrations on the direct string) come from the Neon connection-pooling docs. Cron strings are documentary.",
709
+ "verifiedAgainst": ".NET 10 (SDK 10.0.400-preview) + Hangfire.Core/Hangfire.AspNetCore 1.8.25 + Hangfire.PostgreSql 1.21.1 + Newtonsoft.Json 13.0.4. The startup, job/handler, dashboard-filter and idempotency blocks compile with `TreatWarningsAsErrors`; the Job Types calls compile inside a wrapper method; the per-job DI scope (`AspNetCoreJobActivator` → `IServiceScopeFactory`) and the `PostgreSqlStorageOptions` defaults were read by reflection on those assemblies; the pooled-endpoint limits (LISTEN/NOTIFY, migrations on the direct string) come from the Neon connection-pooling docs. Cron strings are documentary. Scale-to-zero behaviour read from the Neon docs.",
710
710
  "provedBy": []
711
711
  },
712
712
  "backend-integrations-neon-auth-neon-auth": {
@@ -730,7 +730,7 @@
730
730
  "bypass backend",
731
731
  "direct database access"
732
732
  ],
733
- "verifiedAgainst": "Neon Auth — @neondatabase/auth + @neondatabase/auth-ui (Better Auth).",
733
+ "verifiedAgainst": "Neon Auth — @neondatabase/auth + @neondatabase/auth-ui (Better Auth), run on 2026-07-13; package names of `createNeonAuth`/`createAuthClient` and the install line read from the Neon quickstart for `@neon/auth` 0.8.x, not run.",
734
734
  "provedBy": []
735
735
  },
736
736
  "backend-integrations-resend-resend-email": {
@@ -1068,18 +1068,7 @@
1068
1068
  "portEnvNames",
1069
1069
  "local docker compose"
1070
1070
  ],
1071
- "verifiedAgainst": "Docker Compose v2 + morph-spec 8.34 (dedicated stack per worktree).",
1072
- "provedBy": []
1073
- },
1074
- "infrastructure-neon-pgrag": {
1075
- "aliases": [
1076
- "pgrag",
1077
- "RAG in SQL",
1078
- "embedding pipeline",
1079
- "Neon RAG",
1080
- "in-database RAG"
1081
- ],
1082
- "verifiedAgainst": "Neon pgrag (`rag` extension family — experimental, see Core Rules).",
1071
+ "verifiedAgainst": "Docker Compose v2 + morph-spec 8.34 (dedicated stack per worktree). The `pgvector/pgvector:pg17` tag was confirmed on Docker Hub; the image was not run.",
1083
1072
  "provedBy": []
1084
1073
  },
1085
1074
  "infrastructure-neon-pgvector": {
@@ -1090,7 +1079,7 @@
1090
1079
  "Neon vectors",
1091
1080
  "HNSW index"
1092
1081
  ],
1093
- "verifiedAgainst": ".NET 10 (SDK 10.0.400-preview) + Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3 + Pgvector.EntityFrameworkCore 0.3.0 + Microsoft.Extensions.AI 10.9.0 (ai-pin 2026-09-08). The entity, configuration, DbContext, search-handler and raw-Npgsql blocks compile with `TreatWarningsAsErrors` (handler over the `Result`/`IHandler` of `result-pattern.md`/`vertical-slice.md`), and the handler's query shape was translated with `ToQueryString()` to `ORDER BY d.embedding <=> @query`; the SQL (index DDL, `ef_search`, the two SQL functions) is documentary, checked against the pgvector README.",
1082
+ "verifiedAgainst": ".NET 10 (SDK 10.0.400-preview) + Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3 + Pgvector.EntityFrameworkCore 0.3.0 + Microsoft.Extensions.AI 10.9.0 (ai-pin 2026-09-08). The entity, configuration, DbContext, search-handler and raw-Npgsql blocks compile with `TreatWarningsAsErrors` (handler over the `Result`/`IHandler` of `result-pattern.md`/`vertical-slice.md`), and the handler's query shape was translated with `ToQueryString()` to `ORDER BY d.embedding <=> @query`; the SQL (index DDL, `ef_search`, `match_documents`) is documentary, checked against the pgvector README; `hybrid_search` ran on PGlite 0.5.13, not on a Neon compute; the `unaccent` dictionary in a text search configuration is what the Neon `unaccent` page describes (only `unaccent.rules` is closed); Lakebase Search read from the Neon docs.",
1094
1083
  "provedBy": []
1095
1084
  },
1096
1085
  "infrastructure-neon-setup": {
@@ -1101,7 +1090,7 @@
1101
1090
  "Neon CLI",
1102
1091
  "Neon setup"
1103
1092
  ],
1104
- "verifiedAgainst": ".NET 10 (SDK 10.0.400-preview) + Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3 + neonctl. The DbContext registration, design-time factory and cold-start blocks compile with `TreatWarningsAsErrors`; that Npgsql 10 rejects `postgresql://` URIs and marks `Trust Server Certificate` as \"no longer needed and does nothing\" was measured on 10.0.3; the suspend-timeout API and `--cu` ranges were checked against the Neon docs (context7). neonctl commands are documentary.",
1093
+ "verifiedAgainst": ".NET 10 (SDK 10.0.400-preview) + Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3 + neonctl. The DbContext registration, design-time factory and cold-start blocks compile with `TreatWarningsAsErrors`; that Npgsql 10 rejects `postgresql://` URIs and marks `Trust Server Certificate` as \"no longer needed and does nothing\" was measured on 10.0.3; the suspend-timeout API and `--cu` ranges were checked against the Neon docs (context7). `neon` CLI commands are documentary; the top-level commands were read from `neon --help` 8.14.0.",
1105
1094
  "provedBy": []
1106
1095
  },
1107
1096
  "integration-mcp-mcp-tools": {
@@ -1112,7 +1101,7 @@
1112
1101
  "MCP server",
1113
1102
  "MCP client"
1114
1103
  ],
1115
- "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 `neonctl`; 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).",
1116
1105
  "provedBy": []
1117
1106
  },
1118
1107
  "frontend-admin-app-data-table": {
@@ -1196,7 +1185,7 @@
1196
1185
  "refactor neutro",
1197
1186
  "migracao de teste"
1198
1187
  ],
1199
- "verifiedAgainst": "Microsoft.Extensions.AI 10.9.0 + Microsoft.Agents.AI 1.20.0 (ai-pin 2026-09-08); os dois blocos C# abaixo foram extraídos com `scripts/extract-doc-csharp.mjs` e compilados contra o pin com `TreatWarningsAsErrors`, e os três testes do segundo bloco foram executados e passam. **A separação em si e a migração de teste são verificação documental:** vêm da feature `tools-finas` do MORPH_GHLBrain e o ai-kit não as traz.",
1188
+ "verifiedAgainst": "Microsoft.Extensions.AI 10.9.0 + Microsoft.Agents.AI 1.20.0 (ai-pin 2026-09-08); os dois blocos C# abaixo foram extraídos com `scripts/extract-doc-csharp.mjs` e compilados contra o pin com `TreatWarningsAsErrors`, e os três testes do segundo bloco foram executados e passam. **A separação em si e a migração de teste são verificação documental:** vêm de um projeto .NET em produção e o ai-kit não as traz.",
1200
1189
  "provedBy": []
1201
1190
  },
1202
1191
  "frontend-design-system-art-direction": {
@@ -1253,6 +1242,14 @@
1253
1242
  ],
1254
1243
  "verifiedAgainst": "eslint 9.39.5, eslint-config-next 16.4.2 (typescript-eslint 8.71.2, eslint-plugin-import 2.32.0), next 16.4.2, typescript 6.0.3 (sonda: um arquivo ruim por regra → erro da regra esperada, `no-console` → aviso, arquivos conformes e o scaffold `morph-spec scaffold nextjs` → 0 problemas).",
1255
1244
  "provedBy": []
1245
+ },
1246
+ "architecture-stack-baseline": {
1247
+ "verifiedAgainst": ".NET 10, EF Core 10, Next.js 16 App Router, Microsoft Agent Framework 1.0; catálogo de extensões do Neon lido em 2026-10-30.",
1248
+ "provedBy": []
1249
+ },
1250
+ "infrastructure-neon-platform": {
1251
+ "verifiedAgainst": "Neon docs lidas em 2026-10-30 (regions, plans, backup-restore, branch-expiration, s3-compatibility, ai-gateway, neon-mcp-server, functions) + CLI `neon` 8.14.0. Nenhum bloco deste standard foi executado contra um projeto.",
1252
+ "provedBy": []
1256
1253
  }
1257
1254
  },
1258
1255
  "sharedAliases": {
@@ -21,12 +21,11 @@
21
21
  | O histórico é **só** a lista de mensagens, sem campo próprio, e o projeto não precisa lê-lo fora do agente | `AgentSession` + um `ChatHistoryProvider` embutido |
22
22
  | Protótipo, CLI, demo, teste | `InMemoryChatHistoryProvider` |
23
23
 
24
- **O veredito da casa: conversa própria como default.** Isso não é preferência — é a aplicação do critério acima aos projetos que existem. GHLBrain, MORPH_OS e ProspectPRO caem todos nas três primeiras linhas.
24
+ **O veredito da casa: conversa própria como default.** Isso não é preferência — é a aplicação do critério acima aos projetos que existem. Os três agentes da casa em produção caem todos nas três primeiras linhas.
25
25
 
26
26
  ### Os três fundamentos, cada um citável
27
27
 
28
- 1. **ADR D3 do GHLBrain.** O estado da conversa vive em `conv_checkpoints`; `ToolAgentRunner.cs:126-130` roda *"sem AgentThread/sessão"* — porque o **retry depende de o histórico ser visível e manipulável**: para repetir uma volta que falhou é preciso remontar as mensagens, e não dá para remontar o que está dentro de um objeto opaco. Registrado em `docs/specs/elevacao-9/brutos/scan-ghlbrain.md:58` e `:599`.
29
- 2. **Doc oficial de self-hosting** (learn.microsoft.com/en-us/agent-framework/hosting/self-hosting/, `ms.date` 2026-08-17), verbatim: *"MAF doesn't include a general-purpose durable session store"*. Produção exige implementação própria. A mesma página recomenda, em conversa longa, um `ChatHistoryProvider` externo **com mensagens por linha** em vez de reescrever a sessão inteira a cada turno.
28
+ 1. **Decisão de arquitetura de um agente .NET em produção.** O estado da conversa vive em `conv_checkpoints`; o runner roda *"sem AgentThread/sessão"* — porque o **retry depende de o histórico ser visível e manipulável**: para repetir uma volta que falhou é preciso remontar as mensagens, e não dá para remontar o que está dentro de um objeto opaco.2. **Doc oficial de self-hosting** (learn.microsoft.com/en-us/agent-framework/hosting/self-hosting/, `ms.date` 2026-08-17), verbatim: *"MAF doesn't include a general-purpose durable session store"*. Produção exige implementação própria. A mesma página recomenda, em conversa longa, um `ChatHistoryProvider` externo **com mensagens por linha** em vez de reescrever a sessão inteira a cada turno.
30
29
  3. **Padrão do canal** (Rasmus, parte 06 — "Conversations"): objeto de conversa próprio do domínio, com **um** mapper para `ChatMessage`. A conversa é entidade de negócio; o formato do provedor é detalhe de transporte.
31
30
 
32
31
  ### Ligação com a Responses API
@@ -23,7 +23,7 @@ Preciso que o agente saiba X.
23
23
  (nem provider, nem tool)
24
24
  ```
25
25
 
26
- **O caso concreto que a regra evita:** RAG passivo injetado como context provider. O usuário digita "oi" e o agente paga uma busca vetorial + o custo dos trechos no prompt — **em todo turno**, inclusive nos que não precisam de conhecimento nenhum. Como tool, o "oi" não dispara busca alguma. Foi medido em produção: o escopo institucional da base do GHLBrain roda sem `LIMIT`, e passivo isso é custo por turno, não por necessidade.
26
+ **O caso concreto que a regra evita:** RAG passivo injetado como context provider. O usuário digita "oi" e o agente paga uma busca vetorial + o custo dos trechos no prompt — **em todo turno**, inclusive nos que não precisam de conhecimento nenhum. Como tool, o "oi" não dispara busca alguma. Foi medido em produção: o escopo institucional de uma base de conhecimento roda sem `LIMIT`, e passivo isso é custo por turno, não por necessidade.
27
27
 
28
28
  ### O compositor determinístico — a alternativa que não é provider
29
29
 
@@ -45,7 +45,7 @@ var plan = PlanFor(conversation.Stage);
45
45
  var options = new ChatOptions { Instructions = plan.Instructions, Tools = [.. plan.Tools] };
46
46
  ```
47
47
 
48
- É a prática do GHLBrain (`OperatorPlan`) e o padrão do canal: **o código decide o modo, o LLM classifica**. Um provider que "sugere" quais tools usar deixa a decisão com o modelo; a allow-list tira a decisão do modelo.
48
+ É a prática de um agente em produção (um plano do operador decidido em código) e o padrão do canal: **o código decide o modo, o LLM classifica**. Um provider que "sugere" quais tools usar deixa a decisão com o modelo; a allow-list tira a decisão do modelo.
49
49
 
50
50
  ---
51
51
 
@@ -71,7 +71,7 @@ await foreach (WorkflowEvent evt in run.WatchStreamAsync())
71
71
  | **Um agente**, uma tool de efeito irreversível (cobrar, enviar proposta, apagar) | `ApprovalRequiredAIFunction` — **sem workflow nenhum** |
72
72
  | Um grafo com etapa humana entre executores, ou espera de dias | `RequestPort` + `CheckpointManager` |
73
73
 
74
- O caso do agente único é o que a casa realmente tem (MORPH_OS: billing, envio de proposta) e é o que faltava neste standard.
74
+ O caso do agente único é o que a casa realmente tem (billing, envio de proposta) e é o que faltava neste standard.
75
75
 
76
76
  ### O ciclo, medido em `Microsoft.Extensions.AI` 10.9.0
77
77
 
@@ -271,7 +271,7 @@ This framework deploys to VPS/Coolify by default and does not adopt Azure as a d
271
271
  - Human-in-the-loop (HITL) | Microsoft Learn: https://learn.microsoft.com/en-us/agent-framework/workflows/human-in-the-loop
272
272
  - Checkpoints | Microsoft Learn: https://learn.microsoft.com/en-us/agent-framework/workflows/checkpoints
273
273
  - Durable Extension | Microsoft Learn: https://learn.microsoft.com/en-us/agent-framework/integrations/durable-extension
274
- - Release notes 1.14 (2026-07-21) e 1.17 do `microsoft/agent-framework` — graduação do `ToolApprovalAgent` e extração do Durable Task (compilados em `docs/specs/elevacao-9/brutos/research-maf.md:312-331`, lidos 2026-09-07)
274
+ - Release notes 1.14 (2026-07-21) e 1.17 do `microsoft/agent-framework` — graduação do `ToolApprovalAgent` e extração do Durable Task (lidos 2026-09-07)
275
275
 
276
276
  ---
277
277
 
@@ -114,7 +114,7 @@ Read it narrowly, because it **is** narrow: the restriction needs **four** facts
114
114
 
115
115
  ### Origin 2 — measured in the field, no primary source
116
116
 
117
- *"Reasoning models reject `temperature != 1` when tools are present."* This is **measured in production**, not documented: GHLBrain's `ToolAgentRunner.cs:35-38` strips temperature for that path, recorded in `docs/specs/elevacao-9/brutos/scan-ghlbrain.md:106`, and corroborated by third parties (issues on `openai-python` and LibreChat). **The 2026-09-08 research did not find a primary OpenAI sentence stating it.**
117
+ *"Reasoning models reject `temperature != 1` when tools are present."* This is **measured in production**, not documented: a production .NET agent strips temperature for that path, and this is corroborated by third parties (issues on `openai-python` and LibreChat). **The 2026-09-08 research did not find a primary OpenAI sentence stating it.**
118
118
 
119
119
  So it lives in the schema as a **per-alias flag with mandatory provenance** (`constraints.temperatureUnsupported` + `constraints.provenance`), never as a universal rule hardcoded in the registry. Whoever turns it on is asserting it for one specific model and writing where they got it from.
120
120
 
@@ -187,7 +187,7 @@ Going through `Microsoft.Extensions.AI` (`IChatClient`) or the MAF (`AIAgent`) k
187
187
 
188
188
  > **Restore trap, measured 2026-09-08:** `Microsoft.Extensions.AI.OpenAI` 10.9.0 declares `OpenAI (>= 2.12.0 && < 2.13.0)`. Pairing it with the pinned `OpenAI` 2.13.0 emits **NU1608** on restore. Either pin `OpenAI` to 2.12.x alongside the bridge, or accept the warning knowingly and write the decision in `plan.md` (`## Decisões`). Do not discover this in CI.
189
189
 
190
- **No floating ranges.** Every `PackageReference` above is an exact version. A floating `2.*` on a weekly-cadence SDK is how ProspectPRO bought a `MissingMethodException` on the Responses API **after paying for the call** (`docs/specs/elevacao-9/brutos/scan-prospectpro.md:55`).
190
+ **No floating ranges.** Every `PackageReference` above is an exact version. A floating `2.*` on a weekly-cadence SDK is how a production project bought a `MissingMethodException` on the Responses API **after paying for the call**.
191
191
 
192
192
  **Adding a provider branch:** the `ModelRegistry.cs` template implements `openai` + `ollama`. To add `google`, `anthropic`, or `azure-openai`:
193
193
  1. Confirm the current NuGet SDK — community SDKs evolve; check NuGet/context7 before coding.