@fontdata/ai-harness 4.3.1 → 4.5.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 (257) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/README.md +154 -3
  3. package/dist/cli.js +1 -0
  4. package/dist/config/config.js +45 -3
  5. package/dist/delphi/catalogo.js +299 -0
  6. package/dist/delphi/classificar.js +21 -0
  7. package/dist/delphi/command.js +144 -2
  8. package/dist/delphi/encoding.js +112 -0
  9. package/dist/doctor/checks.js +19 -1
  10. package/dist/init.js +16 -2
  11. package/dist/install/perfis.js +21 -0
  12. package/dist/install/plan.js +29 -2
  13. package/dist/install/settings.js +40 -3
  14. package/dist/mapa/extratores/pascal.js +1 -1
  15. package/dist/update/update.js +126 -7
  16. package/package.json +1 -1
  17. package/templates/CLAUDE.md +2 -1
  18. package/templates/catalog.json +11 -3
  19. package/templates/hooks/comentarios/check.mjs +62 -5
  20. package/templates/hooks/hooks.json +2 -1
  21. package/templates/hooks/lib/config.mjs +1 -0
  22. package/templates/hooks/padroes-proibidos.mjs +68 -0
  23. package/templates/perfis/delphi/hooks/encoding.mjs +317 -0
  24. package/templates/perfis/delphi/rules/build-e-verificacao.md +59 -0
  25. package/templates/perfis/delphi/rules/dados/cnpj-alfanumerico-nao-extrair-so-numeros.md +65 -0
  26. package/templates/perfis/delphi/rules/dados/data-hora-sql-nunca-round-trip-textual.md +78 -0
  27. package/templates/perfis/delphi/rules/dados/datestyle-sessao-firedac-postgres.md +60 -0
  28. package/templates/perfis/delphi/rules/dados/ddl-tabela-nova-exige-trigger-de-log.md +68 -0
  29. package/templates/perfis/delphi/rules/dados/divisao-e-conversao-numerica.md +53 -0
  30. package/templates/perfis/delphi/rules/dados/fieldbyname-value-variant-cru-em-aritmetica.md +73 -0
  31. package/templates/perfis/delphi/rules/dados/filtro-condicional-sql-par-add-parambyname.md +72 -0
  32. package/templates/perfis/delphi/rules/dados/firedac.md +51 -0
  33. package/templates/perfis/delphi/rules/dados/macro-firedac-exige-entrada-macrodata.md +96 -0
  34. package/templates/perfis/delphi/rules/dados/sql-qualificacao-colunas.md +36 -0
  35. package/templates/perfis/delphi/rules/dados/tmeminifile-getstrings-nao-limpa-destino.md +89 -0
  36. package/templates/perfis/delphi/rules/encoding-eol.md +130 -0
  37. package/templates/perfis/delphi/rules/linguagem/dataset-nao-se-le-depois-do-laco-eof.md +56 -0
  38. package/templates/perfis/delphi/rules/linguagem/existencia-nunca-se-testa-por-campo-formatado.md +60 -0
  39. package/templates/perfis/delphi/rules/linguagem/float-nunca-comparado-por-igualdade-com-literal.md +55 -0
  40. package/templates/perfis/delphi/rules/linguagem/literal-enum-de-dfm-exige-unit-no-uses.md +84 -0
  41. package/templates/perfis/delphi/rules/linguagem/reaproveitar-funcao-existente-antes-de-criar.md +172 -0
  42. package/templates/perfis/delphi/rules/linguagem/sem-clipboard-debug.md +43 -0
  43. package/templates/perfis/delphi/rules/linguagem/validacao-em-onexit-nao-protege-a-gravacao.md +65 -0
  44. package/templates/perfis/delphi/rules/linguagem/variavel-inline-sai-de-escopo-ao-envolver-bloco.md +69 -0
  45. package/templates/perfis/delphi/rules/telas/foco-decisao-por-canfocus-nao-tabstop.md +40 -0
  46. package/templates/perfis/delphi/rules/telas/form-dinamico-liberar-em-toda-saida.md +80 -0
  47. package/templates/perfis/delphi/rules/telas/heranca-de-form-e-grade-de-selecao.md +58 -0
  48. package/templates/perfis/delphi/rules/threads-e-timers.md +131 -0
  49. package/templates/perfis/delphi/rules/try-finally-e-vazamento.md +109 -0
  50. package/templates/perfis/delphi/skills/conhecimento-delphi/SKILL.md +70 -0
  51. package/templates/perfis/delphi/skills/conhecimento-delphi/references/ATRIBUICAO.md +29 -0
  52. package/templates/perfis/delphi/skills/conhecimento-delphi/references/acbr-nfce-integracao.md +60 -0
  53. package/templates/perfis/delphi/skills/conhecimento-delphi/references/build-via-bat-com-log.md +86 -0
  54. package/templates/perfis/delphi/skills/conhecimento-delphi/references/class-var-vaza-para-campos-de-instancia.md +73 -0
  55. package/templates/perfis/delphi/skills/conhecimento-delphi/references/componentes-designer-vs-runtime.md +47 -0
  56. package/templates/perfis/delphi/skills/conhecimento-delphi/references/console-writeln-sem-flush-nao-loga.md +47 -0
  57. package/templates/perfis/delphi/skills/conhecimento-delphi/references/conversao-numerica-locale.md +47 -0
  58. package/templates/perfis/delphi/skills/conhecimento-delphi/references/delphi13-breaking-changes.md +41 -0
  59. package/templates/perfis/delphi/skills/conhecimento-delphi/references/dpr-uses-project-manager.md +62 -0
  60. package/templates/perfis/delphi/skills/conhecimento-delphi/references/dproj-dcc-debuginformation-nao-booleano.md +78 -0
  61. package/templates/perfis/delphi/skills/conhecimento-delphi/references/dproj-projectguid-valido.md +38 -0
  62. package/templates/perfis/delphi/skills/conhecimento-delphi/references/firedac-registro-drivers.md +94 -0
  63. package/templates/perfis/delphi/skills/conhecimento-delphi/references/horse-gbswagger-rotas-jwt.md +61 -0
  64. package/templates/perfis/delphi/skills/conhecimento-delphi/references/msb6003-command-line-too-long.md +52 -0
  65. package/templates/perfis/delphi/skills/conhecimento-delphi/references/recursos-rcdata.md +67 -0
  66. package/templates/perfis/delphi-fiscal/rules/campo-novo-acbr-preenchimento-explicito.md +61 -0
  67. package/templates/perfis/delphi-fiscal/rules/retorno-de-evento-nfe-pelo-cstat.md +51 -0
  68. package/templates/perfis/delphi-fiscal/rules/sucesso-de-webservice-fiscal-nao-prova-documento.md +100 -0
  69. package/templates/perfis/delphi-fiscal/rules/total-tributo-acbr-soma-itens.md +63 -0
  70. package/templates/perfis/delphi-fiscal/skills/diagnosticar-rejeicao-nfse/SKILL.md +155 -0
  71. package/templates/perfis/delphi-fiscal/skills/patch-acbr/SKILL.md +143 -0
  72. package/templates/skills/auditar-performance/SKILL.md +9 -0
  73. package/templates/skills/auditar-performance/references/pontos-quentes.md +8 -0
  74. package/templates/skills/auditar-seguranca/SKILL.md +55 -14
  75. package/templates/skills/auditar-seguranca/templates/relatorios/TECNICO.md +5 -0
  76. package/templates/skills/auditar-ui/SKILL.md +18 -3
  77. package/templates/skills/auditar-ui/references/ATRIBUICAO.md +44 -0
  78. package/templates/skills/auditar-ui/references/web-interface-guidelines.md +191 -0
  79. package/templates/skills/harness/references/validar-ideia.md +7 -6
  80. package/templates/skills/security-audit/AI-AND-LLM.md +83 -0
  81. package/templates/skills/security-audit/ATTACK-CLASSES.md +130 -0
  82. package/templates/skills/security-audit/CLIENT-SIDE.md +83 -0
  83. package/templates/skills/security-audit/CLOUD-AND-DEPLOYMENT.md +86 -0
  84. package/templates/skills/security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -0
  85. package/templates/skills/security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -0
  86. package/templates/skills/security-audit/HUNTING.md +251 -0
  87. package/templates/skills/security-audit/LICENSE +21 -0
  88. package/templates/skills/security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -0
  89. package/templates/skills/security-audit/ORIGEM.md +51 -0
  90. package/templates/skills/security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -0
  91. package/templates/skills/security-audit/RECONNAISSANCE.md +156 -0
  92. package/templates/skills/security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -0
  93. package/templates/skills/security-audit/SKILL.md +192 -0
  94. package/templates/skills/security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -0
  95. package/templates/skills/security-audit/VALIDATION-AND-REPORTING.md +186 -0
  96. package/templates/skills/security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -0
  97. package/templates/skills/security-audit/report-schema.json +461 -0
  98. package/templates/skills/security-audit/validate-coverage-ledger.cjs +872 -0
  99. package/templates/skills/security-audit/validate-findings.cjs +773 -0
  100. package/templates/skills/supabase-postgres-best-practices/CHANGELOG.md +73 -0
  101. package/templates/skills/supabase-postgres-best-practices/LICENSE +21 -0
  102. package/templates/skills/supabase-postgres-best-practices/ORIGEM.md +43 -0
  103. package/templates/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  104. package/templates/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  105. package/templates/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  106. package/templates/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  107. package/templates/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  108. package/templates/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  109. package/templates/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  110. package/templates/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  111. package/templates/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  112. package/templates/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  113. package/templates/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  114. package/templates/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  115. package/templates/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  116. package/templates/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  117. package/templates/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  118. package/templates/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  119. package/templates/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  120. package/templates/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  121. package/templates/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  122. package/templates/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  123. package/templates/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  124. package/templates/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  125. package/templates/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  126. package/templates/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  127. package/templates/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  128. package/templates/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  129. package/templates/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  130. package/templates/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  131. package/templates/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  132. package/templates/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  133. package/templates/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  134. package/templates/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  135. package/templates/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  136. package/templates/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  137. package/templates/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  138. package/templates/skills/vercel-react-best-practices/AGENTS.md +3810 -0
  139. package/templates/skills/vercel-react-best-practices/ORIGEM.md +39 -0
  140. package/templates/skills/vercel-react-best-practices/README.md +123 -0
  141. package/templates/skills/vercel-react-best-practices/SKILL.md +149 -0
  142. package/templates/skills/vercel-react-best-practices/metadata.json +15 -0
  143. package/templates/skills/vercel-react-best-practices/rules/_sections.md +46 -0
  144. package/templates/skills/vercel-react-best-practices/rules/_template.md +28 -0
  145. package/templates/skills/vercel-react-best-practices/rules/advanced-effect-event-deps.md +56 -0
  146. package/templates/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  147. package/templates/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
  148. package/templates/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
  149. package/templates/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
  150. package/templates/skills/vercel-react-best-practices/rules/async-cheap-condition-before-await.md +37 -0
  151. package/templates/skills/vercel-react-best-practices/rules/async-defer-await.md +82 -0
  152. package/templates/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
  153. package/templates/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
  154. package/templates/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  155. package/templates/skills/vercel-react-best-practices/rules/bundle-analyzable-paths.md +63 -0
  156. package/templates/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +60 -0
  157. package/templates/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
  158. package/templates/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  159. package/templates/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  160. package/templates/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
  161. package/templates/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
  162. package/templates/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
  163. package/templates/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
  164. package/templates/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
  165. package/templates/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
  166. package/templates/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
  167. package/templates/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
  168. package/templates/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
  169. package/templates/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
  170. package/templates/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
  171. package/templates/skills/vercel-react-best-practices/rules/js-flatmap-filter.md +60 -0
  172. package/templates/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
  173. package/templates/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
  174. package/templates/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
  175. package/templates/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
  176. package/templates/skills/vercel-react-best-practices/rules/js-request-idle-callback.md +105 -0
  177. package/templates/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
  178. package/templates/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  179. package/templates/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
  180. package/templates/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  181. package/templates/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
  182. package/templates/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
  183. package/templates/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  184. package/templates/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  185. package/templates/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  186. package/templates/skills/vercel-react-best-practices/rules/rendering-resource-hints.md +85 -0
  187. package/templates/skills/vercel-react-best-practices/rules/rendering-script-defer-async.md +68 -0
  188. package/templates/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
  189. package/templates/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  190. package/templates/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
  191. package/templates/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
  192. package/templates/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  193. package/templates/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
  194. package/templates/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  195. package/templates/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  196. package/templates/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  197. package/templates/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
  198. package/templates/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  199. package/templates/skills/vercel-react-best-practices/rules/rerender-no-inline-components.md +82 -0
  200. package/templates/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  201. package/templates/skills/vercel-react-best-practices/rules/rerender-split-combined-hooks.md +64 -0
  202. package/templates/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
  203. package/templates/skills/vercel-react-best-practices/rules/rerender-use-deferred-value.md +59 -0
  204. package/templates/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  205. package/templates/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
  206. package/templates/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
  207. package/templates/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
  208. package/templates/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
  209. package/templates/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
  210. package/templates/skills/vercel-react-best-practices/rules/server-hoist-static-io.md +149 -0
  211. package/templates/skills/vercel-react-best-practices/rules/server-no-shared-module-state.md +50 -0
  212. package/templates/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
  213. package/templates/skills/vercel-react-best-practices/rules/server-parallel-nested-fetching.md +34 -0
  214. package/templates/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
  215. package/templates/skills/vercel-react-native-skills/AGENTS.md +2897 -0
  216. package/templates/skills/vercel-react-native-skills/ORIGEM.md +39 -0
  217. package/templates/skills/vercel-react-native-skills/README.md +165 -0
  218. package/templates/skills/vercel-react-native-skills/SKILL.md +121 -0
  219. package/templates/skills/vercel-react-native-skills/metadata.json +16 -0
  220. package/templates/skills/vercel-react-native-skills/rules/_sections.md +86 -0
  221. package/templates/skills/vercel-react-native-skills/rules/_template.md +28 -0
  222. package/templates/skills/vercel-react-native-skills/rules/animation-derived-value.md +53 -0
  223. package/templates/skills/vercel-react-native-skills/rules/animation-gesture-detector-press.md +95 -0
  224. package/templates/skills/vercel-react-native-skills/rules/animation-gpu-properties.md +65 -0
  225. package/templates/skills/vercel-react-native-skills/rules/design-system-compound-components.md +66 -0
  226. package/templates/skills/vercel-react-native-skills/rules/fonts-config-plugin.md +71 -0
  227. package/templates/skills/vercel-react-native-skills/rules/imports-design-system-folder.md +68 -0
  228. package/templates/skills/vercel-react-native-skills/rules/js-hoist-intl.md +61 -0
  229. package/templates/skills/vercel-react-native-skills/rules/list-performance-callbacks.md +44 -0
  230. package/templates/skills/vercel-react-native-skills/rules/list-performance-function-references.md +132 -0
  231. package/templates/skills/vercel-react-native-skills/rules/list-performance-images.md +53 -0
  232. package/templates/skills/vercel-react-native-skills/rules/list-performance-inline-objects.md +97 -0
  233. package/templates/skills/vercel-react-native-skills/rules/list-performance-item-expensive.md +94 -0
  234. package/templates/skills/vercel-react-native-skills/rules/list-performance-item-memo.md +82 -0
  235. package/templates/skills/vercel-react-native-skills/rules/list-performance-item-types.md +104 -0
  236. package/templates/skills/vercel-react-native-skills/rules/list-performance-virtualize.md +67 -0
  237. package/templates/skills/vercel-react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
  238. package/templates/skills/vercel-react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
  239. package/templates/skills/vercel-react-native-skills/rules/navigation-native-navigators.md +188 -0
  240. package/templates/skills/vercel-react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
  241. package/templates/skills/vercel-react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
  242. package/templates/skills/vercel-react-native-skills/rules/react-state-dispatcher.md +91 -0
  243. package/templates/skills/vercel-react-native-skills/rules/react-state-fallback.md +56 -0
  244. package/templates/skills/vercel-react-native-skills/rules/react-state-minimize.md +65 -0
  245. package/templates/skills/vercel-react-native-skills/rules/rendering-no-falsy-and.md +74 -0
  246. package/templates/skills/vercel-react-native-skills/rules/rendering-text-in-text-component.md +36 -0
  247. package/templates/skills/vercel-react-native-skills/rules/scroll-position-no-state.md +82 -0
  248. package/templates/skills/vercel-react-native-skills/rules/state-ground-truth.md +80 -0
  249. package/templates/skills/vercel-react-native-skills/rules/ui-expo-image.md +66 -0
  250. package/templates/skills/vercel-react-native-skills/rules/ui-image-gallery.md +104 -0
  251. package/templates/skills/vercel-react-native-skills/rules/ui-measure-views.md +78 -0
  252. package/templates/skills/vercel-react-native-skills/rules/ui-menus.md +174 -0
  253. package/templates/skills/vercel-react-native-skills/rules/ui-native-modals.md +77 -0
  254. package/templates/skills/vercel-react-native-skills/rules/ui-pressable.md +61 -0
  255. package/templates/skills/vercel-react-native-skills/rules/ui-safe-area-scroll.md +65 -0
  256. package/templates/skills/vercel-react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
  257. package/templates/skills/vercel-react-native-skills/rules/ui-styling.md +87 -0
