@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,77 @@
|
|
|
1
|
+
# Telegram, Zalo, WhatsApp, Teams, LINE, and WeChat
|
|
2
|
+
|
|
3
|
+
Verify exact schema versions and host API availability against current official docs before releasing; mobile and business super-app runtimes update rapidly.
|
|
4
|
+
|
|
5
|
+
## Telegram Bots and Mini Apps (Bot API 8.x–9.x)
|
|
6
|
+
|
|
7
|
+
| Constraint | Documented limit / rule |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Text message length | 1–4,096 characters after entity parsing |
|
|
10
|
+
| Media caption length | 0–1,024 characters after entity parsing |
|
|
11
|
+
| Inline button `callback_data` | **1–64 UTF-8 bytes** (CJK/Vietnamese/emoji take 2–4 bytes each—measure byte length, never JS `.length`) |
|
|
12
|
+
| Callback acknowledgement | **Always call `answerCallbackQuery`** on every inline tap to dismiss the client loading spinner |
|
|
13
|
+
| Entity nesting | Respect Telegram nesting rules; blockquotes cannot nest; prefer explicit entities or escaped HTML |
|
|
14
|
+
|
|
15
|
+
- **Keyboards**: Attach inline keyboards to message-scoped actions; make reply keyboards `one_time_keyboard` or explicitly removable so they do not hijack the composer indefinitely.
|
|
16
|
+
- **Mini App (`Telegram.WebApp`) modern capabilities (Bot API 8.0–9.x)**:
|
|
17
|
+
- Use **`MainButton`** (primary action) paired with **`SecondaryButton`** (secondary/cancel action) and **`BackButton`** instead of duplicating fixed bottom bars inside the WebView.
|
|
18
|
+
- Honor safe areas using **`--tg-safe-area-inset-top/bottom/left/right`** and **`--tg-content-safe-area-inset-*`** CSS variables, especially when using **`requestFullscreen()` / `exitFullscreen()`** on mobile.
|
|
19
|
+
- Feature-detect **`addToHomeScreen()`**, **`BiometricManager`** (auth gate with graceful fallback), **`CloudStorage` / `SecureStorage`** (bot-scoped client persistence), and **Telegram Stars** digital goods checkout via `openInvoice(url)` (currency `XTR`).
|
|
20
|
+
- Always verify **`initData`** HMAC signature server-side with the bot token; never trust client-provided `initDataUnsafe` user IDs for authorization. Bind UI colors to `themeParams` rather than hardcoding a single theme.
|
|
21
|
+
|
|
22
|
+
## Zalo Mini Apps, ZaUI, and Zalo OA (ZNS)
|
|
23
|
+
|
|
24
|
+
- Configure pages, header style, status bar, and safe areas in **`app-config.json`**, use **`zmp-ui`** (`zmp-ui/zaui.css` + `<App theme="light" | "dark">`) for ZDS-compliant components, and access host APIs through **`zmp-sdk`** (`authorize`, `getUserInfo`, `openChat`, `getStorage`/`setStorage`, `getSystemInfo`).
|
|
25
|
+
- Design for embedded Vietnamese phone viewports (account for stacked diacritics and line height), intermittent mobile networks, permission-denial recovery, and server-side token exchange.
|
|
26
|
+
- For proactive business notifications outside active user chat sessions, use approved **Zalo OA / ZNS (Zalo Notification Service)** transactional templates with parameterized fields rather than unauthorized free-form pushes.
|
|
27
|
+
|
|
28
|
+
## WhatsApp Business Interactive Messages and Flows
|
|
29
|
+
|
|
30
|
+
| Constraint | Documented limit |
|
|
31
|
+
|---|---|
|
|
32
|
+
| Interactive body text | up to **1,024 characters** |
|
|
33
|
+
| Reply buttons | up to 3 buttons, **max 20 characters per title** |
|
|
34
|
+
| List message | up to 10 rows total; section & row title **max 24 chars**, description **max 72 chars** |
|
|
35
|
+
| CTA URL button (`cta_url`) | single external link button with explicit display text (max 20 chars) |
|
|
36
|
+
| Carousel templates | pre-approved multi-card media templates with identical button count/types across every card |
|
|
37
|
+
| Service window | Interactive list/reply messages require an open 24-hour user-initiated window; proactive outreach requires approved templates or Flows |
|
|
38
|
+
|
|
39
|
+
- **WhatsApp Flows (JSON multi-screen forms)**: Use Flows for structured appointment booking, lead capture, or checkout instead of forcing 8 back-and-forth text turns. Define typed `screens` (`Form`, `TextInput`, `Dropdown`, `DatePicker`, `Footer` with `data_exchange` or `complete`), implement **RSA-OAEP + AES-GCM payload encryption/decryption** on your data-exchange endpoint, return clear field-level validation errors on the active screen, and test narrow truncation on 20-char button labels.
|
|
40
|
+
|
|
41
|
+
## Microsoft Teams Adaptive Cards, Dialogs, and Teams AI Library
|
|
42
|
+
|
|
43
|
+
- Teams desktop/web/mobile and Microsoft Copilot Chat target **Adaptive Cards schema 1.5** (supporting **`Carousel`**, **`CodeBlock`**, and **`Chart.*`** elements where host-verified—always test in the actual target client, not just the web designer, because Outlook Actionable Messages and Bot Framework Web Chat diverge).
|
|
44
|
+
- Use **`Action.Execute`** with `refresh` payloads so cards transition cleanly from actionable to completed/expired state across channel viewers, provide concise `speak` text, and respect HostConfig rather than fighting Teams typography or dark/high-contrast themes.
|
|
45
|
+
- **Teams AI Library**: For LLM agents in Teams, use native streaming responses (`streamer.emit(...)`), **`setGeneratedByAI` / AI disclosure badges**, sensitivity labels, inline numbered citations, and feedback-loop buttons.
|
|
46
|
+
- **Teams Dialogs (Task Modules) & Tabs**: Use `@microsoft/teams-js` (`dialog.url.open` / `app.notifySuccess`) for complex multi-step forms or auth popups that exceed Adaptive Card input limits.
|
|
47
|
+
|
|
48
|
+
## LINE LIFF and Flex Messages
|
|
49
|
+
|
|
50
|
+
- **Flex Messages**: Compose rich cards via JSON `bubble` (single card with `header`, `hero`, `body`, `footer` boxes) or `carousel` (up to 12 horizontally scrollable bubbles). Every Flex Message **must include a concise `altText`** (max 400 chars) shown in chat lists, push notifications, and unsupported clients.
|
|
51
|
+
- **Quick Replies**: Attach up to 13 transient action chips (`message`, `postback`, `datetimepicker`, `camera`, `location`) at the bottom of a message for single-tap next replies; they disappear once tapped.
|
|
52
|
+
- **LIFF SDK v2**: Initialize with `await liff.init({ liffId })`, verify `liff.getIDToken()` server-side against LINE's verify endpoint (never trust decoded JWTs unverified), respect configured sheet height (`compact`, `tall`, `full`), check `liff.isInClient()` before calling `liff.sendMessages()` or `liff.closeWindow()`, and provide a clean browser fallback when opened outside LINE.
|
|
53
|
+
|
|
54
|
+
## WeChat Mini Program (`WXML` / `WXSS` / `wx.*`)
|
|
55
|
+
|
|
56
|
+
- Build layouts in **`WXML`** and **`WXSS`** using responsive **`rpx`** units (750 rpx = screen width), calculate custom navigation bar clearance from **`wx.getMenuButtonBoundingClientRect()`** and `wx.getWindowInfo()` safe-area insets so controls never collide with WeChat's floating capsule button.
|
|
57
|
+
- Authenticate via `wx.login()` -> send ephemeral `code` to your server -> exchange via `code2Session` (never expose `AppSecret` in Mini Program code); handle `wx.requestPayment` failures/cancellations idempotently.
|
|
58
|
+
- Respect hard **2 MB main-package size budgets** via `subpackages` lazy loading, and use **Official Account / Subscription Message templates** strictly with explicit user opt-in (`wx.requestSubscribeMessage`) and truthful transactional content.
|
|
59
|
+
|
|
60
|
+
## Cross-platform bot webhook & interaction reliability (`Slack`, `Discord`, `Telegram`, `Zalo`, `WhatsApp`, `Teams`, `LINE`, `WeChat`)
|
|
61
|
+
|
|
62
|
+
- **Fast webhook `ack` (`< 2–3 s`) + async progress state**: acknowledge every incoming webhook, slash command, button tap, or callback query within **`< 2–3 s`** (`HTTP 200`, `deferReply`, `answerCallbackQuery`, or `Action.Execute` interim card), push heavy LLM/API work to an async queue, and update the placeholder message in place with progress/results so host timeouts never show `"This interaction failed"`.
|
|
63
|
+
- **Idempotent event deduplication**: messaging hosts retry webhooks on transient `5xx` or slow edges (`X-Slack-Retry-Num`, Telegram `update_id`, WhatsApp `messages[].id`, LINE `webhookEventId`, WeChat `MsgId`). Deduplicate on a short-TTL idempotency key before executing mutations or sending replies so users never get double-charged or duplicate bot messages.
|
|
64
|
+
- **Edited & deleted message handling**: subscribe to `message_changed`/`edited_message` and `message_deleted`/recall events—abort in-flight generations for deleted prompts, avoid crashing when editing/replying to a user-deleted message (`400 message to edit not found`), and clearly mark or refresh bot answers when the source prompt was edited.
|
|
65
|
+
- **Invalid command & missing-parameter guidance**: when a slash/text command has malformed syntax or missing required arguments, reply ephemerally with concise usage examples, valid option chips/buttons, or pre-filled modal/Flow launchers—never dump raw parser tracebacks or stay silent.
|
|
66
|
+
|
|
67
|
+
## Do/don't pairs
|
|
68
|
+
|
|
69
|
+
| Do | Don't |
|
|
70
|
+
|---|---|
|
|
71
|
+
| Return webhook `ack` in `< 2–3 s` + async progress state and deduplicate `update_id` / `webhookEventId` / `MsgId` idempotently | Run a `12 s` synchronous LLM call inside the webhook handler or execute duplicate mutations on host retries |
|
|
72
|
+
| Handle edited/deleted user messages gracefully and show actionable usage examples + quick-reply pickers on invalid/incomplete commands | Crash on `message not found` when a user deletes a prompt or fail silently on missing command parameters |
|
|
73
|
+
| Measure UTF-8 bytes for Telegram's 64-byte `callback_data` and always call `answerCallbackQuery` | Check `.length` on multibyte strings or leave Telegram buttons spinning |
|
|
74
|
+
| Validate `initData` HMAC (Telegram), `getIDToken()` (LINE), and `wx.login` code (WeChat) server-side | Trust client-passed user IDs from Mini App JS globals |
|
|
75
|
+
| Use WhatsApp Flows (with RSA/AES data-exchange encryption) for multi-field collection | Force 10 sequential free-text chat turns for a booking form |
|
|
76
|
+
| Provide mandatory `altText` (LINE Flex), `speak` (Teams), and safe-area insets (Telegram/WeChat/Zalo) | Assume rich cards render identically in push notifications or fullscreen notches |
|
|
77
|
+
| Keep Teams Adaptive Cards narrow-friendly and verified on mobile + high contrast | Rely solely on the desktop Adaptive Card designer preview |
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Slack Block Kit and Discord
|
|
2
|
+
|
|
3
|
+
Exact limits and component capabilities evolve. Verify against current official platform docs before shipping schema changes.
|
|
4
|
+
|
|
5
|
+
## Slack Block Kit
|
|
6
|
+
|
|
7
|
+
### Core payload limits and timeouts
|
|
8
|
+
|
|
9
|
+
| Constraint | Documented limit / rule |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Blocks in one message | 50 |
|
|
12
|
+
| Blocks in a Modal or Home tab | 100 |
|
|
13
|
+
| `plain_text` / `mrkdwn` text object | 1–3,000 characters |
|
|
14
|
+
| `header` block `plain_text` | up to 150 characters |
|
|
15
|
+
| `button` label text | **up to 75 characters** |
|
|
16
|
+
| Section `fields` | up to 10 objects (2,000 chars each) |
|
|
17
|
+
| `block_id` / `action_id` | up to 255 characters; unique per message/view |
|
|
18
|
+
| **Interaction `ack()` timeout** | **Must return HTTP 200 within 3 seconds** (post slow work asynchronously via `response_url` or Web API) |
|
|
19
|
+
|
|
20
|
+
### Modern blocks (`rich_text`, native `table`, `header`) and AI Assistant surfaces
|
|
21
|
+
|
|
22
|
+
- Prefer **`rich_text`** blocks for structured nested lists, quotes, inline code, and styled text—avoiding `mrkdwn` escaping edge cases.
|
|
23
|
+
- Use Slack's native **`table` block** for compact tabular summaries instead of broken monospace ASCII tables.
|
|
24
|
+
- Use `header` (`plain_text`, <= 150 chars) for scannable card titles paired with concise `context` metadata.
|
|
25
|
+
- **Slack AI Assistants & Agents surfaces**: When building an app enabled as a Slack AI Assistant (split-pane DM/thread experience), use:
|
|
26
|
+
- `assistant.threads.setTitle` (auto-name the thread from the user's question),
|
|
27
|
+
- `assistant.threads.setStatus` (honest progress copy like `"Searching billing records…"`),
|
|
28
|
+
- `assistant.threads.setSuggestedPrompts` (up to 4 concrete starter prompts),
|
|
29
|
+
- native streaming via **`chat.startStream`**, **`chat.appendStream`**, and **`chat.stopStream`** instead of spamming `chat.update` rate limits, and
|
|
30
|
+
- **`feedback_buttons`** context/action elements for thumbs-up/down evaluation hooks.
|
|
31
|
+
|
|
32
|
+
### Surface model and `mrkdwn` safety
|
|
33
|
+
|
|
34
|
+
- **Messages**: Persistent or ephemeral channel/DM payloads. Always include a concise top-level `text` field for push notifications, screen readers, and degraded clients.
|
|
35
|
+
- **Modals**: Focused bounded multi-field views (`views.open` requires a fresh `trigger_id` valid for 3 seconds). Never rebuild a full SaaS app inside chained modals.
|
|
36
|
+
- **Home tabs**: Persistent per-user workspace (`views.publish`); design explicit loading, empty, and error states.
|
|
37
|
+
- **`mrkdwn` escaping**: Slack `mrkdwn` is neither CommonMark nor HTML—escape `&`, `<`, and `>` on all untrusted user text before interpolating into `mrkdwn`, and never put secrets in `action_id`, `block_id`, or button `value`.
|
|
38
|
+
|
|
39
|
+
## Discord
|
|
40
|
+
|
|
41
|
+
### Legacy embeds vs Components V2
|
|
42
|
+
|
|
43
|
+
Documented legacy embed limits: title 256, description 4,096, 25 fields (name 256 / value 1,024), footer 2,048, author 256, combined text 6,000, max 10 embeds per message. Never split one logical response across 10 embeds.
|
|
44
|
+
|
|
45
|
+
**Components V2** is opt-in per message via flag `IS_COMPONENTS_V2 = 1 << 15` (`32768`). Setting this flag is irreversible for that message and replaces `content`/`embeds`/`poll`/`stickers` with up to **40 total components**:
|
|
46
|
+
|
|
47
|
+
- **Layout & display components**: `Container` (accent color, spoiler flag), `Section` (text + accessory), `Text Display`, `Media Gallery`, `Separator`, **`Thumbnail`** (type 11, Section accessory), and **`File`** (type 13, exposing uploaded `attachment://` files inline).
|
|
48
|
+
- **Interactive components**: `Action Row` holds up to 5 buttons **or** 1 select menu (`String`, `User`, `Role`, `Channel`, `Mentionable`); every interactive component needs a unique per-message `custom_id`.
|
|
49
|
+
- Use Components V2 when structured containers, inline files, and section thumbnails materially improve clarity; keep standard messages/embeds for simple bot responses needing legacy compatibility.
|
|
50
|
+
|
|
51
|
+
### Expanded Modals (2025–2026) and interaction timeouts
|
|
52
|
+
|
|
53
|
+
- **Expanded Modal components**: Discord modals are no longer limited to bare `TextInput` fields—modern modals support **`Label`** wrappers with descriptions, **Select Menus** (String/User/Role/Channel/Mentionable), **File Upload**, and **Radio / Checkbox** inputs alongside short/paragraph text inputs. Verify exact field limits and component type numbers against current Discord API docs before shipping.
|
|
54
|
+
- **Mandatory timing rules**:
|
|
55
|
+
- **3-second initial acknowledgement**: Respond to every slash command, button, select, or modal submit within **3 seconds** (or immediately defer with `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE` / `DEFERRED_UPDATE_MESSAGE`).
|
|
56
|
+
- **15-minute interaction token expiry**: Webhook follow-ups and edits using the interaction token expire after **15 minutes**—design explicit expiration/disabled states or transition to channel/bot-token updates for longer workflows.
|
|
57
|
+
- Always enforce invoker ownership server-side and send private validation/permission errors as ephemeral replies (`EPHEMERAL = 1 << 6`).
|
|
58
|
+
|
|
59
|
+
### Discord Embedded App SDK (Activities)
|
|
60
|
+
|
|
61
|
+
When a rich interactive experience (multiplayer canvas, collaborative board, game, complex configurator) exceeds message components, launch an **Activity** inside Discord's iframe sandbox using **`@discord/embedded-app-sdk`**:
|
|
62
|
+
|
|
63
|
+
- Initialize `new DiscordSDK(clientId)`, await `discordSdk.ready()`, exchange the OAuth2 `code` on your backend server (never expose `client_secret` in the iframe), and call `discordSdk.commands.authenticate({ access_token })`.
|
|
64
|
+
- Route third-party external assets/APIs through Discord's URL proxy (`patchUrlMappings`) so CSP does not silently block fonts, images, or APIs.
|
|
65
|
+
- Design for variable embedded sizes (narrow PiP / voice tile, desktop panel, mobile portrait) and respect Discord channel participant presence honestly.
|
|
66
|
+
|
|
67
|
+
## Do/don't pairs
|
|
68
|
+
|
|
69
|
+
| Do | Don't |
|
|
70
|
+
|---|---|
|
|
71
|
+
| Ack Slack & Discord interactions within `< 2–3 s`, defer slow work with async progress status, and deduplicate `X-Slack-Retry-Num` / `event_id` / `interaction.id` idempotently | Wait on an LLM/DB call before HTTP 200 or execute duplicate mutations on webhook retries |
|
|
72
|
+
| Handle `message_changed` / `message_deleted` (`MESSAGE_UPDATE` / `MESSAGE_DELETE`) and return ephemeral usage guidance + pickers on invalid/missing command parameters | Crash when editing a deleted message or fail silently on incomplete slash/text commands |
|
|
73
|
+
| Stream Slack AI Assistant replies with `chat.startStream`/`appendStream`/`stopStream` | Hammer `chat.update` on every token until rate-limited |
|
|
74
|
+
| Use Slack native `table` and `rich_text` blocks + top-level fallback `text` | Render monospace ASCII tables that shatter on mobile |
|
|
75
|
+
| Use Discord Components V2 `Section` + `Thumbnail` / `File` intentionally | Enable `IS_COMPONENTS_V2` and still pass ignored `content` / `embeds` |
|
|
76
|
+
| Expire or disable Discord buttons after the 15-min token / task window | Leave dead buttons returning `"This interaction failed"` |
|
|
77
|
+
|
|
78
|
+
## Verification
|
|
79
|
+
|
|
80
|
+
Validate Block Kit / Discord JSON payloads before send, count UTF-8 characters accurately (especially localized labels approaching Slack's 75-char button limit), test `< 2–3 s` `ack` deferral, idempotent retry deduplication, edited/deleted message events, invalid-command guidance, and 15-minute expiry paths, and inspect desktop, mobile, light/dark themes, and fallback notifications (`rendered` where tested in real clients; `static` for JSON schema tests).
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pixelcraft-constrained
|
|
3
|
+
description: "Designs and verifies interfaces for constrained or nonstandard surfaces: TV/console/10-foot UI (Roku/BrightScript, Fire TV/Vega OS, tvOS, Compose for TV, webOS/Tizen), D-pad spatial focus, watchOS/Compose for Wear OS, e-ink displays, POS/ISA-101 HMI/kiosks, embedded MCU UI (LVGL, Slint MCU, TouchGFX, Qt for MCUs, embedded-graphics), automotive CarPlay/Android Auto/AAOS, and Realtime Voice AI/WebRTC voice agents/Siri App Intents/Alexa+. Use when viewing distance, input hardware, refresh physics, memory budgets, or safety fundamentally constrains the interface."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: 0.1.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Pixelcraft constrained surfaces
|
|
10
|
+
|
|
11
|
+
Constraint is the primary design material. Do not shrink a desktop/mobile interface: determine viewing distance, input device, interruption cost, refresh capability, compute/memory budget, physical ergonomics, safety context, and failure recovery before layout.
|
|
12
|
+
|
|
13
|
+
## Surface craft
|
|
14
|
+
|
|
15
|
+
Prioritize the one task the physical situation allows: visible spatial focus from the sofa, an at-a-glance answer on the wrist, or a static acknowledgment on low-refresh displays. Verify at the actual viewing distance, input device and refresh class. If effects compete with guidance, remove the effects; do not infer hardware readiness from web emulation.
|
|
16
|
+
|
|
17
|
+
## Detection signals
|
|
18
|
+
|
|
19
|
+
Roku `manifest`/`.brs`/SceneGraph XML, Fire TV / Vega OS (`KeplerScript`, React Native for Vega), `react-native-tvos` / LightningJS, Android TV (`androidx.tv:tv-material`, `FEATURE_LEANBACK`, Leanback), tvOS SwiftUI/UIKit (`@FocusState`, `.focusSection`), LG webOS (`appinfo.json`, `@enact/sandstone`), Samsung Tizen (`config.xml`, `tizen.tvinputdevice`), Wear OS (`androidx.wear.compose`, `TileService`, Watch Face Format XML), watchOS (`WatchKit`, SwiftUI Watch, `WidgetKit` Smart Stack), E-Ink EPD vendor SDKs (Boox/Kindle/reMarkable), POS/kiosk lockdown (`LockTask`, Assigned Access, Single App Mode), ISA-101 HMI specs, embedded UI (`lv_conf.h` LVGL v9, Slint `#![no_std]` MCU, `embedded-graphics`, `.touchgfx` TouchGFX, `Qt Quick Ultralite` Qt for MCUs), automotive (`CPTemplateApplicationSceneDelegate`, CarPlay Ultra, `CarAppService`, `CarUxRestrictionsManager`), Realtime Voice AI (`@openai/realtime`, Gemini Live, LiveKit Agents, Pipecat, ElevenLabs), Apple `AppIntents`, Alexa APL/Alexa+, Google `AppFunctions`, and SSML templates.
|
|
20
|
+
|
|
21
|
+
## References
|
|
22
|
+
|
|
23
|
+
- Read [references/tv-wearables.md](references/tv-wearables.md) when building 10-foot TV/console UIs (Roku BrightScript, Fire TV/Vega OS, React Native TV/LightningJS, Compose for TV, tvOS 26, webOS Enact, Tizen), D-pad focus engines, Compose for Wear OS 5/6 Material 3 Expressive, or watchOS 10–26.
|
|
24
|
+
- Read [references/specialized-hardware.md](references/specialized-hardware.md) when designing for E-Ink (Boox/Kaleido 3/Gallery 3), POS & ISA-101 industrial HMIs, kiosk lockdown, embedded MCUs (LVGL v9, Slint MCU, `embedded-graphics`, TouchGFX, Qt for MCUs), or automotive CarPlay/CarPlay Ultra/Android Auto/AAOS.
|
|
25
|
+
- Read [references/voice-ui.md](references/voice-ui.md) when building classic SSML/IVR voice flows, 2025–2026 Realtime Voice AI / WebRTC voice agents (OpenAI Realtime, Gemini Live, LiveKit, Pipecat, ElevenLabs), Apple Siri App Intents, Alexa APL/Alexa+, or Google Gemini App Functions.
|
|
26
|
+
|
|
27
|
+
## Required workflow
|
|
28
|
+
|
|
29
|
+
1. **Measure the constraint.** Record viewing distance, screen size/resolution/color depth/refresh behavior, input sensors/buttons, orientation, environment noise/lighting, user posture, network/compute/memory budget, and safety/regulatory context.
|
|
30
|
+
2. **Choose the interaction model.** Spatial focus, direct touch, rotary/crown, physical buttons, voice, remote/controller, template host, passive glance, or multimodal hybrid. Do not emulate pointer semantics where none exist.
|
|
31
|
+
3. **Reduce scope per glance/turn.** Define the minimum usable task unit, default action, persistent escape/back path, and recoverable error state.
|
|
32
|
+
4. **Design focus/state explicitly.** Every interactive surface needs initial focus, directional movement, focus visibility, trapping prevention, idle/timeout behavior, disabled/loading/error states, and restoration after interruption.
|
|
33
|
+
5. **Verify on hardware or faithful emulation.** Simulator rendering is not evidence for legibility, focus, motion comfort, refresh artifacts, or physical reach. Label unavailable hardware checks `not-checked`.
|
|
34
|
+
|
|
35
|
+
## Non-negotiable rules
|
|
36
|
+
|
|
37
|
+
| Domain | Mandatory hardware & human-factors contract |
|
|
38
|
+
|---|---|
|
|
39
|
+
| **10-Foot TV** | Deterministic 4-way D-pad spatial graph with **column-index memory across vertical rows**, visible focus halo (`scale 1.04–1.08` + high-contrast ring), **`5%` action / `10%` title overscan safe zones**, and **QR Code / `RFC 8628` Device Authorization Flow** (never force 32-char remote password entry). |
|
|
40
|
+
| **Wearables** | True **`#000000` OLED** canvas (**`< 15–20%` On-Pixel Ratio** in Always-On Display), **`<= 2–3 s` single-glance micro-task**, **`1` primary CTA per screen**, rotary Crown/Bezel haptic detents, and **graceful Watch standalone operation when the companion phone is away/disconnected** (local cache/queue + truthful offline badge rather than a dead `"Connect phone"` wall). |
|
|
41
|
+
| **Kiosk & POS (`ADA` / `EN 301 549`)** | Wheelchair reach **`38–122 cm` (`15–48"`)** or persistent **"Lower Screen / Reachability Mode"** toggle, **`>= 60×60 px` (`12–15 mm`)** touch targets, tactile audio-jack keypad nav with **auto volume/locale reset between sessions**, **`30–60 s` idle timeout with `"Still there?"` countdown (`WCAG 2.2.1`) before purging PII/cart state**, receipt-printer paper-low/offline queue, **power-loss / sudden-reboot safe transactional state recovery**, and **`72 h+` zero-leak soak stability**. |
|
|
42
|
+
| **Automotive IVI (`NHTSA` / `ISO 15005`)** | **`< 2.0 s` single glance / `< 12.0 s` cumulative glance** budget, **`>= 15×15 mm`** touch targets, **lock complex typing/video while `speed > 0`** (handoff to voice/wheel controls), and **instant zero-flash Day <-> Night theme switch** on tunnel ambient-light transitions. |
|
|
43
|
+
| **Embedded MCU, E-Ink & Regulated Safety** | Compile-time static `Flash`/`SRAM` budget (**`0` runtime heap fragmentation**) verified on the **lowest-spec target hardware SKU**, **`VSYNC` / Tearing-Effect (`TE`) double-buffered DMA transfer**, `15–30 ms` physical button debounce, **power-loss / brownout-safe dual-bank / journaled state recovery**, scheduled E-Ink waveforms, and an **explicit regulated-industry certification boundary (`IEC 62304` medical / `ISO 26262` automotive / `ISA-101` / `DO-178C` certified vs uncertified prototype scope)**. |
|
|
44
|
+
| **Voice UI (`VUI`)** | **`< 300 ms` local barge-in audio cutoff** + assistant transcript truncation on user speech, **`<= 3` options / `< 10–12 s` spoken turns**, explicit read-back confirmation before irreversible actions, progressive reprompts, and multimodal transcript fallback. |
|
|
45
|
+
|
|
46
|
+
## Pre-submit checklist
|
|
47
|
+
|
|
48
|
+
- [ ] physical distance, input modality, refresh physics, **lowest-target-hardware `Flash`/`SRAM`/CPU contract**, and **explicit regulated-industry certification boundary (certified vs uncertified)** documented;
|
|
49
|
+
- [ ] **TV / Wearables**: 4-way D-pad column memory + `scale 1.04–1.08` focus halo + `5%/10%` safe zone + `RFC 8628` QR login (TV); `#000000` OLED `< 15–20%` AOD OPR + `1` CTA + rotary detents + **Watch standalone operation when phone is away** (Wear);
|
|
50
|
+
- [ ] **Kiosk / POS / IVI**: `38–122 cm` reachability toggle + `>= 60×60 px` targets + `"Still there?"` PII wipe + `72 h+` soak (Kiosk); `< 2 s / < 12 s` glance + `>= 15×15 mm` targets + `speed > 0` lockout + zero-flash tunnel Day/Night switch (IVI);
|
|
51
|
+
- [ ] **MCU / E-Ink / Power-Loss / Voice**: `0` runtime heap churn + `VSYNC`/`TE` DMA + `15–30 ms` button debounce + **power-loss / sudden-reboot safe state recovery** + E-Ink waveform schedule; `< 300 ms` VUI barge-in cutoff + `<= 3` options / `< 10–12 s` turns + read-back confirmation;
|
|
52
|
+
- [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, hardware/emulator tests on lowest-target specs, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence on visual/perf/a11y per `Rule #0.3`).
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# E-ink, POS, industrial HMI, kiosks, embedded MCUs, and automotive surfaces
|
|
2
|
+
|
|
3
|
+
## E-ink / electronic paper & color EPD specifics
|
|
4
|
+
|
|
5
|
+
E-ink is a stateful, reflective, bistable display—never treat it as a slow LCD:
|
|
6
|
+
|
|
7
|
+
- **Refresh & waveform modes**: full refreshes invert/flash to clear ghosting; fast partial modes (**Boox EPD** `Speed` / `A2` / `X` vs crisp `Normal` / `Regal`) reduce latency at the cost of lower grayscale fidelity and accumulated ghosting. Switch to fast mode only during brief pan/zoom or typing, then trigger a clean `Regal`/full refresh on stop—and expose a manual full-refresh action.
|
|
8
|
+
- **Color e-ink physics**:
|
|
9
|
+
- **Kaleido 3 (e.g., Kindle Colorsoft, Boox Color)**: passive color filter array over a 300 PPI B&W panel yields **~150 PPI color** with a noticeably darker white point and muted pastel gamut. Keep small body text pure crisp black-on-white; reserve color for high-contrast highlights, tags, and coarse charts.
|
|
10
|
+
- **Gallery 3 (e.g., reMarkable Paper Pro)**: multi-pigment capsules deliver richer color at higher native resolution, but full color transitions require noticeably slower multi-stage flashes. Batch updates tightly and avoid continuous hover/scroll repaints.
|
|
11
|
+
- **Dithering & anti-patterns**: apply intentional ordered or Floyd-Steinberg dithering for photography/illustrations; avoid subtle gray gradients, animated spinners, smooth momentum scrolling (prefer crisp pagination), and live per-second counters. Remember the last rendered frame persists when the device sleeps—display honest timestamped status (`Updated 14:20`, not `Live`).
|
|
12
|
+
|
|
13
|
+
## POS, industrial HMI (ISA-101), & kiosk lockdown
|
|
14
|
+
|
|
15
|
+
### Point-of-Sale (POS)
|
|
16
|
+
- **Dual cashier + customer displays**: show itemized totals, discounts, tax, and clear tap/insert prompts on the customer-facing display while keeping staff-only overrides, PIN fields, and back-office actions strictly on the cashier screen.
|
|
17
|
+
- **EMV / NFC tap idempotency**: attach an idempotency key to every card-present authorization and lock the payment state machine while awaiting terminal response so a network timeout or double-tap **never** double-charges a customer.
|
|
18
|
+
- **Fixed muscle-memory grids**: keep high-frequency item/tender buttons in deterministic, fixed screen positions—never dynamically reorder cashier grids by "trending" or recent popularity.
|
|
19
|
+
- **Offline store-and-forward**: visibly badge queued offline orders (`Offline queue: 3 pending`), enforce configured offline floor limits, and reconcile cleanly upon reconnect.
|
|
20
|
+
|
|
21
|
+
### Industrial HMI (**ISA-101 High-Performance HMI**)
|
|
22
|
+
- **Muted normal state**: render normal operating equipment, pipes, and backgrounds in low-saturation neutral grays—**never** bright animated 3D gradients or saturated green pumps everywhere (which obscure real faults).
|
|
23
|
+
- **Reserved alarm colors + redundant encoding**: reserve high-chroma red, amber/yellow, and cyan strictly for active abnormal/alarm priorities, always paired with a unique geometric shape, priority number (`P1`/`P2`), and concise text so color-blind operators recognize severity instantly under harsh plant lighting.
|
|
24
|
+
- **Physical E-stop supersedes software**: software "Stop" controls assist normal sequencing only; never label or rely on a touchscreen button as a safety-rated emergency stop (E-stop).
|
|
25
|
+
- **Stale / bad-quality telemetry**: when a PLC/OPC-UA/Modbus tag loses communication or exceeds freshness TTL, immediately replace normal numeric values with a distinct bad-quality state (dashed frame, `?` / `STALE`, last-good timestamp)—never leave frozen stale readings styled as live normal state.
|
|
26
|
+
|
|
27
|
+
### Public kiosks (`ADA §308 / §707` & `EN 301 549`) & terminal reliability
|
|
28
|
+
- **Wheelchair reach (`38–122 cm` / `15–48"`) & Reachability Mode**: place all interactive controls within **`38–122 cm` (`15–48"`)** above the finished floor, **OR** render a persistent, high-contrast **"Lower Screen / Reachability Mode"** button anchored inside the bottom reach zone that shifts upper interactive controls down into reach.
|
|
29
|
+
- **Touch target floor & tactile audio-jack navigation**: size touch buttons **`>= 60×60 px` (`12–15 mm` physical)** with generous spacing against Parallax/gloved taps; support **tactile keypad / `3.5 mm` audio-jack spoken navigation** (`ADA §707` / `EN 301 549`) and **automatically reset audio volume, speech rate, and UI language to default** at the end of every customer session.
|
|
30
|
+
- **Idle timeout (`30–60 s`) + `"Still there?"` countdown (`WCAG 2.2.1`) & PII wipe**: after `30–60 s` of inactivity, display an accessible **`"Still there?"` countdown modal** (`>= 20 s` to extend session); if unanswered or when a user taps `Finish`/`Cancel`, **atomically purge all PII, auth tokens, form inputs, cached receipts, and cart state** before returning to the non-audio-dependent attract loop.
|
|
31
|
+
- **Hardware telemetry & `72 h+` soak gate**: monitor receipt-printer **paper-low / cover-open / cutter-jam** states (degrading gracefully to SMS/QR digital receipt or queued offline print rather than freezing checkout), lock OS chrome (`LockTask` / `Single App Mode` / `Assigned Access`), and pass a **`72 h+` continuous automated session-loop soak test** with zero heap/DOM/WebGL memory leaks.
|
|
32
|
+
|
|
33
|
+
## Embedded MCUs: LVGL v9, Slint MCU, `embedded-graphics`, TouchGFX, & Qt for MCUs
|
|
34
|
+
|
|
35
|
+
Measure real framebuffer bytes, **compile-time static `Flash` / `SRAM` budgets**, DMA2D/GPU acceleration, worst-case input latency, and thermal limits before selecting a toolkit:
|
|
36
|
+
|
|
37
|
+
| Framework | Language | Rendering & footprint | Best fit |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| **LVGL v9** | C (C++/Rust/MicroPython bindings) | Retained `lv_obj_t` tree, partial draw buffers (`1/10` screen RAM), ~32–64 KB RAM floor | Broadest MCU/RTOS ecosystem (ESP32, STM32, Zephyr, NuttX) |
|
|
40
|
+
| **Slint MCU** | Rust (`#![no_std]`) / C++ + `.slint` DSL | Static-allocation declarative UI compiled ahead-of-time, line-by-line renderer | Safety/Rust teams sharing clean declarative UI across desktop + MCU |
|
|
41
|
+
| **`embedded-graphics`** | Rust (`#![no_std]`) | Zero-allocation immediate draw primitives (`DrawTarget`, bitmaps, mono fonts) | Ultra-tiny monochrome OLEDs, e-paper tags, bare-metal sensors (<16 KB RAM) |
|
|
42
|
+
| **TouchGFX** | C++ (STM32) | Hardware-accelerated STM32 Chrom-ART (DMA2D) / NeoChrom GPU | High-FPS 60fps appliance/medical displays on STM32 MCUs |
|
|
43
|
+
| **Qt for MCUs** | QML subset → C++ (`Qt Quick Ultralite`) | Static compiled QML engine with hardware acceleration | Teams standardizing on Qt/QML across Linux MPU and RTOS MCU product lines |
|
|
44
|
+
|
|
45
|
+
**LVGL v9 concrete idiom** (double-buffered DMA, reusable static `lv_style_t`, and `lv_group_t` for rotary encoder / physical keypad navigation):
|
|
46
|
+
|
|
47
|
+
```c
|
|
48
|
+
static lv_style_t style_focus;
|
|
49
|
+
lv_style_init(&style_focus);
|
|
50
|
+
lv_style_set_outline_width(&style_focus, 3);
|
|
51
|
+
lv_style_set_outline_color(&style_focus, lv_color_hex(0x0074CA));
|
|
52
|
+
|
|
53
|
+
lv_display_t *disp = lv_display_create(320, 240);
|
|
54
|
+
/* Synchronize double-buffered DMA flush to panel VSYNC / Tearing-Effect (TE) pin */
|
|
55
|
+
lv_display_set_buffers(disp, draw_buf1, draw_buf2, sizeof(draw_buf1), LV_DISPLAY_RENDER_MODE_PARTIAL);
|
|
56
|
+
|
|
57
|
+
lv_group_t *group = lv_group_create();
|
|
58
|
+
lv_obj_t *btn = lv_button_create(lv_screen_active());
|
|
59
|
+
lv_obj_add_style(btn, &style_focus, LV_STATE_FOCUSED);
|
|
60
|
+
lv_group_add_obj(group, btn); // binds rotary encoder / debounced physical keypad focus
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
MCU & E-Ink engineering gates:
|
|
64
|
+
- **`0` runtime heap fragmentation**: allocate widgets, glyph bitmaps, and framebuffers statically at boot/compile time (`LV_STDLIB_BUILTIN` fixed pool or `#![no_std]` static structs)—never `malloc`/`free` dynamically per frame.
|
|
65
|
+
- **Tear-free `VSYNC` / `TE` double-buffered DMA**: synchronize SPI/RGB/MIPI-DSI DMA buffer swaps to the panel's hardware **Tearing-Effect (`TE`)** or **`VSYNC`** interrupt so horizontal motion never shears diagonally.
|
|
66
|
+
- **Physical button & rotary debounce (`15–30 ms`)**: apply hardware RC or deterministic **`15–30 ms` software state-machine debounce** on tactile switches and quadrature encoders so contact bounce never double-submits confirmations; on `1-bit`/`4-bit` E-Ink, use pure black-on-white crisp bitmap/hinted typography without gradient soup.
|
|
67
|
+
|
|
68
|
+
## Automotive IVI: CarPlay, Android Auto, AAOS (`NHTSA` / `ISO 15005`)
|
|
69
|
+
|
|
70
|
+
Driver distraction is a physical safety hazard—enforce **NHTSA Visual-Manual Guidelines** and **ISO 15005** glance budgets strictly:
|
|
71
|
+
|
|
72
|
+
- **Glance & target floor**: every driving-accessible task must complete within **`< 2.0 s` per single glance** and **`< 12.0 s` cumulative glance time**, using physical touch targets **`>= 15×15 mm`** with high-contrast labels (`>= 4.5:1`–`7:1` under direct sunlight).
|
|
73
|
+
- **`speed > 0` motion interlocks**: the instant vehicle speed leaves `0` / `Park`, **lock complex QWERTY typing, long-list scrolling, settings setup, and video playback** (`CarUxRestrictionsManager`), handing off seamlessly to **voice (`PTT`) and steering-wheel switches** without losing context.
|
|
74
|
+
- **Instant zero-flash Day <-> Night tunnel switch**: pre-load both Day and Night token palettes in GPU/RAM so entering or exiting a dark highway tunnel switches themes in **`1` frame with zero white-screen flash** (never reload stylesheets or flash `#FFFFFF` into a night-adapted driver's eyes!).
|
|
75
|
+
|
|
76
|
+
### Apple CarPlay & CarPlay Ultra
|
|
77
|
+
- Build apps exclusively on Apple's category-entitled **CarPlay templates** (**`CPListTemplate`**, **`CPMapTemplate`**, **`CPTabBarTemplate`**, **`CPInformationTemplate`**, **`CPNowPlayingTemplate`**, **`CPGridTemplate`**) plus iOS 26 glanceable CarPlay widgets/Live Activities.
|
|
78
|
+
- **CarPlay Ultra** (instrument cluster + center console): respect strict cluster glance budgets, instant Day/Night luminance parity, and OEM telltale priority.
|
|
79
|
+
|
|
80
|
+
### Android Auto & Android Automotive OS (AAOS)
|
|
81
|
+
- **Car App Library (`androidx.car.app`) 5-template task quota**: cap flows at **5 templates**, ending on a documented terminal template (`NavigationTemplate`, `PaneTemplate`, `MessageTemplate`, `MediaPlaybackTemplate`, `SignInTemplate`, `LongMessageTemplate`).
|
|
82
|
+
- **AAOS Distraction Optimization (`CarUxRestrictionsManager`)**: declare `<meta-data android:name="distractionOptimized" android:value="true" />` and obey `UX_RESTRICTIONS_NO_KEYBOARD`, `UX_RESTRICTIONS_LIMIT_STRING_LENGTH`, `UX_RESTRICTIONS_LIMIT_CONTENT`, and `UX_RESTRICTIONS_NO_SETUP` live; keep passenger-zone screens strictly isolated from the driver display.
|
|
83
|
+
|
|
84
|
+
## Shared hardware verification
|
|
85
|
+
|
|
86
|
+
Never certify hardware surfaces from desktop browser screenshots. Verify on target devices (`rendered`; label missing hardware or regulatory sign-off `not-checked`):
|
|
87
|
+
- E-Ink partial vs full waveform schedule, `1-bit`/`4-bit` pure B&W crispness, and sleep-screen timestamp honesty;
|
|
88
|
+
- POS/Kiosk `38–122 cm` reachability mode, `>= 60×60 px` (`12–15 mm`) targets, audio-jack volume reset, `30–60 s` `"Still there?"` PII purge, printer paper-low/offline queue, and `72 h+` soak memory stability;
|
|
89
|
+
- MCU static `Flash`/`SRAM` map (`0` runtime heap churn), `VSYNC`/`TE` DMA tear check, and `15–30 ms` button debounce;
|
|
90
|
+
- Automotive `< 2.0 s` single / `< 12.0 s` cumulative glance timing, `>= 15×15 mm` targets, `speed > 0` `CarUxRestrictions` lockouts, and zero-flash tunnel Day <-> Night transitions.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# TV, console, and wearable interfaces
|
|
2
|
+
|
|
3
|
+
## TV & 10-foot fundamentals
|
|
4
|
+
|
|
5
|
+
Verified baseline constraints:
|
|
6
|
+
- **Viewing distance**: typical **3 meter / 10-foot** lean-back surface.
|
|
7
|
+
- **Overscan safe zones (`5%` / `10%`)**: keep interactive chrome inside the **`5%` action-safe inset** (`48 dp` L/R, `27 dp` T/B at `960×540` MDPI; `96 px` / `54 px` at `1080p`) and critical typography/logos inside the **`10%` title-safe inset** where legacy broadcast overscan or curved bezels apply; background art may bleed edge-to-edge.
|
|
8
|
+
- **Typography floors**: Apple's typography table lists tvOS default **29 pt** (minimum **23 pt**) and watchOS default **16 pt** (minimum **12 pt**). Treat minimums as floors—prefer larger sizes for critical glance labels.
|
|
9
|
+
- **QR Code / `RFC 8628` OAuth 2.0 Device Authorization Grant**: **never force users to peck a 32-character email + password on an on-screen TV remote keyboard** as the primary login! Render a scannable **QR code + short activation URL & 6–8 char user code (`RFC 8628`)** polling in the background, keeping on-screen keyboard entry strictly as a secondary fallback.
|
|
10
|
+
|
|
11
|
+
TV rules:
|
|
12
|
+
- Pair every focused tile with an unmistakable **focus halo** (**`scale(1.04–1.08)`** transform + `>= 3:1` high-contrast border/ring + elevation shadow; drop scale to `1.0` with thicker ring under `prefers-reduced-motion`).
|
|
13
|
+
- Move metadata into a focused preview panel rather than cramming paragraphs onto every grid card.
|
|
14
|
+
- Remember exact rail/item position when returning from detail or video playback.
|
|
15
|
+
- Never ship hover-only menus, tiny tooltips, right-click triggers, or dense multi-column desktop tables.
|
|
16
|
+
|
|
17
|
+
## D-pad spatial navigation & focus engines
|
|
18
|
+
|
|
19
|
+
| Focus state | Required behavior |
|
|
20
|
+
|---|---|
|
|
21
|
+
| **Initial entry** | Predictable useful default (resume watching / primary rail), never an arbitrary hidden top-left node. |
|
|
22
|
+
| **Directional move & column memory** | Build a deterministic **4-way (`Up/Down/Left/Right`) spatial graph** with **column-index / horizontal-coordinate memory across vertical rows** (pressing `Down` from column 4 into a 2-item hero banner and `Down` again restores column 4 in the next rail rather than resetting to column 1!). |
|
|
23
|
+
| **Boundary** | Stop visibly, wrap only when intentional, or transition predictably to sidebar/top navigation chrome. |
|
|
24
|
+
| **Content refresh** | Preserve focused item by stable ID; if removed, move to nearest neighbor—never drop focus to `null`. |
|
|
25
|
+
| **Modal / overlay** | Trap focus inside the modal while open and restore focus to the invoking trigger on `Back`. |
|
|
26
|
+
| **Scroll container** | Scroll smoothly enough to reveal focused card and context without overshooting or fighting fast held-down key repeats. |
|
|
27
|
+
|
|
28
|
+
## TV platforms & concrete idioms
|
|
29
|
+
|
|
30
|
+
### Roku BrightScript / SceneGraph
|
|
31
|
+
- Compose rails and grids with virtualized SceneGraph nodes (**`RowList`**, **`MarkupGrid`**) rather than manually instantiating hundreds of `Poster`/`Group` nodes.
|
|
32
|
+
- Handle D-pad, `back`, `options` (`*`), and playback transport keys explicitly in **`onKeyEvent(key as String, press as Boolean) as Boolean`**, returning `true` only when consumed so unhandled `back` presses bubble cleanly:
|
|
33
|
+
|
|
34
|
+
```brightscript
|
|
35
|
+
function onKeyEvent(key as String, press as Boolean) as Boolean
|
|
36
|
+
if not press then return false
|
|
37
|
+
if key = "options"
|
|
38
|
+
showOptionsDialog()
|
|
39
|
+
return true
|
|
40
|
+
else if key = "back" and m.optionsDialog.visible
|
|
41
|
+
hideOptionsDialog()
|
|
42
|
+
return true
|
|
43
|
+
end if
|
|
44
|
+
return false
|
|
45
|
+
end function
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- **Strict texture/RAM budgets**: low-end Roku sticks enforce tight graphics-memory caps. Request appropriately sized poster bitmaps (`loadWidth`/`loadHeight`, `loadDisplayMode="scaleToFit"`), unload off-screen art, and profile texture memory in Roku's BrightScript debug console.
|
|
49
|
+
|
|
50
|
+
### Compose for TV (`androidx.tv:tv-material`) & Leanback
|
|
51
|
+
- For new Android TV / Google TV apps, use **Compose for TV** (`androidx.tv:tv-material`: `Card`, `StandardCardContainer`, `Carousel`, `NavigationDrawer`, `Surface` with focus border/glow) and **`Modifier.focusRestorer()`** on lazy rails so returning from detail restores the exact focused card. **Leanback** (`androidx.leanback`) is legacy/maintenance—keep only in existing View-based apps.
|
|
52
|
+
|
|
53
|
+
```kotlin
|
|
54
|
+
val rowRequester = remember { FocusRequester() }
|
|
55
|
+
LazyRow(
|
|
56
|
+
modifier = Modifier.focusRestorer { rowRequester },
|
|
57
|
+
horizontalArrangement = Arrangement.spacedBy(20.dp),
|
|
58
|
+
) {
|
|
59
|
+
itemsIndexed(titles, key = { _, item -> item.id }) { index, item ->
|
|
60
|
+
Card(
|
|
61
|
+
onClick = { onSelect(item) },
|
|
62
|
+
modifier = if (index == 0) Modifier.focusRequester(rowRequester) else Modifier,
|
|
63
|
+
) { PosterTile(item) }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### tvOS (26)
|
|
69
|
+
- Drive focus declaratively in SwiftUI with **`@FocusState`**, **`.focusSection()`** (bridging sparse regions across gaps), **`.prefersDefaultFocus(_:in:)`**, and **`.onMoveCommand`**—never hack manual coordinates.
|
|
70
|
+
- On **tvOS 26**, apply **Liquid Glass** (`.glassEffect`) only to floating chrome/transport controls over artwork or video, verifying 10-foot contrast under Reduce Transparency and Increase Contrast; preserve system focus elevation/scale unless replaced with an equally unmistakable highlight.
|
|
71
|
+
|
|
72
|
+
```swift
|
|
73
|
+
@FocusState private var focusedID: String?
|
|
74
|
+
@Namespace private var heroScope
|
|
75
|
+
|
|
76
|
+
HStack(spacing: 32) {
|
|
77
|
+
ForEach(items) { item in
|
|
78
|
+
Button { play(item) } label: { PosterCard(item: item) }
|
|
79
|
+
.focused($focusedID, equals: item.id)
|
|
80
|
+
.prefersDefaultFocus(item.id == items.first?.id, in: heroScope)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
.focusSection()
|
|
84
|
+
.focusScope(heroScope)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Fire TV / Vega OS, React Native TV, LightningJS, webOS, & Tizen
|
|
88
|
+
- **Fire TV / Vega OS**: Fire TV spans Android-based Fire OS **and** Linux-based **Vega OS** (built around React Native for Vega / Kepler SDK). Verify the target Fire TV hardware/OS generation before assuming Android Compose/Leanback availability.
|
|
89
|
+
- **React Native TV & LightningJS**: use **`react-native-tvos`** (`TVFocusGuideView`, `hasTVPreferredFocus`, `nextFocusUp/Down/Left/Right`) for React Native TV targets, or **LightningJS / Lightning 3** (WebGL canvas renderer) on memory-constrained smart TVs and set-top boxes where DOM reflows drop frames.
|
|
90
|
+
- **LG webOS & Samsung Tizen**: on LG webOS, prefer **Enact** (`@enact/sandstone` + `@enact/spotlight` spatial focus engine). On Samsung Tizen, explicitly register hardware remote keys via **`tizen.tvinputdevice.registerKey('MediaPlayPause')`** (and color/channel keys)—unregistered keys never fire JS `keydown` events! Never assume desktop Chromium CSS/RAM parity on multi-year smart TV web engines.
|
|
91
|
+
|
|
92
|
+
### Console / game UI
|
|
93
|
+
Treat gamepads as continuous directional/stick input with explicit dead zones, held-stick acceleration, audio/haptic focus cues, console safe-area settings, and platform certification checklists (TRCs/XRs/Lotcheck)—never force virtual mouse cursors for core menus.
|
|
94
|
+
|
|
95
|
+
## Wearables: Compose for Wear OS & watchOS
|
|
96
|
+
|
|
97
|
+
Wearables are **`<= 2–3 second` single-glance** micro-task surfaces:
|
|
98
|
+
- **True `#000000` OLED canvas & `< 15–20%` AOD On-Pixel Ratio (`OPR`)**: render backgrounds as pure `#000000` so unlit OLED pixels draw zero current and blend seamlessly into watch bezels; in Always-On / ambient mode (`isLuminanceReduced`), strip filled cards to outlines/text so **`< 15–20%` of pixels remain lit**, preventing burn-in and battery drain.
|
|
99
|
+
- **One primary CTA per screen**: cap every screen at **`1` primary action** (`EdgeButton` or bottom pill) plus optional cancel/secondary action; expose rotary **Crown / Bezel scrolling with crisp haptic detents**. Prefer a complication, Tile, or Smart Stack widget over deep app navigation.
|
|
100
|
+
|
|
101
|
+
### Compose for Wear OS Material 3 Expressive (Wear OS 5 / 6)
|
|
102
|
+
- Build screens on **`AppScaffold`** + **`ScreenScaffold`** + **`TimeText`** (curved top clock), **`TransformingLazyColumn`** (automatically scales/morphs items around circular bezels), and **`EdgeButton`** (bezel-hugging curved bottom primary action).
|
|
103
|
+
- Bind rotating crown/bezel scrolling via **`Modifier.rotaryScrollable`** (with `RotaryScrollableDefaults.behavior(scrollableState)` and haptic detents), and adopt **Horologist** helpers where audio/media/layout utilities apply.
|
|
104
|
+
- Surface at-a-glance content via **Tiles (`ProtoLayout`)** and build watch faces strictly in declarative **Watch Face Format (WFF)** XML (mandatory on modern Wear OS—legacy Kotlin canvas watch faces are deprecated).
|
|
105
|
+
|
|
106
|
+
```kotlin
|
|
107
|
+
ScreenScaffold(scrollState = listState) {
|
|
108
|
+
TransformingLazyColumn(
|
|
109
|
+
state = listState,
|
|
110
|
+
modifier = Modifier.rotaryScrollable(
|
|
111
|
+
behavior = RotaryScrollableDefaults.behavior(listState),
|
|
112
|
+
focusRequester = focusRequester,
|
|
113
|
+
),
|
|
114
|
+
) {
|
|
115
|
+
items(items, key = { it.id }) { item -> TaskChip(item) }
|
|
116
|
+
item { EdgeButton(onClick = onStart) { Text("Start") } }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### watchOS (10–26)
|
|
122
|
+
- Design around **Smart Stack** widgets (`WidgetKit`) and full-screen vertical paging (**`.tabViewStyle(.verticalPage)`**) rather than cramped multi-button grids.
|
|
123
|
+
- Support Digital Crown input (**`.digitalCrownRotation(...)`** with haptic detents) and **Double Tap** primary gestures (**`.handGestureShortcut(.primaryAction)`**).
|
|
124
|
+
- Read **`@Environment(\.isLuminanceReduced)`** for Always-On Display: enforce `< 15–20%` OPR on `#000000`, pause sub-minute animations/timers, and keep the critical value readable at low power.
|
|
125
|
+
- On **watchOS 26**, verify **Liquid Glass** toolbar/pill controls remain sharp on small round-cornered OLED screens under Reduce Transparency and wrist-glare conditions.
|
|
126
|
+
|
|
127
|
+
## Verification matrix
|
|
128
|
+
|
|
129
|
+
Verify on real hardware or faithful device emulators (`rendered`; label untested hardware `not-checked`):
|
|
130
|
+
- 10-foot viewing distance, `5%` action / `10%` title overscan safe zones, `scale 1.04–1.08` focus halo, and **`RFC 8628` QR Device Authorization** sign-in;
|
|
131
|
+
- 4-way D-pad **column-index memory across vertical rows**, rapid held-down repeat, empty rows, and focus restoration after `Back`/playback;
|
|
132
|
+
- Wearables `#000000` OLED canvas, **`< 15–20%` AOD On-Pixel Ratio**, `<= 2–3 s` single-CTA task completion, circular mask clipping, and Crown/bezel haptic detents;
|
|
133
|
+
- Roku texture-memory caps, Tizen `registerKey` remote transport keys, and low-RAM smart TV scroll frame pacing;
|
|
134
|
+
- reduced motion, high contrast, text scaling, and offline/phone-companion disconnect recovery.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Voice UI, Realtime Voice AI agents, and platform assistants
|
|
2
|
+
|
|
3
|
+
Voice is transient, linear, and invisible—users cannot visually scan a menu. Keep turns brief, state explicit, latency bounded, and recovery inexpensive across classic IVR/SSML, 2025–2026 Realtime Voice AI agents, and OS assistant surfaces.
|
|
4
|
+
|
|
5
|
+
## Conversation model & prompt design
|
|
6
|
+
|
|
7
|
+
- **Strict turn budget (`<= 3` options, `< 10–12 s` spoken duration)**: working memory collapses on long audio lists—lead with **state/result first**, cap every spoken prompt under **`10–12 seconds`** (~25–30 words), and present **at most `3` options** per turn:
|
|
8
|
+
- Bad: *"Welcome to the Acme productivity assistant. How can I help you today?"*
|
|
9
|
+
- Better: *"Three invoices are ready. Review them, approve urgent, or say a supplier name."*
|
|
10
|
+
- Ask one question per turn; preserve conversational context across corrections (*"the second one"* resolves against mentioned/visible candidates).
|
|
11
|
+
- Distinguish **no-input** (silence timeout) from **no-match** (recognition/intent miss), ambiguity (*"Acme Corp or Acme Labs?"*), backend failure, and microphone/permission failure.
|
|
12
|
+
- Escalate no-input / no-match recovery progressively—never loop the identical prompt:
|
|
13
|
+
1. Targeted reprompt naming valid examples,
|
|
14
|
+
2. Simplified binary yes/no choice,
|
|
15
|
+
3. **Multimodal transcript / visual card fallback** (selectable list or text input),
|
|
16
|
+
4. Warm handoff preserving captured slots.
|
|
17
|
+
- Never make voice the sole path for critical functionality unless hardware mandates it.
|
|
18
|
+
|
|
19
|
+
## Realtime Voice AI & WebRTC voice agents (2025–2026)
|
|
20
|
+
|
|
21
|
+
Modern speech-to-speech and streaming pipelines (**OpenAI Realtime API**, **Gemini Live API**, **LiveKit Agents**, **Pipecat**, **ElevenLabs Conversational AI**) replace turn-locked IVR trees with low-latency full-duplex audio—creating distinct UX failure modes that must be engineered explicitly:
|
|
22
|
+
|
|
23
|
+
| Concern | Concrete engineering & UX rule |
|
|
24
|
+
|---|---|
|
|
25
|
+
| **Transport (WebRTC vs WebSocket)** | Use **WebRTC** (Opus, adaptive jitter buffer, UDP/ICE) between end-user devices and the voice server/edge for low latency and packet-loss resilience; keep raw WebSockets strictly on reliable server-to-model hops. |
|
|
26
|
+
| **Acoustic VAD vs semantic turn detection** | Pure acoustic VAD (e.g., Silero energy/speech silence timeout) frequently cuts users off mid-sentence while pausing to think or read a number. Pair acoustic VAD with **semantic end-of-turn (EOT)** detection and tune silence timeouts per task (tight for commands, generous for dictating IDs/addresses). |
|
|
27
|
+
| **`< 300 ms` local barge-in cutoff & transcript truncation** | Detect speech onset locally on the client VAD and **halt local speaker output in `< 300 ms`** (never wait for a server round-trip to silence audio!), **AND** send `conversation.item.truncate` with exact played-audio milliseconds so the LLM never assumes the user heard unplayed words. |
|
|
28
|
+
| **AEC & mic privacy indicators** | Enable WebRTC/OS Acoustic Echo Cancellation (`echoCancellation: true`, `noiseSuppression: true`, `autoGainControl: true`) so speaker output never self-triggers false barge-in. Display an unmistakable, non-color-only state indicator (`Muted`, `Listening`, `Thinking`, `Speaking`) plus an always-reachable single-tap Mute / End Call control. |
|
|
29
|
+
| **Latency masking during tool calls** | When a backend tool call exceeds ~500–800 ms, emit one concise truthful status cue (*"Checking order 4821 now…"*) or subtle non-looping earcon—never leave >1.5 s of dead silence (users assume disconnection and repeat themselves) and never spam synthetic filler chatter. |
|
|
30
|
+
| **Irreversible-action read-back confirmation** | Before executing payment, deletion, booking, or external-message tools, perform an **explicit spoken read-back** of the exact entity, amount, and recipient (*"Send $420 to Northwind Supplies—say confirm or cancel"*) or require on-screen tap confirmation. Treat retrieved web/tool text as untrusted data against prompt injection. |
|
|
31
|
+
|
|
32
|
+
## Platform assistant integrations
|
|
33
|
+
|
|
34
|
+
### Apple Siri & App Intents
|
|
35
|
+
Expose structured app actions natively via **`AppIntent`** and zero-setup natural phrases via **`AppShortcutsProvider`**, returning concise spoken **`IntentDialog`** paired with a glanceable SwiftUI **`ShowsSnippetView`** for multimodal devices:
|
|
36
|
+
|
|
37
|
+
```swift
|
|
38
|
+
import AppIntents
|
|
39
|
+
import SwiftUI
|
|
40
|
+
|
|
41
|
+
struct CheckNextInvoiceIntent: AppIntent {
|
|
42
|
+
static let title: LocalizedStringResource = "Check Next Invoice"
|
|
43
|
+
|
|
44
|
+
func perform() async throws -> some IntentResult & ProvidesDialog & ShowsSnippetView {
|
|
45
|
+
let invoice = try await InvoiceStore.shared.nextDue()
|
|
46
|
+
return .result(
|
|
47
|
+
dialog: "Invoice \(invoice.number) for \(invoice.formattedAmount) is due \(invoice.dueLabel).",
|
|
48
|
+
view: InvoiceSnippetView(invoice: invoice)
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
struct InvoiceShortcuts: AppShortcutsProvider {
|
|
54
|
+
static var appShortcuts: [AppShortcut] {
|
|
55
|
+
AppShortcut(
|
|
56
|
+
intent: CheckNextInvoiceIntent(),
|
|
57
|
+
phrases: ["Check my next invoice in \(.applicationName)"],
|
|
58
|
+
shortTitle: "Next Invoice",
|
|
59
|
+
systemImageName: "doc.text"
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Amazon Alexa / APL / Alexa+
|
|
66
|
+
- Pair voice responses with **Alexa Presentation Language (APL)** responsive templates on Echo Show / Fire TV screens while ensuring every primary flow still completes cleanly on screenless Echo speakers.
|
|
67
|
+
- For **Alexa+** agentic/LLM-backed skills and actions, publish strict typed tool/action schemas with unambiguous confirmation rules for stateful actions and concise structured outputs the assistant can summarize naturally.
|
|
68
|
+
|
|
69
|
+
### Google Gemini App Functions (Android)
|
|
70
|
+
- Expose typed app capabilities via Android **AppFunctions** (`@AppFunction` / `androidx.appfunctions`) so on-device and Gemini assistants invoke deterministic, permission-scoped app actions directly rather than relying on fragile UI screen scraping.
|
|
71
|
+
|
|
72
|
+
## SSML basics (classic TTS & telephony)
|
|
73
|
+
|
|
74
|
+
SSML (W3C Speech Synthesis Markup Language) controls pronunciation, pacing, and data formatting in classic TTS/IVR engines. Validate every tag on the exact target engine—tag support varies widely across Polly, Azure Speech, Google Cloud TTS, and telephony gateways:
|
|
75
|
+
|
|
76
|
+
```xml
|
|
77
|
+
<speak>
|
|
78
|
+
Invoice <say-as interpret-as="characters">INV</say-as>
|
|
79
|
+
<say-as interpret-as="digits">1042</say-as>
|
|
80
|
+
is due <say-as interpret-as="date" format="mdy">03/14/2026</say-as>.
|
|
81
|
+
<break time="300ms"/>
|
|
82
|
+
Say approve or review.
|
|
83
|
+
</speak>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Use `say-as` for digits/characters/dates/currencies, `break` for breathing rhythm, `sub` for acronym pronunciation, `lang` for inline language switches, and `emphasis`/`phoneme` sparingly.
|
|
87
|
+
|
|
88
|
+
## Do/don't pairs
|
|
89
|
+
|
|
90
|
+
| Do | Don't |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Flush audio AND truncate unplayed assistant text from LLM context on barge-in | Leave interrupted sentences in transcript history causing phantom confirmations |
|
|
93
|
+
| Use WebRTC + AEC + semantic EOT turn detection for live voice agents | Rely on raw silence timers over lossy WebSockets that cut users off mid-number |
|
|
94
|
+
| Restate concrete parameters and require confirmation for irreversible tool calls | Execute payments, deletes, or emails silently from noisy ASR or tool data |
|
|
95
|
+
| Expose native `AppIntent` / `AppShortcutsProvider` / Android `@AppFunction` hooks | Force users through brittle screen-scraping or multi-level IVR menus |
|
|
96
|
+
| Emit a brief truthful cue when tool latency exceeds ~600 ms | Leave 3 seconds of dead silence or endlessly loop *"Hold on…"* filler |
|
|
97
|
+
|
|
98
|
+
## Verification
|
|
99
|
+
|
|
100
|
+
Test live audio paths on target hardware/networks (`rendered`; label untested acoustics/telephony `not-checked`):
|
|
101
|
+
- measure **TTFA** (time to first audio) from end-of-speech under normal and 3G/jittery networks;
|
|
102
|
+
- verify **barge-in truncation** (interrupt mid-sentence, then ask *"What did you just say?"*—the agent must only recall words actually played);
|
|
103
|
+
- test speakerphone **AEC** (verify agent audio does not trigger false self-interruption), background noise, accents, microphone permission denial, and mute toggle honesty;
|
|
104
|
+
- verify irreversible-action confirmations, multimodal screen fallback (APL / Siri snippet / in-app UI), and SSML rendering on the actual speech engine.
|