@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
@@ -6,6 +6,11 @@ import os from 'node:os';
6
6
  import path from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
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
+
9
14
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
10
15
  const exporter = path.join(root, 'skills/pixelcraft-tokens/scripts/export-tokens.mjs');
11
16
  const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-export-tokens-'));
@@ -48,7 +53,9 @@ try {
48
53
  [['--out-dir'], /--out-dir requires a value/],
49
54
  [['--out-dir='], /--out-dir requires a value/],
50
55
  [['--mode'], /--mode requires a value/],
51
- [['--mode='], /--mode requires a value/]
56
+ [['--mode='], /--mode requires a value/],
57
+ [['--selector'], /--selector requires a value/],
58
+ [['--selector='], /--selector requires a value/],
52
59
  ];
53
60
  for (const [optionArgs, message] of missingValueCases) {
54
61
  const missing = run([fixture, ...optionArgs]);
@@ -92,14 +99,263 @@ try {
92
99
  fs.writeFileSync(namedColor, JSON.stringify({ color: { $type: 'color', bad: { $value: 'red' } } }));
93
100
  const cssNamed = run([namedColor, '--format', 'css']);
94
101
  assert.equal(cssNamed.status, 0, cssNamed.stderr);
95
- for (const nativeFmt of ['swift', 'kotlin', 'dart']) {
102
+ for (const nativeFmt of ['swift', 'kotlin', 'dart', 'xaml', 'android-xml', 'rust']) {
96
103
  const failed = run([namedColor, '--format', nativeFmt]);
97
104
  assert.notEqual(failed.status, 0, `${nativeFmt} should reject non-hex string color`);
98
105
  assert.match(failed.stderr, /non-hex string 'red'/);
99
106
  }
100
- console.log('ok 5 - non-hex string colors fail loudly on Swift, Kotlin, and Dart instead of emitting corrupt colors');
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');
101
356
 
102
357
  console.log('token exporter tests passed');
103
358
  } finally {
104
359
  fs.rmSync(tmp, { recursive: true, force: true });
105
360
  }
361
+
@@ -6,7 +6,7 @@ import { spawnSync } from 'node:child_process';
6
6
  import { fileURLToPath } from 'node:url';
7
7
  import { evaluateEvidence } from '../skills/pixelcraft-visual-qa/scripts/finish-gate.mjs';
8
8
 
9
- if (process.argv.includes('--help')) {
9
+ if (process.argv.includes('--help') || process.argv.includes('-h')) {
10
10
  console.log('Usage: node scripts/test-finish-gate.mjs');
11
11
  process.exit(0);
12
12
  }
@@ -23,16 +23,20 @@ const manifest = {
23
23
  checks: {
24
24
  outcome: { ...evidence, assertion: 'Results refresh to one matching item' },
25
25
  input: { ...evidence, modality: 'keyboard', focus: 'Tab visibly focuses search, then submit' },
26
- ...Object.fromEntries([390, 768, 1440].map((width) => [`width-${width}`, { ...evidence, width }])),
27
- 'layout-landscape': { ...evidence, width: 844, height: 390 },
28
- 'layout-short-height': { ...evidence, width: 1280, height: 480, artifact: 'before.txt' },
29
- 'reflow-320': { ...evidence, width: 320 }, error: evidence, empty: evidence, loading: evidence,
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
30
  },
31
31
  rounds: [],
32
32
  };
33
- const hasArtifact = (value) => ['evidence.txt', 'before.txt'].includes(value);
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);
34
38
  assert.equal(evaluateEvidence(manifest, hasArtifact).status, 'PASS');
35
- const missing = { ...manifest, checks: { ...manifest.checks, outcome: evidence, input: { ...manifest.checks.input, label: 'static' }, 'reflow-320': { ...evidence, width: 390 }, loading: { result: 'not-checked', reason: 'Sandbox offline' } } };
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' } } };
36
40
  const unchecked = evaluateEvidence(missing, hasArtifact);
37
41
  assert.equal(unchecked.status, 'NOT CHECKED');
38
42
  assert.deepEqual(Object.keys(unchecked.notChecked), ['outcome', 'input', 'loading', 'reflow-320']);
@@ -69,8 +73,9 @@ try {
69
73
  fs.writeFileSync(file, JSON.stringify(input));
70
74
  return spawnSync(process.execPath, [cli, file], { encoding: 'utf8' });
71
75
  };
72
- fs.writeFileSync(path.join(dir, 'evidence.txt'), 'sandbox trace');
73
- fs.writeFileSync(path.join(dir, 'before.txt'), 'prior sandbox trace');
76
+ for (const name of validArtifacts) {
77
+ fs.writeFileSync(path.join(dir, name), `sandbox trace for ${name}`);
78
+ }
74
79
  const good = run(manifest);
75
80
  assert.equal(good.status, 0, good.stderr);
76
81
  assert.equal(JSON.parse(good.stdout).status, 'PASS');
@@ -141,8 +146,126 @@ for (const [height, status] of [[600, 'NOT CHECKED'], [599, 'PASS']]) {
141
146
  }
142
147
  const reusesDesktopArtifact = evaluateEvidence({
143
148
  ...manifest,
144
- checks: { ...manifest.checks, 'layout-short-height': { ...manifest.checks['layout-short-height'], artifact: './evidence.txt' } },
149
+ checks: { ...manifest.checks, 'layout-short-height': { ...manifest.checks['layout-short-height'], artifact: './width-1440.txt' } },
145
150
  }, (artifact) => hasArtifact(artifact.replace(/^\.\//, '')));
146
151
  assert.equal(reusesDesktopArtifact.status, 'NOT CHECKED');
147
152
  assert.match(reusesDesktopArtifact.notChecked['layout-short-height'], /separate artifact/);
148
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
+
@@ -5,15 +5,15 @@ import os from 'node:os';
5
5
  import path from 'node:path';
6
6
  import { fileURLToPath } from 'node:url';
7
7
 
8
- if (process.argv.includes('--help')) {
8
+ if (process.argv.includes('--help') || process.argv.includes('-h')) {
9
9
  console.log('Usage: node scripts/test-installers.mjs [--shell|--powershell]');
10
10
  process.exit(0);
11
11
  }
12
12
 
13
13
  const root = fileURLToPath(new URL('..', import.meta.url));
14
14
  const destination = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-installers-'));
15
- const run = (command, args, cwd = destination) => {
16
- const result = spawnSync(command, args, { cwd, encoding: 'utf8', timeout: 30000 });
15
+ const run = (command, args, cwd = destination, env = process.env) => {
16
+ const result = spawnSync(command, args, { cwd, encoding: 'utf8', timeout: 30000, env });
17
17
  assert.equal(result.status, 0, result.error?.message ?? result.stderr);
18
18
  return result.stdout;
19
19
  };
@@ -35,20 +35,169 @@ const assertHarnessPaths = (output) => {
35
35
  assert.deepEqual(fs.readdirSync(destination), []);
36
36
  };
37
37
 
38
+ const expandedGlobExts = [
39
+ 'mjml', 'typ', 'tex', 'qmd', 'uxml', 'uss', 'gd', 'tscn', 'qml', 'xaml', 'axaml', 'fxml',
40
+ 'blp', 'slint', 'ets', 'zig', 'less', 'pcss', 'twig', 'cpp', 'h', 'glsl', 'wgsl', 'mdx',
41
+ 'razor', 'heex', 'erb', 'templ', 'tcss', 'qss', 'r', 'jl',
42
+ ];
43
+
44
+ function assertProjectAdapterParity(projectDir) {
45
+ const cursorRule = fs.readFileSync(path.join(projectDir, '.cursor/rules/pixelcraft.mdc'), 'utf8');
46
+ assert.ok(cursorRule.includes('.cursor/skills'), 'cursor rule should reference project-relative .cursor/skills');
47
+ assert.ok(!cursorRule.includes(projectDir), 'cursor rule must not leak absolute workspace path');
48
+
49
+ const copilotInstructions = fs.readFileSync(path.join(projectDir, '.github/copilot-instructions.md'), 'utf8');
50
+ assert.ok(copilotInstructions.includes('<!-- pixelcraft:start -->'));
51
+ assert.ok(copilotInstructions.includes('<!-- pixelcraft:end -->'));
52
+ assert.ok(copilotInstructions.includes('.github/skills'));
53
+ assert.ok(!copilotInstructions.includes(projectDir), 'copilot instructions must not leak absolute workspace path');
54
+ assert.ok(copilotInstructions.includes('Existing user note'), 'managed upsert must preserve existing user instructions');
55
+
56
+ const copilotPath = fs.readFileSync(path.join(projectDir, '.github/instructions/pixelcraft.instructions.md'), 'utf8');
57
+ for (const ext of expandedGlobExts) {
58
+ assert.ok(copilotPath.includes(ext), `missing ${ext} in Copilot applyTo glob`);
59
+ }
60
+
61
+ const windsurfRule = fs.readFileSync(path.join(projectDir, '.windsurf/rules/pixelcraft.md'), 'utf8');
62
+ assert.ok(windsurfRule.includes('.windsurf/skills'));
63
+ assert.ok(!windsurfRule.includes(projectDir));
64
+
65
+ const kiroSteering = fs.readFileSync(path.join(projectDir, '.kiro/steering/pixelcraft.md'), 'utf8');
66
+ assert.ok(kiroSteering.includes('.kiro/skills'));
67
+ assert.ok(!kiroSteering.includes(projectDir));
68
+
69
+ const claudeCommands = fs.readdirSync(path.join(projectDir, '.claude/commands')).sort();
70
+ assert.deepEqual(claudeCommands, [
71
+ 'pixelcraft-plan.md',
72
+ 'pixelcraft-review.md',
73
+ 'pixelcraft-visual-qa.md',
74
+ 'pixelcraft.md',
75
+ ]);
76
+ }
77
+
38
78
  try {
39
- assertGuidance(process.execPath, [path.join(root, 'bin/pixelcraft.mjs'), 'add', 'pixelcraft-plan', '--agent', 'agents', '--dry-run'], '--docs-mcp');
79
+ const cli = path.join(root, 'bin/pixelcraft.mjs');
80
+ const cliHelp = run(process.execPath, [cli, '--help']);
81
+ assert.match(cliHelp, /antigravity=\.agents\/skills/);
82
+ assert.match(cliHelp, /windsurf=\.windsurf\/skills/);
83
+ assert.match(cliHelp, /\bdoctor\b/);
84
+ assert.match(cliHelp, /\bremove\b/);
85
+ assert.match(cliHelp, /\binit-router\b/);
86
+ assert.match(cliHelp, /\bcheck\b/);
87
+ assertGuidance(process.execPath, [cli, 'add', 'pixelcraft-plan', '--agent', 'agents', '--dry-run'], '--docs-mcp');
40
88
  console.log('ok - Node installer only prints MCP guidance on opt-in and dry-run leaves the workspace unchanged');
41
- assertHarnessPaths(run(process.execPath, [path.join(root, 'bin/pixelcraft.mjs'), 'add', 'pixelcraft-plan', '--agent', harnesses, '--dry-run']));
89
+ assertHarnessPaths(run(process.execPath, [cli, 'add', 'pixelcraft-plan', '--agent', harnesses, '--dry-run']));
42
90
  console.log('ok - Node installer maps native harnesses and deduplicates shared project skills');
91
+
92
+ const nodeProject = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-node-adapters-'));
93
+ try {
94
+ fs.mkdirSync(path.join(nodeProject, '.github'), { recursive: true });
95
+ fs.writeFileSync(path.join(nodeProject, '.github/copilot-instructions.md'), '# Team notes\n\nExisting user note.\n');
96
+ run(process.execPath, [cli, 'add', 'pixelcraft-plan', '--agent', 'claude,cursor,copilot,windsurf,kiro'], nodeProject);
97
+ assertProjectAdapterParity(nodeProject);
98
+ console.log('ok - Node installer writes project-relative adapter paths, 4 Claude commands, expanded Copilot glob, and managed Copilot block');
99
+
100
+ // doctor reports healthy installation, then catches missing core skill after remove
101
+ const doctorOk = run(process.execPath, [cli, 'doctor', '--agent', 'claude'], nodeProject);
102
+ assert.match(doctorOk, /OK\s+\.claude\/skills: 2 skill\(s\) installed and healthy/);
103
+
104
+ const removeDry = run(process.execPath, [cli, 'remove', 'pixelcraft-plan', '--agent', 'claude', '--dry-run'], nodeProject);
105
+ assert.match(removeDry, /dry-run: remove pixelcraft-plan/);
106
+ assert.ok(fs.existsSync(path.join(nodeProject, '.claude/skills/pixelcraft-plan')));
107
+
108
+ // Refuse removing non-Pixelcraft folders
109
+ const nonPc = spawnSync(process.execPath, [cli, 'remove', 'other-skill', '--agent', 'claude'], { cwd: nodeProject, encoding: 'utf8' });
110
+ assert.notEqual(nonPc.status, 0);
111
+ assert.match(nonPc.stderr, /non-Pixelcraft/);
112
+
113
+ run(process.execPath, [cli, 'remove', 'pixelcraft-plan', '--agent', 'claude'], nodeProject);
114
+ assert.equal(fs.existsSync(path.join(nodeProject, '.claude/skills/pixelcraft-plan')), false);
115
+
116
+ const doctorMissingCore = spawnSync(process.execPath, [cli, 'doctor', '--agent', 'claude'], { cwd: nodeProject, encoding: 'utf8' });
117
+ assert.equal(doctorMissingCore.status, 1, 'doctor must flag missing core skill pixelcraft-plan');
118
+ assert.match(doctorMissingCore.stdout, /missing required core skill 'pixelcraft-plan'/);
119
+
120
+ // init-router detects multi-language manifests and upserts managed block idempotently
121
+ fs.writeFileSync(path.join(nodeProject, 'Cargo.toml'), '[dependencies]\nratatui = "0.29"\n');
122
+ fs.writeFileSync(path.join(nodeProject, 'go.mod'), 'module example\nrequire github.com/charmbracelet/bubbletea v1.0.0\n');
123
+ fs.writeFileSync(path.join(nodeProject, 'AGENTS.md'), '# Repo rules\n\nKeep commits focused.\n');
124
+ const routerStdout = run(process.execPath, [cli, 'init-router', '--dir', nodeProject], nodeProject);
125
+ assert.match(routerStdout, /pixelcraft-tui/);
126
+ assert.match(routerStdout, /Cargo\.toml/);
127
+ run(process.execPath, [cli, 'init-router', '--dir', nodeProject, '--write', 'AGENTS.md'], nodeProject);
128
+ run(process.execPath, [cli, 'init-router', '--dir', nodeProject, '--write', 'AGENTS.md'], nodeProject);
129
+ const agentsMd = fs.readFileSync(path.join(nodeProject, 'AGENTS.md'), 'utf8');
130
+ assert.ok(agentsMd.includes('Keep commits focused.'));
131
+ assert.equal(agentsMd.split('<!-- pixelcraft:start -->').length, 2, 'init-router --write must be idempotent');
132
+
133
+ // check dispatches slop-scan, check-contrast (DTCG JSON), check-pdf (.pdf), and notes check-email for .mjml
134
+ const cleanHtml = path.join(root, 'skills/pixelcraft-review/scripts/fixtures/clean.html');
135
+ const checkHtml = run(process.execPath, [cli, 'check', cleanHtml, '--json', '--fail-on', 'any'], nodeProject);
136
+ assert.equal(JSON.parse(checkHtml).score, 0);
137
+
138
+ const tokensJson = path.join(root, 'skills/pixelcraft-tokens/assets/tokens.example.json');
139
+ const checkTokens = run(process.execPath, [cli, 'check', tokensJson, '--json'], nodeProject);
140
+ assert.equal(JSON.parse(checkTokens).pass, true);
141
+
142
+ const sampleMjml = path.join(nodeProject, 'receipt.mjml');
143
+ fs.writeFileSync(sampleMjml, '<mjml><mj-body><mj-section><mj-column><mj-text>Receipt #10</mj-text></mj-column></mj-section></mj-body></mjml>\n');
144
+ const checkMjml = spawnSync(process.execPath, [cli, 'check', sampleMjml, '--json'], { cwd: nodeProject, encoding: 'utf8' });
145
+ assert.equal(checkMjml.status, 0, checkMjml.stderr);
146
+ assert.equal(JSON.parse(checkMjml.stdout).score, 0);
147
+ assert.match(checkMjml.stderr, /check-email\.mjs/);
148
+
149
+ const samplePdf = path.join(nodeProject, 'doc.pdf');
150
+ fs.writeFileSync(samplePdf, Buffer.from('%PDF-1.7\n1 0 obj << /Type /Page /StructTreeRoot 2 0 R /MarkInfo << /Marked true >> /Lang (en) /Title (Test) /FontFile2 3 0 R >> endobj\n%%EOF\n', 'latin1'));
151
+ const checkPdf = run(process.execPath, [cli, 'check', samplePdf, '--json'], nodeProject);
152
+ assert.equal(JSON.parse(checkPdf).pass, true);
153
+ console.log('ok - CLI doctor, remove, init-router, and check subcommands work cleanly');
154
+ } finally {
155
+ fs.rmSync(nodeProject, { recursive: true, force: true });
156
+ }
157
+
158
+ // Verify install.ps1 static parity (4 Claude commands, managed global Windsurf rules, expanded Copilot glob, relative paths)
159
+ const ps1 = fs.readFileSync(path.join(root, 'install.ps1'), 'utf8');
160
+ assert.ok(ps1.includes('memories/global_rules.md'), 'install.ps1 must support global Windsurf memories/global_rules.md');
161
+ assert.ok(ps1.includes('<!-- pixelcraft:start -->') && ps1.includes('<!-- pixelcraft:end -->'), 'install.ps1 must support managed blocks');
162
+ assert.ok(ps1.includes('$displayRoot'), 'install.ps1 must use display skill root');
163
+ for (const ext of expandedGlobExts) assert.ok(ps1.includes(ext), `install.ps1 missing ${ext} in Copilot applyTo glob`);
164
+ const claudeBlock = /if \(\$AgentName -eq 'claude'\) \{([\s\S]*?)\} elseif/.exec(ps1)?.[1] ?? '';
165
+ assert.ok(!claudeBlock.includes('pixelcraft-direction'), 'install.ps1 Claude commands must stay aligned to 4 commands');
166
+ console.log('ok - PowerShell installer parity checks pass');
167
+
43
168
  if (process.argv.includes('--shell')) {
44
169
  const archive = `${destination}.tar.gz`;
170
+ const shellProject = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-shell-project-'));
171
+ const shellHome = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-shell-home-'));
45
172
  try {
46
173
  run('git', ['archive', '--format=tar.gz', `--output=${archive}`, '--prefix=Pixelcraft-test/', 'HEAD', 'skills'], root);
47
174
  assertGuidance('bash', [path.join(root, 'install.sh'), '--archive', archive, '--skills', 'pixelcraft-plan', '--dry-run'], '--docs-mcp');
48
175
  assertHarnessPaths(run('bash', [path.join(root, 'install.sh'), '--archive', archive, '--skills', 'pixelcraft-plan', '--agent', harnesses, '--dry-run']));
49
- console.log('ok - Bash installer accepts a local archive and opt-in guidance without writing');
176
+
177
+ fs.mkdirSync(path.join(shellProject, '.github'), { recursive: true });
178
+ fs.writeFileSync(path.join(shellProject, '.github/copilot-instructions.md'), '# Team notes\n\nExisting user note.\n');
179
+ run('bash', [path.join(root, 'install.sh'), '--archive', archive, '--skills', 'pixelcraft-plan', '--agent', 'claude,cursor,copilot,windsurf,kiro'], shellProject);
180
+ assertProjectAdapterParity(shellProject);
181
+ // Re-run to verify managed-block idempotency
182
+ run('bash', [path.join(root, 'install.sh'), '--archive', archive, '--skills', 'pixelcraft-plan', '--agent', 'copilot'], shellProject);
183
+ const copilotAfter = fs.readFileSync(path.join(shellProject, '.github/copilot-instructions.md'), 'utf8');
184
+ assert.equal(copilotAfter.split('<!-- pixelcraft:start -->').length, 2, 'managed upsert must not duplicate blocks');
185
+
186
+ // Test Windsurf --global managed memories/global_rules.md upsert
187
+ const globalRules = path.join(shellHome, '.codeium/windsurf/memories/global_rules.md');
188
+ fs.mkdirSync(path.dirname(globalRules), { recursive: true });
189
+ fs.writeFileSync(globalRules, '# Personal global rules\n\nKeep answers terse.\n');
190
+ run('bash', [path.join(root, 'install.sh'), '--archive', archive, '--skills', 'pixelcraft-plan', '--agent', 'windsurf', '--global'], shellProject, { ...process.env, HOME: shellHome });
191
+ const rulesContent = fs.readFileSync(globalRules, 'utf8');
192
+ assert.ok(rulesContent.includes('Keep answers terse.'), 'global_rules.md must preserve existing user rules');
193
+ assert.ok(rulesContent.includes('<!-- pixelcraft:start -->') && rulesContent.includes('<!-- pixelcraft:end -->'));
194
+ assert.ok(rulesContent.includes('~/.codeium/windsurf/skills'));
195
+ assert.equal(fs.existsSync(path.join(shellHome, '.codeium/windsurf/rules/pixelcraft.md')), false, 'global windsurf should write memories/global_rules.md, not rules/pixelcraft.md');
196
+ console.log('ok - Bash installer accepts a local archive, writes relative paths, and upserts managed Copilot and global Windsurf rules');
50
197
  } finally {
51
198
  fs.rmSync(archive, { force: true });
199
+ fs.rmSync(shellProject, { recursive: true, force: true });
200
+ fs.rmSync(shellHome, { recursive: true, force: true });
52
201
  }
53
202
  }
54
203
  if (process.argv.includes('--powershell')) {