@@ -25,6 +25,14 @@
25
25
  - Complexidade evitável (O(n²) em laços aninhados sobre coleções grandes).
26
26
  - Estrutura de dados inadequada (busca linear onde cabe mapa ou conjunto).
27
27
 
28
+ ## Regras por stack
29
+
30
+ Só quando o projeto tem a stack:
31
+
32
+ - React ou Next.js → `vercel-react-best-practices`.
33
+ - React Native ou Expo → `vercel-react-native-skills`.
34
+ - Postgres → `supabase-postgres-best-practices`.
35
+
28
36
  ## Como medir
29
37
 
30
38
  | Camada | Ferramenta típica |
@@ -1,15 +1,17 @@
1
1
  ---
2
2
  name: auditar-seguranca
3
3
  description: Auditoria de segurança e LGPD — procura vulnerabilidade, segredo ou token exposto, dados pessoais sem proteção, dependências vulneráveis, inputs sem validação e configurações inseguras.
4
- argument-hint: "[foco opcional: 'só segurança', 'só lgpd', 'autenticação'...]"
4
+ argument-hint: "[perfil opcional: quick (padrão), standard ou deep] [foco opcional: 'só segurança', 'só lgpd', 'autenticação'...]"
5
5
  ---
6
6
 
7
7
  # Auditoria de segurança e LGPD
