@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,140 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { execFileSync } from 'node:child_process';
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import os from 'node:os';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
|
|
9
|
+
if (process.argv.includes('--help')) {
|
|
10
|
+
console.log('Usage: node scripts/test-sync-docs.mjs');
|
|
11
|
+
process.exit(0);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
15
|
+
const script = path.join(root, 'scripts/sync-docs.mjs');
|
|
16
|
+
|
|
17
|
+
function run(args, allowFail = false) {
|
|
18
|
+
try {
|
|
19
|
+
const stdout = execFileSync(process.execPath, [script, ...args], {
|
|
20
|
+
cwd: root,
|
|
21
|
+
encoding: 'utf8',
|
|
22
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
23
|
+
});
|
|
24
|
+
return { code: 0, stdout, stderr: '' };
|
|
25
|
+
} catch (err) {
|
|
26
|
+
if (!allowFail) throw err;
|
|
27
|
+
return {
|
|
28
|
+
code: err.status ?? 1,
|
|
29
|
+
stdout: err.stdout?.toString('utf8') ?? '',
|
|
30
|
+
stderr: err.stderr?.toString('utf8') ?? '',
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// 1. --help works
|
|
36
|
+
const helpRes = run(['--help']);
|
|
37
|
+
assert.equal(helpRes.code, 0);
|
|
38
|
+
assert.match(helpRes.stdout, /--check/);
|
|
39
|
+
assert.match(helpRes.stdout, /--write/);
|
|
40
|
+
console.log('ok 1 - sync-docs.mjs supports --help');
|
|
41
|
+
|
|
42
|
+
// 2. Real repo passes --check cleanly
|
|
43
|
+
const checkRes = run(['--check', '--json']);
|
|
44
|
+
assert.equal(checkRes.code, 0);
|
|
45
|
+
const parsed = JSON.parse(checkRes.stdout);
|
|
46
|
+
assert.deepEqual(parsed.drifted, [], `Unexpected drift in repo: ${parsed.drifted.join(', ')}`);
|
|
47
|
+
assert.ok(parsed.metrics.skills >= 26);
|
|
48
|
+
assert.ok(parsed.metrics.references >= 247);
|
|
49
|
+
assert.ok(parsed.metrics.scripts >= 9);
|
|
50
|
+
assert.ok(parsed.metrics.tokenFormatCount >= 19);
|
|
51
|
+
assert.ok(parsed.metrics.scanRuleCount >= 23);
|
|
52
|
+
assert.ok(parsed.metrics.evalFixtures >= 66);
|
|
53
|
+
assert.ok(parsed.metrics.galleryExhibits >= 6);
|
|
54
|
+
console.log('ok 2 - real repository passes --check with live metrics');
|
|
55
|
+
|
|
56
|
+
// 3. Stale counts & version drift fail --check and heal cleanly under --write
|
|
57
|
+
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-sync-docs-'));
|
|
58
|
+
try {
|
|
59
|
+
for (const rel of [
|
|
60
|
+
'package.json',
|
|
61
|
+
'plugin.json',
|
|
62
|
+
'gemini-extension.json',
|
|
63
|
+
'.claude-plugin',
|
|
64
|
+
'.cursor-plugin',
|
|
65
|
+
'.antigravity-plugin',
|
|
66
|
+
'.codex-plugin',
|
|
67
|
+
'.github/plugin',
|
|
68
|
+
'.devin-plugin',
|
|
69
|
+
'README.md',
|
|
70
|
+
'docs',
|
|
71
|
+
'evals',
|
|
72
|
+
'skills',
|
|
73
|
+
'bin',
|
|
74
|
+
'website/package.json',
|
|
75
|
+
'website/package-lock.json',
|
|
76
|
+
'website/src/generated/repo-meta.json',
|
|
77
|
+
'website/README.md',
|
|
78
|
+
'website/public/gallery',
|
|
79
|
+
]) {
|
|
80
|
+
const src = path.join(root, rel);
|
|
81
|
+
const dst = path.join(tmp, rel);
|
|
82
|
+
fs.mkdirSync(path.dirname(dst), { recursive: true });
|
|
83
|
+
fs.cpSync(src, dst, { recursive: true });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Introduce deliberate drift across README.md, evals/README.md, website/package.json, website/src/generated/repo-meta.json, and .antigravity-plugin/plugin.json
|
|
87
|
+
const readmePath = path.join(tmp, 'README.md');
|
|
88
|
+
fs.writeFileSync(
|
|
89
|
+
readmePath,
|
|
90
|
+
fs.readFileSync(readmePath, 'utf8')
|
|
91
|
+
.replace(/references-\d+-0984e3\.svg" alt="\d+ References"/, 'references-199-0984e3.svg" alt="199 References"')
|
|
92
|
+
.replace(/\(\d+ JSON fixtures\)/, '(48 JSON fixtures)'),
|
|
93
|
+
'utf8',
|
|
94
|
+
);
|
|
95
|
+
const evalReadmePath = path.join(tmp, 'evals/README.md');
|
|
96
|
+
fs.writeFileSync(
|
|
97
|
+
evalReadmePath,
|
|
98
|
+
fs.readFileSync(evalReadmePath, 'utf8').replace(/\(\d+ fixtures covering/, '(48 fixtures covering'),
|
|
99
|
+
'utf8',
|
|
100
|
+
);
|
|
101
|
+
const webPkgPath = path.join(tmp, 'website/package.json');
|
|
102
|
+
const webPkg = JSON.parse(fs.readFileSync(webPkgPath, 'utf8'));
|
|
103
|
+
webPkg.version = '0.0.1';
|
|
104
|
+
fs.writeFileSync(webPkgPath, `${JSON.stringify(webPkg, null, 2)}\n`, 'utf8');
|
|
105
|
+
|
|
106
|
+
const repoMetaPath = path.join(tmp, 'website/src/generated/repo-meta.json');
|
|
107
|
+
const repoMeta = JSON.parse(fs.readFileSync(repoMetaPath, 'utf8'));
|
|
108
|
+
repoMeta.version = '0.0.1';
|
|
109
|
+
fs.writeFileSync(repoMetaPath, `${JSON.stringify(repoMeta, null, 2)}\n`, 'utf8');
|
|
110
|
+
|
|
111
|
+
const agyPath = path.join(tmp, '.antigravity-plugin/plugin.json');
|
|
112
|
+
const agyPkg = JSON.parse(fs.readFileSync(agyPath, 'utf8'));
|
|
113
|
+
agyPkg.version = '0.0.1';
|
|
114
|
+
fs.writeFileSync(agyPath, `${JSON.stringify(agyPkg, null, 2)}\n`, 'utf8');
|
|
115
|
+
|
|
116
|
+
const failRes = run(['--check', '--root', tmp], true);
|
|
117
|
+
assert.equal(failRes.code, 1, 'Expected --check to fail on drifted files');
|
|
118
|
+
assert.match(failRes.stderr, /README\.md/);
|
|
119
|
+
assert.match(failRes.stderr, /evals\/README\.md/);
|
|
120
|
+
assert.match(failRes.stderr, /website\/package\.json/);
|
|
121
|
+
assert.match(failRes.stderr, /website\/src\/generated\/repo-meta\.json/);
|
|
122
|
+
assert.match(failRes.stderr, /\.antigravity-plugin\/plugin\.json/);
|
|
123
|
+
|
|
124
|
+
const writeRes = run(['--write', '--root', tmp]);
|
|
125
|
+
assert.equal(writeRes.code, 0);
|
|
126
|
+
|
|
127
|
+
const healedRes = run(['--check', '--root', tmp]);
|
|
128
|
+
assert.equal(healedRes.code, 0);
|
|
129
|
+
const healedWebPkg = JSON.parse(fs.readFileSync(webPkgPath, 'utf8'));
|
|
130
|
+
assert.equal(healedWebPkg.version, parsed.metrics.version);
|
|
131
|
+
const healedRepoMeta = JSON.parse(fs.readFileSync(repoMetaPath, 'utf8'));
|
|
132
|
+
assert.equal(healedRepoMeta.version, parsed.metrics.version);
|
|
133
|
+
const healedAgyPkg = JSON.parse(fs.readFileSync(agyPath, 'utf8'));
|
|
134
|
+
assert.equal(healedAgyPkg.version, parsed.metrics.version);
|
|
135
|
+
console.log('ok 3 - drift fails --check and heals idempotently with --write');
|
|
136
|
+
} finally {
|
|
137
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
console.log('sync-docs tests passed');
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { spawnSync } from 'node:child_process';
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import os from 'node:os';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
|
|
9
|
+
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
10
|
+
console.log('Usage: node scripts/test-validate-skills.mjs\n\nRuns contract tests for scripts/validate-skills.mjs.');
|
|
11
|
+
process.exit(0);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
15
|
+
const validatorSource = path.join(root, 'scripts/validate-skills.mjs');
|
|
16
|
+
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'pixelcraft-validator-test-'));
|
|
17
|
+
const validator = path.join(tmp, 'scripts/validate-skills.mjs');
|
|
18
|
+
const skillDir = path.join(tmp, 'skills/case');
|
|
19
|
+
const skillFile = path.join(skillDir, 'SKILL.md');
|
|
20
|
+
|
|
21
|
+
fs.mkdirSync(path.dirname(validator), { recursive: true });
|
|
22
|
+
fs.mkdirSync(skillDir, { recursive: true });
|
|
23
|
+
fs.mkdirSync(path.join(tmp, 'evals'), { recursive: true });
|
|
24
|
+
fs.copyFileSync(validatorSource, validator);
|
|
25
|
+
fs.writeFileSync(path.join(tmp, 'evals/case.md'), '# Evaluation\n\n## Case\n\nPrompt.\n');
|
|
26
|
+
fs.mkdirSync(path.join(tmp, 'evals/fixtures'), { recursive: true });
|
|
27
|
+
const validFixture = JSON.stringify({
|
|
28
|
+
schemaVersion: 1,
|
|
29
|
+
id: 'case-valid',
|
|
30
|
+
skill: 'case',
|
|
31
|
+
title: 'Valid fixture',
|
|
32
|
+
contextSnapshot: {
|
|
33
|
+
surface: 'settings',
|
|
34
|
+
platform: 'web',
|
|
35
|
+
mode: 'Operate',
|
|
36
|
+
states: ['error'],
|
|
37
|
+
constraints: ['keyboard only']
|
|
38
|
+
},
|
|
39
|
+
prompt: 'Verify the settings form.',
|
|
40
|
+
expectedRouting: ['case'],
|
|
41
|
+
forbiddenBehaviors: ['claims without evidence'],
|
|
42
|
+
rubricDimensions: [
|
|
43
|
+
{ dimension: 'routing', pass: 'uses expected skill', fail: 'generic implementation' }
|
|
44
|
+
],
|
|
45
|
+
negativeControls: [
|
|
46
|
+
{ name: 'build only', input: 'build passes without interaction', mustNot: 'claim rendered behavior' }
|
|
47
|
+
],
|
|
48
|
+
baseline: { withoutSkill: 'generic output', withSkill: 'constrained behavior' }
|
|
49
|
+
}, null, 2);
|
|
50
|
+
fs.writeFileSync(path.join(tmp, 'evals/fixtures/case-valid.json'), `${validFixture}\n`);
|
|
51
|
+
|
|
52
|
+
function runValidator(frontmatter, body = '# Case\n') {
|
|
53
|
+
fs.writeFileSync(skillFile, `---\n${frontmatter}\n---\n\n${body}`);
|
|
54
|
+
return spawnSync(process.execPath, [validator], { encoding: 'utf8' });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function expectFailure(frontmatter, pattern, label, body = '# Case\n') {
|
|
58
|
+
const result = runValidator(frontmatter, body);
|
|
59
|
+
assert.notEqual(result.status, 0, `${label} unexpectedly passed`);
|
|
60
|
+
assert.match(result.stderr, pattern, `${label} failed with unexpected message: ${result.stderr}`);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
for (const indicator of ['|', '|-', '|+', '>', '>-', '>+', '|2-']) {
|
|
65
|
+
const result = runValidator(`name: case\ndescription: ${indicator}\n Handles block: scalar content\n across multiple lines.\nmetadata:\n version: 0.1.0\nlicense: MIT`);
|
|
66
|
+
assert.equal(result.status, 0, `${indicator} failed: ${result.stderr}`);
|
|
67
|
+
}
|
|
68
|
+
console.log('ok 1 - literal and folded block scalars pass');
|
|
69
|
+
|
|
70
|
+
const flow = runValidator('name: case\ndescription: Handles inline flow metadata\nmetadata: {version: 0.1.0, owner: validator-test, note: "safe: colon, with comma", plain_note: don\'t}\nlicense: MIT');
|
|
71
|
+
assert.equal(flow.status, 0, flow.stderr);
|
|
72
|
+
console.log('ok 2 - inline flow mappings pass');
|
|
73
|
+
|
|
74
|
+
const comment = runValidator('name: case\ndescription: Handles YAML safely # trailing comment with: colon\nlicense: MIT');
|
|
75
|
+
assert.equal(comment.status, 0, comment.stderr);
|
|
76
|
+
const contraction = runValidator("name: case\ndescription: Don't break contractions # trailing comment with: colon\nlicense: MIT");
|
|
77
|
+
assert.equal(contraction.status, 0, contraction.stderr);
|
|
78
|
+
console.log('ok 3 - colon text inside trailing comments is ignored');
|
|
79
|
+
|
|
80
|
+
expectFailure('name: case\ndescription: Invalid: plain scalar\nlicense: MIT', /contains ': '/, 'unsafe plain scalar');
|
|
81
|
+
expectFailure('name: case\ndescription: @invalid\nlicense: MIT', /starts with YAML-special character/, 'reserved leading scalar');
|
|
82
|
+
console.log('ok 4 - unsafe plain scalars still fail');
|
|
83
|
+
|
|
84
|
+
expectFailure('name: case\ndescription: Handles metadata\nmetadata: {owner: bad: value}\nlicense: MIT', /contains ': '/, 'unsafe scalar inside flow mapping');
|
|
85
|
+
console.log('ok 5 - unsafe plain scalars inside flow mappings fail');
|
|
86
|
+
|
|
87
|
+
expectFailure('name: case\ndescription: |\n Handles correct indentation.\n orphaned continuation\nlicense: MIT', /no owning block or mapping/, 'under-indented block scalar leftover');
|
|
88
|
+
console.log('ok 6 - unconsumed indented frontmatter lines fail');
|
|
89
|
+
|
|
90
|
+
const scalarCases = [
|
|
91
|
+
['name: [case]\ndescription: Handles YAML\nlicense: MIT', 'flow-sequence name'],
|
|
92
|
+
['name: case\ndescription: [one, two]\nlicense: MIT', 'flow-sequence description'],
|
|
93
|
+
['name: {value: case}\ndescription: Handles YAML\nlicense: MIT', 'flow-mapping name'],
|
|
94
|
+
['name: case\ndescription: {topic: test}\nlicense: MIT', 'flow-mapping description'],
|
|
95
|
+
['name:\n - case\ndescription: Handles YAML\nlicense: MIT', 'block-sequence name'],
|
|
96
|
+
['name: case\ndescription:\n - one\n - two\nlicense: MIT', 'block-sequence description'],
|
|
97
|
+
['name:\n value: case\ndescription: Handles YAML\nlicense: MIT', 'block-mapping name'],
|
|
98
|
+
['name: case\ndescription:\n topic: test\nlicense: MIT', 'block-mapping description'],
|
|
99
|
+
['name:\ndescription: Handles YAML\nlicense: MIT', 'null name'],
|
|
100
|
+
['name: case\ndescription:\nlicense: MIT', 'null description']
|
|
101
|
+
];
|
|
102
|
+
for (const [frontmatter, label] of scalarCases) {
|
|
103
|
+
expectFailure(frontmatter, /must be a scalar string/, label);
|
|
104
|
+
}
|
|
105
|
+
console.log('ok 7 - name and description must be scalar strings');
|
|
106
|
+
|
|
107
|
+
const validEvalRun = runValidator('name: case\ndescription: Handles YAML\nlicense: MIT');
|
|
108
|
+
assert.equal(validEvalRun.status, 0, validEvalRun.stderr);
|
|
109
|
+
console.log('ok 8 - valid evaluation fixture passes');
|
|
110
|
+
|
|
111
|
+
const brokenFixture = JSON.parse(validFixture);
|
|
112
|
+
brokenFixture.id = 'case-broken';
|
|
113
|
+
delete brokenFixture.negativeControls;
|
|
114
|
+
fs.writeFileSync(path.join(tmp, 'evals/fixtures/case-broken.json'), `${JSON.stringify(brokenFixture, null, 2)}\n`);
|
|
115
|
+
expectFailure('name: case\ndescription: Handles YAML\nlicense: MIT', /negativeControls must be a nonempty array/, 'missing negative controls');
|
|
116
|
+
fs.rmSync(path.join(tmp, 'evals/fixtures/case-broken.json'));
|
|
117
|
+
console.log('ok 9 - evaluation fixture negative controls are required');
|
|
118
|
+
|
|
119
|
+
expectFailure('name: case\ndescription: Handles YAML\nalwaysApply: true\nlicense: MIT', /unsupported non-portable frontmatter key: alwaysApply/, 'disallowed host-specific frontmatter key');
|
|
120
|
+
console.log('ok 10 - non-portable frontmatter keys are rejected');
|
|
121
|
+
|
|
122
|
+
const refsDir = path.join(skillDir, 'references');
|
|
123
|
+
fs.mkdirSync(refsDir, { recursive: true });
|
|
124
|
+
fs.writeFileSync(path.join(refsDir, 'orphan.md'), '# Orphan\n');
|
|
125
|
+
expectFailure('name: case\ndescription: Handles YAML\nlicense: MIT', /orphan reference not linked from SKILL\.md/, 'orphan reference');
|
|
126
|
+
fs.writeFileSync(path.join(refsDir, 'orphan.md'), '# Linked\n\nSee [broken](missing.md).\n');
|
|
127
|
+
expectFailure('name: case\ndescription: Handles YAML\nlicense: MIT', /broken relative link: missing\.md/, 'broken link in reference', '# Case\n\n- Read [references/orphan.md](references/orphan.md) when testing.\n');
|
|
128
|
+
fs.writeFileSync(path.join(refsDir, 'orphan.md'), '# Linked\n\n```sh\nnpm run build || true\n```\n');
|
|
129
|
+
expectFailure('name: case\ndescription: Handles YAML\nlicense: MIT', /suppresses command failures/, 'suppressed shell failure in reference', '# Case\n\n- Read [references/orphan.md](references/orphan.md) when testing.\n');
|
|
130
|
+
fs.writeFileSync(path.join(refsDir, 'orphan.md'), '# Linked\n');
|
|
131
|
+
fs.mkdirSync(path.join(refsDir, 'nested'), { recursive: true });
|
|
132
|
+
expectFailure('name: case\ndescription: Handles YAML\nlicense: MIT', /must stay one level deep/, 'nested references subdirectory', '# Case\n\n- Read [references/orphan.md](references/orphan.md) when testing.\n');
|
|
133
|
+
fs.rmSync(refsDir, { recursive: true, force: true });
|
|
134
|
+
console.log('ok 11 - orphan refs, nested ref dirs, ref links, and shell suppressions are enforced');
|
|
135
|
+
|
|
136
|
+
const badRouteFixture = JSON.parse(validFixture);
|
|
137
|
+
badRouteFixture.id = 'case-bad-route';
|
|
138
|
+
badRouteFixture.expectedRouting = ['case', 'references/does-not-exist.md'];
|
|
139
|
+
fs.writeFileSync(path.join(tmp, 'evals/fixtures/case-bad-route.json'), `${JSON.stringify(badRouteFixture, null, 2)}\n`);
|
|
140
|
+
expectFailure('name: case\ndescription: Handles YAML\nlicense: MIT', /expectedRouting references missing file/, 'missing expectedRouting reference');
|
|
141
|
+
fs.rmSync(path.join(tmp, 'evals/fixtures/case-bad-route.json'));
|
|
142
|
+
console.log('ok 12 - expectedRouting file targets are verified');
|
|
143
|
+
|
|
144
|
+
// Duplicate consecutive headings and duplicate Domain/Platform routing headings
|
|
145
|
+
expectFailure(
|
|
146
|
+
'name: case\ndescription: Handles YAML\nlicense: MIT',
|
|
147
|
+
/duplicate consecutive heading: ## Details/,
|
|
148
|
+
'duplicate consecutive heading',
|
|
149
|
+
'# Case\n\n## Details\n\nText.\n\n## Details\n\nMore text.\n',
|
|
150
|
+
);
|
|
151
|
+
expectFailure(
|
|
152
|
+
'name: case\ndescription: Handles YAML\nlicense: MIT',
|
|
153
|
+
/duplicate '## Domain routing' heading/,
|
|
154
|
+
'duplicate Domain routing heading',
|
|
155
|
+
'# Case\n\n## Domain routing\n\nA.\n\n## Notes\n\nB.\n\n## Domain routing\n\nC.\n',
|
|
156
|
+
);
|
|
157
|
+
expectFailure(
|
|
158
|
+
'name: case\ndescription: Handles YAML\nlicense: MIT',
|
|
159
|
+
/duplicate '## Platform routing' heading/,
|
|
160
|
+
'duplicate Platform routing heading',
|
|
161
|
+
'# Case\n\n## Platform routing\n\nA.\n\n## Notes\n\nB.\n\n## Platform routing\n\nC.\n',
|
|
162
|
+
);
|
|
163
|
+
console.log('ok 13 - duplicate consecutive headings and duplicate Domain/Platform routing headings are rejected');
|
|
164
|
+
|
|
165
|
+
// Platform routing table sync enforcement on skills/pixelcraft/SKILL.md
|
|
166
|
+
const orchDir = path.join(tmp, 'skills/pixelcraft');
|
|
167
|
+
const surfDir = path.join(tmp, 'skills/pixelcraft-demo');
|
|
168
|
+
const surfRefsDir = path.join(surfDir, 'references');
|
|
169
|
+
fs.mkdirSync(orchDir, { recursive: true });
|
|
170
|
+
fs.mkdirSync(surfRefsDir, { recursive: true });
|
|
171
|
+
fs.writeFileSync(path.join(tmp, 'evals/pixelcraft.md'), '# Eval\n\n## Case 1 — demo\n');
|
|
172
|
+
fs.writeFileSync(path.join(tmp, 'evals/pixelcraft-demo.md'), '# Eval\n\n## Case 1 — demo\n');
|
|
173
|
+
fs.writeFileSync(path.join(surfRefsDir, 'alpha.md'), '# Alpha\n');
|
|
174
|
+
fs.writeFileSync(path.join(surfRefsDir, 'beta.md'), '# Beta\n');
|
|
175
|
+
fs.writeFileSync(path.join(surfDir, 'SKILL.md'), '---\nname: pixelcraft-demo\ndescription: Demo platform skill.\nlicense: MIT\n---\n\n# Demo\n\n- Read [references/alpha.md](references/alpha.md) when alpha.\n- Read [references/beta.md](references/beta.md) when beta.\n');
|
|
176
|
+
|
|
177
|
+
// Missing reference ('beta') in Platform routing table -> fails
|
|
178
|
+
fs.writeFileSync(path.join(orchDir, 'SKILL.md'), '---\nname: pixelcraft\ndescription: Orchestrator.\nlicense: MIT\n---\n\n# Orchestrator\n\n## Platform routing\n\n| Platform skill | Framework and surface references |\n|---|---|\n| `pixelcraft-demo` | `alpha` |\n');
|
|
179
|
+
expectFailure('name: case\ndescription: Handles YAML\nlicense: MIT', /Platform routing table for pixelcraft-demo is missing reference 'beta'/, 'missing platform routing ref');
|
|
180
|
+
|
|
181
|
+
// Nonexistent reference ('ghost') in Platform routing table -> fails
|
|
182
|
+
fs.writeFileSync(path.join(orchDir, 'SKILL.md'), '---\nname: pixelcraft\ndescription: Orchestrator.\nlicense: MIT\n---\n\n# Orchestrator\n\n## Platform routing\n\n| Platform skill | Framework and surface references |\n|---|---|\n| `pixelcraft-demo` | `alpha`, `beta`, `ghost` |\n');
|
|
183
|
+
expectFailure('name: case\ndescription: Handles YAML\nlicense: MIT', /Platform routing table for pixelcraft-demo lists nonexistent reference 'ghost'/, 'nonexistent platform routing ref');
|
|
184
|
+
|
|
185
|
+
// Exact match -> passes
|
|
186
|
+
fs.writeFileSync(path.join(orchDir, 'SKILL.md'), '---\nname: pixelcraft\ndescription: Orchestrator.\nlicense: MIT\n---\n\n# Orchestrator\n\n## Platform routing\n\n| Platform skill | Framework and surface references |\n|---|---|\n| `pixelcraft-demo` | `alpha`, `beta` |\n');
|
|
187
|
+
const syncedRun = runValidator('name: case\ndescription: Handles YAML\nlicense: MIT');
|
|
188
|
+
assert.equal(syncedRun.status, 0, syncedRun.stderr);
|
|
189
|
+
console.log('ok 14 - Platform routing table reference sync enforces both missing and nonexistent references');
|
|
190
|
+
|
|
191
|
+
console.log('validator YAML tests passed');
|
|
192
|
+
} finally {
|
|
193
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
194
|
+
}
|
|
195
|
+
|