@vesviet/agent-skills 5.8.0 → 5.11.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/INDEX.md +35 -22
- package/README.md +7 -18
- package/VERSION +1 -1
- package/adapters/antigravity/ANTIGRAVITY.md +40 -142
- package/adapters/antigravity/INDEX_TIER1.json +174 -146
- package/adapters/antigravity/a2a-config.template.yaml +1 -1
- package/adapters/antigravity/antigravity-tools.md +25 -0
- package/adapters/antigravity/role-skill-index.json +175 -58
- package/adapters/claude/CLAUDE_ADAPTER.md +3 -7
- package/adapters/claude/settings.template.json +18 -3
- package/adapters/cursor/README.md +1 -5
- package/adapters/cursor/hooks.template.json +4 -2
- package/core/contracts/README.md +0 -20
- package/core/contracts/schemas/compact-working-state.json +42 -1
- package/core/contracts/schemas/ui-component-spec.json +28 -2
- package/core/policies/README.md +0 -20
- package/core/policies/action-boundaries.yaml +10 -1
- package/core/policies/execution-sandbox.md +0 -12
- package/core/policies/mcp-tool-map.yaml +28 -0
- package/core/roles/3d-graphics-engineer.md +144 -208
- package/core/roles/README.md +1 -23
- package/core/roles/agent-coordinator.md +28 -147
- package/core/roles/agent-discovery-engineer.md +46 -39
- package/core/roles/ai-systems-engineer.md +2 -0
- package/core/roles/backend-developer.md +22 -117
- package/core/roles/cloudflare-engineer.md +1 -1
- package/core/roles/data-engineer.md +3 -1
- package/core/roles/devops-engineer.md +4 -3
- package/core/roles/ecommerce-engineer.md +18 -6
- package/core/roles/frontend-developer.md +146 -317
- package/core/roles/game-developer.md +2 -1
- package/core/roles/mobile-engineer.md +18 -204
- package/core/roles/product-manager.md +3 -3
- package/core/roles/project-manager.md +5 -5
- package/core/roles/references/3d-graphics-engineer-review-checklist.md +109 -109
- package/core/roles/references/agent-coordinator-responsibilities.md +120 -0
- package/core/roles/references/agent-coordinator-review-checklist.md +22 -4
- package/core/roles/references/agent-discovery-engineer-review-checklist.md +29 -20
- package/core/roles/references/backend-developer-responsibilities.md +47 -0
- package/core/roles/references/backend-developer-review-checklist.md +15 -0
- package/core/roles/references/business-analyst-responsibilities.md +2 -2
- package/core/roles/references/frontend-developer-responsibilities.md +14 -6
- package/core/roles/references/frontend-developer-review-checklist.md +13 -6
- package/core/roles/references/mobile-engineer-responsibilities.md +137 -0
- package/core/roles/references/mobile-engineer-review-checklist.md +63 -0
- package/core/roles/references/reviewer-review-checklist.md +54 -0
- package/core/roles/references/sdet-review-checklist.md +53 -0
- package/core/roles/references/solution-architect-responsibilities.md +134 -0
- package/core/roles/references/sre-review-checklist.md +81 -0
- package/core/roles/references/system-engineer-responsibilities.md +124 -0
- package/core/roles/references/technical-architect-responsibilities.md +192 -0
- package/core/roles/references/technical-architect-review-checklist.md +58 -0
- package/core/roles/references/technical-lead-review-checklist.md +65 -0
- package/core/roles/references/ui-ux-designer-anti-slop-standards.md +61 -35
- package/core/roles/references/ui-ux-designer-responsibilities.md +79 -226
- package/core/roles/references/ui-ux-designer-review-checklist.md +102 -116
- package/core/roles/references/vietnam-accounting-specialist-review-checklist.md +6 -6
- package/core/roles/researcher.md +3 -3
- package/core/roles/reviewer.md +2 -2
- package/core/roles/role-standard.md +79 -205
- package/core/roles/sdet.md +5 -6
- package/core/roles/security-engineer.md +4 -3
- package/core/roles/solution-architect.md +9 -130
- package/core/roles/sre.md +1 -0
- package/core/roles/system-engineer.md +15 -155
- package/core/roles/task-planner.md +1 -1
- package/core/roles/technical-architect.md +15 -244
- package/core/roles/technical-lead.md +1 -0
- package/core/roles/technical-writer.md +3 -3
- package/core/roles/ui-ux-designer.md +158 -303
- package/core/roles/vietnam-accounting-specialist.md +20 -20
- package/core/rules/README.md +0 -22
- package/core/rules/code.md +11 -6
- package/core/skills/README.md +12 -25
- package/core/skills/agent/agent-delegation/SKILL.md +11 -0
- package/core/skills/agent/agent-graph-orchestration/SKILL.md +5 -0
- package/core/skills/agent/agent-memory-compaction/SKILL.md +79 -82
- package/core/skills/agent/agent-memory-compaction/references/anchored-schema-and-compaction-algorithms.md +74 -115
- package/core/skills/agent/agent-model-routing/SKILL.md +2 -0
- package/core/skills/agent/agent-observability/SKILL.md +12 -6
- package/core/skills/agent/agent-observability/references/session-forensics-7-dimensions.md +41 -0
- package/core/skills/agent/agent-panel-meeting/SKILL.md +3 -3
- package/core/skills/agent/agent-quality-gate/SKILL.md +9 -0
- package/core/skills/agent/configure-agent-commerce/SKILL.md +2 -0
- package/core/skills/agent/configure-agent-commerce/examples/ucp-commerce-manifest-and-endpoints.json +55 -0
- package/core/skills/agent/configure-agent-commerce/references/acp-ucp-agent-commerce-manifest-specs.md +66 -0
- package/core/skills/agent/configure-agent-headers/SKILL.md +3 -0
- package/core/skills/agent/configure-agent-skills/SKILL.md +4 -4
- package/core/skills/agent/configure-oauth-metadata/SKILL.md +10 -7
- package/core/skills/agent/manage-agent-identity/SKILL.md +2 -0
- package/core/skills/agent/manage-agent-identity/examples/agent-identity-spire-workload.yaml +72 -0
- package/core/skills/agent/manage-agent-identity/references/nhi-lifecycle-and-token-rotation.md +45 -0
- package/core/skills/ai/deploy-vllm-inference/SKILL.md +2 -0
- package/core/skills/ai/deploy-vllm-inference/examples/vllm-production-serve-config.yaml +22 -0
- package/core/skills/ai/deploy-vllm-inference/references/vllm-v1-paged-attention-and-kv-tiering.md +20 -0
- package/core/skills/ai/openrouter-task/SKILL.md +5 -5
- package/core/skills/ai-agent/context-optimization/SKILL.md +2 -0
- package/core/skills/ai-agent/context-optimization/examples/context-pruner-and-reorderer.py +85 -0
- package/core/skills/ai-agent/context-optimization/references/token-budgeting-and-attention-allocation.md +47 -0
- package/core/skills/ai-agent/memory-hygiene/SKILL.md +13 -0
- package/core/skills/ai-agent/memory-hygiene/examples/memory-audit-and-compaction-routine.py +90 -0
- package/core/skills/ai-agent/memory-hygiene/references/agent-memory-vault-spec.md +137 -0
- package/core/skills/ai-agent/memory-hygiene/references/owasp-asi06-and-memory-poisoning-defense.md +38 -0
- package/core/skills/backend/add-api-endpoint/SKILL.md +9 -0
- package/core/skills/backend/add-api-endpoint/examples/express-zod-rfc9457-endpoint.md +329 -0
- package/core/skills/backend/add-api-endpoint/examples/kratos-go-clean-architecture-endpoint.md +405 -0
- package/core/skills/backend/add-api-endpoint/references/idempotency-and-rate-limiting.md +116 -0
- package/core/skills/backend/add-event-handler/SKILL.md +12 -1
- package/core/skills/backend/add-event-handler/examples/go-outbox-skip-locked-relay.go +97 -0
- package/core/skills/backend/add-event-handler/references/transactional-outbox-and-cloudevents.md +42 -0
- package/core/skills/backend/add-service-client/SKILL.md +2 -0
- package/core/skills/backend/add-service-client/examples/ts-circuit-breaker-full-jitter-client.ts +71 -0
- package/core/skills/backend/add-service-client/references/resilient-client-circuit-breaker-specs.md +25 -0
- package/core/skills/backend/build-mcp-server/SKILL.md +2 -0
- package/core/skills/backend/build-mcp-server/examples/ts-stateless-mcp-server-zod.ts +52 -0
- package/core/skills/backend/build-mcp-server/references/mcp-2026-stateless-contract-specs.md +21 -0
- package/core/skills/backend/design-caching-and-locking/SKILL.md +83 -0
- package/core/skills/backend/design-caching-and-locking/examples/redis-lua-atomic-reservation-fencing.lua +30 -0
- package/core/skills/backend/design-caching-and-locking/references/redis-lua-fencing-and-stampede-specs.md +25 -0
- package/core/skills/backend/design-caching-and-locking/scripts/verify_lua_atomicity.py +68 -0
- package/core/skills/backend/implement-auth/SKILL.md +9 -0
- package/core/skills/backend/implement-structured-outputs/SKILL.md +2 -0
- package/core/skills/backend/implement-structured-outputs/examples/python-pydantic-structured-output.py +65 -0
- package/core/skills/backend/implement-structured-outputs/references/constrained-decoding-and-double-validation.md +18 -0
- package/core/skills/backend/optimize-postgres/SKILL.md +9 -0
- package/core/skills/backend/scaffold-new-service/SKILL.md +2 -1
- package/core/skills/backend/scaffold-new-service/references/deep-modules-and-seams.md +43 -0
- package/core/skills/business/elicit-requirements/SKILL.md +2 -0
- package/core/skills/business/trace-requirements-impact/SKILL.md +1 -0
- package/core/skills/business/write-use-cases/SKILL.md +1 -0
- package/core/skills/commerce/handle-checkout-flow/SKILL.md +18 -66
- package/core/skills/commerce/handle-checkout-flow/examples/production-checkout-orchestrator.ts +185 -0
- package/core/skills/commerce/handle-checkout-flow/references/pci-dss-v4-and-agentic-checkout-specs.md +72 -0
- package/core/skills/commerce/integrate-payment-gateway/SKILL.md +22 -58
- package/core/skills/commerce/integrate-payment-gateway/examples/resilient-webhook-and-mpp-handler.ts +164 -0
- package/core/skills/commerce/integrate-payment-gateway/references/mpp-x402-and-webhook-security-specs.md +47 -0
- package/core/skills/commerce/manage-order-fulfillment/SKILL.md +17 -50
- package/core/skills/commerce/manage-order-fulfillment/examples/temporal-fulfillment-saga.ts +104 -0
- package/core/skills/commerce/manage-order-fulfillment/references/event-sourced-fulfillment-and-carrier-webhooks.md +58 -0
- package/core/skills/commerce/manage-product-catalog/SKILL.md +5 -1
- package/core/skills/commerce/manage-product-catalog/examples/hybrid-search-and-governance-pipeline.ts +120 -0
- package/core/skills/commerce/manage-product-catalog/references/semantic-vector-catalog-and-graphrag.md +54 -0
- package/core/skills/content/write-article/SKILL.md +1 -1
- package/core/skills/document/docx/SKILL.md +1 -0
- package/core/skills/document/pdf/SKILL.md +2 -0
- package/core/skills/document/pdf/references/pdf-acroforms-and-pdfplumber-specs.md +54 -0
- package/core/skills/document/pdf/scripts/check_fillable_fields.py +144 -0
- package/core/skills/document/pdf/scripts/fill_fillable_fields.py +145 -0
- package/core/skills/document/xlsx/SKILL.md +1 -0
- package/core/skills/documentation/configure-llms-txt/SKILL.md +3 -0
- package/core/skills/documentation/configure-llms-txt/examples/canonical-llms-txt-and-full-txt.md +45 -0
- package/core/skills/documentation/configure-llms-txt/references/llms-txt-and-llms-full-txt-standard.md +37 -0
- package/core/skills/documentation/write-documentation/SKILL.md +4 -1
- package/core/skills/documentation/write-documentation/examples/microservice-production-readme-and-api-docs.md +70 -0
- package/core/skills/documentation/write-documentation/references/diataxis-framework-and-doc-standards.md +62 -0
- package/core/skills/documentation/write-tech-radar/SKILL.md +1 -0
- package/core/skills/education/create-exercises/SKILL.md +1 -0
- package/core/skills/education/design-learning-plan/SKILL.md +1 -0
- package/core/skills/education/grade-and-review/SKILL.md +1 -0
- package/core/skills/foundation/accessibility-review/SKILL.md +1 -0
- package/core/skills/foundation/ai-risk-assessment/SKILL.md +4 -5
- package/core/skills/foundation/ai-risk-assessment/examples/genai-system-risk-register.md +67 -0
- package/core/skills/foundation/ai-risk-assessment/references/nist-ai-rmf-and-eu-ai-act-taxonomy.md +49 -0
- package/core/skills/foundation/combinatorial-testing/SKILL.md +1 -0
- package/core/skills/foundation/conduct-research/SKILL.md +2 -2
- package/core/skills/foundation/conduct-research/references/ai-era-source-discipline.md +1 -1
- package/core/skills/foundation/create-migration/SKILL.md +10 -0
- package/core/skills/foundation/design-review/SKILL.md +9 -10
- package/core/skills/foundation/design-ux-flow/SKILL.md +9 -7
- package/core/skills/foundation/discernment-nudge/SKILL.md +2 -0
- package/core/skills/foundation/hostile-component-stress-testing/SKILL.md +1 -0
- package/core/skills/foundation/incident-report/SKILL.md +1 -0
- package/core/skills/foundation/plan-technical-delivery/SKILL.md +3 -1
- package/core/skills/foundation/playwright-evidence-qa/SKILL.md +1 -0
- package/core/skills/foundation/refactor-legacy-code/SKILL.md +84 -0
- package/core/skills/foundation/refactor-legacy-code/examples/characterization-test-seam-extraction.py +34 -0
- package/core/skills/foundation/refactor-legacy-code/references/strangler-fig-seams-and-characterization-tests.md +17 -0
- package/core/skills/foundation/refactor-legacy-code/scripts/check_refactor_blast_radius.py +63 -0
- package/core/skills/foundation/release-notes/SKILL.md +3 -3
- package/core/skills/foundation/release-notes/examples/enterprise-platform-release-notes.md +42 -0
- package/core/skills/foundation/release-notes/references/keep-a-changelog-and-semver-governance.md +43 -0
- package/core/skills/foundation/systematic-debugging/SKILL.md +15 -0
- package/core/skills/foundation/webapp-server-runner/SKILL.md +1 -0
- package/core/skills/foundation/write-product-brief/SKILL.md +1 -0
- package/core/skills/foundation/write-tests/SKILL.md +9 -0
- package/core/skills/foundation/write-tests/examples/anti-tautological-tdd-walkthrough.md +204 -0
- package/core/skills/foundation/write-tests/examples/testcontainers-kratos-integration-test.md +186 -0
- package/core/skills/foundation/write-tests/references/contract-and-chaos-testing.md +187 -0
- package/core/skills/frontend/INDEX.json +16 -0
- package/core/skills/frontend/add-page-route/SKILL.md +10 -8
- package/core/skills/frontend/add-page-route/examples/streaming-rsc-page-with-view-transition.tsx +133 -0
- package/core/skills/frontend/add-page-route/references/rsc-routing-and-view-transitions.md +72 -0
- package/core/skills/frontend/add-ui-component/SKILL.md +4 -1
- package/core/skills/frontend/add-ui-component/examples/compound-dialog-and-form-actions.tsx +193 -0
- package/core/skills/frontend/add-ui-component/references/react19-component-standards-and-anti-slop.md +55 -0
- package/core/skills/frontend/component-composition/SKILL.md +12 -1
- package/core/skills/frontend/component-composition/examples/headless-combobox-compound-component.tsx +207 -0
- package/core/skills/frontend/design-md-specification/SKILL.md +5 -0
- package/core/skills/frontend/design-system-engineering/SKILL.md +4 -2
- package/core/skills/frontend/frontend-micro-polish/SKILL.md +1 -0
- package/core/skills/frontend/frontend-testing/SKILL.md +4 -1
- package/core/skills/frontend/frontend-testing/examples/playwright-e2e-with-msw-and-axe.spec.ts +87 -0
- package/core/skills/frontend/frontend-testing/references/playwright-msw-and-a11y-testing-standards.md +78 -0
- package/core/skills/frontend/implement-ai-disclosure/SKILL.md +119 -0
- package/core/skills/frontend/implement-view-transitions/SKILL.md +1 -0
- package/core/skills/frontend/implement-webmcp/SKILL.md +7 -4
- package/core/skills/frontend/implement-webmcp/examples/webmcp-provider-and-hitl-modal.tsx +163 -0
- package/core/skills/frontend/implement-webmcp/references/webmcp-architecture-and-hitl-security.md +48 -0
- package/core/skills/frontend/integrate-api-client/SKILL.md +12 -12
- package/core/skills/frontend/integrate-api-client/examples/orval-query-and-streaming-mutation.ts +102 -0
- package/core/skills/frontend/integrate-api-client/references/orval-tanstack-query-and-streaming-specs.md +57 -0
- package/core/skills/frontend/interactive-component-workbench/SKILL.md +1 -0
- package/core/skills/frontend/motion-performance-engineering/SKILL.md +1 -0
- package/core/skills/frontend/setup-design-system/SKILL.md +6 -3
- package/core/skills/frontend/setup-design-system/examples/tailwind-v4-theme-and-dtcg-tokens.css +87 -0
- package/core/skills/frontend/setup-design-system/references/tailwind-v4-oklch-and-dtcg-tokens.md +61 -0
- package/core/skills/frontend/setup-visual-regression/SKILL.md +8 -5
- package/core/skills/frontend/setup-visual-regression/examples/visual-regression-playwright.config.ts +83 -0
- package/core/skills/frontend/setup-visual-regression/references/visual-regression-docker-and-masking-specs.md +46 -0
- package/core/skills/frontend/ui-ux-designer-anti-slop-standards.md +64 -42
- package/core/skills/frontend/web-quality-audit/SKILL.md +1 -0
- package/core/skills/gamedev/abstract-input-actions/SKILL.md +2 -0
- package/core/skills/gamedev/abstract-input-actions/examples/input-action-manager.ts +85 -0
- package/core/skills/gamedev/abstract-input-actions/references/action-mapping-and-analog-deadzones.md +54 -0
- package/core/skills/gamedev/architect-ecs-systems/SKILL.md +2 -0
- package/core/skills/gamedev/architect-ecs-systems/examples/bevy-flecs-combat-system.rs +73 -0
- package/core/skills/gamedev/architect-ecs-systems/references/data-oriented-design-and-archetype-ecs.md +39 -0
- package/core/skills/gamedev/author-game-ai/SKILL.md +2 -0
- package/core/skills/gamedev/author-game-ai/examples/modular-behavior-tree-ai.ts +98 -0
- package/core/skills/gamedev/author-game-ai/references/behavior-trees-and-utility-ai-curves.md +47 -0
- package/core/skills/gamedev/configure-physics-collision/SKILL.md +2 -0
- package/core/skills/gamedev/configure-physics-collision/examples/kinematic-physics-substepping.cpp +100 -0
- package/core/skills/gamedev/configure-physics-collision/references/continuous-collision-detection-and-substepping.md +50 -0
- package/core/skills/gamedev/develop-gameplay-systems/SKILL.md +2 -0
- package/core/skills/gamedev/develop-gameplay-systems/examples/kinematic-character-controller.gd +86 -0
- package/core/skills/gamedev/develop-gameplay-systems/references/deterministic-gameplay-state-machines.md +42 -0
- package/core/skills/gamedev/implement-save-persistence/SKILL.md +2 -0
- package/core/skills/gamedev/implement-save-persistence/examples/versioned-save-manager.ts +127 -0
- package/core/skills/gamedev/implement-save-persistence/references/versioned-save-schemas-and-checksums.md +44 -0
- package/core/skills/gamedev/render-webgl-threejs/SKILL.md +14 -10
- package/core/skills/gamedev/render-webgl-threejs/examples/production-threejs-webgpu-scene.ts +116 -0
- package/core/skills/gamedev/render-webgl-threejs/references/webgpu-threejs-pbr-pipeline.md +72 -0
- package/core/skills/legal-compliance/audit-ai-compliance/SKILL.md +1 -0
- package/core/skills/legal-compliance/draft-legal-opinion/SKILL.md +1 -0
- package/core/skills/legal-compliance/manage-vietnam-legal/SKILL.md +1 -0
- package/core/skills/meetings-analysis/analyze-business-requirements/SKILL.md +1 -0
- package/core/skills/meetings-analysis/analyze-data/SKILL.md +1 -0
- package/core/skills/meetings-analysis/meeting-review/SKILL.md +1 -0
- package/core/skills/mmo/analyze-campaign-roi/SKILL.md +2 -0
- package/core/skills/mmo/analyze-campaign-roi/examples/campaign-roi-and-roas-dashboard.py +80 -0
- package/core/skills/mmo/analyze-campaign-roi/references/multi-touch-attribution-and-cpa-analytics.md +33 -0
- package/core/skills/mmo/create-automation-script/SKILL.md +2 -0
- package/core/skills/mmo/create-automation-script/examples/stealth-browser-automation-flow.ts +65 -0
- package/core/skills/mmo/create-automation-script/references/stealth-cdp-and-behavioral-mimicry.md +37 -0
- package/core/skills/mmo/deploy-mmo-infrastructure/SKILL.md +3 -0
- package/core/skills/mmo/deploy-mmo-infrastructure/examples/proxy-health-probe-and-rotation-daemon.py +75 -0
- package/core/skills/mmo/deploy-mmo-infrastructure/references/proxy-pool-rotation-and-anti-detect-specs.md +45 -0
- package/core/skills/mmo/deploy-proxyware-fleet/SKILL.md +3 -0
- package/core/skills/mmo/deploy-proxyware-fleet/examples/docker-compose-depin-light-node-fleet.yaml +52 -0
- package/core/skills/mmo/deploy-proxyware-fleet/references/depin-bandwidth-monetization-node-specs.md +43 -0
- package/core/skills/mmo/generate-mmo-content/SKILL.md +2 -0
- package/core/skills/mmo/generate-mmo-content/examples/pseo-programmatic-page-generator.ts +76 -0
- package/core/skills/mmo/generate-mmo-content/references/pseo-landing-pages-and-social-video-hooks.md +39 -0
- package/core/skills/mmo/manage-mmo-assets/SKILL.md +2 -0
- package/core/skills/mmo/manage-mmo-assets/examples/mmo-asset-vault-manager.py +63 -0
- package/core/skills/mmo/manage-mmo-assets/references/mmo-asset-rbac-and-vault-isolation.md +38 -0
- package/core/skills/mmo/setup-tracking-system/SKILL.md +2 -0
- package/core/skills/mmo/setup-tracking-system/examples/meta-capi-s2s-event-dispatcher.ts +79 -0
- package/core/skills/mmo/setup-tracking-system/references/server-to-server-postback-and-capi-specs.md +45 -0
- package/core/skills/mobile/deploy-mobile-app/SKILL.md +1 -0
- package/core/skills/mobile/develop-mobile-app/SKILL.md +1 -0
- package/core/skills/platform/add-telemetry-instrumentation/SKILL.md +2 -0
- package/core/skills/platform/add-telemetry-instrumentation/examples/kratos-otel-middleware-instrumentation.go +87 -0
- package/core/skills/platform/add-telemetry-instrumentation/references/opentelemetry-semantic-conventions-2026.md +37 -0
- package/core/skills/platform/agents-sdk/SKILL.md +1 -0
- package/core/skills/platform/aws-infrastructure/SKILL.md +2 -0
- package/core/skills/platform/aws-infrastructure/examples/opentofu-eks-pod-identity-vpc.tf +101 -0
- package/core/skills/platform/aws-infrastructure/references/opentofu-aws-zero-trust-and-irsa.md +40 -0
- package/core/skills/platform/cloudflare-email-service/SKILL.md +2 -2
- package/core/skills/platform/configure-ci-cd-pipeline/SKILL.md +83 -0
- package/core/skills/platform/configure-ci-cd-pipeline/examples/hardened-ci-matrix-workflow.yml +33 -0
- package/core/skills/platform/configure-ci-cd-pipeline/references/github-actions-sha-pinning-and-slsa-specs.md +22 -0
- package/core/skills/platform/configure-ci-cd-pipeline/scripts/audit_workflow_pinning.py +74 -0
- package/core/skills/platform/debug-runtime-platform/SKILL.md +1 -2
- package/core/skills/platform/debug-workers-edge/SKILL.md +2 -2
- package/core/skills/platform/durable-objects/SKILL.md +1 -0
- package/core/skills/platform/orchestrate-chaos-experiment/SKILL.md +1 -0
- package/core/skills/platform/sandbox-sdk/SKILL.md +1 -0
- package/core/skills/platform/setup-deployment/SKILL.md +6 -2
- package/core/skills/platform/setup-deployment/examples/kustomize-production-service-manifests.yaml +123 -0
- package/core/skills/platform/setup-deployment/references/interactive-hitl-wizard.md +55 -0
- package/core/skills/platform/setup-deployment/references/k8s-gitops-and-kustomize-invariants.md +40 -0
- package/core/skills/platform/setup-gpu-finops/SKILL.md +2 -0
- package/core/skills/platform/setup-gpu-finops/examples/gpu-finops-prometheus-rules.yaml +23 -0
- package/core/skills/platform/setup-gpu-finops/references/dcgm-kubecost-gpu-attribution-specs.md +16 -0
- package/core/skills/platform/setup-llm-gateway/SKILL.md +2 -0
- package/core/skills/platform/setup-llm-gateway/examples/litellm-gateway-config.yaml +28 -0
- package/core/skills/platform/setup-llm-gateway/references/litellm-routing-budget-failover-specs.md +16 -0
- package/core/skills/platform/supply-chain-security/SKILL.md +3 -2
- package/core/skills/platform/supply-chain-security/examples/github-actions-sbom-cosign.yaml +57 -0
- package/core/skills/platform/supply-chain-security/references/slsa-provenance-and-sbom-sigstore.md +60 -0
- package/core/skills/platform/turnstile-spin/SKILL.md +2 -2
- package/core/skills/platform/web-perf/SKILL.md +2 -2
- package/core/skills/platform/workers-best-practices/SKILL.md +1 -0
- package/core/skills/platform/wrangler/SKILL.md +1 -0
- package/core/skills/product/build-story-map/SKILL.md +3 -0
- package/core/skills/product/define-product-strategy/SKILL.md +1 -0
- package/core/skills/product/model-saas-metrics/SKILL.md +1 -0
- package/core/skills/product/prioritize-roadmap/SKILL.md +1 -0
- package/core/skills/repo-ops/commit-code/SKILL.md +1 -0
- package/core/skills/repo-ops/navigate-service/SKILL.md +28 -132
- package/core/skills/repo-ops/navigate-service/examples/service-boundary-map-example.md +14 -0
- package/core/skills/repo-ops/navigate-service/references/service-topology-mapping-guide.md +18 -0
- package/core/skills/repo-ops/review-code/SKILL.md +12 -2
- package/core/skills/repo-ops/review-code/examples/adversarial-two-axis-pr-review.md +167 -0
- package/core/skills/repo-ops/review-code/examples/ai-vibe-slop-remediation.md +220 -0
- package/core/skills/repo-ops/review-code/references/supply-chain-and-migration-safety.md +103 -0
- package/core/skills/repo-ops/review-service/SKILL.md +4 -1
- package/core/skills/repo-ops/review-service/examples/service-release-audit-report.md +21 -0
- package/core/skills/repo-ops/review-service/references/release-readiness-audit-rubric.md +21 -0
- package/core/skills/repo-ops/troubleshoot-service/SKILL.md +1 -0
- package/core/skills/security-data/database-maintenance/SKILL.md +1 -1
- package/core/skills/security-data/manage-secrets/SKILL.md +2 -0
- package/core/skills/security-data/manage-secrets/examples/external-secrets-vault-crds.yaml +53 -0
- package/core/skills/security-data/manage-secrets/references/zero-trust-secret-rotation-and-eso.md +30 -0
- package/core/skills/security-data/manage-vietnam-accounting/SKILL.md +8 -7
- package/core/skills/security-data/prompt-injection-defense/SKILL.md +2 -0
- package/core/skills/security-data/prompt-injection-defense/examples/bounded-tool-execution-wrapper.py +78 -0
- package/core/skills/security-data/prompt-injection-defense/references/prompt-injection-taxonomy-and-delimiters.md +37 -0
- package/core/skills/security-data/reverse-engineer-binary/SKILL.md +3 -0
- package/core/skills/security-data/reverse-engineer-binary/examples/binary-triage-and-vulnerability-dossier.md +58 -0
- package/core/skills/security-data/reverse-engineer-binary/references/ghidra-radare2-and-rea-evidence-ledgers.md +43 -0
- package/core/skills/security-data/security-audit/SKILL.md +3 -1
- package/core/skills/security-data/security-audit/examples/enterprise-service-security-audit-report.md +54 -0
- package/core/skills/security-data/security-audit/references/owasp-asi-and-cvss4-threat-modeling.md +39 -0
- package/core/skills/security-data/skill-preflight-ast-check/SKILL.md +3 -0
- package/core/skills/security-data/skill-preflight-ast-check/references/ast-lethal-trifecta-and-static-vetting.md +38 -0
- package/core/skills/security-data/skill-preflight-ast-check/scripts/scan-skill-ast.py +127 -0
- package/core/skills/seo/audit-technical-seo/SKILL.md +1 -0
- package/core/skills/seo/implement-schema-markup/SKILL.md +1 -0
- package/core/workflows/README.md +0 -20
- package/overlays/README.md +2 -22
- package/overlays/astro-cloudflare/README.md +0 -20
- package/overlays/astro-cloudflare/rules/astro-cloudflare-conventions.md +0 -31
- package/overlays/b2b-catalog-golf/README.md +0 -20
- package/overlays/b2b-catalog-golf/rules/golf-project-rules.md +0 -31
- package/overlays/b2b-catalog-golf/skills/develop-b2b-golf-feature/SKILL.md +1 -0
- package/overlays/b2b-factory-catalog/README.md +0 -20
- package/overlays/b2b-factory-catalog/rules/icm-project-rules.md +0 -31
- package/overlays/b2b-factory-catalog/skills/develop-b2b-catalog-feature/SKILL.md +1 -0
- package/overlays/b2b-sport-catalog/README.md +0 -20
- package/overlays/b2b-sport-catalog/rules/sport-project-rules.md +0 -31
- package/overlays/cad-projection/README.md +0 -20
- package/overlays/cad-projection/rules/cad-conventions.md +0 -20
- package/overlays/cad-projection/skills/isometric-svg-projection/SKILL.md +1 -0
- package/overlays/data-analyst-stack/README.md +0 -20
- package/overlays/data-analyst-stack/rules/metric-dashboard-templates.md +0 -31
- package/overlays/data-analyst-stack/rules/stack-conventions.md +0 -31
- package/overlays/data-warehouse/README.md +0 -22
- package/overlays/data-warehouse/learning/learning-conventions.md +0 -31
- package/overlays/data-warehouse/learning/phase-roadmap.md +0 -31
- package/overlays/data-warehouse/rules/amis-accounting-standards.md +0 -33
- package/overlays/data-warehouse/rules/duckdb-concurrency.md +0 -37
- package/overlays/data-warehouse/rules/pii-scrubbing.md +0 -37
- package/overlays/data-warehouse/rules/stocktake-tolerance.md +0 -33
- package/overlays/ecommerce-microservices/README.md +22 -35
- package/overlays/ecommerce-microservices/config/README.md +3 -1
- package/overlays/ecommerce-microservices/rules/README.md +2 -1
- package/overlays/ecommerce-microservices/rules/microservices-conventions.md +30 -0
- package/overlays/ecommerce-microservices/skills/README.md +1 -1
- package/overlays/ecommerce-microservices/workflows/README.md +3 -1
- package/overlays/fintech-compliance/README.md +0 -20
- package/overlays/fintech-compliance/rules/credit-scorecard-rules.md +0 -20
- package/overlays/fintech-compliance/skills/build-credit-scorecard/SKILL.md +1 -0
- package/overlays/go-microservices/README.md +1 -21
- package/overlays/go-microservices/rules/go-conventions.md +0 -31
- package/overlays/hugo-authority-content/README.md +0 -20
- package/overlays/hugo-authority-content/roles/README.md +0 -20
- package/overlays/hugo-authority-content/rules/content-brand.md +0 -30
- package/overlays/hugo-authority-content/rules/link-topology.md +0 -30
- package/overlays/hugo-authority-content/rules/seo-authority.md +0 -30
- package/overlays/hugo-authority-content/rules/technical-article-2027.md +0 -30
- package/overlays/hugo-authority-content/skills/audit-technical-article/SKILL.md +1 -0
- package/overlays/hugo-authority-content/skills/write-hugo-twin-content/SKILL.md +1 -0
- package/overlays/hugo-authority-content/workflows/README.md +0 -20
- package/overlays/hvac-authority-content/README.md +0 -20
- package/overlays/hvac-authority-content/config/collections.md +0 -22
- package/overlays/hvac-authority-content/rules/content-schema.md +0 -30
- package/overlays/hvac-authority-content/rules/hvac-engineering-standards.md +0 -30
- package/overlays/hvac-authority-content/rules/silo-linking.md +0 -30
- package/overlays/hvac-authority-content/skills/write-hvac-authority-content/SKILL.md +1 -0
- package/overlays/hvac-authority-content/workflows/publish-hvac-content.md +0 -22
- package/overlays/laravel-ecommerce/README.md +0 -20
- package/overlays/laravel-ecommerce/rules/elomus-design-system.md +0 -31
- package/overlays/laravel-ecommerce/rules/laravel-ecommerce-rules.md +0 -31
- package/overlays/laravel-ecommerce/skills/develop-laravel-ecommerce-feature/SKILL.md +1 -0
- package/overlays/laravel-filament/README.md +0 -20
- package/overlays/laravel-filament/rules/laravel-conventions.md +0 -31
- package/overlays/laravel-filament/skills/develop-laravel-feature/SKILL.md +1 -0
- package/overlays/livestream-web/README.md +0 -20
- package/overlays/livestream-web/rules/livestream-web-ux-conventions.md +0 -31
- package/overlays/obj-configurator/README.md +0 -20
- package/overlays/obj-configurator/rules/obj-project-rules.md +0 -31
- package/overlays/obj-configurator/skills/develop-obj-feature/SKILL.md +1 -0
- package/overlays/r3f-stack/README.md +0 -20
- package/overlays/r3f-stack/rules/stub.md +0 -31
- package/overlays/r3f-stack/skills/debug-3d-scene/SKILL.md +4 -2
- package/overlays/r3f-stack/skills/integrate-r3f-three-legacy/SKILL.md +6 -5
- package/overlays/r3f-stack/skills/optimize-3d-assets/SKILL.md +4 -3
- package/overlays/real-estate-content/README.md +0 -20
- package/overlays/real-estate-content/roles/README.md +0 -20
- package/overlays/real-estate-content/rules/affiliate-links.md +0 -31
- package/overlays/real-estate-content/rules/content-schema.md +0 -31
- package/overlays/real-estate-content/rules/seo-baseline.md +0 -31
- package/overlays/real-estate-content/skills/write-real-estate-astro-data/SKILL.md +1 -0
- package/overlays/real-estate-content/workflows/README.md +0 -20
- package/overlays/security-research/README.md +0 -20
- package/overlays/security-research/rules/reverse-engineering-rules.md +0 -20
- package/overlays/seo-publishing/README.md +1 -21
- package/overlays/seo-publishing/rules/publish-log-conventions.md +0 -31
- package/overlays/seo-publishing/rules/publishing-cadence.md +0 -31
- package/overlays/seo-publishing/rules/site-mix-and-cannibalization.md +0 -31
- package/overlays/seo-publishing/rules/topic-board-template.md +0 -31
- package/overlays/ui-design-system/README.md +0 -20
- package/overlays/ui-design-system/rules/handoff-conventions.md +0 -31
- package/package.json +2 -2
- package/packs/README.md +3 -9
- package/packs/ecommerce-team/manifest.yaml +1 -1
- package/core/skills/commerce/2026_STANDARDS_SUMMARY.md +0 -316
- package/core/skills/commerce/handle-checkout-flow/UPGRADE_PLAN_2026.md +0 -99
- package/core/skills/commerce/integrate-payment-gateway/UPGRADE_PLAN_2026.md +0 -128
- package/core/skills/commerce/manage-order-fulfillment/UPGRADE_PLAN_2026.md +0 -136
- package/core/skills/commerce/manage-product-catalog/UPGRADE_PLAN_2026.md +0 -130
- package/core/skills/education/2026_STANDARDS_SUMMARY.md +0 -290
- package/core/skills/education/create-exercises/UPGRADE_PLAN_2026.md +0 -115
- package/core/skills/education/design-learning-plan/UPGRADE_PLAN_2026.md +0 -140
- package/core/skills/education/grade-and-review/UPGRADE_PLAN_2026.md +0 -141
- package/core/skills/frontend/2026_STANDARDS_SUMMARY.md +0 -345
- package/core/skills/frontend/add-page-route/UPGRADE_PLAN_2026.md +0 -102
- package/core/skills/frontend/add-ui-component/UPGRADE_PLAN_2026.md +0 -114
- package/core/skills/frontend/component-composition/UPGRADE_PLAN_2026.md +0 -103
- package/core/skills/frontend/frontend-testing/UPGRADE_PLAN_2026.md +0 -137
- package/core/skills/frontend/implement-view-transitions/UPGRADE_PLAN_2026.md +0 -118
- package/core/skills/frontend/implement-webmcp/UPGRADE_PLAN_2026.md +0 -108
- package/core/skills/frontend/integrate-api-client/UPGRADE_PLAN_2026.md +0 -118
- package/core/skills/frontend/setup-design-system/UPGRADE_PLAN_2026.md +0 -123
- package/core/skills/frontend/setup-visual-regression/UPGRADE_PLAN_2026.md +0 -121
- package/core/skills/meetings-analysis/2026_STANDARDS_SUMMARY.md +0 -236
- package/core/skills/meetings-analysis/analyze-business-requirements/UPGRADE_PLAN_2026.md +0 -97
- package/core/skills/meetings-analysis/analyze-data/UPGRADE_PLAN_2026.md +0 -143
- package/core/skills/meetings-analysis/meeting-review/UPGRADE_PLAN_2026.md +0 -125
- package/core/skills/mobile/2026_STANDARDS_SUMMARY.md +0 -209
- package/core/skills/mobile/deploy-mobile-app/UPGRADE_PLAN_2026.md +0 -122
- package/core/skills/mobile/develop-mobile-app/UPGRADE_PLAN_2026.md +0 -141
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-visual-regression
|
|
3
3
|
description: Configure automated visual diffing for UI components and pages. Use when establishing pixel-level regression testing, cross-browser snapshot baselines, or CI visual gates.
|
|
4
|
+
version: "1.0.0"
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, run_dev_server, execute_command]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -15,7 +16,7 @@ Use this skill to integrate Playwright or Chromatic into the CI pipeline to enfo
|
|
|
15
16
|
- **Negative Asset Constraints**: Strictly prohibit generating fabricated inline SVG logos ("NovaCorp") and synthetic customer testimonials with unverified metrics; mandate authentic typography, system monograms, verified Simple Icons marks, or honest structural placeholders
|
|
16
17
|
- **Animation Suppression**: All CSS animations, transitions, and cursor blinks must be disabled before snapshotting (`animations: 'disabled'`)
|
|
17
18
|
- **Dynamic Content Masking**: Mask or stub dynamic content (dates, user avatars, random IDs, ads) before capturing snapshots using `mask: [page.locator('...')]`
|
|
18
|
-
- **Explicit Tolerance Thresholds**:
|
|
19
|
+
- **Explicit Tolerance Thresholds**: Standardize `maxDiffPixelRatio: 0.002` (0.2%) for isolated font-stabilized component snapshots in Docker Linux, and allow up to `maxDiffPixelRatio: 0.01` (1%) with `threshold: 0.2` only for full-page route diffs with masked dynamic regions — unconfigured default thresholds are too loose
|
|
19
20
|
- **Component Isolation**: Test UI components in isolation (Storybook + Chromatic with TurboSnap) alongside full-page Playwright visual regression tests
|
|
20
21
|
- **Cross-Browser Coverage**: Configure the matrix across Chromium, WebKit, and Firefox at mobile and desktop viewports
|
|
21
22
|
- **Hard CI Gate**: Visual regression failures must block merges unless explicitly approved by a `ui-ux-designer` or `frontend-developer`
|
|
@@ -29,7 +30,7 @@ Use this skill to integrate Playwright or Chromatic into the CI pipeline to enfo
|
|
|
29
30
|
Choose and install the appropriate framework based on repo architecture:
|
|
30
31
|
- Playwright Test (`@playwright/test`) with `toHaveScreenshot()` for full-page and integrated route diffs.
|
|
31
32
|
- Chromatic / Storybook Test Runner for isolated design system component snapshot suites.
|
|
32
|
-
- Configure snapshot storage directories and
|
|
33
|
+
- Configure snapshot storage directories and explicit tolerances (`maxDiffPixelRatio: 0.002` for isolated components, `0.01` max for masked full-page diffs).
|
|
33
34
|
|
|
34
35
|
### 2. Define Viewport and Browser Matrix
|
|
35
36
|
|
|
@@ -70,7 +71,7 @@ Document snapshot maintenance procedures:
|
|
|
70
71
|
- **Baseline not captured for new component**: a new component ships without a visual baseline. Mitigation: require a Chromatic or Percy baseline at component registration; reject components without the baseline.
|
|
71
72
|
- **Baseline drift undetected**: a visual baseline changes without a corresponding PR. Mitigation: lock the baseline to the component version; surface drift in the diff report.
|
|
72
73
|
- **Driver version drift**: the visual driver (Chromatic, Percy) is updated without re-baselining. Mitigation: re-baseline every component on driver upgrades; surface the missing re-baseline in CI.
|
|
73
|
-
- **Threshold too loose**: a visual regression
|
|
74
|
+
- **Threshold too loose**: a visual regression exceeds the calibrated tolerance without failing CI. Mitigation: enforce `maxDiffPixelRatio: 0.002` for isolated components and `<= 0.01` for masked full-page routes; reject unconfigured thresholds.
|
|
74
75
|
|
|
75
76
|
## Output Contracts
|
|
76
77
|
|
|
@@ -90,7 +91,7 @@ When this skill is invoked as part of a coordinated multi-role delivery, emit:
|
|
|
90
91
|
- [ ] **Official Playwright Docker container** (`mcr.microsoft.com/playwright`) for baseline generation
|
|
91
92
|
- [ ] **Bounded self-QA**: max 2 passes, dual viewport (Desktop + Mobile), defect-driven edits only
|
|
92
93
|
- [ ] **Negative asset constraints**: no fabricated SVGs, no synthetic testimonials
|
|
93
|
-
- [ ] **Explicit tolerance thresholds**: `maxDiffPixelRatio: 0.01
|
|
94
|
+
- [ ] **Explicit tolerance thresholds**: `maxDiffPixelRatio: 0.002` (component) / `<= 0.01` (masked full-page), `threshold: 0.2`
|
|
94
95
|
- [ ] **Component isolation**: Storybook + Chromatic TurboSnap + Playwright full-page
|
|
95
96
|
- [ ] **Cross-browser matrix**: Chromium, WebKit, Firefox at mobile/desktop
|
|
96
97
|
- [ ] **Hard CI gate**: visual failures block merges unless `ui-ux-designer`/`frontend-developer` approves
|
|
@@ -111,5 +112,7 @@ When this skill is invoked as part of a coordinated multi-role delivery, emit:
|
|
|
111
112
|
- **add-ui-component**: Validate new or modified UI components against visual snapshot baselines
|
|
112
113
|
- **design-review**: Review visual snapshot diffs against design specifications and design tokens
|
|
113
114
|
- **review-code**: Audit visual test coverage and snapshot approval evidence during code review
|
|
115
|
+
- Companion reference: `references/visual-regression-docker-and-masking-specs.md`
|
|
116
|
+
- Companion example: `examples/visual-regression-playwright.config.ts`
|
|
114
117
|
|
|
115
|
-
Last updated: 2026-
|
|
118
|
+
Last updated: 2026-11-08
|
package/core/skills/frontend/setup-visual-regression/examples/visual-regression-playwright.config.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Production Playwright Visual Regression Configuration
|
|
3
|
+
*
|
|
4
|
+
* Implements:
|
|
5
|
+
* - Deterministic visual diff settings (maxDiffPixelRatio: 0.002, threshold: 0.2)
|
|
6
|
+
* - Cross-browser projects (Chromium, Firefox, WebKit) for Desktop (1280px) and Mobile (375px)
|
|
7
|
+
* - Containerized path alignment with mcr.microsoft.com/playwright
|
|
8
|
+
* - Diagnostic trace retention on failure
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
12
|
+
|
|
13
|
+
export default defineConfig({
|
|
14
|
+
testDir: './tests/visual',
|
|
15
|
+
snapshotDir: './tests/visual/snapshots',
|
|
16
|
+
snapshotPathTemplate: '{snapshotDir}/{testFileDir}/{testFileName}-snapshots/{arg}-{projectName}{ext}',
|
|
17
|
+
|
|
18
|
+
timeout: 30_000,
|
|
19
|
+
fullyParallel: true,
|
|
20
|
+
forbidOnly: !!process.env.CI,
|
|
21
|
+
retries: process.env.CI ? 2 : 0,
|
|
22
|
+
workers: process.env.CI ? 2 : undefined,
|
|
23
|
+
|
|
24
|
+
reporter: [
|
|
25
|
+
['html', { outputFolder: 'playwright-visual-report', open: 'never' }],
|
|
26
|
+
['list'],
|
|
27
|
+
],
|
|
28
|
+
|
|
29
|
+
use: {
|
|
30
|
+
baseURL: process.env.BASE_URL || 'http://localhost:3000',
|
|
31
|
+
trace: 'retain-on-failure',
|
|
32
|
+
screenshot: 'only-on-failure',
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
expect: {
|
|
36
|
+
toHaveScreenshot: {
|
|
37
|
+
maxDiffPixelRatio: 0.002, // 0.2% max variance allowed
|
|
38
|
+
threshold: 0.2, // Per-pixel color sensitivity
|
|
39
|
+
animations: 'disabled', // Freeze all CSS animations and transitions
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
projects: [
|
|
44
|
+
// 1. Desktop Viewport (1280x800)
|
|
45
|
+
{
|
|
46
|
+
name: 'chromium-desktop',
|
|
47
|
+
use: {
|
|
48
|
+
...devices['Desktop Chrome'],
|
|
49
|
+
viewport: { width: 1280, height: 800 },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'firefox-desktop',
|
|
54
|
+
use: {
|
|
55
|
+
...devices['Desktop Firefox'],
|
|
56
|
+
viewport: { width: 1280, height: 800 },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'webkit-desktop',
|
|
61
|
+
use: {
|
|
62
|
+
...devices['Desktop Safari'],
|
|
63
|
+
viewport: { width: 1280, height: 800 },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
// 2. Mobile Viewport (iPhone 14 / Mobile Chrome 375x667)
|
|
68
|
+
{
|
|
69
|
+
name: 'mobile-chrome',
|
|
70
|
+
use: {
|
|
71
|
+
...devices['Pixel 5'],
|
|
72
|
+
viewport: { width: 375, height: 667 },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'mobile-safari',
|
|
77
|
+
use: {
|
|
78
|
+
...devices['iPhone 14'],
|
|
79
|
+
viewport: { width: 375, height: 667 },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Visual Regression Testing with Containerized Playwright & Dynamic Masking (2026)
|
|
2
|
+
|
|
3
|
+
## 1. Containerized Baseline Determinism
|
|
4
|
+
|
|
5
|
+
### 1.1 Cross-Platform Rasterization Drift
|
|
6
|
+
Sub-pixel anti-aliasing algorithms differ substantially between macOS (Core Graphics), Windows (DirectWrite), and Linux (FreeType):
|
|
7
|
+
- **Mandatory Docker Containerization**: Visual regression snapshots must be generated and compared inside the official Playwright Docker container:
|
|
8
|
+
```bash
|
|
9
|
+
docker run --rm --network host -v $(pwd):/work/ -w /work/ \
|
|
10
|
+
mcr.microsoft.com/playwright:v1.48.0-noble \
|
|
11
|
+
npx playwright test --config=playwright.visual.config.ts
|
|
12
|
+
```
|
|
13
|
+
- Local developer workstation diffs must never be checked into git without containerized verification.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 2. Flakiness Elimination & Dynamic Element Masking
|
|
18
|
+
|
|
19
|
+
### 2.1 Pre-Snapshot Stabilization Sequence
|
|
20
|
+
Before executing `toHaveScreenshot()`, tests must execute a 4-point stabilization sequence:
|
|
21
|
+
1. **Font Readiness**:
|
|
22
|
+
```typescript
|
|
23
|
+
await page.evaluate(() => document.fonts.ready);
|
|
24
|
+
```
|
|
25
|
+
2. **Animation & Transition Disabling**:
|
|
26
|
+
Configure `animations: 'disabled'` to freeze CSS keyframes, transitions, and SVG animations.
|
|
27
|
+
3. **Caret Hiding**: Suppress flashing input cursor carats (`caret-color: transparent`).
|
|
28
|
+
4. **Dynamic Masking**: Mask non-deterministic elements (timestamps, user avatars, live metrics):
|
|
29
|
+
```typescript
|
|
30
|
+
await expect(page).toHaveScreenshot('dashboard-overview.png', {
|
|
31
|
+
mask: [
|
|
32
|
+
page.locator('[data-testid="live-timestamp"]'),
|
|
33
|
+
page.locator('[data-testid="user-avatar"]'),
|
|
34
|
+
],
|
|
35
|
+
maxDiffPixelRatio: 0.002,
|
|
36
|
+
threshold: 0.2,
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 3. Strict Tolerance Calibration & CI Gates
|
|
43
|
+
|
|
44
|
+
- **`threshold: 0.2`**: Perceptual color difference threshold per pixel in YIQ color space.
|
|
45
|
+
- **`maxDiffPixelRatio: 0.002`**: Allows maximum 0.2% total pixel variance across the entire viewport to absorb subpixel font rendering while catching real layout regressions.
|
|
46
|
+
- **Hard CI Failure**: Unapproved visual regressions fail CI builds, requiring explicit review from a UI/UX Designer or Frontend Developer before baseline update.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Master Design Standard: UI/UX Anti-Slop Specification
|
|
1
|
+
# Master Design Standard: UI/UX Anti-Slop Specification & Reference
|
|
2
2
|
|
|
3
3
|
This document establishes the unified **Master Design Standard** for all UI/UX design, frontend architecture, and component engineering across `agent-skills`. It consolidates and codifies the 9 S-Rank Design & UI/UX skills into an authoritative, enforceable design governance specification.
|
|
4
4
|
|
|
5
|
-
Every agent assuming the `@designer` (`ui-ux-designer`) or `@frontend` (`frontend-developer`) role MUST strictly comply with these rules.
|
|
5
|
+
This reference is linked from [`ui-ux-designer.md`](../ui-ux-designer.md) and mirrored at `core/skills/frontend/ui-ux-designer-anti-slop-standards.md`. Every agent assuming the `@designer` (`ui-ux-designer`) or `@frontend` (`frontend-developer`) role MUST strictly comply with these rules.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -12,27 +12,25 @@ The Master Design Standard synthesizes nine domain-leading design engineering me
|
|
|
12
12
|
|
|
13
13
|
| # | S-Rank Skill | Core Focus & Authority | Integrated Sections |
|
|
14
14
|
|---|--------------|------------------------|---------------------|
|
|
15
|
-
| 1 | **Taste Skill** | Aesthetic direction, 3-dial engine, archetype calibration, mandatory pre-code Design Read statement | §2 (Taste Engine), §3 (Design Read) |
|
|
16
|
-
| 2 | **Anthropic Frontend Design** |
|
|
17
|
-
| 3 | **
|
|
18
|
-
| 4 | **
|
|
19
|
-
| 5 | **
|
|
20
|
-
| 6 | **
|
|
21
|
-
| 7 | **
|
|
22
|
-
| 8 | **Web Design Guidelines** | Bounded 2-pass QA protocol (Desktop 1280px+ & Mobile 375-430px simultaneously), single smooth-scroll engine | §7 (Smooth Scroll), §8 (Bounded Visual QA) |
|
|
23
|
-
| 9 | **Build Awwwards-Quality Sites** | Editorial typography, negative asset constraints (ban fake SVG logos / synthetic testimonials / ungrounded metrics) | §4 (Layout), §9 (Negative Asset Constraints) |
|
|
15
|
+
| 1 | **Taste Skill** | Aesthetic direction, 3-dial engine, archetype calibration, mandatory pre-code Design Read statement | §2 (Taste Engine & Domain Matrix), §3 (Design Read) |
|
|
16
|
+
| 2 | **Anthropic Frontend Design** | Context-first intentional aesthetic commitment across varied visual poles (brutalist, editorial, luxury, tactile, industrial), avoiding any single AI template | §2.2 (Domain Matrix), §3 (Design Read), §4 (Layout) |
|
|
17
|
+
| 3 | **UI/UX Pro Max** | Domain-grounded lookup (styles, palettes, typography, charts, stack rules), `MASTER.md` + page override token hierarchy | §2.2 (Domain Matrix), §11.2 (Master + Page Overrides) |
|
|
18
|
+
| 4 | **Vercel Web Design Guidelines** | Deterministic UI craft & micro-audit rules (`file:line` findings, URL-as-state, unicode `…`, `tabular-nums`, `color-scheme`, focus restoration, hydration-safe inputs) | §8 (Visual QA), §10.3 (Web Interface Micro-Craft) |
|
|
19
|
+
| 5 | **Vercel Composition Patterns** | Compound components, `{ state, actions, meta }`, `FieldGroup` + `Field`, `InputGroup`, Base UI `render` vs Radix `asChild`, `<= 2` stylistic booleans | §5 (Component Composition) |
|
|
20
|
+
| 6 | **Impeccable & Emil Design Engineering** | Perceptual OKLCH ramps, APCA contrast + WCAG 2.2 AA floor, frequency-based motion budget (`0ms` hotkeys, `150–250ms` overlays), harmonic spring physics | §6 (Token System), §7 (Motion Physics) |
|
|
21
|
+
| 7 | **Build Awwwards-Quality Sites** | Negative asset constraints (ban fake SVG logos, synthetic testimonials, ungrounded precision metrics) | §9 (Negative Asset Constraints), §10 (Copy & CTA) |
|
|
24
22
|
|
|
25
23
|
---
|
|
26
24
|
|
|
27
|
-
## 2. Taste Engine
|
|
25
|
+
## 2. Taste Engine, Three-Dial Calibration & Domain-to-Aesthetic Matrix
|
|
28
26
|
|
|
29
|
-
The Taste Engine governs design execution via three numeric dials on a 1–10 scale.
|
|
27
|
+
The Taste Engine governs design execution via three numeric dials on a 1–10 scale. These are global variables — cross-references must use these exact names, never aliases like `LAYOUT_VARIANCE` or `ANIM_LEVEL`. **There is no universal visual look**: start from the project's **Domain Archetype** below rather than defaulting to dark-slate + `Geist` + Emerald.
|
|
30
28
|
|
|
31
29
|
```
|
|
32
30
|
TASTE ENGINE THREE DIALS
|
|
33
31
|
┌─────────────────────────┬─────────────────────────┬─────────────────────────┐
|
|
34
32
|
│ DESIGN_VARIANCE │ MOTION_INTENSITY │ VISUAL_DENSITY │
|
|
35
|
-
│
|
|
33
|
+
│ (Archetype-driven) │ (Archetype-driven) │ (Archetype-driven) │
|
|
36
34
|
├─────────────────────────┼─────────────────────────┼─────────────────────────┤
|
|
37
35
|
│ 1: Perfect Symmetry │ 1: Static / No Motion │ 1: Art Gallery / Ultra │
|
|
38
36
|
│ 5: Balanced Bento Grid │ 5: Snappy Micro-Springs │ 4: Modern SaaS Baseline │
|
|
@@ -96,16 +94,22 @@ The Taste Engine governs design execution via three numeric dials on a 1–10 sc
|
|
|
96
94
|
|
|
97
95
|
---
|
|
98
96
|
|
|
99
|
-
### 2.2
|
|
97
|
+
### 2.2 Domain-to-Aesthetic Lookup Matrix (Anti-Monoculture)
|
|
100
98
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
|
104
|
-
|
|
105
|
-
| **
|
|
106
|
-
| **
|
|
107
|
-
| **
|
|
108
|
-
| **
|
|
99
|
+
Select the matching domain archetype before proposing typography, colors, or layout. Never apply the **Modern Developer Tool** dark-slate + emerald aesthetic to Fintech, Healthcare, Editorial, or Retail unless the brief explicitly demands it.
|
|
100
|
+
|
|
101
|
+
| Domain Archetype | VARIANCE | MOTION | DENSITY | Aesthetic Pole, Typography & Palette Direction | Avoided Domain Cliché |
|
|
102
|
+
|:---|:---:|:---:|:---:|:---|:---|
|
|
103
|
+
| **Fintech / Core Banking / Ledger** | **3** | **2** | **6** | Crisp light-first paper (`oklch(0.985 0.004 250)`), deep navy/forest/slate ink, `tabular-nums` mandatory, high-contrast semantic status badges, institutional clarity. | Neon crypto dark glow, playful bouncy springs |
|
|
104
|
+
| **Healthcare / Clinical / Regulated** | **3** | **2** | **5** | Calm daylight surfaces, soft mineral teal or cobalt accent (`sat < 70%`), COGA-compliant plain labels, persistent field instructions, WCAG AAA text contrast. | Harsh high-contrast dark mode, ambiguous icons |
|
|
105
|
+
| **B2B Ops / WMS / Telemetry / ERP** | **4** | **3** | **7–8** | High-density data grids, sticky table headers, URL-persisted filters, keyboard shortcuts (`0ms`), crisp 1px borders, monospace IDs & `tabular-nums`. | Marketing bento cards, excessive whitespace padding |
|
|
106
|
+
| **Modern Developer Tool / Infra** | **6** | **5** | **5** | Choose between **Daylight Technical Docs** (warm stone/paper + sharp mono) OR **Dark Precision** (tinted slate + 1 restrained accent); `Cmd+K` at `0ms`. | Unprompted Linear-dark + Emerald + fake terminal clone |
|
|
107
|
+
| **Editorial / Publishing / Knowledge** | **7–8** | **4** | **3** | Expressive typographic hierarchy (permitted heritage serif pairing when brief aligns), `60–68ch` reading measure, asymmetric pull quotes, generous margins. | Generic SaaS 3-column feature card grid |
|
|
108
|
+
| **Premium Consumer / Luxury / Craft** | **7** | **6** | **3** | Rotate purposefully: **Cold Luxury** (ice grey + obsidian), **Botanical Forest** (pine + alabaster), **Terracotta + Slate**, or **Cobalt + Cream**; tactile transitions. | Warm-beige (`#f5f1ea`) + brass (`#b08947`) + espresso (`#1a1714`) |
|
|
109
|
+
| **E-Commerce / High-Velocity Retail** | **5** | **5** | **5** | Product-photography-first grid, sticky thumb-zone mobile CTA, clear 2D variant matrix (size × color), zero dark-pattern urgency tricks. | Cluttered badge spam, low-contrast ghost buttons on photos |
|
|
110
|
+
| **AI Agentic Workspace** | **5** | **4** | **6** | Visible Trust Ladder tier badge, streaming skeletons (`CLS = 0`), calibrated confidence badges, Red Path recovery, upfront `<AIDisclosureBanner>`. | Confident chat bubble with no undo, provenance, or fallback |
|
|
111
|
+
| **Public Sector / Gov / Education** | **2–3** | **2** | **5** | Official `govuk-frontend` / `uswds` grammar when applicable, linear single-column forms, WCAG 2.1/2.2 AA+, zero decorative animation. | Experimental split heroes, hidden navigation |
|
|
112
|
+
| **General SaaS Baseline (Mode A/B)** | **7** | **5** | **4** | Balanced modern SaaS when no specialist domain dominates; distinct brand accent (`sat < 80%`), `DESIGN.md` master tokens. | Purple/indigo AI mesh gradient, `Inter` + 3 identical cards |
|
|
109
113
|
|
|
110
114
|
### 2.3 Dial Clamping & Conflict Resolution Rules
|
|
111
115
|
When user briefs contain conflicting requirements (e.g., "We want an experimental Awwwards look, but for a Swiss private wealth management portal"):
|
|
@@ -173,7 +177,7 @@ export default function Hero() {
|
|
|
173
177
|
- **Mood & Intent**: Utilitarian Monospace Precision, High-Signal Developer Tool
|
|
174
178
|
- **Dial Calibration**:
|
|
175
179
|
- `DESIGN_VARIANCE`: 8 — Asymmetric 60/40 desktop split hero with terminal visual anchor
|
|
176
|
-
- `MOTION_INTENSITY`: 6 — Tactile scale-[0.
|
|
180
|
+
- `MOTION_INTENSITY`: 6 — Tactile scale-[0.96] active spring on CTA; 0ms on keyboard shortcuts
|
|
177
181
|
- `VISUAL_DENSITY`: 4 — Generous SaaS whitespace (min-h-[100dvh], py-24, gap-12)
|
|
178
182
|
- **Composition Archetype**: Asymmetrical Split Hero (60/40) with Live Interactive Preview
|
|
179
183
|
- **Typography System**: Display: Geist Sans (tracking-tight), Body: Geist Sans (leading-relaxed), Mono: Geist Mono
|
|
@@ -209,7 +213,7 @@ export default function Hero() {
|
|
|
209
213
|
</p>
|
|
210
214
|
|
|
211
215
|
<div className="flex flex-wrap items-center gap-4 pt-2">
|
|
212
|
-
<Button size="lg" className="active:scale-[0.
|
|
216
|
+
<Button size="lg" className="active:scale-[0.96] transition-transform">
|
|
213
217
|
Deploy Cluster
|
|
214
218
|
</Button>
|
|
215
219
|
<Button variant="outline" size="lg">
|
|
@@ -237,11 +241,20 @@ export default function Hero() {
|
|
|
237
241
|
```
|
|
238
242
|
|
|
239
243
|
#### 💡 WHY
|
|
240
|
-
Pre-code commitments anchor the LLM to specific tokens, layout archetypes, and negative constraints before generating
|
|
244
|
+
Pre-code commitments anchor the LLM to specific tokens, layout archetypes, and negative constraints before generating markup. **Crucial rule**: the dark-slate + Emerald example above is valid *only* for a Developer Tool brief; for Fintech, Healthcare, Retail, or B2B Ops, derive a completely different daylight/editorial/high-density Design Read from Section 2.2 so the system never collapses into a single dark-mode SaaS look.
|
|
241
245
|
|
|
242
246
|
---
|
|
243
247
|
|
|
244
|
-
## 4.
|
|
248
|
+
## 4. Layout & Composition Directives (Mode A: Product UI vs Mode B: Showcase)
|
|
249
|
+
|
|
250
|
+
Apply **Mode A** to in-app product UIs (dashboards, CRUD tables, settings, AI workspaces) and **Mode B** only to marketing, product landing, or storefront showcase pages. Never force Mode B landing rules (zigzags, marketing hero stacks) onto Mode A operational tools.
|
|
251
|
+
|
|
252
|
+
### Mode A: In-App Product UI Grammar
|
|
253
|
+
- **Surface Hierarchy**: select Inline vs Popover vs Drawer/Sheet vs Modal Dialog vs Dedicated Route based on reversibility and context-preservation needs.
|
|
254
|
+
- **URL as State**: serialize active tabs, filters, sort order, pagination, and selected inspection drawers into URL query parameters (`?tab=`, `?status=`, `?selected=`).
|
|
255
|
+
- **Data-Dense Scannability**: align numeric/currency/time columns with `tabular-nums`, pin sticky table headers (`scroll-margin-top` set), and provide keyboard-accessible full-value reveal for truncated cells.
|
|
256
|
+
|
|
257
|
+
### Mode B: Landing & Showcase Composition Directives
|
|
245
258
|
|
|
246
259
|
### 4.1 Anti-Center Bias
|
|
247
260
|
Centered Hero / H1 sections are avoided when `DESIGN_VARIANCE > 4`. Use split screen (50/50, 60/40), left-aligned copy with right-aligned visual asset, asymmetric whitespace, or scroll-pinned compositions. Centered heroes are permitted only for manifesto/editorial launch pages.
|
|
@@ -605,12 +618,15 @@ export function GoodCard({ title, description }: { title: string; description: s
|
|
|
605
618
|
2. **Perceptual Contrast Uniformity**: OKLCH ensures mathematically consistent perceived contrast across light and dark palettes, guaranteeing WCAG AA compliance.
|
|
606
619
|
3. **Clean Codebases**: Eliminates repetitive `dark:*` class strings, reducing CSS bundle size and developer cognitive load.
|
|
607
620
|
|
|
608
|
-
### 6.2 Typography & Color Discipline Rules
|
|
609
|
-
- **
|
|
621
|
+
### 6.2 Typography, Contrast Dual-Gate & Color Discipline Rules
|
|
622
|
+
- **Domain-Calibrated Typography Voice**: avoid lazy unprompted defaults (`Inter`, `Roboto`, `Space Grotesk`, `Fraunces`, `Instrument_Serif`), AND avoid defaulting every SaaS/app to `Geist`/`Satoshi` when the domain calls for warmth, authority, or editorial character. Select display + body + monospace fonts from the Domain Archetype Matrix (§2.2).
|
|
610
623
|
- **Word Emphasis**: Word emphasis in display type must use bold or italic of the **same font family**; never inject a foreign serif word into a sans headline.
|
|
611
|
-
- **
|
|
612
|
-
- **
|
|
613
|
-
- **
|
|
624
|
+
- **Contrast Dual-Gate (Unified)**:
|
|
625
|
+
- **WCAG 2.2 AA (Legal & Accessibility Floor)**: $CR \ge 4.5:1$ normal text, $\ge 3.0:1$ large text, UI controls, and focus indicators.
|
|
626
|
+
- **APCA (Perceptual Design-Token Target)**: $L_c \ge 75$ body text, $L_c \ge 60$ headlines/controls, verified independently in both light and dark modes.
|
|
627
|
+
- **Color Discipline & Lila Ban**: Maximum 1 dominant accent color with saturation $< 80\%$ (unless domain semantics require status colors). Ban generic AI-purple/blue glow gradients on dark buttons and backgrounds.
|
|
628
|
+
- **Palette Rotation**: Ban the default reach for warm-beige (`#f5f1ea`), brass/clay, and espresso text, as well as repeating the same dark-slate + emerald palette across unrelated domains.
|
|
629
|
+
- **Shape Consistency Lock**: Enforce a single corner-radius scale across the page (all-sharp, all-soft 12-16px, or documented pill buttons + soft cards) and concentric corner math ($R_{\text{outer}} = R_{\text{inner}} + P + B$).
|
|
614
630
|
|
|
615
631
|
---
|
|
616
632
|
|
|
@@ -688,7 +704,7 @@ export function BadPalette({ isOpen }: { isOpen: boolean }) {
|
|
|
688
704
|
initial={{ opacity: 0, scale: 0.9 }}
|
|
689
705
|
animate={{ opacity: 1, scale: 1 }}
|
|
690
706
|
exit={{ opacity: 0, scale: 0.9 }}
|
|
691
|
-
transition={{ duration: 0.35 }}
|
|
707
|
+
transition={{ duration: 0.35 }}
|
|
692
708
|
className="fixed top-24 left-1/2 -translate-x-1/2 w-[500px] bg-card p-4"
|
|
693
709
|
>
|
|
694
710
|
<input placeholder="Search..." autoFocus />
|
|
@@ -861,7 +877,7 @@ AI-generated interfaces frequently suffer from recognizable "vibe-slop" visual a
|
|
|
861
877
|
NovaPulse
|
|
862
878
|
</span>
|
|
863
879
|
```
|
|
864
|
-
2. **
|
|
880
|
+
2. **Unified Functional Iconography**: Icons must be drawn strictly from one consistent icon library per codebase (`@phosphor-icons/react`, `hugeicons-react`, `@radix-ui/react-icons`, or `lucide-react` when aligning with an existing shadcn/ui or Base UI repo) and represent **functional UI actions** (`<Terminal />`, `<Database />`, `<ChevronRight />`), NEVER masquerading as corporate brand marks or mixed across libraries in the same component tree. Standardize stroke width globally.
|
|
865
881
|
3. **Verified Social Proof Marks**: When real brand integration is required, use verified official monochrome marks via Simple Icons (`https://cdn.simpleicons.org/{slug}`) with the Logo-Only rule.
|
|
866
882
|
4. **Factual Structural Placeholders**: If customer logos or testimonials are requested but real assets are not provided, render honest structural placeholders (`[Client Logo Slot: Monochrome SVG]`).
|
|
867
883
|
5. **Verifiable Technical Highlights**: Replace fake testimonials with factual architecture benchmarks (latency measurements, uptime SLA, concurrent connection benchmarks).
|
|
@@ -874,12 +890,10 @@ AI-generated interfaces frequently suffer from recognizable "vibe-slop" visual a
|
|
|
874
890
|
export function BadAssets() {
|
|
875
891
|
return (
|
|
876
892
|
<div>
|
|
877
|
-
{/* Fake SVG swirl */}
|
|
878
893
|
<svg className="h-8 w-8 text-indigo-500" viewBox="0 0 100 100">
|
|
879
894
|
<circle cx="50" cy="50" r="40" stroke="url(#g)" strokeWidth="8" fill="none" />
|
|
880
895
|
<defs><linearGradient id="g"><stop stopColor="#6366f1"/><stop offset="1" stopColor="#a855f7"/></linearGradient></defs>
|
|
881
896
|
</svg>
|
|
882
|
-
{/* Fake testimonial */}
|
|
883
897
|
<blockquote>
|
|
884
898
|
"NovaPulse doubled our engineering velocity by 340% in 14 days!"
|
|
885
899
|
<footer>Sarah Miller, VP of Cloud at HyperScale</footer>
|
|
@@ -895,7 +909,6 @@ export function BadAssets() {
|
|
|
895
909
|
export function GoodAssets() {
|
|
896
910
|
return (
|
|
897
911
|
<div className="space-y-8">
|
|
898
|
-
{/* Authentic wordmark */}
|
|
899
912
|
<div className="flex items-center gap-2.5">
|
|
900
913
|
<div className="flex h-7 w-7 items-center justify-center rounded-md bg-primary text-primary-foreground font-mono text-xs font-semibold">
|
|
901
914
|
NP
|
|
@@ -905,7 +918,6 @@ export function GoodAssets() {
|
|
|
905
918
|
</span>
|
|
906
919
|
</div>
|
|
907
920
|
|
|
908
|
-
{/* Verifiable Technical Benchmark */}
|
|
909
921
|
<div className="rounded-xl border border-border bg-card p-6">
|
|
910
922
|
<div className="flex items-center justify-between pb-4 border-b border-border">
|
|
911
923
|
<h4 className="text-xs font-mono font-semibold uppercase text-muted-foreground">
|
|
@@ -951,6 +963,15 @@ Audit all visible UI strings before handoff. Reject:
|
|
|
951
963
|
- Do not mix "Get in touch", "Contact us", and "Let's talk" on one page.
|
|
952
964
|
- Primary CTA labels must never wrap to multiple lines on desktop (maximum 3 words, ideally 1–2 words).
|
|
953
965
|
|
|
966
|
+
### 10.3 Web Interface Micro-Craft Rules (Vercel Web Design Guidelines)
|
|
967
|
+
- **Unicode Ellipsis & Trigger Punctuation**: always use the true Unicode ellipsis (`…`), never three ASCII dots (`...`). Append `…` to async progress states (`Loading…`, `Saving…`) and menu/button labels that open a secondary dialog or flow (`Rename…`, `Export…`).
|
|
968
|
+
- **Tabular Numerals**: enforce `font-variant-numeric: tabular-nums` on all numeric tables, prices, KPIs, counters, and live telemetry so columns never jitter horizontally.
|
|
969
|
+
- **Dark Mode Native Integration**: declare `color-scheme: dark` on dark-theme root containers so native scrollbars, date pickers, and form controls match the theme without white flashes.
|
|
970
|
+
- **Tactile `:active` Press Feedback**: unify interactive press scaling at `scale-[0.96]` (`150ms ease-out`), excluding disabled controls, and guard hover styles inside `@media (hover: hover)`.
|
|
971
|
+
- **Scroll & Modal Containment**: set `overscroll-behavior: contain` inside scrollable modals/drawers to prevent background scroll chaining; set `scroll-margin-top` on anchored headings under sticky headers; always restore focus to the triggering element when closing dialogs/popovers.
|
|
972
|
+
- **Hydration-Safe & Frictionless Inputs**: never block paste in email/password/OTP fields; provide accurate `autocomplete` and `inputMode` attributes; keep mobile input `font-size >= 16px` (`text-base sm:text-sm`) to prevent iOS Safari auto-zoom.
|
|
973
|
+
- **Flex Truncation Safety**: set `min-w-0` on flex parents containing truncated (`truncate` / `text-ellipsis`) children, and pair truncated text with an accessible full-value reveal.
|
|
974
|
+
|
|
954
975
|
---
|
|
955
976
|
|
|
956
977
|
## 11. Design System Selection Map & Living Infrastructure
|
|
@@ -973,10 +994,11 @@ When the design read points to a known system, reach for the official package
|
|
|
973
994
|
- **One system per project**: Do not mix Fluent with Carbon in the same tree.
|
|
974
995
|
- When the brief is an aesthetic (glassmorphism, bento, brutalism, dark tech), build with native CSS + Tailwind + maintained primitives, clearly documenting approximations.
|
|
975
996
|
|
|
976
|
-
### 11.2 Living Infrastructure & Dual-Audience
|
|
977
|
-
- **
|
|
978
|
-
- **
|
|
979
|
-
- **
|
|
997
|
+
### 11.2 Living Infrastructure, `DESIGN.md` Master + Page Overrides & Dual-Audience Docs
|
|
998
|
+
- **Two-Tier DTCG 2025.10 Token Architecture**: `Tier 1 (Primitive) -> Tier 2 (Semantic)`, with optional `Tier 3 (Component)` strictly capped at `<= 3` documented exceptions per component. Components reference semantic tokens exclusively in DTCG `$value`/`$type` format.
|
|
999
|
+
- **Master + Page Override Pattern**: maintain `DESIGN.md` (`design-tokens-spec.json`) as the single **MASTER** system specification; document route-specific density or surface overrides in explicit **Page Overrides** without forking base palettes.
|
|
1000
|
+
- **Automated Pipeline**: Figma Variables / `DESIGN.md` -> PR -> Style Dictionary v4 DTCG mode / Terrazzo.
|
|
1001
|
+
- **Dual-Audience Token Documentation**: When design systems serve AI agents, token definitions and specs must be authored in strict Markdown hierarchy (`H1->H2->H3`) for LLM parse efficiency (`llms.txt` as scope map only).
|
|
980
1002
|
|
|
981
1003
|
---
|
|
982
1004
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: web-quality-audit
|
|
3
3
|
description: Use when conducting Core Web Vitals audits, profiling Long Animation Frames and interaction responsiveness, auditing DOM depth and bundle bloat, and enforcing Lighthouse CI quality gates.
|
|
4
|
+
version: "1.0.0"
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -78,3 +78,5 @@ When completing input action abstraction, emit:
|
|
|
78
78
|
- **develop-gameplay-systems**: consuming semantic action states in character controllers
|
|
79
79
|
- **tune-game-feel**: integrating input buffering and coyote time windows with action maps
|
|
80
80
|
- **build-game-ui-ux**: updating dynamic controller glyph prompts and focus navigation
|
|
81
|
+
- Companion reference: `references/action-mapping-and-analog-deadzones.md`
|
|
82
|
+
- Companion example: `examples/input-action-manager.ts`
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Input Action Manager & Scaled Radial Deadzone in TypeScript (2026)
|
|
2
|
+
|
|
3
|
+
export interface Vector2 {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ActionState {
|
|
9
|
+
pressed: boolean;
|
|
10
|
+
value: number | Vector2;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type InputContext = 'Gameplay' | 'UI' | 'Dialogue';
|
|
14
|
+
|
|
15
|
+
export class InputActionManager {
|
|
16
|
+
private activeContext: InputContext = 'Gameplay';
|
|
17
|
+
private deadzoneMin = 0.15;
|
|
18
|
+
private deadzoneMax = 0.95;
|
|
19
|
+
private actions: Map<string, ActionState> = new Map();
|
|
20
|
+
|
|
21
|
+
constructor() {
|
|
22
|
+
this.registerAction('Jump', { pressed: false, value: 0 });
|
|
23
|
+
this.registerAction('Move', { pressed: false, value: { x: 0, y: 0 } });
|
|
24
|
+
this.registerAction('Confirm', { pressed: false, value: 0 });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public registerAction(name: string, initial: ActionState) {
|
|
28
|
+
this.actions.set(name, initial);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public setContext(context: InputContext) {
|
|
32
|
+
this.activeContext = context;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Scaled Radial Deadzone filtering for analog thumbsticks
|
|
36
|
+
public filterRadialDeadzone(rawX: number, rawY: number): Vector2 {
|
|
37
|
+
const magnitude = Math.sqrt(rawX * rawX + rawY * rawY);
|
|
38
|
+
if (magnitude <= this.deadzoneMin) {
|
|
39
|
+
return { x: 0, y: 0 };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const normalizedX = rawX / magnitude;
|
|
43
|
+
const normalizedY = rawY / magnitude;
|
|
44
|
+
|
|
45
|
+
if (magnitude >= this.deadzoneMax) {
|
|
46
|
+
return { x: normalizedX, y: normalizedY };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const scaledMag = (magnitude - this.deadzoneMin) / (this.deadzoneMax - this.deadzoneMin);
|
|
50
|
+
return {
|
|
51
|
+
x: normalizedX * scaledMag,
|
|
52
|
+
y: normalizedY * scaledMag,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public updateAnalogStick(rawX: number, rawY: number) {
|
|
57
|
+
if (this.activeContext !== 'Gameplay') {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const filtered = this.filterRadialDeadzone(rawX, rawY);
|
|
61
|
+
const action = this.actions.get('Move');
|
|
62
|
+
if (action) {
|
|
63
|
+
action.pressed = filtered.x !== 0 || filtered.y !== 0;
|
|
64
|
+
action.value = filtered;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public getAction(name: string): ActionState | undefined {
|
|
69
|
+
return this.actions.get(name);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
public handleControllerDisconnect() {
|
|
73
|
+
console.warn('Primary controller disconnected! Triggering pause safeguard.');
|
|
74
|
+
// Reset all pressed states
|
|
75
|
+
this.actions.forEach((act) => {
|
|
76
|
+
act.pressed = false;
|
|
77
|
+
if (typeof act.value === 'object') {
|
|
78
|
+
act.value = { x: 0, y: 0 };
|
|
79
|
+
} else {
|
|
80
|
+
act.value = 0;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
this.setContext('UI');
|
|
84
|
+
}
|
|
85
|
+
}
|
package/core/skills/gamedev/abstract-input-actions/references/action-mapping-and-analog-deadzones.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Input Action Mapping & Scaled Radial Deadzones (2026)
|
|
2
|
+
|
|
3
|
+
## 1. Architectural Foundations: Hardware Decoupling
|
|
4
|
+
|
|
5
|
+
Gameplay systems must never query physical device hardware keys (e.g., `Key_W`, `Gamepad_Button_South`). Input systems enforce a three-tier decoupling pipeline:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Physical Devices (KBM, Xbox, DualSense, Touch)
|
|
9
|
+
│
|
|
10
|
+
▼
|
|
11
|
+
Raw Input Polling (DirectInput, XInput, Gamepad API)
|
|
12
|
+
│
|
|
13
|
+
▼
|
|
14
|
+
Scaled Radial Deadzone & Coordinate Normalization
|
|
15
|
+
│
|
|
16
|
+
▼
|
|
17
|
+
Context-Filtered Semantic Actions (Jump, Move, Fire)
|
|
18
|
+
│
|
|
19
|
+
▼
|
|
20
|
+
Gameplay Consumer Systems (Character, UI, Vehicle)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 2. Scaled Radial Deadzone Algorithm
|
|
24
|
+
|
|
25
|
+
Per-axis deadzone filtering introduces cardinal axis snapping, destroying subtle diagonal analog stick movement. The scaled radial deadzone algorithm operates on the complete 2D magnitude:
|
|
26
|
+
|
|
27
|
+
$$\vec{v} = (x, y), \quad \|\vec{v}\| = \sqrt{x^2 + y^2}$$
|
|
28
|
+
|
|
29
|
+
$$\vec{v}_{\text{filtered}} = \begin{cases}
|
|
30
|
+
(0, 0) & \text{if } \|\vec{v}\| \le d_{\text{min}} \\
|
|
31
|
+
\frac{\vec{v}}{\|\vec{v}\|} & \text{if } \|\vec{v}\| \ge d_{\text{max}} \\
|
|
32
|
+
\frac{\vec{v}}{\|\vec{v}\|} \cdot \left( \frac{\|\vec{v}\| - d_{\text{min}}}{d_{\text{max}} - d_{\text{min}}} \right) & \text{otherwise}
|
|
33
|
+
\end{cases}$$
|
|
34
|
+
|
|
35
|
+
Where standard default parameters are:
|
|
36
|
+
- Inner deadzone: $d_{\text{min}} = 0.15$ (filters mechanical stick drift).
|
|
37
|
+
- Outer deadzone: $d_{\text{max}} = 0.95$ (ensures maximum velocity reach without physical strain).
|
|
38
|
+
|
|
39
|
+
## 3. Input Context Hierarchy
|
|
40
|
+
|
|
41
|
+
Actions belong to semantic Contexts:
|
|
42
|
+
- `GameplayContext`: Jump, Move, Attack, Dodge.
|
|
43
|
+
- `UIContext`: Navigate, Confirm, Cancel, TabNext.
|
|
44
|
+
- `DialogueContext`: AdvanceDialogue, Skip, ChooseOption.
|
|
45
|
+
|
|
46
|
+
Context priority stacks prevent gameplay input leakage when interacting with inventory or modal menus.
|
|
47
|
+
|
|
48
|
+
## 4. Multi-Device Hot-Swapping & Disconnect Safeguards
|
|
49
|
+
|
|
50
|
+
1. Listen to device connect/disconnect events (`gamepadconnected`, `gamepaddisconnected`).
|
|
51
|
+
2. When the active gameplay controller disconnects during combat or real-time simulation:
|
|
52
|
+
- Immediately dispatch `InputDeviceDisconnectedEvent`.
|
|
53
|
+
- Freeze kinematic simulation and trigger the system pause menu.
|
|
54
|
+
- Dynamically swap UI prompt glyphs to the fallback device (e.g., KBM or connected Gamepad 2).
|
|
@@ -78,3 +78,5 @@ When completing ECS architecture implementation, emit:
|
|
|
78
78
|
|
|
79
79
|
- **develop-gameplay-systems**: kinematic gameplay systems and hierarchical state machines
|
|
80
80
|
- **profile-game-performance**: CPU cache line profiling and memory bandwidth monitoring
|
|
81
|
+
- Companion reference: `references/data-oriented-design-and-archetype-ecs.md`
|
|
82
|
+
- Companion example: `examples/bevy-flecs-combat-system.rs`
|