8
8
 
9
- Foco (opcional): $ARGUMENTS
9
+ Parâmetros (opcionais): $ARGUMENTS
10
10
 
11
11
  Auditoria **defensiva** do próprio projeto, em duas frentes: **segurança técnica** e **conformidade com a LGPD**.
12
- Se o foco restringir o escopo, respeite-o; sem foco, rode as duas frentes. **Não altere código.**
12
+ Se o argumento começar por `quick`, `standard` ou `deep`, esse é o perfil da segurança técnica; o resto é o foco.
13
+ Se o foco restringir o escopo, respeite-o; sem foco, rode as duas frentes. **Não altere código.** Nada desta
14
+ auditoria é gravado no repositório fora de `docs/trabalhos/<id>/`.
13
15
 
14
16
  ## Passo 1 — Criar o trabalho de auditoria
15
17
 
@@ -22,10 +24,28 @@ Se o foco restringir o escopo, respeite-o; sem foco, rode as duas frentes. **Nã
22
24
 
23
25
  ## Passo 2 — Segurança técnica
24
26
 
25
- Siga o checklist de `references/seguranca-tecnica.md`: segredos, dependências, validação de entrada,
26
- autenticação e autorização, configuração. Classifique cada achado em **CRÍTICO / ALTO / MÉDIO / BAIXO**, com
27
- evidência (`arquivo:linha`) e correção recomendada. **Nunca** copie o valor de um segredo para o relatório — só a
28
- localização.
27
+ Use a skill **`security-audit`** (no plugin, `fontdata:security-audit`) em **full audit mode**: o pedido já é uma
28
+ auditoria completa, então não pergunte qual modo rodar. Ela audita em fases e valida cada candidato com um agent
29
+ novo:
30
+
31
+ - **Perfil:** `quick` por padrão, ou `standard`/`deep` quando o argumento pedir. Um foco (caminho, subsistema,
32
+ tema como autenticação) vira **scoped run**, e o resto fica `out_of_scope`, nunca `covered`.
33
+ - **Pasta de saída:** a padrão da skill, `~/security-audit-skill/<repo>/run-<N>`, fora do repositório. Num runner
34
+ de CI ela some com o runner; o que precisa ficar vai para `anexos/`.
35
+ - **Rastro:** ao fim, copie `findings.json` e `coverage-ledger.json` da pasta da execução para
36
+ `docs/trabalhos/<id>/anexos/`. O `REPORT.md` e os outros arquivos da skill ficam na pasta dela.
37
+
38
+ Cada registro do `findings.json` tem um de três vereditos:
39
+
40
+ - `confirmed`: tem rastro completo no código e resultado observado; é o único que recebe severidade;
41
+ - `needs_validation`: hipótese ancorada no código, bloqueada por um fato que a skill não conseguiu verificar (por
42
+ exemplo, uma configuração de deploy). Não tem severidade;
43
+ - `rejected`: candidato refutado; não entra nos relatórios.
44
+
45
+ Complemente com o checklist de `references/seguranca-tecnica.md` naquilo que a skill não cobre: segredos
46
+ versionados (inclusive no histórico do git) e código Delphi/legado. Achado que a skill já apontou não se repete.
47
+ Classifique cada achado do checklist em **CRÍTICO / ALTO / MÉDIO / BAIXO**, com evidência (`arquivo:linha`) e
48
+ correção recomendada. **Nunca** copie o valor de um segredo para o relatório — só a localização.
29
49
 
