@thanhnguyxn/pixelcraft 0.0.0-stage → 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 (455) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +20 -0
  4. package/.claude-plugin/plugin.json +22 -0
  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/LICENSE +21 -0
  13. package/README.md +264 -2
  14. package/SECURITY.md +28 -0
  15. package/assets/README.md +28 -0
  16. package/assets/pixelcraft-logo-128.png +0 -0
  17. package/assets/pixelcraft-logo-256.png +0 -0
  18. package/assets/pixelcraft-logo-512.png +0 -0
  19. package/bin/pixelcraft.mjs +852 -0
  20. package/docs/ARCHITECTURE.md +105 -0
  21. package/docs/DESIGN-RATIONALE.md +191 -0
  22. package/docs/INSTALL.md +221 -0
  23. package/evals/README.md +37 -0
  24. package/evals/fixtures/3d-web-engineering.json +69 -0
  25. package/evals/fixtures/README.md +36 -0
  26. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  27. package/evals/fixtures/ai-ui-libraries.json +53 -0
  28. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  29. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  30. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  31. package/evals/fixtures/build-and-architecture.json +53 -0
  32. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  33. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  34. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  35. package/evals/fixtures/component-systems.json +53 -0
  36. package/evals/fixtures/component-testing.json +53 -0
  37. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  38. package/evals/fixtures/creative-code-rendering.json +69 -0
  39. package/evals/fixtures/creative-reference-evidence.json +67 -0
  40. package/evals/fixtures/data-app-python-marimo.json +49 -0
  41. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  42. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  43. package/evals/fixtures/desktop-native-workspace.json +48 -0
  44. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  45. package/evals/fixtures/direction-prototype-complexity.json +29 -0
  46. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  47. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  48. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  49. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  50. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  51. package/evals/fixtures/enterprise-data-ui.json +53 -0
  52. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  53. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  54. package/evals/fixtures/file-upload-media-ui.json +53 -0
  55. package/evals/fixtures/finish-gate-anti-slop.json +30 -0
  56. package/evals/fixtures/forms-accessibility-negative.json +29 -0
  57. package/evals/fixtures/forms-validation.json +53 -0
  58. package/evals/fixtures/game-go-ebitengine.json +49 -0
  59. package/evals/fixtures/game-godot-gdscript.json +49 -0
  60. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  61. package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
  62. package/evals/fixtures/i18n-engineering.json +53 -0
  63. package/evals/fixtures/local-first-sync.json +53 -0
  64. package/evals/fixtures/lynxjs.json +53 -0
  65. package/evals/fixtures/maizzle-email.json +53 -0
  66. package/evals/fixtures/maps-geospatial.json +53 -0
  67. package/evals/fixtures/media-og-and-video-export.json +43 -0
  68. package/evals/fixtures/media-players.json +53 -0
  69. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  70. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  71. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  72. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  73. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  74. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  75. package/evals/fixtures/motion-engineering.json +69 -0
  76. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  77. package/evals/fixtures/plan-brownfield-evidence.json +28 -0
  78. package/evals/fixtures/plan-discovery-interview.json +31 -0
  79. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  80. package/evals/fixtures/reactive-data-apps.json +53 -0
  81. package/evals/fixtures/review-evidence-audit.json +43 -0
  82. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  83. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  84. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  85. package/evals/fixtures/state-architecture.json +53 -0
  86. package/evals/fixtures/styling-ecosystem.json +53 -0
  87. package/evals/fixtures/token-tooling.json +53 -0
  88. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  89. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  90. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  91. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  92. package/evals/fixtures/visual-qa-task-evidence.json +29 -0
  93. package/evals/fixtures/web-3d-engines.json +53 -0
  94. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  95. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  96. package/evals/fixtures/workflow-checkpoints.json +30 -0
  97. package/evals/pixelcraft-accessibility.md +74 -0
  98. package/evals/pixelcraft-brandkit.md +58 -0
  99. package/evals/pixelcraft-chat-ui.md +55 -0
  100. package/evals/pixelcraft-constrained.md +55 -0
  101. package/evals/pixelcraft-craft.md +76 -0
  102. package/evals/pixelcraft-data-apps.md +55 -0
  103. package/evals/pixelcraft-dataviz.md +59 -0
  104. package/evals/pixelcraft-desktop.md +55 -0
  105. package/evals/pixelcraft-direction.md +77 -0
  106. package/evals/pixelcraft-document.md +55 -0
  107. package/evals/pixelcraft-email.md +55 -0
  108. package/evals/pixelcraft-extensions.md +55 -0
  109. package/evals/pixelcraft-game-ui.md +59 -0
  110. package/evals/pixelcraft-handoff.md +57 -0
  111. package/evals/pixelcraft-media.md +55 -0
  112. package/evals/pixelcraft-mobile.md +59 -0
  113. package/evals/pixelcraft-patterns.md +73 -0
  114. package/evals/pixelcraft-plan.md +127 -0
  115. package/evals/pixelcraft-review.md +63 -0
  116. package/evals/pixelcraft-spatial.md +55 -0
  117. package/evals/pixelcraft-tokens.md +57 -0
  118. package/evals/pixelcraft-tui.md +55 -0
  119. package/evals/pixelcraft-ux.md +59 -0
  120. package/evals/pixelcraft-visual-qa.md +86 -0
  121. package/evals/pixelcraft-web.md +89 -0
  122. package/evals/pixelcraft.md +70 -0
  123. package/gemini-extension.json +6 -0
  124. package/install.ps1 +341 -0
  125. package/install.sh +512 -0
  126. package/package.json +91 -4
  127. package/plugin.json +29 -0
  128. package/scripts/build-adapters.mjs +288 -0
  129. package/scripts/build-release-archives.mjs +61 -0
  130. package/scripts/build-skill-zips.mjs +94 -0
  131. package/scripts/run-evals.mjs +397 -0
  132. package/scripts/sync-docs.mjs +381 -0
  133. package/scripts/test-build-adapters.mjs +61 -0
  134. package/scripts/test-cross-platform-qa.mjs +359 -0
  135. package/scripts/test-distribution.mjs +203 -0
  136. package/scripts/test-export-tokens.mjs +361 -0
  137. package/scripts/test-finish-gate.mjs +271 -0
  138. package/scripts/test-installers.mjs +216 -0
  139. package/scripts/test-release-archives.mjs +42 -0
  140. package/scripts/test-shoot.mjs +87 -0
  141. package/scripts/test-slop-scan.mjs +416 -0
  142. package/scripts/test-style-inventory.mjs +234 -0
  143. package/scripts/test-sync-docs.mjs +140 -0
  144. package/scripts/test-validate-skills.mjs +195 -0
  145. package/scripts/validate-skills.mjs +658 -0
  146. package/skills/pixelcraft/SKILL.md +155 -0
  147. package/skills/pixelcraft/references/design-brief.md +75 -0
  148. package/skills/pixelcraft/references/floor.md +90 -0
  149. package/skills/pixelcraft/references/report-template.md +49 -0
  150. package/skills/pixelcraft/references/stack-detection.md +226 -0
  151. package/skills/pixelcraft/references/surface-acceptance.md +52 -0
  152. package/skills/pixelcraft/references/workflow-checkpoints.md +71 -0
  153. package/skills/pixelcraft-accessibility/SKILL.md +54 -0
  154. package/skills/pixelcraft-accessibility/references/apg-patterns.md +64 -0
  155. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  156. package/skills/pixelcraft-accessibility/references/platforms.md +86 -0
  157. package/skills/pixelcraft-accessibility/references/verification.md +64 -0
  158. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +99 -0
  159. package/skills/pixelcraft-brandkit/SKILL.md +127 -0
  160. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +165 -0
  161. package/skills/pixelcraft-brandkit/references/brand-governance.md +82 -0
  162. package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
  163. package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
  164. package/skills/pixelcraft-brandkit/references/logo-methods.md +97 -0
  165. package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
  166. package/skills/pixelcraft-brandkit/references/prompt-template.md +87 -0
  167. package/skills/pixelcraft-brandkit/references/qa-checklist.md +93 -0
  168. package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
  169. package/skills/pixelcraft-chat-ui/SKILL.md +57 -0
  170. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  171. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  172. package/skills/pixelcraft-chat-ui/references/conversation-design.md +84 -0
  173. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +77 -0
  174. package/skills/pixelcraft-chat-ui/references/slack-discord.md +80 -0
  175. package/skills/pixelcraft-constrained/SKILL.md +52 -0
  176. package/skills/pixelcraft-constrained/references/specialized-hardware.md +90 -0
  177. package/skills/pixelcraft-constrained/references/tv-wearables.md +134 -0
  178. package/skills/pixelcraft-constrained/references/voice-ui.md +104 -0
  179. package/skills/pixelcraft-craft/SKILL.md +58 -0
  180. package/skills/pixelcraft-craft/references/color.md +125 -0
  181. package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
  182. package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
  183. package/skills/pixelcraft-craft/references/layout.md +73 -0
  184. package/skills/pixelcraft-craft/references/motion.md +163 -0
  185. package/skills/pixelcraft-craft/references/typography.md +110 -0
  186. package/skills/pixelcraft-data-apps/SKILL.md +86 -0
  187. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  188. package/skills/pixelcraft-data-apps/references/dash.md +109 -0
  189. package/skills/pixelcraft-data-apps/references/evidence.md +90 -0
  190. package/skills/pixelcraft-data-apps/references/gradio.md +103 -0
  191. package/skills/pixelcraft-data-apps/references/julia-genie.md +89 -0
  192. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +91 -0
  193. package/skills/pixelcraft-data-apps/references/nicegui.md +102 -0
  194. package/skills/pixelcraft-data-apps/references/observable-framework.md +105 -0
  195. package/skills/pixelcraft-data-apps/references/panel.md +99 -0
  196. package/skills/pixelcraft-data-apps/references/r-shiny.md +124 -0
  197. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  198. package/skills/pixelcraft-data-apps/references/reflex.md +116 -0
  199. package/skills/pixelcraft-data-apps/references/shiny.md +110 -0
  200. package/skills/pixelcraft-data-apps/references/streamlit.md +113 -0
  201. package/skills/pixelcraft-dataviz/SKILL.md +60 -0
  202. package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
  203. package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
  204. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +107 -0
  205. package/skills/pixelcraft-dataviz/references/libraries.md +176 -0
  206. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  207. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +92 -0
  208. package/skills/pixelcraft-desktop/SKILL.md +93 -0
  209. package/skills/pixelcraft-desktop/references/appkit.md +92 -0
  210. package/skills/pixelcraft-desktop/references/avalonia.md +95 -0
  211. package/skills/pixelcraft-desktop/references/cpp-gui.md +129 -0
  212. package/skills/pixelcraft-desktop/references/electron.md +96 -0
  213. package/skills/pixelcraft-desktop/references/go-gui.md +83 -0
  214. package/skills/pixelcraft-desktop/references/gtk.md +97 -0
  215. package/skills/pixelcraft-desktop/references/javafx-swing.md +81 -0
  216. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +88 -0
  217. package/skills/pixelcraft-desktop/references/rust-gui.md +83 -0
  218. package/skills/pixelcraft-desktop/references/tauri.md +110 -0
  219. package/skills/pixelcraft-desktop/references/uno-platform.md +71 -0
  220. package/skills/pixelcraft-desktop/references/winui-wpf.md +98 -0
  221. package/skills/pixelcraft-desktop/references/working-context.md +84 -0
  222. package/skills/pixelcraft-direction/SKILL.md +120 -0
  223. package/skills/pixelcraft-direction/references/composition-library.md +84 -0
  224. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  225. package/skills/pixelcraft-direction/references/direction-card.md +64 -0
  226. package/skills/pixelcraft-direction/references/direction-scoring.md +76 -0
  227. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  228. package/skills/pixelcraft-direction/references/movements.md +71 -0
  229. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  230. package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
  231. package/skills/pixelcraft-direction/references/slop-fingerprints.md +83 -0
  232. package/skills/pixelcraft-direction/references/wildcards.md +47 -0
  233. package/skills/pixelcraft-document/SKILL.md +58 -0
  234. package/skills/pixelcraft-document/references/archetypes.md +106 -0
  235. package/skills/pixelcraft-document/references/pdf-tools.md +314 -0
  236. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  237. package/skills/pixelcraft-document/references/print-css.md +187 -0
  238. package/skills/pixelcraft-document/references/slides.md +198 -0
  239. package/skills/pixelcraft-email/SKILL.md +80 -0
  240. package/skills/pixelcraft-email/references/client-quirks.md +113 -0
  241. package/skills/pixelcraft-email/references/html-tables.md +114 -0
  242. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  243. package/skills/pixelcraft-email/references/mjml.md +54 -0
  244. package/skills/pixelcraft-email/references/react-email.md +95 -0
  245. package/skills/pixelcraft-extensions/SKILL.md +56 -0
  246. package/skills/pixelcraft-extensions/references/browser-extensions.md +105 -0
  247. package/skills/pixelcraft-extensions/references/figma-office.md +106 -0
  248. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  249. package/skills/pixelcraft-extensions/references/raycast.md +98 -0
  250. package/skills/pixelcraft-extensions/references/vscode-webviews.md +100 -0
  251. package/skills/pixelcraft-game-ui/SKILL.md +80 -0
  252. package/skills/pixelcraft-game-ui/references/bevy.md +90 -0
  253. package/skills/pixelcraft-game-ui/references/godot.md +130 -0
  254. package/skills/pixelcraft-game-ui/references/hud-principles.md +67 -0
  255. package/skills/pixelcraft-game-ui/references/love2d.md +77 -0
  256. package/skills/pixelcraft-game-ui/references/monogame.md +68 -0
  257. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  258. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +107 -0
  259. package/skills/pixelcraft-game-ui/references/unreal-umg.md +80 -0
  260. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  261. package/skills/pixelcraft-handoff/SKILL.md +50 -0
  262. package/skills/pixelcraft-handoff/references/design-translation.md +134 -0
  263. package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
  264. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  265. package/skills/pixelcraft-media/SKILL.md +49 -0
  266. package/skills/pixelcraft-media/references/banners-video.md +130 -0
  267. package/skills/pixelcraft-media/references/og-generation.md +154 -0
  268. package/skills/pixelcraft-media/references/social-cards.md +71 -0
  269. package/skills/pixelcraft-mobile/SKILL.md +86 -0
  270. package/skills/pixelcraft-mobile/references/dotnet-maui.md +91 -0
  271. package/skills/pixelcraft-mobile/references/flet.md +80 -0
  272. package/skills/pixelcraft-mobile/references/flutter.md +113 -0
  273. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  274. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +87 -0
  275. package/skills/pixelcraft-mobile/references/jetpack-compose.md +129 -0
  276. package/skills/pixelcraft-mobile/references/kivy.md +82 -0
  277. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +86 -0
  278. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  279. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  280. package/skills/pixelcraft-mobile/references/react-native-expo.md +106 -0
  281. package/skills/pixelcraft-mobile/references/swiftui.md +200 -0
  282. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  283. package/skills/pixelcraft-mobile/references/task-state-composition.md +85 -0
  284. package/skills/pixelcraft-mobile/references/uikit.md +92 -0
  285. package/skills/pixelcraft-patterns/SKILL.md +75 -0
  286. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  287. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  288. package/skills/pixelcraft-patterns/references/auth-onboarding.md +44 -0
  289. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  290. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  291. package/skills/pixelcraft-patterns/references/commerce.md +47 -0
  292. package/skills/pixelcraft-patterns/references/communication.md +45 -0
  293. package/skills/pixelcraft-patterns/references/creative-tools.md +42 -0
  294. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  295. package/skills/pixelcraft-patterns/references/dashboard-admin.md +35 -0
  296. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  297. package/skills/pixelcraft-patterns/references/marketing.md +44 -0
  298. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  299. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  300. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  301. package/skills/pixelcraft-patterns/references/pattern-selection.md +80 -0
  302. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  303. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  304. package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
  305. package/skills/pixelcraft-patterns/references/settings.md +51 -0
  306. package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
  307. package/skills/pixelcraft-plan/SKILL.md +103 -0
  308. package/skills/pixelcraft-plan/references/design-input.md +69 -0
  309. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  310. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  311. package/skills/pixelcraft-plan/references/plan-template.md +134 -0
  312. package/skills/pixelcraft-plan/references/repo-discovery.md +49 -0
  313. package/skills/pixelcraft-plan/references/stack-freshness.md +67 -0
  314. package/skills/pixelcraft-plan/references/stack-selection.md +98 -0
  315. package/skills/pixelcraft-review/SKILL.md +86 -0
  316. package/skills/pixelcraft-review/references/audit-report.md +69 -0
  317. package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
  318. package/skills/pixelcraft-review/references/heuristics.md +63 -0
  319. package/skills/pixelcraft-review/references/personas.md +53 -0
  320. package/skills/pixelcraft-review/references/polish.md +78 -0
  321. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  322. package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
  323. package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
  324. package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
  325. package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
  326. package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
  327. package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
  328. package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
  329. package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
  330. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  331. package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
  332. package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
  333. package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
  334. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
  335. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
  336. package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
  337. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
  338. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
  339. package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
  340. package/skills/pixelcraft-review/scripts/slop-scan.mjs +1233 -0
  341. package/skills/pixelcraft-spatial/SKILL.md +51 -0
  342. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +39 -0
  343. package/skills/pixelcraft-spatial/references/platforms.md +147 -0
  344. package/skills/pixelcraft-tokens/SKILL.md +60 -0
  345. package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
  346. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
  347. package/skills/pixelcraft-tokens/references/adoption.md +55 -0
  348. package/skills/pixelcraft-tokens/references/format.md +84 -0
  349. package/skills/pixelcraft-tokens/references/governance.md +80 -0
  350. package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
  351. package/skills/pixelcraft-tokens/references/theme-presets.md +122 -0
  352. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  353. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +847 -0
  354. package/skills/pixelcraft-tui/SKILL.md +76 -0
  355. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +79 -0
  356. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  357. package/skills/pixelcraft-tui/references/ink.md +109 -0
  358. package/skills/pixelcraft-tui/references/ratatui.md +102 -0
  359. package/skills/pixelcraft-tui/references/rich.md +82 -0
  360. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  361. package/skills/pixelcraft-tui/references/textual.md +108 -0
  362. package/skills/pixelcraft-ux/SKILL.md +56 -0
  363. package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
  364. package/skills/pixelcraft-ux/references/feedback-performance.md +50 -0
  365. package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
  366. package/skills/pixelcraft-ux/references/forms.md +151 -0
  367. package/skills/pixelcraft-ux/references/i18n.md +221 -0
  368. package/skills/pixelcraft-ux/references/laws.md +39 -0
  369. package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
  370. package/skills/pixelcraft-ux/references/state-matrix.md +53 -0
  371. package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
  372. package/skills/pixelcraft-ux/references/ux-writing.md +44 -0
  373. package/skills/pixelcraft-visual-qa/SKILL.md +96 -0
  374. package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
  375. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +59 -0
  376. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  377. package/skills/pixelcraft-visual-qa/references/capture-email.md +38 -0
  378. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +50 -0
  379. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +35 -0
  380. package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
  381. package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
  382. package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
  383. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  384. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +78 -0
  385. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  386. package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
  387. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  388. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  389. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  390. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  391. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +174 -0
  392. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
  393. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
  394. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
  395. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
  396. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
  397. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
  398. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
  399. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +668 -0
  400. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1226 -0
  401. package/skills/pixelcraft-web/SKILL.md +132 -0
  402. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  403. package/skills/pixelcraft-web/references/adaptive-layout.md +69 -0
  404. package/skills/pixelcraft-web/references/angular.md +108 -0
  405. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  406. package/skills/pixelcraft-web/references/astro.md +113 -0
  407. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  408. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  409. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  410. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  411. package/skills/pixelcraft-web/references/clojurescript.md +88 -0
  412. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  413. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  414. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  415. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  416. package/skills/pixelcraft-web/references/elm.md +53 -0
  417. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  418. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  419. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  420. package/skills/pixelcraft-web/references/fsharp-fable.md +54 -0
  421. package/skills/pixelcraft-web/references/gsap.md +102 -0
  422. package/skills/pixelcraft-web/references/html-css.md +220 -0
  423. package/skills/pixelcraft-web/references/htmx-alpine.md +103 -0
  424. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  425. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  426. package/skills/pixelcraft-web/references/java-web.md +61 -0
  427. package/skills/pixelcraft-web/references/kotlin-web.md +57 -0
  428. package/skills/pixelcraft-web/references/leptos-yew.md +97 -0
  429. package/skills/pixelcraft-web/references/lit-web-components.md +63 -0
  430. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  431. package/skills/pixelcraft-web/references/media-players.md +104 -0
  432. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  433. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  434. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  435. package/skills/pixelcraft-web/references/pwa.md +230 -0
  436. package/skills/pixelcraft-web/references/qwik.md +94 -0
  437. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  438. package/skills/pixelcraft-web/references/react-next.md +168 -0
  439. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  440. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  441. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  442. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  443. package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
  444. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  445. package/skills/pixelcraft-web/references/server-rendered.md +114 -0
  446. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  447. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  448. package/skills/pixelcraft-web/references/solid.md +111 -0
  449. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  450. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  451. package/skills/pixelcraft-web/references/svelte.md +111 -0
  452. package/skills/pixelcraft-web/references/tailwind.md +99 -0
  453. package/skills/pixelcraft-web/references/video-media.md +69 -0
  454. package/skills/pixelcraft-web/references/vue-nuxt.md +86 -0
  455. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -0,0 +1,361 @@
