@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.
- package/.agents/plugins/marketplace.json +20 -0
- package/.antigravity-plugin/plugin.json +32 -0
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +22 -0
- package/.codex-plugin/plugin.json +45 -0
- package/.cursor-plugin/marketplace.json +17 -0
- package/.cursor-plugin/plugin.json +27 -0
- package/.devin-plugin/plugin.json +21 -0
- package/.github/plugin/marketplace.json +34 -0
- package/CHANGELOG.md +159 -0
- package/GEMINI.md +1 -0
- package/LICENSE +21 -0
- package/README.md +264 -2
- package/SECURITY.md +28 -0
- package/assets/README.md +28 -0
- package/assets/pixelcraft-logo-128.png +0 -0
- package/assets/pixelcraft-logo-256.png +0 -0
- package/assets/pixelcraft-logo-512.png +0 -0
- package/bin/pixelcraft.mjs +852 -0
- package/docs/ARCHITECTURE.md +105 -0
- package/docs/DESIGN-RATIONALE.md +191 -0
- package/docs/INSTALL.md +221 -0
- package/evals/README.md +37 -0
- package/evals/fixtures/3d-web-engineering.json +69 -0
- package/evals/fixtures/README.md +36 -0
- package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
- package/evals/fixtures/ai-ui-libraries.json +53 -0
- package/evals/fixtures/audio-visual-accessibility.json +69 -0
- package/evals/fixtures/auth-and-checkout-ui.json +53 -0
- package/evals/fixtures/brandkit-identity-governance.json +48 -0
- package/evals/fixtures/build-and-architecture.json +53 -0
- package/evals/fixtures/canvas-and-node-editors.json +53 -0
- package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
- package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
- package/evals/fixtures/component-systems.json +53 -0
- package/evals/fixtures/component-testing.json +53 -0
- package/evals/fixtures/constrained-voice-and-tv.json +43 -0
- package/evals/fixtures/creative-code-rendering.json +69 -0
- package/evals/fixtures/creative-reference-evidence.json +67 -0
- package/evals/fixtures/data-app-python-marimo.json +49 -0
- package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
- package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
- package/evals/fixtures/desktop-native-workspace.json +48 -0
- package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
- package/evals/fixtures/direction-prototype-complexity.json +29 -0
- package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
- package/evals/fixtures/document-rust-typst-invoice.json +49 -0
- package/evals/fixtures/document-typst-and-print-css.json +43 -0
- package/evals/fixtures/email-mjml-dark-mode.json +49 -0
- package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
- package/evals/fixtures/enterprise-data-ui.json +53 -0
- package/evals/fixtures/extended-tui-toolkits.json +53 -0
- package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
- package/evals/fixtures/file-upload-media-ui.json +53 -0
- package/evals/fixtures/finish-gate-anti-slop.json +30 -0
- package/evals/fixtures/forms-accessibility-negative.json +29 -0
- package/evals/fixtures/forms-validation.json +53 -0
- package/evals/fixtures/game-go-ebitengine.json +49 -0
- package/evals/fixtures/game-godot-gdscript.json +49 -0
- package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
- package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
- package/evals/fixtures/i18n-engineering.json +53 -0
- package/evals/fixtures/local-first-sync.json +53 -0
- package/evals/fixtures/lynxjs.json +53 -0
- package/evals/fixtures/maizzle-email.json +53 -0
- package/evals/fixtures/maps-geospatial.json +53 -0
- package/evals/fixtures/media-og-and-video-export.json +43 -0
- package/evals/fixtures/media-players.json +53 -0
- package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
- package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
- package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
- package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
- package/evals/fixtures/mobile-jetpack-compose.json +49 -0
- package/evals/fixtures/mobile-swiftui-ios.json +49 -0
- package/evals/fixtures/motion-engineering.json +69 -0
- package/evals/fixtures/pdfjs-and-pptx.json +53 -0
- package/evals/fixtures/plan-brownfield-evidence.json +28 -0
- package/evals/fixtures/plan-discovery-interview.json +31 -0
- package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
- package/evals/fixtures/reactive-data-apps.json +53 -0
- package/evals/fixtures/review-evidence-audit.json +43 -0
- package/evals/fixtures/rich-text-and-code-editors.json +53 -0
- package/evals/fixtures/scrollytelling-resilience.json +70 -0
- package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
- package/evals/fixtures/state-architecture.json +53 -0
- package/evals/fixtures/styling-ecosystem.json +53 -0
- package/evals/fixtures/token-tooling.json +53 -0
- package/evals/fixtures/tui-go-bubbletea.json +49 -0
- package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
- package/evals/fixtures/tui-rust-ratatui.json +49 -0
- package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
- package/evals/fixtures/visual-qa-task-evidence.json +29 -0
- package/evals/fixtures/web-3d-engines.json +53 -0
- package/evals/fixtures/web-php-laravel-filament.json +49 -0
- package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
- package/evals/fixtures/workflow-checkpoints.json +30 -0
- package/evals/pixelcraft-accessibility.md +74 -0
- package/evals/pixelcraft-brandkit.md +58 -0
- package/evals/pixelcraft-chat-ui.md +55 -0
- package/evals/pixelcraft-constrained.md +55 -0
- package/evals/pixelcraft-craft.md +76 -0
- package/evals/pixelcraft-data-apps.md +55 -0
- package/evals/pixelcraft-dataviz.md +59 -0
- package/evals/pixelcraft-desktop.md +55 -0
- package/evals/pixelcraft-direction.md +77 -0
- package/evals/pixelcraft-document.md +55 -0
- package/evals/pixelcraft-email.md +55 -0
- package/evals/pixelcraft-extensions.md +55 -0
- package/evals/pixelcraft-game-ui.md +59 -0
- package/evals/pixelcraft-handoff.md +57 -0
- package/evals/pixelcraft-media.md +55 -0
- package/evals/pixelcraft-mobile.md +59 -0
- package/evals/pixelcraft-patterns.md +73 -0
- package/evals/pixelcraft-plan.md +127 -0
- package/evals/pixelcraft-review.md +63 -0
- package/evals/pixelcraft-spatial.md +55 -0
- package/evals/pixelcraft-tokens.md +57 -0
- package/evals/pixelcraft-tui.md +55 -0
- package/evals/pixelcraft-ux.md +59 -0
- package/evals/pixelcraft-visual-qa.md +86 -0
- package/evals/pixelcraft-web.md +89 -0
- package/evals/pixelcraft.md +70 -0
- package/gemini-extension.json +6 -0
- package/install.ps1 +341 -0
- package/install.sh +512 -0
- package/package.json +91 -4
- package/plugin.json +29 -0
- package/scripts/build-adapters.mjs +288 -0
- package/scripts/build-release-archives.mjs +61 -0
- package/scripts/build-skill-zips.mjs +94 -0
- package/scripts/run-evals.mjs +397 -0
- package/scripts/sync-docs.mjs +381 -0
- package/scripts/test-build-adapters.mjs +61 -0
- package/scripts/test-cross-platform-qa.mjs +359 -0
- package/scripts/test-distribution.mjs +203 -0
- package/scripts/test-export-tokens.mjs +361 -0
- package/scripts/test-finish-gate.mjs +271 -0
- package/scripts/test-installers.mjs +216 -0
- package/scripts/test-release-archives.mjs +42 -0
- package/scripts/test-shoot.mjs +87 -0
- package/scripts/test-slop-scan.mjs +416 -0
- package/scripts/test-style-inventory.mjs +234 -0
- package/scripts/test-sync-docs.mjs +140 -0
- package/scripts/test-validate-skills.mjs +195 -0
- package/scripts/validate-skills.mjs +658 -0
- package/skills/pixelcraft/SKILL.md +155 -0
- package/skills/pixelcraft/references/design-brief.md +75 -0
- package/skills/pixelcraft/references/floor.md +90 -0
- package/skills/pixelcraft/references/report-template.md +49 -0
- package/skills/pixelcraft/references/stack-detection.md +226 -0
- package/skills/pixelcraft/references/surface-acceptance.md +52 -0
- package/skills/pixelcraft/references/workflow-checkpoints.md +71 -0
- package/skills/pixelcraft-accessibility/SKILL.md +54 -0
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +64 -0
- package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +86 -0
- package/skills/pixelcraft-accessibility/references/verification.md +64 -0
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +99 -0
- package/skills/pixelcraft-brandkit/SKILL.md +127 -0
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +165 -0
- package/skills/pixelcraft-brandkit/references/brand-governance.md +82 -0
- package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
- package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
- package/skills/pixelcraft-brandkit/references/logo-methods.md +97 -0
- package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
- package/skills/pixelcraft-brandkit/references/prompt-template.md +87 -0
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +93 -0
- package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
- package/skills/pixelcraft-chat-ui/SKILL.md +57 -0
- package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
- package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
- package/skills/pixelcraft-chat-ui/references/conversation-design.md +84 -0
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +77 -0
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +80 -0
- package/skills/pixelcraft-constrained/SKILL.md +52 -0
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +90 -0
- package/skills/pixelcraft-constrained/references/tv-wearables.md +134 -0
- package/skills/pixelcraft-constrained/references/voice-ui.md +104 -0
- package/skills/pixelcraft-craft/SKILL.md +58 -0
- package/skills/pixelcraft-craft/references/color.md +125 -0
- package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
- package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
- package/skills/pixelcraft-craft/references/layout.md +73 -0
- package/skills/pixelcraft-craft/references/motion.md +163 -0
- package/skills/pixelcraft-craft/references/typography.md +110 -0
- package/skills/pixelcraft-data-apps/SKILL.md +86 -0
- package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
- package/skills/pixelcraft-data-apps/references/dash.md +109 -0
- package/skills/pixelcraft-data-apps/references/evidence.md +90 -0
- package/skills/pixelcraft-data-apps/references/gradio.md +103 -0
- package/skills/pixelcraft-data-apps/references/julia-genie.md +89 -0
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +91 -0
- package/skills/pixelcraft-data-apps/references/nicegui.md +102 -0
- package/skills/pixelcraft-data-apps/references/observable-framework.md +105 -0
- package/skills/pixelcraft-data-apps/references/panel.md +99 -0
- package/skills/pixelcraft-data-apps/references/r-shiny.md +124 -0
- package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +116 -0
- package/skills/pixelcraft-data-apps/references/shiny.md +110 -0
- package/skills/pixelcraft-data-apps/references/streamlit.md +113 -0
- package/skills/pixelcraft-dataviz/SKILL.md +60 -0
- package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
- package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
- package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +107 -0
- package/skills/pixelcraft-dataviz/references/libraries.md +176 -0
- package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +92 -0
- package/skills/pixelcraft-desktop/SKILL.md +93 -0
- package/skills/pixelcraft-desktop/references/appkit.md +92 -0
- package/skills/pixelcraft-desktop/references/avalonia.md +95 -0
- package/skills/pixelcraft-desktop/references/cpp-gui.md +129 -0
- package/skills/pixelcraft-desktop/references/electron.md +96 -0
- package/skills/pixelcraft-desktop/references/go-gui.md +83 -0
- package/skills/pixelcraft-desktop/references/gtk.md +97 -0
- package/skills/pixelcraft-desktop/references/javafx-swing.md +81 -0
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +88 -0
- package/skills/pixelcraft-desktop/references/rust-gui.md +83 -0
- package/skills/pixelcraft-desktop/references/tauri.md +110 -0
- package/skills/pixelcraft-desktop/references/uno-platform.md +71 -0
- package/skills/pixelcraft-desktop/references/winui-wpf.md +98 -0
- package/skills/pixelcraft-desktop/references/working-context.md +84 -0
- package/skills/pixelcraft-direction/SKILL.md +120 -0
- package/skills/pixelcraft-direction/references/composition-library.md +84 -0
- package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
- package/skills/pixelcraft-direction/references/direction-card.md +64 -0
- package/skills/pixelcraft-direction/references/direction-scoring.md +76 -0
- package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
- package/skills/pixelcraft-direction/references/movements.md +71 -0
- package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
- package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +83 -0
- package/skills/pixelcraft-direction/references/wildcards.md +47 -0
- package/skills/pixelcraft-document/SKILL.md +58 -0
- package/skills/pixelcraft-document/references/archetypes.md +106 -0
- package/skills/pixelcraft-document/references/pdf-tools.md +314 -0
- package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
- package/skills/pixelcraft-document/references/print-css.md +187 -0
- package/skills/pixelcraft-document/references/slides.md +198 -0
- package/skills/pixelcraft-email/SKILL.md +80 -0
- package/skills/pixelcraft-email/references/client-quirks.md +113 -0
- package/skills/pixelcraft-email/references/html-tables.md +114 -0
- package/skills/pixelcraft-email/references/maizzle.md +54 -0
- package/skills/pixelcraft-email/references/mjml.md +54 -0
- package/skills/pixelcraft-email/references/react-email.md +95 -0
- package/skills/pixelcraft-extensions/SKILL.md +56 -0
- package/skills/pixelcraft-extensions/references/browser-extensions.md +105 -0
- package/skills/pixelcraft-extensions/references/figma-office.md +106 -0
- package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
- package/skills/pixelcraft-extensions/references/raycast.md +98 -0
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +100 -0
- package/skills/pixelcraft-game-ui/SKILL.md +80 -0
- package/skills/pixelcraft-game-ui/references/bevy.md +90 -0
- package/skills/pixelcraft-game-ui/references/godot.md +130 -0
- package/skills/pixelcraft-game-ui/references/hud-principles.md +67 -0
- package/skills/pixelcraft-game-ui/references/love2d.md +77 -0
- package/skills/pixelcraft-game-ui/references/monogame.md +68 -0
- package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +107 -0
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +80 -0
- package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
- package/skills/pixelcraft-handoff/SKILL.md +50 -0
- package/skills/pixelcraft-handoff/references/design-translation.md +134 -0
- package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
- package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
- package/skills/pixelcraft-media/SKILL.md +49 -0
- package/skills/pixelcraft-media/references/banners-video.md +130 -0
- package/skills/pixelcraft-media/references/og-generation.md +154 -0
- package/skills/pixelcraft-media/references/social-cards.md +71 -0
- package/skills/pixelcraft-mobile/SKILL.md +86 -0
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +91 -0
- package/skills/pixelcraft-mobile/references/flet.md +80 -0
- package/skills/pixelcraft-mobile/references/flutter.md +113 -0
- package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +87 -0
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +129 -0
- package/skills/pixelcraft-mobile/references/kivy.md +82 -0
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +86 -0
- package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
- package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
- package/skills/pixelcraft-mobile/references/react-native-expo.md +106 -0
- package/skills/pixelcraft-mobile/references/swiftui.md +200 -0
- package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +85 -0
- package/skills/pixelcraft-mobile/references/uikit.md +92 -0
- package/skills/pixelcraft-patterns/SKILL.md +75 -0
- package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
- package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
- package/skills/pixelcraft-patterns/references/auth-onboarding.md +44 -0
- package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
- package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
- package/skills/pixelcraft-patterns/references/commerce.md +47 -0
- package/skills/pixelcraft-patterns/references/communication.md +45 -0
- package/skills/pixelcraft-patterns/references/creative-tools.md +42 -0
- package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +35 -0
- package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
- package/skills/pixelcraft-patterns/references/marketing.md +44 -0
- package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
- package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
- package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
- package/skills/pixelcraft-patterns/references/pattern-selection.md +80 -0
- package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
- package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
- package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
- package/skills/pixelcraft-patterns/references/settings.md +51 -0
- package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
- package/skills/pixelcraft-plan/SKILL.md +103 -0
- package/skills/pixelcraft-plan/references/design-input.md +69 -0
- package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
- package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
- package/skills/pixelcraft-plan/references/plan-template.md +134 -0
- package/skills/pixelcraft-plan/references/repo-discovery.md +49 -0
- package/skills/pixelcraft-plan/references/stack-freshness.md +67 -0
- package/skills/pixelcraft-plan/references/stack-selection.md +98 -0
- package/skills/pixelcraft-review/SKILL.md +86 -0
- package/skills/pixelcraft-review/references/audit-report.md +69 -0
- package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
- package/skills/pixelcraft-review/references/heuristics.md +63 -0
- package/skills/pixelcraft-review/references/personas.md +53 -0
- package/skills/pixelcraft-review/references/polish.md +78 -0
- package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
- package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
- package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
- package/skills/pixelcraft-review/scripts/slop-scan.mjs +1233 -0
- package/skills/pixelcraft-spatial/SKILL.md +51 -0
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +39 -0
- package/skills/pixelcraft-spatial/references/platforms.md +147 -0
- package/skills/pixelcraft-tokens/SKILL.md +60 -0
- package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
- package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
- package/skills/pixelcraft-tokens/references/adoption.md +55 -0
- package/skills/pixelcraft-tokens/references/format.md +84 -0
- package/skills/pixelcraft-tokens/references/governance.md +80 -0
- package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
- package/skills/pixelcraft-tokens/references/theme-presets.md +122 -0
- package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +847 -0
- package/skills/pixelcraft-tui/SKILL.md +76 -0
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +79 -0
- package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
- package/skills/pixelcraft-tui/references/ink.md +109 -0
- package/skills/pixelcraft-tui/references/ratatui.md +102 -0
- package/skills/pixelcraft-tui/references/rich.md +82 -0
- package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
- package/skills/pixelcraft-tui/references/textual.md +108 -0
- package/skills/pixelcraft-ux/SKILL.md +56 -0
- package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
- package/skills/pixelcraft-ux/references/feedback-performance.md +50 -0
- package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
- package/skills/pixelcraft-ux/references/forms.md +151 -0
- package/skills/pixelcraft-ux/references/i18n.md +221 -0
- package/skills/pixelcraft-ux/references/laws.md +39 -0
- package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
- package/skills/pixelcraft-ux/references/state-matrix.md +53 -0
- package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
- package/skills/pixelcraft-ux/references/ux-writing.md +44 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +96 -0
- package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +59 -0
- package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +38 -0
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +50 -0
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +35 -0
- package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
- package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
- package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
- package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +78 -0
- package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
- package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
- package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
- package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
- package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
- package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
- package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +174 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
- package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +668 -0
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1226 -0
- package/skills/pixelcraft-web/SKILL.md +132 -0
- package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +69 -0
- package/skills/pixelcraft-web/references/angular.md +108 -0
- package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
- package/skills/pixelcraft-web/references/astro.md +113 -0
- package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
- package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
- package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
- package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
- package/skills/pixelcraft-web/references/clojurescript.md +88 -0
- package/skills/pixelcraft-web/references/component-systems.md +102 -0
- package/skills/pixelcraft-web/references/component-testing.md +170 -0
- package/skills/pixelcraft-web/references/creative-effects.md +59 -0
- package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
- package/skills/pixelcraft-web/references/elm.md +53 -0
- package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
- package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
- package/skills/pixelcraft-web/references/forms-validation.md +123 -0
- package/skills/pixelcraft-web/references/fsharp-fable.md +54 -0
- package/skills/pixelcraft-web/references/gsap.md +102 -0
- package/skills/pixelcraft-web/references/html-css.md +220 -0
- package/skills/pixelcraft-web/references/htmx-alpine.md +103 -0
- package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
- package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
- package/skills/pixelcraft-web/references/java-web.md +61 -0
- package/skills/pixelcraft-web/references/kotlin-web.md +57 -0
- package/skills/pixelcraft-web/references/leptos-yew.md +97 -0
- package/skills/pixelcraft-web/references/lit-web-components.md +63 -0
- package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
- package/skills/pixelcraft-web/references/media-players.md +104 -0
- package/skills/pixelcraft-web/references/motion-react.md +96 -0
- package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
- package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
- package/skills/pixelcraft-web/references/pwa.md +230 -0
- package/skills/pixelcraft-web/references/qwik.md +94 -0
- package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
- package/skills/pixelcraft-web/references/react-next.md +168 -0
- package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
- package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
- package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
- package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
- package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
- package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
- package/skills/pixelcraft-web/references/server-rendered.md +114 -0
- package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
- package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
- package/skills/pixelcraft-web/references/solid.md +111 -0
- package/skills/pixelcraft-web/references/state-architecture.md +107 -0
- package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
- package/skills/pixelcraft-web/references/svelte.md +111 -0
- package/skills/pixelcraft-web/references/tailwind.md +99 -0
- package/skills/pixelcraft-web/references/video-media.md +69 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +86 -0
- package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
|
|
8
|
+
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
9
|
+
console.log('Usage: node scripts/test-installers.mjs [--shell|--powershell]');
|
|
10
|
+
process.exit(0);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const root = fileURLToPath(new URL('..', import.meta.url));
|
|
14
|
+
const destination = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-installers-'));
|
|
15
|
+
const run = (command, args, cwd = destination, env = process.env) => {
|
|
16
|
+
const result = spawnSync(command, args, { cwd, encoding: 'utf8', timeout: 30000, env });
|
|
17
|
+
assert.equal(result.status, 0, result.error?.message ?? result.stderr);
|
|
18
|
+
return result.stdout;
|
|
19
|
+
};
|
|
20
|
+
const assertGuidance = (command, args, flag) => {
|
|
21
|
+
assert.doesNotMatch(run(command, args), /context7/i);
|
|
22
|
+
const output = run(command, [...args, flag]);
|
|
23
|
+
assert.match(output, /dry-run: .*pixelcraft-plan/);
|
|
24
|
+
assert.match(output, /https:\/\/github\.com\/upstash\/context7#readme/);
|
|
25
|
+
assert.deepEqual(fs.readdirSync(destination), []);
|
|
26
|
+
};
|
|
27
|
+
const harnesses = 'kiro,cline,roo,droid,antigravity,goose,amp,zed';
|
|
28
|
+
const assertHarnessPaths = (output) => {
|
|
29
|
+
const portableOutput = output.replaceAll('\\', '/');
|
|
30
|
+
for (const prefix of ['.kiro/skills', '.cline/skills', '.roo/skills', '.factory/skills', '.agents/skills']) {
|
|
31
|
+
assert.ok(portableOutput.includes(`/${prefix}/pixelcraft-plan`), prefix);
|
|
32
|
+
}
|
|
33
|
+
assert.ok(portableOutput.includes('/.kiro/steering/pixelcraft.md'));
|
|
34
|
+
assert.equal(portableOutput.split('/.agents/skills/pixelcraft-plan').length, 2);
|
|
35
|
+
assert.deepEqual(fs.readdirSync(destination), []);
|
|
36
|
+
};
|
|
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
|
+
|
|
78
|
+
try {
|
|
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');
|
|
88
|
+
console.log('ok - Node installer only prints MCP guidance on opt-in and dry-run leaves the workspace unchanged');
|
|
89
|
+
assertHarnessPaths(run(process.execPath, [cli, 'add', 'pixelcraft-plan', '--agent', harnesses, '--dry-run']));
|
|
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
|
+
|
|
168
|
+
if (process.argv.includes('--shell')) {
|
|
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-'));
|
|
172
|
+
try {
|
|
173
|
+
run('git', ['archive', '--format=tar.gz', `--output=${archive}`, '--prefix=Pixelcraft-test/', 'HEAD', 'skills'], root);
|
|
174
|
+
assertGuidance('bash', [path.join(root, 'install.sh'), '--archive', archive, '--skills', 'pixelcraft-plan', '--dry-run'], '--docs-mcp');
|
|
175
|
+
assertHarnessPaths(run('bash', [path.join(root, 'install.sh'), '--archive', archive, '--skills', 'pixelcraft-plan', '--agent', harnesses, '--dry-run']));
|
|
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');
|
|
197
|
+
} finally {
|
|
198
|
+
fs.rmSync(archive, { force: true });
|
|
199
|
+
fs.rmSync(shellProject, { recursive: true, force: true });
|
|
200
|
+
fs.rmSync(shellHome, { recursive: true, force: true });
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (process.argv.includes('--powershell')) {
|
|
204
|
+
const archive = `${destination}.zip`;
|
|
205
|
+
try {
|
|
206
|
+
run('git', ['archive', '--format=zip', `--output=${archive}`, '--prefix=Pixelcraft-test/', 'HEAD', 'skills'], root);
|
|
207
|
+
assertGuidance('pwsh', ['-NoProfile', '-File', path.join(root, 'install.ps1'), '-Archive', archive, '-Skill', 'pixelcraft-plan', '-DryRun'], '-DocsMcp');
|
|
208
|
+
assertHarnessPaths(run('pwsh', ['-NoProfile', '-File', path.join(root, 'install.ps1'), '-Archive', archive, '-Skill', 'pixelcraft-plan', '-Agent', harnesses, '-DryRun']));
|
|
209
|
+
console.log('ok - PowerShell installer accepts a local archive and opt-in guidance without writing');
|
|
210
|
+
} finally {
|
|
211
|
+
fs.rmSync(archive, { force: true });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
} finally {
|
|
215
|
+
fs.rmSync(destination, { recursive: true, force: true });
|
|
216
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { execFileSync } from 'node:child_process';
|
|
3
|
+
import { createHash } from 'node:crypto';
|
|
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')) {
|
|
10
|
+
console.log('Usage: node scripts/test-release-archives.mjs');
|
|
11
|
+
process.exit(0);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const script = fileURLToPath(new URL('./build-release-archives.mjs', import.meta.url));
|
|
15
|
+
const scratch = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-release-test-'));
|
|
16
|
+
const names = ['pixelcraft-skills.zip', 'pixelcraft-skills.tar.gz'];
|
|
17
|
+
|
|
18
|
+
function build(output, tz, umask) {
|
|
19
|
+
const previous = process.umask(umask);
|
|
20
|
+
try {
|
|
21
|
+
execFileSync(process.execPath, [script, output], { env: { ...process.env, TZ: tz } });
|
|
22
|
+
} finally {
|
|
23
|
+
process.umask(previous);
|
|
24
|
+
}
|
|
25
|
+
return names.map((name) => createHash('sha256').update(fs.readFileSync(path.join(output, name))).digest('hex'));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
const first = path.join(scratch, 'first');
|
|
30
|
+
const second = path.join(scratch, 'second');
|
|
31
|
+
const expected = build(first, 'Pacific/Honolulu', 0o022);
|
|
32
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 2100);
|
|
33
|
+
assert.deepEqual(build(second, 'Asia/Tokyo', 0o077), expected);
|
|
34
|
+
for (const [command, args] of [['unzip', ['-Z1', path.join(first, names[0])]], ['tar', ['-tzf', path.join(first, names[1])]]]) {
|
|
35
|
+
const entries = execFileSync(command, args, { encoding: 'utf8' }).split('\n');
|
|
36
|
+
assert.ok(entries.includes('skills/pixelcraft/SKILL.md'));
|
|
37
|
+
assert.ok(entries.includes('adapters/manifest.json'));
|
|
38
|
+
}
|
|
39
|
+
console.log('ok - both release archives have identical SHA-256 checksums across independent builds');
|
|
40
|
+
} finally {
|
|
41
|
+
fs.rmSync(scratch, { recursive: true, force: true });
|
|
42
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
|
|
8
|
+
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
9
|
+
console.log('Usage: node scripts/test-shoot.mjs');
|
|
10
|
+
process.exit(0);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-shoot-test-'));
|
|
14
|
+
try {
|
|
15
|
+
const local = (file) => fileURLToPath(new URL(`../skills/pixelcraft-visual-qa/scripts/${file}`, import.meta.url));
|
|
16
|
+
const rawRun = (...args) => spawnSync(process.execPath, [local('shoot.mjs'), ...args], { encoding: 'utf8', timeout: 30000 });
|
|
17
|
+
|
|
18
|
+
const helpRes = rawRun('--help');
|
|
19
|
+
assert.equal(helpRes.status, 0, helpRes.stderr);
|
|
20
|
+
assert.match(helpRes.stdout, /--executable-path/);
|
|
21
|
+
assert.match(helpRes.stdout, /--forced-colors/);
|
|
22
|
+
assert.match(helpRes.stdout, /--locale/);
|
|
23
|
+
|
|
24
|
+
for (const [args, pattern] of [
|
|
25
|
+
[['--out'], /--out requires a value/],
|
|
26
|
+
[['--timeout', '0'], /--timeout must be a positive number/],
|
|
27
|
+
[['--timeout=abc'], /--timeout must be a positive number/],
|
|
28
|
+
[['--forced-colors', 'inverted'], /--forced-colors must be 'none' or 'active'/],
|
|
29
|
+
[['--locale='], /--locale requires a value/],
|
|
30
|
+
[['--executable-path'], /--executable-path requires a value/],
|
|
31
|
+
]) {
|
|
32
|
+
const failed = rawRun('https://example.com', ...args);
|
|
33
|
+
assert.notEqual(failed.status, 0, `expected failure for ${args.join(' ')}`);
|
|
34
|
+
assert.match(failed.stderr, pattern);
|
|
35
|
+
}
|
|
36
|
+
console.log('ok 0 - shoot CLI validates flags, timeout, forced-colors, locale, and executable-path');
|
|
37
|
+
|
|
38
|
+
const run = (fixture, ...options) => spawnSync(process.execPath, [
|
|
39
|
+
local('shoot.mjs'), local(`fixtures/${fixture}`), '--out', dir, '--project',
|
|
40
|
+
process.env.PIXELCRAFT_TEST_PLAYWRIGHT_PROJECT ?? process.cwd(), '--breakpoints=390x844,768x1024',
|
|
41
|
+
'--light-only', '--no-reduced-motion', '--wait-ms=100', ...options,
|
|
42
|
+
], { encoding: 'utf8', timeout: 30000 });
|
|
43
|
+
const result = run('shoot-audit.html', '--keyboard');
|
|
44
|
+
if (result.status === 2 && /Playwright is not installed/.test(result.stderr) && !process.env.PIXELCRAFT_TEST_PLAYWRIGHT_PROJECT) {
|
|
45
|
+
console.log('SKIP - Playwright not installed; set PIXELCRAFT_TEST_PLAYWRIGHT_PROJECT to verify browser diagnostics');
|
|
46
|
+
} else {
|
|
47
|
+
assert.equal(result.status, 0, `${result.error ?? ''}\n${result.stdout}\n${result.stderr}`);
|
|
48
|
+
const [narrow, wide] = JSON.parse(fs.readFileSync(path.join(dir, 'report.json'), 'utf8')).captures;
|
|
49
|
+
const has = (capture, type, id) => capture.findings.some((item) => item.type === type && (!id || item.element?.endsWith(`#${id}`)));
|
|
50
|
+
for (const [type, bad, good] of [
|
|
51
|
+
['broken-image', 'broken', 'valid'],
|
|
52
|
+
['content-hidden-at-rest', 'hidden-essential', 'closed'],
|
|
53
|
+
['text-occlusion', 'occluded', 'not-occluded'],
|
|
54
|
+
['low-contrast-text', 'low-contrast', 'readable'],
|
|
55
|
+
['keyboard-focus-not-detected', 'focusless', 'focus-ring'],
|
|
56
|
+
]) {
|
|
57
|
+
assert.ok(has(wide, type, bad), `expected ${type} for ${bad}: ${JSON.stringify(wide.findings)}`);
|
|
58
|
+
assert.ok(!has(wide, type, good), `unexpected ${type} for ${good}`);
|
|
59
|
+
}
|
|
60
|
+
assert.ok(!has(wide, 'broken-image', 'hidden-image'));
|
|
61
|
+
assert.ok(!has(wide, 'content-hidden-at-rest', 'closed-dialog'));
|
|
62
|
+
assert.ok(has(narrow, 'horizontal-overflow'));
|
|
63
|
+
assert.ok(!has(wide, 'horizontal-overflow'));
|
|
64
|
+
assert.deepEqual(wide.keyboard.slice(0, 2), [
|
|
65
|
+
{ element: 'button#focusless', indicator: 'not-detected' },
|
|
66
|
+
{ element: 'button#focus-ring', indicator: 'style-change' },
|
|
67
|
+
]);
|
|
68
|
+
console.log('ok 1 - actual browser distinguishes broken images, hidden content, occlusion, overflow, contrast and focus controls');
|
|
69
|
+
const modal = run('shoot-modal.html', '--breakpoints=768x1024');
|
|
70
|
+
assert.equal(modal.status, 0, `${modal.error ?? ''}\n${modal.stdout}\n${modal.stderr}`);
|
|
71
|
+
const [dialog] = JSON.parse(fs.readFileSync(path.join(dir, 'report.json'), 'utf8')).captures;
|
|
72
|
+
assert.ok(has(dialog, 'text-occlusion', 'occluded-modal'), 'expected occlusion inside a visible modal');
|
|
73
|
+
assert.ok(!has(dialog, 'text-occlusion', 'readable-modal'));
|
|
74
|
+
assert.ok(!has(dialog, 'text-occlusion', 'behind-modal'));
|
|
75
|
+
console.log('ok 2 - visible modal detects internal occlusion without flagging its intentional background coverage');
|
|
76
|
+
const ariaModal = run('shoot-aria-modal.html');
|
|
77
|
+
assert.equal(ariaModal.status, 0, `${ariaModal.error ?? ''}\n${ariaModal.stdout}\n${ariaModal.stderr}`);
|
|
78
|
+
const [hiddenAriaDialog, ariaDialog] = JSON.parse(fs.readFileSync(path.join(dir, 'report.json'), 'utf8')).captures;
|
|
79
|
+
assert.ok(has(hiddenAriaDialog, 'text-occlusion', 'behind-aria-modal'), 'fixed overlay is a defect when the sibling modal is hidden');
|
|
80
|
+
assert.ok(has(ariaDialog, 'text-occlusion', 'occluded-aria-modal'));
|
|
81
|
+
assert.ok(!has(ariaDialog, 'text-occlusion', 'readable-aria-modal'));
|
|
82
|
+
assert.ok(!has(ariaDialog, 'text-occlusion', 'behind-aria-modal'), 'sibling backdrop intentionally covers background text');
|
|
83
|
+
console.log('ok 3 - open ARIA modal distinguishes sibling backdrop from internal occlusion');
|
|
84
|
+
}
|
|
85
|
+
} finally {
|
|
86
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
87
|
+
}
|