30
50
  Sem caso concreto, não é achado: diga a entrada ou situação (requisição, usuário, dado) e o que ela expõe ou permite.
31
51
  Leia quem chama o trecho apontado e o que ele chama.
@@ -45,10 +65,19 @@ Categoria sem código para avaliar é dita explicitamente, não presumida.
45
65
 
46
66
  ## Passo 4 — Relatório técnico
47
67
 
48
- Grave `docs/trabalhos/<id>/relatorios/TECNICO.md` a partir de `templates/relatorios/TECNICO.md`: sumário por
49
- severidade e veredito LGPD, achados críticos primeiro, segurança técnica, conformidade LGPD por categoria (no
50
- formato do relatório da `lgpd-checker`), pontos positivos e plano de ação priorizado. Preencha `arquivos` com os
51
- arquivos citados.
68
+ Grave `docs/trabalhos/<id>/relatorios/TECNICO.md` a partir de `templates/relatorios/TECNICO.md`, em pt-BR:
69
+ sumário por severidade e veredito LGPD, achados críticos primeiro, segurança técnica, conformidade LGPD por
70
+ categoria (no formato do relatório da `lgpd-checker`), "Precisa de validação", pontos positivos e plano de ação
71
+ priorizado. Preencha `arquivos` com os arquivos citados.
72
+
73
+ O `REPORT.md` da `security-audit` vem em inglês e não é copiado: o relatório é composto a partir do
74
+ `findings.json`.
75
+
76
+ - Os `confirmed` da skill entram na escala do harness: critical → **CRÍTICO**, high → **ALTO**, medium →
77
+ **MÉDIO**, low e informational → **BAIXO**.
78
+ - Os achados do checklist complementar entram na mesma escala, sem repetir o que a skill apontou.
79
+ - **Precisa de validação:** cada `needs_validation`, sem severidade, com o `arquivo:linha` da hipótese e o fato que
80
+ falta verificar.
52
81
 
53
82
  Use numeração única sobre a escala (1, 2, 3… contínuos de CRÍTICO a BAIXO). Cada achado vem em 4 partes:
54
83
  **O que é** (`arquivo:linha`), **Problema** (o caso concreto), **Correção** e **Se não corrigir**. Antes de citar,
@@ -69,7 +98,19 @@ npx @fontdata/ai-harness evento relatorio_gerado --trabalho <id> --nome auditar-
69
98
  npx @fontdata/ai-harness evento trabalho_concluido --trabalho <id> --nome auditar-seguranca
70
99
  ```
71
100
 
72
- ## Passo 6 — Próximos passos
101
+ ## Passo 6 — 🚦 GATE do trabalho de correção
102
+
103
+ Liste os achados que viram task, em ordem de severidade:
104
+
105
+ - os `confirmed` da `security-audit`;
106
+ - os achados do checklist complementar;
107
+ - os achados da LGPD com severidade.
108
+
109
+ Os `needs_validation` ficam fora até alguém verificar o fato que falta. Pergunte se deve criar o trabalho de
110
+ correção. Com o "sim" do usuário, chame `/nova-tarefa` citando o id desta auditoria, com um recorte de **uma task
111
+ por achado**: a severidade, o `arquivo:linha`, a correção mínima e o teste de regressão sugeridos. A auditoria
112
+ em si continua sem alterar código.
73
113
 
74
- Achados que viram correção seguem por `/resolver-bug` (defeito pontual) ou `/nova-tarefa` (adequação maior),
75
- citando o id desta auditoria.
114
+ Sem o "sim", ou em execução não interativa (`npx @fontdata/ai-harness auditar-seguranca -- -p`, para CI), em que o
115
+ GATE não é exibido, os relatórios já gravados bastam: os achados que viram correção seguem por `/resolver-bug`
116
+ (defeito pontual) ou `/nova-tarefa` (adequação maior), citando o id desta auditoria.
@@ -31,6 +31,11 @@ Cada achado: severidade, `arquivo:linha`, descrição e correção recomendada.
31
31
 
32
32
  Achados por categoria (CAT-1 a CAT-11), com o artigo da lei e a recomendação.
33
33
 
34
+ ## Precisa de validação
35
+
36
+ Cada hipótese `needs_validation`, sem severidade: `arquivo:linha` e o fato que falta verificar. Fica fora do plano
37
+ de ação até ser verificada.
38
+
34
39
  ## Pontos positivos
35
40
 
36
41
  ## Plano de ação
@@ -41,7 +41,22 @@ A senha nunca vai para os relatórios nem para o rastro.
41
41
  4. Sem caso concreto, não é achado: diga a ação na tela e o resultado errado que a pessoa vê ou deixa de conseguir.
42
42
  Quando o achado aponta código, leia quem chama o trecho apontado e o que ele chama.
43
43
 
44
- ## Passo 3 — Relatório técnico
44
+ ## Passo 3 — Conferir o código das telas
45
+
46
+ 1. Para cada tela visitada no Passo 2, localize no código-fonte da aplicação os componentes que a renderizam e
47
+ confira esse código contra `references/web-interface-guidelines.md`.
48
+ 2. Escopo das regras conforme a lente:
49
+ - `a11y`: só as seções `### Accessibility`, `### Focus States` e `### Forms`;
50
+ - `ux` ou `tudo`: todas as seções.
51
+ 3. Ignore o frontmatter e a linha "Review these files for compliance" do arquivo vendorizado: os alvos são as telas
52
+ visitadas, não arquivos passados como parâmetro.
53
+ 4. Registre cada achado com `arquivo:linha`, na mesma escala (**CRÍTICO**, **SÉRIO**, **MODERADO**, **MENOR**) e
54
+ com o mesmo rigor de caso concreto. Se a navegação já apontou o problema, acrescente o `arquivo:linha` ao achado
55
+ existente em vez de criar outro.
56
+ 5. Sem acesso ao código-fonte da aplicação, pule este passo e registre isso no **Não verificado**, dizendo quais
57
+ telas ficaram sem conferência de código.
58
+
59
+ ## Passo 4 — Relatório técnico
45
60
 