1
+ #!/usr/bin/env node
2
+ import assert from 'node:assert/strict';
3
+ import { spawnSync } from 'node:child_process';
4
+ import fs from 'node:fs';
5
+ import os from 'node:os';
6
+ import path from 'node:path';
7
+ import { fileURLToPath } from 'node:url';
8
+
9
+ if (process.argv.includes('--help') || process.argv.includes('-h')) {
10
+ console.log('Usage: node scripts/test-export-tokens.mjs');
11
+ process.exit(0);
12
+ }
13
+
14
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
15
+ const exporter = path.join(root, 'skills/pixelcraft-tokens/scripts/export-tokens.mjs');
16
+ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-export-tokens-'));
17
+
18
+ function run(args, cwd = root) {
19
+ return spawnSync(process.execPath, [exporter, ...args], { encoding: 'utf8', cwd });
20
+ }
21
+
22
+ try {
23
+ const fixture = path.join(tmp, 'tokens.json');
24
+ fs.writeFileSync(fixture, JSON.stringify({
25
+ color: {
26
+ $type: 'color',
27
+ surface: { $value: { colorSpace: 'srgb', components: [1, 1, 1], alpha: 1 } }
28
+ },
29
+ semantic: {
30
+ background: {
31
+ $value: '{color.surface}',
32
+ $extensions: {
33
+ pixelcraft: {
34
+ modes: {
35
+ dark: { $value: { colorSpace: 'srgb', components: [0, 0, 0], alpha: 1 } }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }, null, 2));
42
+
43
+ const dark = run([fixture, '--format', 'css', '--mode', 'dark']);
44
+ assert.equal(dark.status, 0, dark.stderr);
45
+ assert.match(dark.stdout, /--semantic-background: #000000;/);
46
+ assert.doesNotMatch(dark.stdout, /colorSpace/);
47
+ console.log('ok 1 - mode override inherits the original alias target type');
48
+
49
+ const missingValueCases = [
50
+ [['--format'], /--format requires a value/],
51
+ [['--format='], /--format requires a value/],
52
+ [['--format', '--out-dir', 'x'], /--format requires a value/],
53
+ [['--out-dir'], /--out-dir requires a value/],
54
+ [['--out-dir='], /--out-dir requires a value/],
55
+ [['--mode'], /--mode requires a value/],
56
+ [['--mode='], /--mode requires a value/],
57
+ [['--selector'], /--selector requires a value/],
58
+ [['--selector='], /--selector requires a value/],
59
+ ];
60
+ for (const [optionArgs, message] of missingValueCases) {
61
+ const missing = run([fixture, ...optionArgs]);
62
+ assert.notEqual(missing.status, 0, `${optionArgs.join(' ')} unexpectedly succeeded`);
63
+ assert.match(missing.stderr, message);
64
+ }
65
+ console.log('ok 2 - missing option values are rejected');
66
+
67
+ const dashOutDir = run([fixture, '--format', 'css', '--mode', 'dark', '--out-dir', '-generated'], tmp);
68
+ assert.equal(dashOutDir.status, 0, dashOutDir.stderr);
69
+ assert.ok(fs.existsSync(path.join(tmp, '-generated', 'tokens.dark.css')), 'dash-prefixed output directory was not used');
70
+ assert.match(dashOutDir.stdout, /wrote -generated[\\/]tokens\.dark\.css/);
71
+ console.log('ok 3 - dash-prefixed option values are accepted');
72
+
73
+ const stringColors = path.join(tmp, 'string-colors.json');
74
+ fs.writeFileSync(stringColors, JSON.stringify({
75
+ color: {
76
+ $type: 'color',
77
+ whiteShort: { $value: '#fff' },
78
+ accentAlpha: { $value: '#ff000080' }
79
+ }
80
+ }, null, 2));
81
+
82
+ const swiftHex = run([stringColors, '--format', 'swift']);
83
+ assert.equal(swiftHex.status, 0, swiftHex.stderr);
84
+ assert.match(swiftHex.stdout, /colorWhiteShort = Color\(red: 1\.0000, green: 1\.0000, blue: 1\.0000, opacity: 1\)/);
85
+ assert.match(swiftHex.stdout, /colorAccentAlpha = Color\(red: 1\.0000, green: 0\.0000, blue: 0\.0000, opacity: 0\.501961\)/);
86
+
87
+ const kotlinHex = run([stringColors, '--format', 'kotlin']);
88
+ assert.equal(kotlinHex.status, 0, kotlinHex.stderr);
89
+ assert.match(kotlinHex.stdout, /val colorWhiteShort = Color\(0xffffffff\)/);
90
+ assert.match(kotlinHex.stdout, /val colorAccentAlpha = Color\(0x80ff0000\)/);
91
+
92
+ const dartHex = run([stringColors, '--format', 'dart']);
93
+ assert.equal(dartHex.status, 0, dartHex.stderr);
94
+ assert.match(dartHex.stdout, /static const Color colorWhiteShort = Color\(0xffffffff\);/);
95
+ assert.match(dartHex.stdout, /static const Color colorAccentAlpha = Color\(0x80ff0000\);/);
96
+ console.log('ok 4 - string hex colors (#rgb/#rrggbbaa) export accurately to Swift, Kotlin, and Dart');
97
+
98
+ const namedColor = path.join(tmp, 'named-color.json');
99
+ fs.writeFileSync(namedColor, JSON.stringify({ color: { $type: 'color', bad: { $value: 'red' } } }));
100
+ const cssNamed = run([namedColor, '--format', 'css']);
101
+ assert.equal(cssNamed.status, 0, cssNamed.stderr);
102
+ for (const nativeFmt of ['swift', 'kotlin', 'dart', 'xaml', 'android-xml', 'rust']) {
103
+ const failed = run([namedColor, '--format', nativeFmt]);
104
+ assert.notEqual(failed.status, 0, `${nativeFmt} should reject non-hex string color`);
105
+ assert.match(failed.stderr, /non-hex string 'red'/);
106
+ }
107
+ console.log('ok 5 - non-hex string colors fail loudly on typed native formats instead of emitting corrupt colors');
108
+
109
+ // Flag-before-positional and unknown option rejection
110
+ const flagFirst = run(['--format', 'css', '--selector', '[data-theme="dark"]', '--preserve-references', fixture]);
111
+ assert.equal(flagFirst.status, 0, flagFirst.stderr);
112
+ assert.match(flagFirst.stdout, /\[data-theme="dark"\] \{/);
113
+ assert.match(flagFirst.stdout, /--semantic-background: var\(--color-surface\);/);
114
+ const unknownFlag = run([fixture, '--bogus']);
115
+ assert.notEqual(unknownFlag.status, 0);
116
+ assert.match(unknownFlag.stderr, /unknown option: --bogus/);
117
+ console.log('ok 6 - flags before positional input, --selector, --preserve-references, and unknown flag rejection work');
118
+
119
+ // DTCG composite types, cubicBezier, fontFamily quoting, color spaces, rem-to-px, and new formats
120
+ const rich = path.join(tmp, 'rich.json');
121
+ fs.writeFileSync(rich, JSON.stringify({
122
+ color: {
123
+ $type: 'color',
124
+ lab: { $value: { colorSpace: 'oklab', components: [0.6, 0.1, -0.05], alpha: 1 } },
125
+ p3: { $value: { colorSpace: 'display-p3', components: [1, 0.2, 0.1], alpha: 0.9, hex: '#e8331a' } },
126
+ hsl: { $value: { colorSpace: 'hsl', components: [210, 80, 50], alpha: 1 } },
127
+ ink: { $value: '#112233' },
128
+ },
129
+ space: {
130
+ $type: 'dimension',
131
+ gutter: { $value: { value: 1.5, unit: 'rem' } },
132
+ },
133
+ text: {
134
+ size: {
135
+ $type: 'dimension',
136
+ body: { $value: { value: 1, unit: 'rem' } },
137
+ },
138
+ },
139
+ font: {
140
+ family: {
141
+ $type: 'fontFamily',
142
+ ui: { $value: ['IBM Plex Sans', 'System UI', 'sans-serif'] },
143
+ },
144
+ },
145
+ motion: {
146
+ easing: {
147
+ $type: 'cubicBezier',
148
+ standard: { $value: [0.2, 0, 0, 1] },
149
+ },
150
+ duration: {
151
+ $type: 'duration',
152
+ fast: { $value: { value: 150, unit: 'ms' } },
153
+ },
154
+ },
155
+ elevation: {
156
+ card: {
157
+ $type: 'shadow',
158
+ $value: {
159
+ color: '{color.ink}',
160
+ offsetX: { value: 0, unit: 'px' },
161
+ offsetY: { value: 4, unit: 'px' },
162
+ blur: { value: 12, unit: 'px' },
163
+ spread: { value: 0, unit: 'px' },
164
+ },
165
+ },
166
+ },
167
+ stroke: {
168
+ focus: {
169
+ $type: 'border',
170
+ $value: { color: '{color.ink}', width: { value: 2, unit: 'px' }, style: 'solid' },
171
+ },
172
+ },
173
+ anim: {
174
+ fade: {
175
+ $type: 'transition',
176
+ $value: { duration: '{motion.duration.fast}', timingFunction: '{motion.easing.standard}' },
177
+ },
178
+ },
179
+ surface: {
180
+ banner: {
181
+ $type: 'gradient',
182
+ $value: [
183
+ { color: '{color.ink}', position: 0 },
184
+ { color: '{color.hsl}', position: 1 },
185
+ ],
186
+ },
187
+ },
188
+ type: {
189
+ heading: {
190
+ $type: 'typography',
191
+ $value: { fontFamily: '{font.family.ui}', fontSize: '{text.size.body}', fontWeight: 700, lineHeight: 1.2 },
192
+ },
193
+ },
194
+ }, null, 2));
195
+
196
+ const richCss = run(['--format', 'css', rich]);
197
+ assert.equal(richCss.status, 0, richCss.stderr);
198
+ assert.match(richCss.stdout, /--color-lab: oklab\(0\.6 0\.1 -0\.05\);/);
199
+ assert.match(richCss.stdout, /--color-p3: color\(display-p3 1 0\.2 0\.1 \/ 0\.9\);/);
200
+ assert.match(richCss.stdout, /--color-hsl: hsl\(210 80% 50%\);/);
201
+ assert.match(richCss.stdout, /--font-family-ui: "IBM Plex Sans", "System UI", sans-serif;/);
202
+ assert.match(richCss.stdout, /--motion-easing-standard: cubic-bezier\(0\.2, 0, 0, 1\);/);
203
+ assert.match(richCss.stdout, /--elevation-card: 0px 4px 12px 0px #112233;/);
204
+ assert.match(richCss.stdout, /--stroke-focus: 2px solid #112233;/);
205
+ assert.match(richCss.stdout, /--anim-fade: 150ms cubic-bezier\(0\.2, 0, 0, 1\);/);
206
+ assert.match(richCss.stdout, /--surface-banner: linear-gradient\(#112233 0%, hsl\(210 80% 50%\) 100%\);/);
207
+ assert.match(richCss.stdout, /--type-heading: 700 1rem\/1\.2 "IBM Plex Sans", "System UI", sans-serif;/);
208
+ assert.doesNotMatch(richCss.stdout, /"\$?value"|"\w+":/);
209
+
210
+ const richTw = run(['--format', 'tailwind', rich]);
211
+ assert.equal(richTw.status, 0, richTw.stderr);
212
+ assert.match(richTw.stdout, /@theme \{/);
213
+ assert.match(richTw.stdout, /--spacing-gutter: 1\.5rem;/);
214
+ assert.match(richTw.stdout, /--font-ui: "IBM Plex Sans", "System UI", sans-serif;/);
215
+ assert.match(richTw.stdout, /--ease-standard: cubic-bezier\(0\.2, 0, 0, 1\);/);
216
+ assert.match(richTw.stdout, /--shadow-elevation-card: 0px 4px 12px 0px #112233;/);
217
+
218
+ // Native rem -> px (* 16) scaling and hex fallback
219
+ const richSwift = run(['--format', 'swift', rich]);
220
+ assert.equal(richSwift.status, 0, richSwift.stderr);
221
+ assert.match(richSwift.stdout, /spaceGutter: CGFloat = 24 \/\/ 1\.5rem @ 16px base/);
222
+ assert.match(richSwift.stdout, /colorP3 = Color\(red: 0\.9098, green: 0\.2000, blue: 0\.1020, opacity: 0\.9\)/);
223
+
224
+ const richKotlin = run(['--format', 'kotlin', rich]);
225
+ assert.equal(richKotlin.status, 0, richKotlin.stderr);
226
+ assert.match(richKotlin.stdout, /val spaceGutter = 24\.dp \/\/ 1\.5rem @ 16px base/);
227
+ assert.match(richKotlin.stdout, /val textSizeBody = 16\.sp \/\/ 1rem @ 16px base/);
228
+
229
+ const richDart = run(['--format', 'dart', rich]);
230
+ assert.equal(richDart.status, 0, richDart.stderr);
231
+ assert.match(richDart.stdout, /static const double spaceGutter = 24; \/\/ 1\.5rem @ 16px base/);
232
+ console.log('ok 7 - DTCG color spaces, hex fallback, cubicBezier, fontFamily quoting, composite types, Tailwind v4 namespaces, and native rem scaling work');
233
+
234
+ // New formats: ts, scss, xaml, android-xml, rust
235
+ const richTs = run(['--format', 'ts', rich]);
236
+ assert.equal(richTs.status, 0, richTs.stderr);
237
+ assert.match(richTs.stdout, /export const pixelcraftTokens = \{/);
238
+ assert.match(richTs.stdout, /export type PixelcraftTokenName = keyof typeof pixelcraftTokens;/);
239
+
240
+ const richScss = run(['--format', 'scss', '--preserve-references', fixture]);
241
+ assert.equal(richScss.status, 0, richScss.stderr);
242
+ assert.match(richScss.stdout, /\$semantic-background: \$color-surface;/);
243
+
244
+ const richXaml = run(['--format', 'xaml', rich]);
245
+ assert.equal(richXaml.status, 0, richXaml.stderr);
246
+ assert.match(richXaml.stdout, /<ResourceDictionary/);
247
+ assert.match(richXaml.stdout, /<Color x:Key="ColorP3">#E6E8331A<\/Color>/);
248
+ assert.match(richXaml.stdout, /<x:Double x:Key="SpaceGutter">24<\/x:Double>/);
249
+
250
+ const richAndroid = run(['--format', 'android-xml', rich]);
251
+ assert.equal(richAndroid.status, 0, richAndroid.stderr);
252
+ assert.match(richAndroid.stdout, /<resources>/);
253
+ assert.match(richAndroid.stdout, /<color name="color_ink">#FF112233<\/color>/);
254
+ assert.match(richAndroid.stdout, /<dimen name="space_gutter">24dp<\/dimen>/);
255
+ assert.match(richAndroid.stdout, /<dimen name="text_size_body">16sp<\/dimen>/);
256
+
257
+ const richRust = run(['--format', 'rust', rich]);
258
+ assert.equal(richRust.status, 0, richRust.stderr);
259
+ assert.match(richRust.stdout, /pub const COLOR_INK: \[u8; 4\] = \[17, 34, 51, 255\];/);
260
+ assert.match(richRust.stdout, /pub const SPACE_GUTTER: f32 = 24\.0;/);
261
+ assert.match(richRust.stdout, /pub const MOTION_DURATION_FAST: u64 = 150;/);
262
+
263
+ // Example asset files: no broken HTML $schema and all 19 formats export cleanly
264
+ for (const asset of ['tokens.example.json', 'tokens.modes.example.json']) {
265
+ const assetPath = path.join(root, 'skills/pixelcraft-tokens/assets', asset);
266
+ const parsedAsset = JSON.parse(fs.readFileSync(assetPath, 'utf8'));
267
+ assert.equal(parsedAsset.$schema, undefined, `${asset} should not point $schema to an HTML spec page`);
268
+ const allOut = run(['--format', 'all', assetPath]);
269
+ assert.equal(allOut.status, 0, `${asset} failed --format all: ${allOut.stderr}`);
270
+ }
271
+ console.log('ok 8 - ts, scss, xaml, android-xml, rust formats and example assets export cleanly');
272
+
273
+ // 6 new non-JS formats: go-lipgloss, godot, unity-uss, slint, gtk4, typst (19 total)
274
+ const goOut = run(['--format', 'go-lipgloss', rich]);
275
+ assert.equal(goOut.status, 0, goOut.stderr);
276
+ assert.match(goOut.stdout, /package tokens/);
277
+ assert.match(goOut.stdout, /import "github\.com\/charmbracelet\/lipgloss"/);
278
+ assert.match(goOut.stdout, /ColorInk = lipgloss\.Color\("#112233"\)/);
279
+
280
+ const godotOut = run(['--format', 'godot', rich]);
281
+ assert.equal(godotOut.status, 0, godotOut.stderr);
282
+ assert.match(godotOut.stdout, /class_name DesignTokens/);
283
+ assert.match(godotOut.stdout, /const COLOR_INK: Color = Color\.html\("#112233"\)/);
284
+ assert.match(godotOut.stdout, /const SPACE_GUTTER: float = 24\.0/);
285
+
286
+ const ussOut = run(['--format', 'unity-uss', '--preserve-references', fixture]);
287
+ assert.equal(ussOut.status, 0, ussOut.stderr);
288
+ assert.match(ussOut.stdout, /:root \{/);
289
+ assert.match(ussOut.stdout, /--color-surface: #ffffff;/);
290
+ assert.match(ussOut.stdout, /--semantic-background: var\(--color-surface\);/);
291
+
292
+ const slintOut = run(['--format', 'slint', rich]);
293
+ assert.equal(slintOut.status, 0, slintOut.stderr);
294
+ assert.match(slintOut.stdout, /export global DesignTokens \{/);
295
+ assert.match(slintOut.stdout, /out property <color> color-ink: #112233;/);
296
+ assert.match(slintOut.stdout, /out property <length> space-gutter: 24px;/);
297
+ assert.match(slintOut.stdout, /out property <duration> motion-duration-fast: 150ms;/);
298
+
299
+ const gtk4Out = run(['--format', 'gtk4', rich]);
300
+ assert.equal(gtk4Out.status, 0, gtk4Out.stderr);
301
+ assert.match(gtk4Out.stdout, /@define-color color_ink #112233;/);
302
+ assert.match(gtk4Out.stdout, /@define-color color_p3 rgba\(232, 51, 26, 0\.9\);/);
303
+
304
+ const typstOut = run(['--format', 'typst', rich]);
305
+ assert.equal(typstOut.status, 0, typstOut.stderr);
306
+ assert.match(typstOut.stdout, /#let tokens = \(/);
307
+ assert.match(typstOut.stdout, /color-ink: rgb\("#112233"\),/);
308
+ assert.match(typstOut.stdout, /space-gutter: 1\.5em,/);
309
+
310
+ // Verify --out-dir writes all 19 expected files including tokens-gtk4.css
311
+ const allDir = path.join(tmp, 'all-19');
312
+ const allWrite = run(['--format', 'all', '--out-dir', allDir, rich]);
313
+ assert.equal(allWrite.status, 0, allWrite.stderr);
314
+ const expectedFiles = [
315
+ 'tokens.css', 'tokens.tailwind.css', 'tokens.swift', 'tokens.kt', 'tokens.dart',
316
+ 'tokens.py', 'tokens.qt', 'tokens.textual', 'tokens.ts', 'tokens.scss',
317
+ 'tokens.xaml', 'tokens.xml', 'tokens.rs', 'tokens.go', 'tokens.gd',
318
+ 'tokens.uss', 'tokens.slint', 'tokens-gtk4.css', 'tokens.typ',
319
+ ];
320
+ for (const name of expectedFiles) {
321
+ assert.ok(fs.existsSync(path.join(allDir, name)), `missing output file ${name}`);
322
+ }
323
+ assert.equal(fs.readdirSync(allDir).length, 19);
324
+ for (const typedFmt of ['go-lipgloss', 'godot', 'unity-uss', 'slint', 'gtk4', 'typst']) {
325
+ const failed = run([namedColor, '--format', typedFmt]);
326
+ assert.notEqual(failed.status, 0, `${typedFmt} should reject non-hex string color`);
327
+ }
328
+ console.log('ok 9 - all 19 formats (including go-lipgloss, godot, unity-uss, slint, gtk4, typst) emit idiomatic output and filenames');
329
+
330
+ // DTCG 2025.10 $root and $deprecated support
331
+ const dtcg2025 = path.join(tmp, 'dtcg-2025.json');
332
+ fs.writeFileSync(dtcg2025, JSON.stringify({
333
+ color: {
334
+ $type: 'color',
335
+ brand: {
336
+ $root: { $value: '#0055cc' },
337
+ hover: { $value: '#003d99' },
338
+ legacy: { $value: '#002266', $deprecated: 'Use color.brand instead' },
339
+ },
340
+ },
341
+ semantic: {
342
+ $type: 'color',
343
+ action: { $value: '{color.brand}' },
344
+ 'action-explicit-root': { $value: '{color.brand.$root}' },
345
+ },
346
+ }, null, 2));
347
+ const dtcgCss = run(['--format', 'css', '--preserve-references', dtcg2025]);
348
+ assert.equal(dtcgCss.status, 0, dtcgCss.stderr);
349
+ assert.match(dtcgCss.stdout, /--color-brand: #0055cc;/);
350
+ assert.match(dtcgCss.stdout, /--color-brand-hover: #003d99;/);
351
+ assert.match(dtcgCss.stdout, /--semantic-action: var\(--color-brand\);/);
352
+ assert.match(dtcgCss.stdout, /--semantic-action-explicit-root: var\(--color-brand\);/);
353
+ assert.doesNotMatch(dtcgCss.stdout, /warning:/i, 'deprecation warnings must not pollute stdout');
354
+ assert.match(dtcgCss.stderr, /warning: deprecated token 'color\.brand\.legacy' \(Use color\.brand instead\)/);
355
+ console.log('ok 10 - DTCG 2025.10 $root group tokens and $deprecated stderr warnings work cleanly');
356
+
357
+ console.log('token exporter tests passed');
358
+ } finally {
359
+ fs.rmSync(tmp, { recursive: true, force: true });
360
+ }
361
+
@@ -0,0 +1,271 @@
1
+ import assert from 'node:assert/strict';
2
+ import fs from 'node:fs';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import { spawnSync } from 'node:child_process';
6
+ import { fileURLToPath } from 'node:url';
7
+ import { evaluateEvidence } from '../skills/pixelcraft-visual-qa/scripts/finish-gate.mjs';
8
+
9
+ if (process.argv.includes('--help') || process.argv.includes('-h')) {
10
+ console.log('Usage: node scripts/test-finish-gate.mjs');
11
+ process.exit(0);
12
+ }
13
+
14
+ const evidence = { result: 'pass', label: 'rendered', method: 'local sandbox', expected: 'expected value', observed: 'actual value', artifact: 'evidence.txt' };
15
+ const excluded = { applies: false, reason: 'Interface has no animation or alternative theme' };
16
+ const manifest = {
17
+ schemaVersion: 1, surface: 'responsive-web', target: '/search', revision: 'abc', task: 'Search products', fixture: 'local sandbox',
18
+ applicability: { error: true, empty: true, loading: true, theme: excluded, 'reduced-motion': excluded, 'reflow-320': true },
19
+ layoutMatrix: {
20
+ 'layout-landscape': { width: 844, height: 390 },
21
+ 'layout-short-height': { width: 1280, height: 480 },
22
+ },
23
+ checks: {
24
+ outcome: { ...evidence, assertion: 'Results refresh to one matching item' },
25
+ input: { ...evidence, modality: 'keyboard', focus: 'Tab visibly focuses search, then submit' },
26
+ ...Object.fromEntries([390, 768, 1440].map((width) => [`width-${width}`, { ...evidence, width, artifact: `width-${width}.txt` }])),
27
+ 'layout-landscape': { ...evidence, width: 844, height: 390, artifact: 'landscape.txt' },
28
+ 'layout-short-height': { ...evidence, width: 1280, height: 480, artifact: 'short-height.txt' },
29
+ 'reflow-320': { ...evidence, width: 320, artifact: 'reflow-320.txt' }, error: evidence, empty: evidence, loading: evidence,
30
+ },
31
+ rounds: [],
32
+ };
33
+ const validArtifacts = new Set([
34
+ 'evidence.txt', 'before.txt', 'width-390.txt', 'width-768.txt', 'width-1440.txt',
35
+ 'landscape.txt', 'short-height.txt', 'reflow-320.txt',
36
+ ]);
37
+ const hasArtifact = (value) => validArtifacts.has(value);
38
+ assert.equal(evaluateEvidence(manifest, hasArtifact).status, 'PASS');
39
+ const missing = { ...manifest, checks: { ...manifest.checks, outcome: evidence, input: { ...manifest.checks.input, label: 'static' }, 'reflow-320': { ...evidence, width: 390, artifact: 'reflow-320.txt' }, loading: { result: 'not-checked', reason: 'Sandbox offline' } } };
40
+ const unchecked = evaluateEvidence(missing, hasArtifact);
41
+ assert.equal(unchecked.status, 'NOT CHECKED');
42
+ assert.deepEqual(Object.keys(unchecked.notChecked), ['outcome', 'input', 'loading', 'reflow-320']);
43
+ assert.equal(unchecked.notChecked.loading, 'Sandbox offline');
44
+ assert.equal(evaluateEvidence({ ...manifest, applicability: {} }, hasArtifact).status, 'NOT CHECKED');
45
+ assert.equal(evaluateEvidence({ ...manifest, checks: { ...manifest.checks, error: { ...evidence, artifact: 'missing' } } }, hasArtifact).status, 'NOT CHECKED');
46
+ assert.equal(evaluateEvidence({ ...manifest, surface: 'other', layoutMatrix: undefined, checks: { outcome: manifest.checks.outcome, layout: evidence, input: { ...evidence, focus: 'controller focus ring' }, error: evidence, empty: evidence, loading: evidence } }, hasArtifact).status, 'PASS');
47
+ console.log('ok 1 - finish gate requires task, focus, responsive and applicable state evidence');
48
+
49
+ const failed = { ...manifest, checks: { ...manifest.checks, 'critical-overflow': { ...evidence, result: 'fail' } } };
50
+ const round = { failure: 'critical-overflow', reproduction: 'Submit clipped at 390', change: 'Reflow actions', rerun: 'Still clipped on longer locale', before: 'before.txt', after: 'evidence.txt' };
51
+ assert.equal(evaluateEvidence({ ...failed, rounds: [round, round] }, hasArtifact).status, 'FAIL');
52
+ const open = evaluateEvidence({ ...failed, rounds: [round, round, round] }, hasArtifact);
53
+ assert.equal(open.status, 'OPEN');
54
+ assert.equal(open.failures['critical-overflow'].artifact, 'evidence.txt');
55
+ assert.throws(() => evaluateEvidence({ ...failed, rounds: [round, round, round, round] }, hasArtifact), /at most three/);
56
+ const omittedRerun = evaluateEvidence({ ...manifest, rounds: [round, round, round] }, hasArtifact);
57
+ assert.equal(omittedRerun.status, 'NOT CHECKED');
58
+ assert.ok(omittedRerun.notChecked['critical-overflow']);
59
+ const repaired = { ...manifest, checks: { ...manifest.checks, 'critical-overflow': evidence }, rounds: [round, round, round] };
60
+ assert.equal(evaluateEvidence(repaired, hasArtifact).status, 'PASS');
61
+ const skippedRerun = evaluateEvidence({ ...manifest, rounds: [{ ...round, failure: 'theme' }] }, hasArtifact);
62
+ assert.equal(skippedRerun.status, 'NOT CHECKED');
63
+ assert.ok(skippedRerun.notChecked.theme);
64
+ assert.ok(!Object.hasOwn(skippedRerun.notApplicable, 'theme'));
65
+ assert.throws(() => evaluateEvidence({ ...failed, rounds: [{ ...round, after: 'before.txt' }] }, hasArtifact), /distinct before\/after/);
66
+ console.log('ok 2 - gate keeps confirmed failures open after three rounds and requires rerun evidence');
67
+
68
+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-gate-test-'));
69
+ try {
70
+ const file = path.join(dir, 'manifest.json');
71
+ const cli = fileURLToPath(new URL('../skills/pixelcraft-visual-qa/scripts/finish-gate.mjs', import.meta.url));
72
+ const run = (input) => {
73
+ fs.writeFileSync(file, JSON.stringify(input));
74
+ return spawnSync(process.execPath, [cli, file], { encoding: 'utf8' });
75
+ };
76
+ for (const name of validArtifacts) {
77
+ fs.writeFileSync(path.join(dir, name), `sandbox trace for ${name}`);
78
+ }
79
+ const good = run(manifest);
80
+ assert.equal(good.status, 0, good.stderr);
81
+ assert.equal(JSON.parse(good.stdout).status, 'PASS');
82
+ const bad = run({ ...failed, rounds: [round, round, round] });
83
+ assert.equal(bad.status, 1, bad.stderr);
84
+ assert.equal(JSON.parse(bad.stdout).status, 'OPEN');
85
+ const external = run({ ...manifest, checks: { ...manifest.checks, error: { ...evidence, artifact: cli } } });
86
+ assert.equal(external.status, 2, external.stderr);
87
+ assert.equal(JSON.parse(external.stdout).status, 'NOT CHECKED');
88
+ } finally {
89
+ fs.rmSync(dir, { recursive: true, force: true });
90
+ }
91
+ console.log('ok 3 - gate exits nonzero for open or unchecked scope and rejects external artifacts');
92
+
93
+ const widthDefect = { ...evidence, result: 'fail', width: 390 };
94
+ const scopedRound = { ...round, failure: 'width-390-submit' };
95
+ const scopedDefect = { ...manifest, rounds: [scopedRound, scopedRound, scopedRound],
96
+ checks: { ...manifest.checks, 'width-390-submit': widthDefect } };
97
+ const scopedOpen = evaluateEvidence(scopedDefect, hasArtifact);
98
+ assert.equal(scopedOpen.status, 'OPEN');
99
+ assert.equal(scopedOpen.failures['width-390-submit'].artifact, 'evidence.txt');
100
+ const wrongWidth = evaluateEvidence({ ...scopedDefect,
101
+ checks: { ...scopedDefect.checks, 'width-390-submit': { ...widthDefect, width: 768 } } }, hasArtifact);
102
+ assert.equal(wrongWidth.status, 'NOT CHECKED');
103
+ assert.ok(wrongWidth.notChecked['width-390-submit']);
104
+ console.log('ok 4 - width-scoped defect IDs require the viewport encoded in their prefix');
105
+
106
+ const malformedWidth = evaluateEvidence({ ...manifest, checks: { ...manifest.checks,
107
+ 'width-390px-submit': { ...evidence, width: 768 } } }, hasArtifact);
108
+ assert.equal(malformedWidth.status, 'NOT CHECKED');
109
+ assert.ok(malformedWidth.notChecked['width-390px-submit']);
110
+ console.log('ok 5 - malformed width IDs cannot bypass viewport validation');
111
+
112
+ const adaptive = { ...manifest, layoutMatrix: { ...manifest.layoutMatrix, 'layout-ultrawide': { width: 2560, height: 1080 } } };
113
+ const omittedMatrix = evaluateEvidence({ ...manifest, layoutMatrix: undefined }, hasArtifact);
114
+ assert.equal(omittedMatrix.status, 'NOT CHECKED');
115
+ assert.deepEqual(Object.keys(omittedMatrix.notChecked), ['layout-landscape', 'layout-short-height']);
116
+ const uncheckedClass = evaluateEvidence(adaptive, hasArtifact);
117
+ assert.equal(uncheckedClass.status, 'NOT CHECKED');
118
+ assert.ok(uncheckedClass.notChecked['layout-ultrawide']);
119
+ const wrongHeight = evaluateEvidence({ ...manifest, checks: {
120
+ ...manifest.checks, 'layout-short-height': { ...manifest.checks['layout-short-height'], height: 900 },
121
+ } }, hasArtifact);
122
+ assert.equal(wrongHeight.status, 'NOT CHECKED');
123
+ assert.ok(wrongHeight.notChecked['layout-short-height']);
124
+ const excludedClass = evaluateEvidence({ ...adaptive, layoutMatrix: {
125
+ ...adaptive.layoutMatrix, 'layout-ultrawide': { applies: false, reason: 'This product is limited to the embedded host window' },
126
+ } }, hasArtifact);
127
+ assert.equal(excludedClass.status, 'PASS');
128
+ assert.ok(excludedClass.notApplicable['layout-ultrawide']);
129
+ console.log('ok 6 - responsive evidence requires landscape, short height, and every declared layout at matching dimensions');
130
+
131
+ const desktop = { ...manifest.checks['width-1440'], height: 900 };
132
+ const desktopAsShort = evaluateEvidence({
133
+ ...manifest,
134
+ layoutMatrix: { ...manifest.layoutMatrix, 'layout-short-height': { width: 1440, height: 900 } },
135
+ checks: { ...manifest.checks, 'width-1440': desktop, 'layout-short-height': desktop },
136
+ }, hasArtifact);
137
+ assert.equal(desktopAsShort.status, 'NOT CHECKED');
138
+ assert.match(desktopAsShort.notChecked['layout-short-height'], /below 600 CSS px/);
139
+ for (const [height, status] of [[600, 'NOT CHECKED'], [599, 'PASS']]) {
140
+ const atBoundary = evaluateEvidence({
141
+ ...manifest,
142
+ layoutMatrix: { ...manifest.layoutMatrix, 'layout-short-height': { width: 1440, height } },
143
+ checks: { ...manifest.checks, 'layout-short-height': { ...manifest.checks['layout-short-height'], width: 1440, height } },
144
+ }, hasArtifact);
145
+ assert.equal(atBoundary.status, status);
146
+ }
147
+ const reusesDesktopArtifact = evaluateEvidence({
148
+ ...manifest,
149
+ checks: { ...manifest.checks, 'layout-short-height': { ...manifest.checks['layout-short-height'], artifact: './width-1440.txt' } },
150
+ }, (artifact) => hasArtifact(artifact.replace(/^\.\//, '')));
151
+ assert.equal(reusesDesktopArtifact.status, 'NOT CHECKED');
152
+ assert.match(reusesDesktopArtifact.notChecked['layout-short-height'], /separate artifact/);
153
+ console.log('ok 7 - regular desktop evidence cannot satisfy the short-height check');
154
+
155
+ const extendedMissing = evaluateEvidence({
156
+ ...manifest,
157
+ applicability: {
158
+ ...manifest.applicability,
159
+ i18n: true,
160
+ 'forced-colors': true,
161
+ 'text-scale-200': { applies: false, reason: 'Fixed terminal grid has no browser text zoom' },
162
+ locale: { applies: false },
163
+ },
164
+ }, hasArtifact);
165
+ assert.equal(extendedMissing.status, 'NOT CHECKED');
166
+ assert.ok(extendedMissing.notChecked.i18n);
167
+ assert.ok(extendedMissing.notChecked['forced-colors']);
168
+ assert.ok(extendedMissing.notChecked.locale);
169
+ assert.equal(extendedMissing.notApplicable['text-scale-200'], 'Fixed terminal grid has no browser text zoom');
170
+
171
+ const extendedPassing = evaluateEvidence({
172
+ ...manifest,
173
+ applicability: {
174
+ ...manifest.applicability,
175
+ i18n: true,
176
+ 'forced-colors': true,
177
+ 'text-scale-200': true,
178
+ locale: { applies: false, reason: 'Covered by i18n check' },
179
+ },
180
+ checks: {
181
+ ...manifest.checks,
182
+ i18n: evidence,
183
+ 'forced-colors': evidence,
184
+ 'text-scale-200': evidence,
185
+ },
186
+ }, hasArtifact);
187
+ assert.equal(extendedPassing.status, 'PASS');
188
+ assert.equal(extendedPassing.notApplicable.locale, 'Covered by i18n check');
189
+ console.log('ok 8 - declared extended optional keys (i18n, locale, forced-colors, text-scale-200) are enforced without breaking v1 manifests');
190
+
191
+ // Duplicate artifact paths across any distinct viewport/layout checks are rejected
192
+ const dupWidth = evaluateEvidence({
193
+ ...manifest,
194
+ checks: { ...manifest.checks, 'width-768': { ...manifest.checks['width-768'], artifact: 'width-390.txt' } },
195
+ }, hasArtifact);
196
+ assert.equal(dupWidth.status, 'NOT CHECKED');
197
+ assert.match(dupWidth.notChecked['width-768'], /Duplicate artifact.*width-390/);
198
+
199
+ const dupReflow = evaluateEvidence({
200
+ ...manifest,
201
+ checks: { ...manifest.checks, 'reflow-320': { ...manifest.checks['reflow-320'], artifact: './width-390.txt' } },
202
+ }, (artifact) => hasArtifact(artifact.replace(/^\.\//, '')));
203
+ assert.equal(dupReflow.status, 'NOT CHECKED');
204
+ assert.match(dupReflow.notChecked['reflow-320'], /Duplicate artifact.*width-390/);
205
+
206
+ const dupLandscape = evaluateEvidence({
207
+ ...manifest,
208
+ checks: { ...manifest.checks, 'layout-landscape': { ...manifest.checks['layout-landscape'], artifact: 'width-768.txt' } },
209
+ }, hasArtifact);
210
+ assert.equal(dupLandscape.status, 'NOT CHECKED');
211
+ assert.match(dupLandscape.notChecked['layout-landscape'], /Duplicate artifact.*width-768/);
212
+ console.log('ok 9 - duplicate artifact paths cannot satisfy multiple viewport or layout breakpoints');
213
+
214
+ // Lazy trivial applies: false excuses on core floor items (error, reduced-motion, theme) are rejected
215
+ for (const lazy of ['n/a', 'N/A', 'none', 'skip', 'skipped', 'todo', 'tbd', 'ignored', '-', 'short']) {
216
+ const lazyRes = evaluateEvidence({
217
+ ...manifest,
218
+ applicability: { ...manifest.applicability, theme: { applies: false, reason: lazy } },
219
+ }, hasArtifact);
220
+ assert.equal(lazyRes.status, 'NOT CHECKED', `lazy reason '${lazy}' must be rejected`);
221
+ assert.match(lazyRes.notChecked.theme, /concrete/);
222
+ }
223
+ const lazyError = evaluateEvidence({
224
+ ...manifest,
225
+ applicability: { ...manifest.applicability, error: { applies: false, reason: 'none' } },
226
+ }, hasArtifact);
227
+ assert.equal(lazyError.status, 'NOT CHECKED');
228
+ assert.ok(lazyError.notChecked.error);
229
+ const lazyMotion = evaluateEvidence({
230
+ ...manifest,
231
+ applicability: { ...manifest.applicability, 'reduced-motion': { applies: false, reason: 'skipped' } },
232
+ }, hasArtifact);
233
+ assert.equal(lazyMotion.status, 'NOT CHECKED');
234
+ assert.ok(lazyMotion.notChecked['reduced-motion']);
235
+ console.log('ok 10 - lazy trivial applies: false reasons on core floor items (error, reduced-motion, theme) are rejected');
236
+
237
+ // Surface-typed profiles: tui, mobile, email (including optional plaintext check)
238
+ const nonWebBase = {
239
+ schemaVersion: 1, target: 'main-view', revision: 'abc', task: 'Filter records', fixture: 'local run',
240
+ applicability: { error: true, empty: true, loading: true, theme: excluded, 'reduced-motion': excluded },
241
+ checks: {
242
+ outcome: manifest.checks.outcome,
243
+ input: { ...evidence, focus: 'keyboard/touch focus traversal' },
244
+ layout: evidence,
245
+ error: evidence,
246
+ empty: evidence,
247
+ loading: evidence,
248
+ },
249
+ rounds: [],
250
+ };
251
+ for (const surface of ['tui', 'mobile', 'desktop', 'document', 'game', 'spatial', 'email']) {
252
+ const surfaceRes = evaluateEvidence({ ...nonWebBase, surface }, hasArtifact);
253
+ assert.equal(surfaceRes.status, 'PASS', `surface '${surface}' should pass`);
254
+ }
255
+ const emailPlaintextMissing = evaluateEvidence({
256
+ ...nonWebBase,
257
+ surface: 'email',
258
+ applicability: { ...nonWebBase.applicability, plaintext: true },
259
+ }, hasArtifact);
260
+ assert.equal(emailPlaintextMissing.status, 'NOT CHECKED');
261
+ assert.ok(emailPlaintextMissing.notChecked.plaintext);
262
+
263
+ const emailPlaintextPass = evaluateEvidence({
264
+ ...nonWebBase,
265
+ surface: 'email',
266
+ applicability: { ...nonWebBase.applicability, plaintext: true },
267
+ checks: { ...nonWebBase.checks, plaintext: evidence },
268
+ }, hasArtifact);
269
+ assert.equal(emailPlaintextPass.status, 'PASS');
270
+ console.log('ok 11 - surface-typed profiles (tui, mobile, desktop, email + plaintext, document, game, spatial) validate cleanly');
271
+