46
61
  Grave `docs/trabalhos/<id>/relatorios/TECNICO.md` a partir de `templates/relatorios/TECNICO.md`: achados agrupados
47
62
  por **tela** e **severidade**, cada um com o elemento afetado, o critério WCAG (quando houver) e a correção
@@ -53,7 +68,7 @@ caso concreto), **Correção** e **Se não corrigir**. Antes de citar um `arquiv
53
68
  trecho no estado atual. Feche com **Não verificado**: telas, lentes ou fluxos que não foram percorridos ou medidos,
54
69
  e por quê.
55
70
 
56
- ## Passo 4 — Relatório para a gestão
71
+ ## Passo 5 — Relatório para a gestão
57
72
 
58
73
  Grave `docs/trabalhos/<id>/relatorios/CLIENTE.md` a partir de `templates/relatorios/CLIENTE.md`: quais perfis de
59
74
  pessoas têm dificuldade, em quais tarefas, e as prioridades — **sem jargão técnico**.
@@ -66,7 +81,7 @@ npx @fontdata/ai-harness evento relatorio_gerado --trabalho <id> --nome auditar-
66
81
  npx @fontdata/ai-harness evento trabalho_concluido --trabalho <id> --nome auditar-ui
67
82
  ```
68
83
 
69
- ## Passo 5 — Próximos passos
84
+ ## Passo 6 — Próximos passos
70
85
 
71
86
  Correções aprovadas seguem por `/nova-tarefa` (conjunto de melhorias) ou `/resolver-bug` (tela que não funciona),
72
87
  citando o id desta auditoria.
@@ -0,0 +1,44 @@
1
+ # Atribuição
2
+
3
+ O arquivo `web-interface-guidelines.md` desta pasta é uma cópia sem alterações do `command.md` da raiz do
4
+ repositório **Web Interface Guidelines**, da Vercel Labs, disponível em
5
+ https://github.com/vercel-labs/web-interface-guidelines (commit `434b7f91364665f2f733b310ec54809bf8f37937`),
6
+ distribuído sob a licença MIT reproduzida abaixo.
7
+
8
+ | Origem | Destino |
9
+ |---|---|
10
+ | `command.md` | `web-interface-guidelines.md` |
11
+
12
+ ## Como atualizar
13
+
14
+ 1. Clone o repositório numa pasta nova e vazia e faça `git checkout` do commit desejado. Não execute nada do
15
+ conteúdo baixado (em especial o `install.sh`).
16
+ 2. Copie o `command.md` da raiz por cima de `web-interface-guidelines.md`, sem editar o conteúdo.
17
+ 3. Troque o commit deste arquivo pelo novo e confira se o `LICENSE` de origem mudou; se mudou, substitua o
18
+ texto da licença abaixo.
19
+ 4. Rode `npx vitest run tests/vendor-web-interface-guidelines.test.ts` e confirme que o `diff` entre a cópia e o
20
+ `command.md` do commit está vazio.
21
+
22
+ ---
23
+
24
+ MIT License
25
+
26
+ Copyright (c) 2025 Vercel Labs
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining a copy
29
+ of this software and associated documentation files (the "Software"), to deal
30
+ in the Software without restriction, including without limitation the rights
31
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
+ copies of the Software, and to permit persons to whom the Software is
33
+ furnished to do so, subject to the following conditions:
34
+
35
+ The above copyright notice and this permission notice shall be included in all
36
+ copies or substantial portions of the Software.
37
+
38
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44
+ SOFTWARE.
@@ -0,0 +1,191 @@
1
+ ---
2
+ description: Review UI code for Vercel Web Interface Guidelines compliance
3
+ argument-hint: <file-or-pattern>
4
+ ---
5
+
6
+ # Web Interface Guidelines
7
+
8
+ Review these files for compliance: $ARGUMENTS
9
+
10
+ Read files, check against rules below. Output concise but comprehensive—sacrifice grammar for brevity. High signal-to-noise.
11
+
12
+ ## Rules
13
+
14
+ ### Accessibility
15
+
16
+ - Icon-only buttons need `aria-label`
17
+ - Form controls need `<label>` or `aria-label`
18
+ - Interactive elements need keyboard handlers (`onKeyDown`/`onKeyUp`)
19
+ - `<button>` for actions, `<a>`/`<Link>` for navigation (not `<div onClick>`)
20
+ - Images need `alt` (or `alt=""` if decorative)
21
+ - Decorative icons need `aria-hidden="true"`
22
+ - Async updates (toasts, validation) need `aria-live="polite"`
23
+ - Use semantic HTML (`<button>`, `<a>`, `<label>`, `<table>`) before ARIA
24
+ - Headings hierarchical `<h1>`–`<h6>`; include skip link for main content
25
+ - `scroll-margin-top` on heading anchors
26
+ - Meaningful media needs captions, transcripts, or descriptions as applicable
27
+ - Media controls need keyboard support; decorative media needs assistive-tech hiding
28
+
29
+ ### Focus States
30
+
31
+ - Interactive elements need visible focus: `focus-visible:ring-*` or equivalent
32
+ - Never `outline-none` / `outline: none` without focus replacement
33
+ - Use `:focus-visible` over `:focus` (avoid focus ring on click)
34
+ - Group focus with `:focus-within` for compound controls
35
+ - Sticky headers/footers/overlays must not cover the focused element
36
+
37
+ ### Forms
38
+
39
+ - Inputs need `autocomplete` and meaningful `name`
40
+ - Use correct `type` (`email`, `tel`, `url`, `number`) and `inputmode`
41
+ - Never block paste (`onPaste` + `preventDefault`)
42
+ - Labels clickable (`htmlFor` or wrapping control)
43
+ - Disable spellcheck on emails, codes, usernames (`spellCheck={false}`)
44
+ - Checkboxes/radios: label + control share single hit target (no dead zones)
45
+ - Submit button stays enabled until request starts; spinner during request
46
+ - Errors inline next to fields; focus first error on submit
47
+ - Placeholders end with `…` and show example pattern
48
+ - `autocomplete="off"` on non-auth fields to avoid password manager triggers
49
+ - Warn before navigation with unsaved changes (`beforeunload` or router guard)
50
+
51
+ ### Animation
52
+
53
+ - Honor `prefers-reduced-motion` (provide reduced variant or disable)
54
+ - Animate `transform`/`opacity` only (compositor-friendly)
55
+ - Never `transition: all`—list properties explicitly
56
+ - Set correct `transform-origin`
57
+ - SVG: transforms on `<g>` wrapper with `transform-box: fill-box; transform-origin: center`
58
+ - Animations interruptible—respond to user input mid-animation
59
+ - Autoplay motion >5 seconds alongside other content needs pause, stop, or hide controls
60
+ - Muted decorative loops must stop under `prefers-reduced-motion`
61
+
62
+ ### Typography
63
+
64
+ - `…` not `...`
65
+ - Curly quotes `“` `”` not straight `"`
66
+ - Non-breaking spaces: `10&nbsp;MB`, `⌘&nbsp;K`, brand names
67
+ - Loading states end with `…`: `"Loading…"`, `"Saving…"`
68
+ - `font-variant-numeric: tabular-nums` for number columns/comparisons
69
+ - Use `text-wrap: balance` or `text-pretty` on headings (prevents widows)
70
+
71
+ ### Content Handling
72
+
73
+ - Text containers handle long content: `truncate`, `line-clamp-*`, or `break-words`
74
+ - Flex children need `min-w-0` to allow text truncation
75
+ - Handle empty states—don't render broken UI for empty strings/arrays
76
+ - User-generated content: anticipate short, average, and very long inputs
77
+
78
+ ### Images
79
+
80
+ - `<img>` needs explicit `width` and `height` (prevents CLS)
81
+ - Below-fold images: `loading="lazy"`
82
+ - Above-fold critical images: `priority` or `fetchpriority="high"`
83
+
84
+ ### Performance
85
+
86
+ - Large lists (>50 items): virtualize (`virtua`, `content-visibility: auto`)
87
+ - No layout reads in render (`getBoundingClientRect`, `offsetHeight`, `offsetWidth`, `scrollTop`)
88
+ - Batch DOM reads/writes; avoid interleaving
89
+ - Prefer uncontrolled inputs; controlled inputs must be cheap per keystroke
90
+ - Add `<link rel="preconnect">` for CDN/asset domains
91
+ - Critical fonts: `<link rel="preload" as="font">` with `font-display: swap`
92
+ - Prefer `<video autoplay muted loop playsinline>` over animated GIF; provide a still alternative
93
+ - Short non-essential loops: Safari H.264 MP4 `<picture>` source, `prefers-reduced-motion` media condition, and still fallback
94
+
95
+ ### Navigation & State
96
+
97
+ - URL reflects state—filters, tabs, pagination, expanded panels in query params
98
+ - Links use `<a>`/`<Link>` (Cmd/Ctrl+click, middle-click support)
99
+ - Deep-link all stateful UI (if uses `useState`, consider URL sync via nuqs or similar)
100
+ - Destructive actions need confirmation modal or undo window—never immediate
101
+
102
+ ### Touch & Interaction
103
+
104
+ - `touch-action: manipulation` (prevents double-tap zoom delay)
105
+ - `-webkit-tap-highlight-color` set intentionally
106
+ - `overscroll-behavior: contain` in modals/drawers/sheets
107
+ - Page rubber-band suppression: `overscroll-behavior: none` on `<html>` inside `@media (pointer: fine)`; keep coarse-pointer page defaults for pull-to-refresh. Test hybrid touch devices: `pointer` describes the primary input, and `none` also disables scroll chaining and native swipe navigation
108
+ - During drag: disable text selection, `inert` on dragged elements
109
+ - Drag/swipe/pinch/path gestures need tap/click and keyboard alternatives unless essential
110
+ - `autoFocus` sparingly—desktop only, single primary input; avoid on mobile
111
+
112
+ ### Safe Areas & Layout
113
+
114
+ - Full-bleed layouts need `env(safe-area-inset-*)` for notches
115
+ - Avoid unwanted scrollbars: `overflow-x-hidden` on containers, fix content overflow
116
+ - Flex/grid over JS measurement for layout
117
+
118
+ ### Dark Mode & Theming
119
+
120
+ - `color-scheme: dark` on `<html>` for dark themes (fixes scrollbar, inputs)
121
+ - `<meta name="theme-color">` matches page background
122
+ - Native `<select>`: explicit `background-color` and `color` (Windows dark mode)
123
+
124
+ ### Locale & i18n
125
+
126
+ - Dates/times: use `Intl.DateTimeFormat` not hardcoded formats
127
+ - Numbers/currency: use `Intl.NumberFormat` not hardcoded formats
128
+ - Detect language via `Accept-Language` / `navigator.languages`, not IP
129
+ - Brand names, code tokens, identifiers: wrap with `translate="no"` to prevent garbled auto-translation
130
+
131
+ ### Hydration Safety
132
+
133
+ - Inputs with `value` need `onChange` (or use `defaultValue` for uncontrolled)
134
+ - Date/time rendering: guard against hydration mismatch (server vs client)
135
+ - `suppressHydrationWarning` only where truly needed
136
+
137
+ ### Hover & Interactive States
138
+
139
+ - Buttons/links need `hover:` state (visual feedback)
140
+ - Interactive states increase contrast: hover/active/focus more prominent than rest
141
+
142
+ ### Content & Copy
143
+
144
+ - Active voice: "Install the CLI" not "The CLI will be installed"
145
+ - Title Case for headings/buttons (Chicago style)
146
+ - Numerals for counts: "8 deployments" not "eight"
147
+ - Specific button labels: "Save API Key" not "Continue"
148
+ - Error messages include fix/next step, not just problem
149
+ - Second person; avoid first person
150
+ - `&` over "and" where space-constrained
151
+
152
+ ### Anti-patterns (flag these)
153
+
154
+ - `user-scalable=no` or `maximum-scale=1` disabling zoom
155
+ - `onPaste` with `preventDefault`
156
+ - `transition: all`
157
+ - `outline-none` without focus-visible replacement
158
+ - Inline `onClick` navigation without `<a>`
159
+ - `<div>` or `<span>` with click handlers (should be `<button>`)
160
+ - Images without dimensions
161
+ - Large arrays `.map()` without virtualization
162
+ - Form inputs without labels
163
+ - Icon buttons without `aria-label`
164
+ - Hardcoded date/number formats (use `Intl.*`)
165
+ - `autoFocus` without clear justification
166
+ - Animated GIF when compressed video is suitable
167
+ - Gesture-only action without tap/click and keyboard alternative
168
+
169
+ ## Output Format
170
+
171
+ Group by file. Use `file:line` format (VS Code clickable). Terse findings.
172
+
173
+ ```text
174
+ ## src/Button.tsx
175
+
176
+ src/Button.tsx:42 - icon button missing aria-label
177
+ src/Button.tsx:18 - input lacks label
178
+ src/Button.tsx:55 - animation missing prefers-reduced-motion
179
+ src/Button.tsx:67 - transition: all → list properties
180
+
181
+ ## src/Modal.tsx
182
+
183
+ src/Modal.tsx:12 - missing overscroll-behavior: contain
184
+ src/Modal.tsx:34 - "..." → "…"
185
+
186
+ ## src/Card.tsx
187
+
188
+ ✓ pass
189
+ ```
190
+
191
+ State issue + location. Skip explanation unless fix non-obvious. No preamble.
@@ -6,7 +6,7 @@ Code e multi-agents. Dê um diagnóstico **honesto e acionável**. Na dúvida, e
6
6
  ## Contexto
7
7
 
8
8
  - **Ideia:** o que o usuário descreveu ao chamar o `/harness` ou nesta conversa.
9
- - **Janela de tempo:** se não foi informada, assuma **~4 horas** (formato imersão) e **diga que assumiu**.
9
+ - **Janela de tempo:** opcional. Se o usuário informou, compare a estimativa com ela; se não, não pergunte nem assuma um valor: estime o esforço e julgue o escopo pela primeira fatia vertical entregável.
10
10
  - **Modo de execução:** TDD obrigatório e sub-agents implementando módulos independentes em paralelo.
11
11
 
12
12
  Ideia ausente ou vaga demais: **pare e faça as perguntas mínimas**, uma por vez, antes de avaliar.
@@ -18,22 +18,23 @@ Para cada um, um veredito curto com a **evidência ou o risco concreto**, sem re
18
18
  1. **Decomposição em módulos** — 2 a 4 módulos que agents separados implementariam de forma **genuinamente
19
19
  independente** (não tocam os mesmos arquivos nem dependem um do outro para começar). Não dar para quebrar assim
20
20
  já é alerta sobre o escopo.
21
- 2. **Fatia vertical entregável** — o menor caminho ponta a ponta **funcionando** ao fim da janela, mesmo simples.
22
- Sem fatia demonstrável, o escopo está errado.
21
+ 2. **Fatia vertical entregável** — o menor caminho ponta a ponta **funcionando** ao fim da janela ou, sem ela, na primeira entrega,
22
+ mesmo simples. Sem fatia demonstrável, o escopo está errado.
23
23
  3. **Complexidade oculta** — autenticação de terceiros, pagamentos, uploads, tempo real, integrações externas,
24
24
  processamento pesado, mobile nativo, infra e deploy. Para cada uma presente, diga como **cortar, simular ou
25
25
  adiar**.
26
26
  4. **Stack** — está clara e é dominada? Se precisa ser decidida antes, sinalize como pré-requisito bloqueante.
27
27
  5. **Testabilidade (TDD)** — para pelo menos 2 módulos, os **testes críticos** (um de entrada válida e um de caso
28
28
  de erro) escritos antes do código. Se o comportamento essencial é difícil de testar, explique por quê.
29
- 6. **Estimativa realista** — esforço por módulo, soma e comparação com a janela, pessimista onde houver incerteza.
29
+ 6. **Estimativa realista** — esforço por módulo, soma e comparação com a janela quando informada, pessimista onde
30
+ houver incerteza.
30
31
 
31
32
  ## Veredito
32
33
 
33
34
  Feche com **um** dos três, justificado em até 3 linhas:
34
35
 
35
- - ✅ **APROVADO** — cabe na janela. Liste em 1 linha os módulos e a fatia vertical alvo e siga para a etapa
36
- contexto (`/sincronizar-claude-md`), após confirmação.
36
+ - ✅ **APROVADO** — cabe na janela informada ou, sem ela, numa primeira entrega com a fatia vertical. Liste em 1
37
+ linha os módulos e a fatia vertical alvo e siga para a etapa contexto (`/sincronizar-claude-md`), após confirmação.
37
38
  - ✂️ **AJUSTAR** — boa ideia, grande demais. **Reescreva a ideia recortada em 2 a 3 frases**, preservando a
38
39
  essência, pronta para virar SPEC. Diga o que ficou de fora (backlog).
39
40
  - ❌ **REPROVAR** — inviável mesmo recortada. Explique o porquê e **proponha uma alternativa no mesmo domínio**
@@ -0,0 +1,83 @@
1
+ # AI, LLM, and Agent Hunting
2
+
3
+ #### When to use this file
4
+
5
+ Reach for this file when a language model participates in a trust-sensitive decision: chatbots and assistants, RAG pipelines, persistent agent memory, agent/tool-calling loops, MCP servers and clients, code that builds prompts from untrusted input, or code that consumes model output and acts on it. The important data flow is *untrusted content → model or memory → capability, authority, or sink*.
6
+
7
+ Use this alongside `ATTACK-CLASSES.md`, not instead of it. Transport, access control, query construction, filesystem use, and output rendering remain ordinary trust boundaries. This file covers the model-specific delegation layer. Split large targets by retrieval, memory, tool dispatch, MCP, and output handling.
8
+
9
+ ## Core discipline (include in every agent prompt for this domain)
10
+
11
+ ```
12
+ - Prompt injection alone is not a finding. Require a code-level boundary failure: content reaches another principal's context, invokes authority the requester lacks, discloses data they cannot read, or drives a sink they cannot reach directly.
13
+ - Model output, memory, tool descriptions, and MCP responses are untrusted inputs. Point to the code that grants authority, trusts output, writes durable state, or feeds a sink.
14
+ - A guardrail prompt is not a security boundary. Count only deterministic checks, resource-scoped authorization, isolation, binding, and constrained credentials.
15
+ - State the attacker, affected principal, effective execution identity, resource, exact action, authority used, and observable impact. An intentional direct request to use the requester's existing authority is not a delegation defect merely because a model executes it.
16
+ - Authorization and action binding are separate controls. Attacker-controlled content that causes an action under an affected principal's valid authority is an action-binding failure when that principal did not intentionally request or approve the exact action.
17
+ - Classify every candidate as `confirmed` only after source evidence and bounded local validation establish the boundary and result. Use `needs_validation` when a required provider, deployment, model, renderer, or identity behavior is not observable locally.
18
+ ```
19
+
20
+ ## Context, retrieval, and memory attack classes (subagent_type: `general`)
21
+
22
+ **Indirect injection through retrieved or ingested content**
23
+ An attacker can write a RAG document, indexed page, file, email, issue body, tool response, or metadata that enters a different principal's model context. Trace who can write each source, how retrieval scopes it, whose session consumes it, and what capability is enabled there. Check isolation, resource authorization, and binding to the consuming principal's intent separately. The defect is a missing deterministic control, not persuasive text by itself.
24
+
25
+ **Cross-session or cross-tenant context bleed**
26
+ Conversation history, embeddings, retrieval results, or prompt caches are keyed too broadly. Verify tenant and ACL filters in the query itself and every cache key. A tenant field stored on an object is not enforcement if an alternate query, shared cache, or batch path omits it.
27
+
28
+ **Persistent memory poisoning**
29
+ Attacker-controlled content or model summaries are written into memory that later shapes another task, user, or privileged session. Review who may create, update, merge, and delete memory; its provenance and tenant scope; whether low-trust observations become durable instructions or facts; and whether retrieval distinguishes user preferences from tool policy. Memory intentionally saved by a user and used only for that user's intentional, allowed requests is not a cross-boundary finding.
30
+
31
+ **Prompt role and provenance confusion**
32
+ Prompt assembly lets untrusted text impersonate a system message, prior turn, tool result, policy, or memory record. Look for string concatenation, untyped history, caller-controlled role fields, and serialization round trips that lose source labels. Confirm that the forged provenance changes a deterministic trust decision or reaches a meaningful capability.
33
+
34
+ ## Tool and action attack classes (subagent_type: `general`)
35
+
36
+ **Tool-argument injection into a downstream sink**
37
+ Model-produced arguments reach SQL, shell, file, URL-fetch, or privileged APIs without handler-side validation. Treat the tool schema as input parsing, then follow each field from decoded call to sink. Structured output narrows shape; it does not establish authorization, safe paths, safe URLs, or query semantics.
38
+
39
+ **Excessive agency and confused-deputy authority**
40
+ The agent uses a service identity or broad credential, while the tool handler does not re-check the requesting principal's permission on the named resource. Verify both the effective identity and whether the caller could perform that exact operation through the normal product interface. A shared credential with enforced per-user query scope is not a defect.
41
+
42
+ **Action-confirmation and approval binding**
43
+ A user approves one described action but execution can use changed arguments, a different resource, a different principal, or a later model turn. An action-binding defect also exists when attacker-controlled content causes a side effect under a victim's valid authority without the victim's intentional request or approval, even if generic authorization permits the victim to perform it. Review whether intent or confirmation binds the normalized tool name, complete argument object, requester, target, amount, expiry, and batch membership. Check retries and resumed sessions: an approval must not authorize a mutated or duplicate side effect.
44
+
45
+ **Tool-schema and dispatcher disagreement**
46
+ The schema accepts aliases, extra fields, duplicate keys, coercions, nested free-form objects, or out-of-range values that the dispatcher or handler interprets differently. Compare schema validation, canonicalization, generated bindings, and handler defaults. Validate again where values become resource selectors or security-relevant options.
47
+
48
+ **Unbounded delegated action loops**
49
+ A bounded request can enqueue repeated spend, send, mutation, or external API work without a per-request budget, per-action authorization, cancellation, or idempotency control. Confirm impact on shared cost, quotas, other users, or durable state. Do not test by exhausting a service; use code-level accounting and a locally bounded loop.
50
+
51
+ ## MCP and sub-agent trust classes (subagent_type: `general`)
52
+
53
+ **Sub-agent and MCP trust inheritance**
54
+ A delegated task receives the full session, credentials, memory, or capabilities rather than the least authority required. Check the principal and tenant carried into each call, capability narrowing, credential audience, and whether delegated results are treated as untrusted on return.
55
+
56
+ **MCP server and tool identity confusion**
57
+ Calls or results are routed by attacker-influenceable server names, tool names, request IDs, resource URIs, or model-selected aliases rather than the authenticated connection and outstanding request. Check whether two servers can claim the same tool or resource identity, whether reconnect changes the binding, and whether a response from one server can satisfy another server's pending call.
58
+
59
+ **MCP metadata and schema as policy**
60
+ Tool descriptions, resource metadata, prompts, completion hints, or schemas supplied by an MCP peer are trusted as policy or authorization. These fields can guide the model but cannot grant capability. Find the deterministic allowlist, server identity check, and handler authorization that remain authoritative when metadata conflicts.
61
+
62
+ ## Output and disclosure attack classes (subagent_type: `general`)
63
+
64
+ **Insecure output rendering**
65
+ Model output reaches an executing HTML, Markdown, template, URL, or command sink without the sink's required encoding and policy. For browser rendering, verify auto-loaded resources and CSP or sanitization in `CLIENT-SIDE.md`; renderer behavior outside the repository makes the candidate `needs_validation`.
66
+
67
+ **Sensitive context extraction**
68
+ The assembled context contains credentials, another user's data, private source, or policy values that themselves grant access, and user-influenced output exposes them. Read prompt assembly and data-fetch code. Disclosure of generic instructions or behavior that does not cross a data boundary is not a finding.
69
+
70
+ ## Universal moves (apply across the above)
71
+
72
+ - Draw four maps first: each execution identity, each capability, every writable context or memory source, and each output destination. Then connect the principal at the start to the authority at the end.
73
+ - Start at side-effecting tools and work backward through dispatcher, schema, confirmation, model context, retrieval, and ingestion. Start at durable memory reads and trace every writer.
74
+ - Compare direct, queued, retry, resume, batch, and delegated paths for the same action. The strongest gate must apply after arguments are final and before every side effect.
75
+
76
+ ## Validation rules (apply before reporting ANY finding here)
77
+
78
+ 1. Name the crossed boundary and observable result: attacker, affected principal or shared resource, execution identity, target, and unauthorized or unrequested action or disclosure.
79
+ 2. For confused-deputy authority claims, prove the tool lacks requester-and-resource authorization and that the attacker cannot perform the same action normally. For action-binding claims, instead prove attacker-controlled content caused an action under the affected principal's authority that the principal did not intentionally request or approve. Valid generic authorization does not establish that intent.
80
+ 3. For memory or retrieval claims, cite both the attacker-controlled write and the later cross-principal read or privileged decision. A shared record without a reachable consumer is not enough.
81
+ 4. For action binding, establish the intentional request or normalized approved object, if any, and compare it with the object the handler uses. Confirm a locally observable unrequested action, mutation, duplicate, or authority change without extending the test into harmful execution. For schema disagreement, compare the normalized validated object with the handler's object.
82
+ 5. For MCP identity claims, verify the authenticated connection, request correlation, tool namespace, and effective credential. Mark `needs_validation` if external server identity or deployment routing is required.
83
+ 6. Return `confirmed` findings only with a complete source trace and meaningful result. Return `needs_validation` for a specific unresolved boundary fact and state the bounded local or owner-observed check needed to resolve it.