@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.
Files changed (454) hide show
  1. package/INDEX.md +35 -22
  2. package/README.md +7 -18
  3. package/VERSION +1 -1
  4. package/adapters/antigravity/ANTIGRAVITY.md +40 -142
  5. package/adapters/antigravity/INDEX_TIER1.json +174 -146
  6. package/adapters/antigravity/a2a-config.template.yaml +1 -1
  7. package/adapters/antigravity/antigravity-tools.md +25 -0
  8. package/adapters/antigravity/role-skill-index.json +175 -58
  9. package/adapters/claude/CLAUDE_ADAPTER.md +3 -7
  10. package/adapters/claude/settings.template.json +18 -3
  11. package/adapters/cursor/README.md +1 -5
  12. package/adapters/cursor/hooks.template.json +4 -2
  13. package/core/contracts/README.md +0 -20
  14. package/core/contracts/schemas/compact-working-state.json +42 -1
  15. package/core/contracts/schemas/ui-component-spec.json +28 -2
  16. package/core/policies/README.md +0 -20
  17. package/core/policies/action-boundaries.yaml +10 -1
  18. package/core/policies/execution-sandbox.md +0 -12
  19. package/core/policies/mcp-tool-map.yaml +28 -0
  20. package/core/roles/3d-graphics-engineer.md +144 -208
  21. package/core/roles/README.md +1 -23
  22. package/core/roles/agent-coordinator.md +28 -147
  23. package/core/roles/agent-discovery-engineer.md +46 -39
  24. package/core/roles/ai-systems-engineer.md +2 -0
  25. package/core/roles/backend-developer.md +22 -117
  26. package/core/roles/cloudflare-engineer.md +1 -1
  27. package/core/roles/data-engineer.md +3 -1
  28. package/core/roles/devops-engineer.md +4 -3
  29. package/core/roles/ecommerce-engineer.md +18 -6
  30. package/core/roles/frontend-developer.md +146 -317
  31. package/core/roles/game-developer.md +2 -1
  32. package/core/roles/mobile-engineer.md +18 -204
  33. package/core/roles/product-manager.md +3 -3
  34. package/core/roles/project-manager.md +5 -5
  35. package/core/roles/references/3d-graphics-engineer-review-checklist.md +109 -109
  36. package/core/roles/references/agent-coordinator-responsibilities.md +120 -0
  37. package/core/roles/references/agent-coordinator-review-checklist.md +22 -4
  38. package/core/roles/references/agent-discovery-engineer-review-checklist.md +29 -20
  39. package/core/roles/references/backend-developer-responsibilities.md +47 -0
  40. package/core/roles/references/backend-developer-review-checklist.md +15 -0
  41. package/core/roles/references/business-analyst-responsibilities.md +2 -2
  42. package/core/roles/references/frontend-developer-responsibilities.md +14 -6
  43. package/core/roles/references/frontend-developer-review-checklist.md +13 -6
  44. package/core/roles/references/mobile-engineer-responsibilities.md +137 -0
  45. package/core/roles/references/mobile-engineer-review-checklist.md +63 -0
  46. package/core/roles/references/reviewer-review-checklist.md +54 -0
  47. package/core/roles/references/sdet-review-checklist.md +53 -0
  48. package/core/roles/references/solution-architect-responsibilities.md +134 -0
  49. package/core/roles/references/sre-review-checklist.md +81 -0
  50. package/core/roles/references/system-engineer-responsibilities.md +124 -0
  51. package/core/roles/references/technical-architect-responsibilities.md +192 -0
  52. package/core/roles/references/technical-architect-review-checklist.md +58 -0
  53. package/core/roles/references/technical-lead-review-checklist.md +65 -0
  54. package/core/roles/references/ui-ux-designer-anti-slop-standards.md +61 -35
  55. package/core/roles/references/ui-ux-designer-responsibilities.md +79 -226
  56. package/core/roles/references/ui-ux-designer-review-checklist.md +102 -116
  57. package/core/roles/references/vietnam-accounting-specialist-review-checklist.md +6 -6
  58. package/core/roles/researcher.md +3 -3
  59. package/core/roles/reviewer.md +2 -2
  60. package/core/roles/role-standard.md +79 -205
  61. package/core/roles/sdet.md +5 -6
  62. package/core/roles/security-engineer.md +4 -3
  63. package/core/roles/solution-architect.md +9 -130
  64. package/core/roles/sre.md +1 -0
  65. package/core/roles/system-engineer.md +15 -155
  66. package/core/roles/task-planner.md +1 -1
  67. package/core/roles/technical-architect.md +15 -244
  68. package/core/roles/technical-lead.md +1 -0
  69. package/core/roles/technical-writer.md +3 -3
  70. package/core/roles/ui-ux-designer.md +158 -303
  71. package/core/roles/vietnam-accounting-specialist.md +20 -20
  72. package/core/rules/README.md +0 -22
  73. package/core/rules/code.md +11 -6
  74. package/core/skills/README.md +12 -25
  75. package/core/skills/agent/agent-delegation/SKILL.md +11 -0
  76. package/core/skills/agent/agent-graph-orchestration/SKILL.md +5 -0
  77. package/core/skills/agent/agent-memory-compaction/SKILL.md +79 -82
  78. package/core/skills/agent/agent-memory-compaction/references/anchored-schema-and-compaction-algorithms.md +74 -115
  79. package/core/skills/agent/agent-model-routing/SKILL.md +2 -0
  80. package/core/skills/agent/agent-observability/SKILL.md +12 -6
  81. package/core/skills/agent/agent-observability/references/session-forensics-7-dimensions.md +41 -0
  82. package/core/skills/agent/agent-panel-meeting/SKILL.md +3 -3
  83. package/core/skills/agent/agent-quality-gate/SKILL.md +9 -0
  84. package/core/skills/agent/configure-agent-commerce/SKILL.md +2 -0
  85. package/core/skills/agent/configure-agent-commerce/examples/ucp-commerce-manifest-and-endpoints.json +55 -0
  86. package/core/skills/agent/configure-agent-commerce/references/acp-ucp-agent-commerce-manifest-specs.md +66 -0
  87. package/core/skills/agent/configure-agent-headers/SKILL.md +3 -0
  88. package/core/skills/agent/configure-agent-skills/SKILL.md +4 -4
  89. package/core/skills/agent/configure-oauth-metadata/SKILL.md +10 -7
  90. package/core/skills/agent/manage-agent-identity/SKILL.md +2 -0
  91. package/core/skills/agent/manage-agent-identity/examples/agent-identity-spire-workload.yaml +72 -0
  92. package/core/skills/agent/manage-agent-identity/references/nhi-lifecycle-and-token-rotation.md +45 -0
  93. package/core/skills/ai/deploy-vllm-inference/SKILL.md +2 -0
  94. package/core/skills/ai/deploy-vllm-inference/examples/vllm-production-serve-config.yaml +22 -0
  95. package/core/skills/ai/deploy-vllm-inference/references/vllm-v1-paged-attention-and-kv-tiering.md +20 -0
  96. package/core/skills/ai/openrouter-task/SKILL.md +5 -5
  97. package/core/skills/ai-agent/context-optimization/SKILL.md +2 -0
  98. package/core/skills/ai-agent/context-optimization/examples/context-pruner-and-reorderer.py +85 -0
  99. package/core/skills/ai-agent/context-optimization/references/token-budgeting-and-attention-allocation.md +47 -0
  100. package/core/skills/ai-agent/memory-hygiene/SKILL.md +13 -0
  101. package/core/skills/ai-agent/memory-hygiene/examples/memory-audit-and-compaction-routine.py +90 -0
  102. package/core/skills/ai-agent/memory-hygiene/references/agent-memory-vault-spec.md +137 -0
  103. package/core/skills/ai-agent/memory-hygiene/references/owasp-asi06-and-memory-poisoning-defense.md +38 -0
  104. package/core/skills/backend/add-api-endpoint/SKILL.md +9 -0
  105. package/core/skills/backend/add-api-endpoint/examples/express-zod-rfc9457-endpoint.md +329 -0
  106. package/core/skills/backend/add-api-endpoint/examples/kratos-go-clean-architecture-endpoint.md +405 -0
  107. package/core/skills/backend/add-api-endpoint/references/idempotency-and-rate-limiting.md +116 -0
  108. package/core/skills/backend/add-event-handler/SKILL.md +12 -1
  109. package/core/skills/backend/add-event-handler/examples/go-outbox-skip-locked-relay.go +97 -0
  110. package/core/skills/backend/add-event-handler/references/transactional-outbox-and-cloudevents.md +42 -0
  111. package/core/skills/backend/add-service-client/SKILL.md +2 -0
  112. package/core/skills/backend/add-service-client/examples/ts-circuit-breaker-full-jitter-client.ts +71 -0
  113. package/core/skills/backend/add-service-client/references/resilient-client-circuit-breaker-specs.md +25 -0
  114. package/core/skills/backend/build-mcp-server/SKILL.md +2 -0
  115. package/core/skills/backend/build-mcp-server/examples/ts-stateless-mcp-server-zod.ts +52 -0
  116. package/core/skills/backend/build-mcp-server/references/mcp-2026-stateless-contract-specs.md +21 -0
  117. package/core/skills/backend/design-caching-and-locking/SKILL.md +83 -0
  118. package/core/skills/backend/design-caching-and-locking/examples/redis-lua-atomic-reservation-fencing.lua +30 -0
  119. package/core/skills/backend/design-caching-and-locking/references/redis-lua-fencing-and-stampede-specs.md +25 -0
  120. package/core/skills/backend/design-caching-and-locking/scripts/verify_lua_atomicity.py +68 -0
  121. package/core/skills/backend/implement-auth/SKILL.md +9 -0
  122. package/core/skills/backend/implement-structured-outputs/SKILL.md +2 -0
  123. package/core/skills/backend/implement-structured-outputs/examples/python-pydantic-structured-output.py +65 -0
  124. package/core/skills/backend/implement-structured-outputs/references/constrained-decoding-and-double-validation.md +18 -0
  125. package/core/skills/backend/optimize-postgres/SKILL.md +9 -0
  126. package/core/skills/backend/scaffold-new-service/SKILL.md +2 -1
  127. package/core/skills/backend/scaffold-new-service/references/deep-modules-and-seams.md +43 -0
  128. package/core/skills/business/elicit-requirements/SKILL.md +2 -0
  129. package/core/skills/business/trace-requirements-impact/SKILL.md +1 -0
  130. package/core/skills/business/write-use-cases/SKILL.md +1 -0
  131. package/core/skills/commerce/handle-checkout-flow/SKILL.md +18 -66
  132. package/core/skills/commerce/handle-checkout-flow/examples/production-checkout-orchestrator.ts +185 -0
  133. package/core/skills/commerce/handle-checkout-flow/references/pci-dss-v4-and-agentic-checkout-specs.md +72 -0
  134. package/core/skills/commerce/integrate-payment-gateway/SKILL.md +22 -58
  135. package/core/skills/commerce/integrate-payment-gateway/examples/resilient-webhook-and-mpp-handler.ts +164 -0
  136. package/core/skills/commerce/integrate-payment-gateway/references/mpp-x402-and-webhook-security-specs.md +47 -0
  137. package/core/skills/commerce/manage-order-fulfillment/SKILL.md +17 -50
  138. package/core/skills/commerce/manage-order-fulfillment/examples/temporal-fulfillment-saga.ts +104 -0
  139. package/core/skills/commerce/manage-order-fulfillment/references/event-sourced-fulfillment-and-carrier-webhooks.md +58 -0
  140. package/core/skills/commerce/manage-product-catalog/SKILL.md +5 -1
  141. package/core/skills/commerce/manage-product-catalog/examples/hybrid-search-and-governance-pipeline.ts +120 -0
  142. package/core/skills/commerce/manage-product-catalog/references/semantic-vector-catalog-and-graphrag.md +54 -0
  143. package/core/skills/content/write-article/SKILL.md +1 -1
  144. package/core/skills/document/docx/SKILL.md +1 -0
  145. package/core/skills/document/pdf/SKILL.md +2 -0
  146. package/core/skills/document/pdf/references/pdf-acroforms-and-pdfplumber-specs.md +54 -0
  147. package/core/skills/document/pdf/scripts/check_fillable_fields.py +144 -0
  148. package/core/skills/document/pdf/scripts/fill_fillable_fields.py +145 -0
  149. package/core/skills/document/xlsx/SKILL.md +1 -0
  150. package/core/skills/documentation/configure-llms-txt/SKILL.md +3 -0
  151. package/core/skills/documentation/configure-llms-txt/examples/canonical-llms-txt-and-full-txt.md +45 -0
  152. package/core/skills/documentation/configure-llms-txt/references/llms-txt-and-llms-full-txt-standard.md +37 -0
  153. package/core/skills/documentation/write-documentation/SKILL.md +4 -1
  154. package/core/skills/documentation/write-documentation/examples/microservice-production-readme-and-api-docs.md +70 -0
  155. package/core/skills/documentation/write-documentation/references/diataxis-framework-and-doc-standards.md +62 -0
  156. package/core/skills/documentation/write-tech-radar/SKILL.md +1 -0
  157. package/core/skills/education/create-exercises/SKILL.md +1 -0
  158. package/core/skills/education/design-learning-plan/SKILL.md +1 -0
  159. package/core/skills/education/grade-and-review/SKILL.md +1 -0
  160. package/core/skills/foundation/accessibility-review/SKILL.md +1 -0
  161. package/core/skills/foundation/ai-risk-assessment/SKILL.md +4 -5
  162. package/core/skills/foundation/ai-risk-assessment/examples/genai-system-risk-register.md +67 -0
  163. package/core/skills/foundation/ai-risk-assessment/references/nist-ai-rmf-and-eu-ai-act-taxonomy.md +49 -0
  164. package/core/skills/foundation/combinatorial-testing/SKILL.md +1 -0
  165. package/core/skills/foundation/conduct-research/SKILL.md +2 -2
  166. package/core/skills/foundation/conduct-research/references/ai-era-source-discipline.md +1 -1
  167. package/core/skills/foundation/create-migration/SKILL.md +10 -0
  168. package/core/skills/foundation/design-review/SKILL.md +9 -10
  169. package/core/skills/foundation/design-ux-flow/SKILL.md +9 -7
  170. package/core/skills/foundation/discernment-nudge/SKILL.md +2 -0
  171. package/core/skills/foundation/hostile-component-stress-testing/SKILL.md +1 -0
  172. package/core/skills/foundation/incident-report/SKILL.md +1 -0
  173. package/core/skills/foundation/plan-technical-delivery/SKILL.md +3 -1
  174. package/core/skills/foundation/playwright-evidence-qa/SKILL.md +1 -0
  175. package/core/skills/foundation/refactor-legacy-code/SKILL.md +84 -0
  176. package/core/skills/foundation/refactor-legacy-code/examples/characterization-test-seam-extraction.py +34 -0
  177. package/core/skills/foundation/refactor-legacy-code/references/strangler-fig-seams-and-characterization-tests.md +17 -0
  178. package/core/skills/foundation/refactor-legacy-code/scripts/check_refactor_blast_radius.py +63 -0
  179. package/core/skills/foundation/release-notes/SKILL.md +3 -3
  180. package/core/skills/foundation/release-notes/examples/enterprise-platform-release-notes.md +42 -0
  181. package/core/skills/foundation/release-notes/references/keep-a-changelog-and-semver-governance.md +43 -0
  182. package/core/skills/foundation/systematic-debugging/SKILL.md +15 -0
  183. package/core/skills/foundation/webapp-server-runner/SKILL.md +1 -0
  184. package/core/skills/foundation/write-product-brief/SKILL.md +1 -0
  185. package/core/skills/foundation/write-tests/SKILL.md +9 -0
  186. package/core/skills/foundation/write-tests/examples/anti-tautological-tdd-walkthrough.md +204 -0
  187. package/core/skills/foundation/write-tests/examples/testcontainers-kratos-integration-test.md +186 -0
  188. package/core/skills/foundation/write-tests/references/contract-and-chaos-testing.md +187 -0
  189. package/core/skills/frontend/INDEX.json +16 -0
  190. package/core/skills/frontend/add-page-route/SKILL.md +10 -8
  191. package/core/skills/frontend/add-page-route/examples/streaming-rsc-page-with-view-transition.tsx +133 -0
  192. package/core/skills/frontend/add-page-route/references/rsc-routing-and-view-transitions.md +72 -0
  193. package/core/skills/frontend/add-ui-component/SKILL.md +4 -1
  194. package/core/skills/frontend/add-ui-component/examples/compound-dialog-and-form-actions.tsx +193 -0
  195. package/core/skills/frontend/add-ui-component/references/react19-component-standards-and-anti-slop.md +55 -0
  196. package/core/skills/frontend/component-composition/SKILL.md +12 -1
  197. package/core/skills/frontend/component-composition/examples/headless-combobox-compound-component.tsx +207 -0
  198. package/core/skills/frontend/design-md-specification/SKILL.md +5 -0
  199. package/core/skills/frontend/design-system-engineering/SKILL.md +4 -2
  200. package/core/skills/frontend/frontend-micro-polish/SKILL.md +1 -0
  201. package/core/skills/frontend/frontend-testing/SKILL.md +4 -1
  202. package/core/skills/frontend/frontend-testing/examples/playwright-e2e-with-msw-and-axe.spec.ts +87 -0
  203. package/core/skills/frontend/frontend-testing/references/playwright-msw-and-a11y-testing-standards.md +78 -0
  204. package/core/skills/frontend/implement-ai-disclosure/SKILL.md +119 -0
  205. package/core/skills/frontend/implement-view-transitions/SKILL.md +1 -0
  206. package/core/skills/frontend/implement-webmcp/SKILL.md +7 -4
  207. package/core/skills/frontend/implement-webmcp/examples/webmcp-provider-and-hitl-modal.tsx +163 -0
  208. package/core/skills/frontend/implement-webmcp/references/webmcp-architecture-and-hitl-security.md +48 -0
  209. package/core/skills/frontend/integrate-api-client/SKILL.md +12 -12
  210. package/core/skills/frontend/integrate-api-client/examples/orval-query-and-streaming-mutation.ts +102 -0
  211. package/core/skills/frontend/integrate-api-client/references/orval-tanstack-query-and-streaming-specs.md +57 -0
  212. package/core/skills/frontend/interactive-component-workbench/SKILL.md +1 -0
  213. package/core/skills/frontend/motion-performance-engineering/SKILL.md +1 -0
  214. package/core/skills/frontend/setup-design-system/SKILL.md +6 -3
  215. package/core/skills/frontend/setup-design-system/examples/tailwind-v4-theme-and-dtcg-tokens.css +87 -0
  216. package/core/skills/frontend/setup-design-system/references/tailwind-v4-oklch-and-dtcg-tokens.md +61 -0
  217. package/core/skills/frontend/setup-visual-regression/SKILL.md +8 -5
  218. package/core/skills/frontend/setup-visual-regression/examples/visual-regression-playwright.config.ts +83 -0
  219. package/core/skills/frontend/setup-visual-regression/references/visual-regression-docker-and-masking-specs.md +46 -0
  220. package/core/skills/frontend/ui-ux-designer-anti-slop-standards.md +64 -42
  221. package/core/skills/frontend/web-quality-audit/SKILL.md +1 -0
  222. package/core/skills/gamedev/abstract-input-actions/SKILL.md +2 -0
  223. package/core/skills/gamedev/abstract-input-actions/examples/input-action-manager.ts +85 -0
  224. package/core/skills/gamedev/abstract-input-actions/references/action-mapping-and-analog-deadzones.md +54 -0
  225. package/core/skills/gamedev/architect-ecs-systems/SKILL.md +2 -0
  226. package/core/skills/gamedev/architect-ecs-systems/examples/bevy-flecs-combat-system.rs +73 -0
  227. package/core/skills/gamedev/architect-ecs-systems/references/data-oriented-design-and-archetype-ecs.md +39 -0
  228. package/core/skills/gamedev/author-game-ai/SKILL.md +2 -0
  229. package/core/skills/gamedev/author-game-ai/examples/modular-behavior-tree-ai.ts +98 -0
  230. package/core/skills/gamedev/author-game-ai/references/behavior-trees-and-utility-ai-curves.md +47 -0
  231. package/core/skills/gamedev/configure-physics-collision/SKILL.md +2 -0
  232. package/core/skills/gamedev/configure-physics-collision/examples/kinematic-physics-substepping.cpp +100 -0
  233. package/core/skills/gamedev/configure-physics-collision/references/continuous-collision-detection-and-substepping.md +50 -0
  234. package/core/skills/gamedev/develop-gameplay-systems/SKILL.md +2 -0
  235. package/core/skills/gamedev/develop-gameplay-systems/examples/kinematic-character-controller.gd +86 -0
  236. package/core/skills/gamedev/develop-gameplay-systems/references/deterministic-gameplay-state-machines.md +42 -0
  237. package/core/skills/gamedev/implement-save-persistence/SKILL.md +2 -0
  238. package/core/skills/gamedev/implement-save-persistence/examples/versioned-save-manager.ts +127 -0
  239. package/core/skills/gamedev/implement-save-persistence/references/versioned-save-schemas-and-checksums.md +44 -0
  240. package/core/skills/gamedev/render-webgl-threejs/SKILL.md +14 -10
  241. package/core/skills/gamedev/render-webgl-threejs/examples/production-threejs-webgpu-scene.ts +116 -0
  242. package/core/skills/gamedev/render-webgl-threejs/references/webgpu-threejs-pbr-pipeline.md +72 -0
  243. package/core/skills/legal-compliance/audit-ai-compliance/SKILL.md +1 -0
  244. package/core/skills/legal-compliance/draft-legal-opinion/SKILL.md +1 -0
  245. package/core/skills/legal-compliance/manage-vietnam-legal/SKILL.md +1 -0
  246. package/core/skills/meetings-analysis/analyze-business-requirements/SKILL.md +1 -0
  247. package/core/skills/meetings-analysis/analyze-data/SKILL.md +1 -0
  248. package/core/skills/meetings-analysis/meeting-review/SKILL.md +1 -0
  249. package/core/skills/mmo/analyze-campaign-roi/SKILL.md +2 -0
  250. package/core/skills/mmo/analyze-campaign-roi/examples/campaign-roi-and-roas-dashboard.py +80 -0
  251. package/core/skills/mmo/analyze-campaign-roi/references/multi-touch-attribution-and-cpa-analytics.md +33 -0
  252. package/core/skills/mmo/create-automation-script/SKILL.md +2 -0
  253. package/core/skills/mmo/create-automation-script/examples/stealth-browser-automation-flow.ts +65 -0
  254. package/core/skills/mmo/create-automation-script/references/stealth-cdp-and-behavioral-mimicry.md +37 -0
  255. package/core/skills/mmo/deploy-mmo-infrastructure/SKILL.md +3 -0
  256. package/core/skills/mmo/deploy-mmo-infrastructure/examples/proxy-health-probe-and-rotation-daemon.py +75 -0
  257. package/core/skills/mmo/deploy-mmo-infrastructure/references/proxy-pool-rotation-and-anti-detect-specs.md +45 -0
  258. package/core/skills/mmo/deploy-proxyware-fleet/SKILL.md +3 -0
  259. package/core/skills/mmo/deploy-proxyware-fleet/examples/docker-compose-depin-light-node-fleet.yaml +52 -0
  260. package/core/skills/mmo/deploy-proxyware-fleet/references/depin-bandwidth-monetization-node-specs.md +43 -0
  261. package/core/skills/mmo/generate-mmo-content/SKILL.md +2 -0
  262. package/core/skills/mmo/generate-mmo-content/examples/pseo-programmatic-page-generator.ts +76 -0
  263. package/core/skills/mmo/generate-mmo-content/references/pseo-landing-pages-and-social-video-hooks.md +39 -0
  264. package/core/skills/mmo/manage-mmo-assets/SKILL.md +2 -0
  265. package/core/skills/mmo/manage-mmo-assets/examples/mmo-asset-vault-manager.py +63 -0
  266. package/core/skills/mmo/manage-mmo-assets/references/mmo-asset-rbac-and-vault-isolation.md +38 -0
  267. package/core/skills/mmo/setup-tracking-system/SKILL.md +2 -0
  268. package/core/skills/mmo/setup-tracking-system/examples/meta-capi-s2s-event-dispatcher.ts +79 -0
  269. package/core/skills/mmo/setup-tracking-system/references/server-to-server-postback-and-capi-specs.md +45 -0
  270. package/core/skills/mobile/deploy-mobile-app/SKILL.md +1 -0
  271. package/core/skills/mobile/develop-mobile-app/SKILL.md +1 -0
  272. package/core/skills/platform/add-telemetry-instrumentation/SKILL.md +2 -0
  273. package/core/skills/platform/add-telemetry-instrumentation/examples/kratos-otel-middleware-instrumentation.go +87 -0
  274. package/core/skills/platform/add-telemetry-instrumentation/references/opentelemetry-semantic-conventions-2026.md +37 -0
  275. package/core/skills/platform/agents-sdk/SKILL.md +1 -0
  276. package/core/skills/platform/aws-infrastructure/SKILL.md +2 -0
  277. package/core/skills/platform/aws-infrastructure/examples/opentofu-eks-pod-identity-vpc.tf +101 -0
  278. package/core/skills/platform/aws-infrastructure/references/opentofu-aws-zero-trust-and-irsa.md +40 -0
  279. package/core/skills/platform/cloudflare-email-service/SKILL.md +2 -2
  280. package/core/skills/platform/configure-ci-cd-pipeline/SKILL.md +83 -0
  281. package/core/skills/platform/configure-ci-cd-pipeline/examples/hardened-ci-matrix-workflow.yml +33 -0
  282. package/core/skills/platform/configure-ci-cd-pipeline/references/github-actions-sha-pinning-and-slsa-specs.md +22 -0
  283. package/core/skills/platform/configure-ci-cd-pipeline/scripts/audit_workflow_pinning.py +74 -0
  284. package/core/skills/platform/debug-runtime-platform/SKILL.md +1 -2
  285. package/core/skills/platform/debug-workers-edge/SKILL.md +2 -2
  286. package/core/skills/platform/durable-objects/SKILL.md +1 -0
  287. package/core/skills/platform/orchestrate-chaos-experiment/SKILL.md +1 -0
  288. package/core/skills/platform/sandbox-sdk/SKILL.md +1 -0
  289. package/core/skills/platform/setup-deployment/SKILL.md +6 -2
  290. package/core/skills/platform/setup-deployment/examples/kustomize-production-service-manifests.yaml +123 -0
  291. package/core/skills/platform/setup-deployment/references/interactive-hitl-wizard.md +55 -0
  292. package/core/skills/platform/setup-deployment/references/k8s-gitops-and-kustomize-invariants.md +40 -0
  293. package/core/skills/platform/setup-gpu-finops/SKILL.md +2 -0
  294. package/core/skills/platform/setup-gpu-finops/examples/gpu-finops-prometheus-rules.yaml +23 -0
  295. package/core/skills/platform/setup-gpu-finops/references/dcgm-kubecost-gpu-attribution-specs.md +16 -0
  296. package/core/skills/platform/setup-llm-gateway/SKILL.md +2 -0
  297. package/core/skills/platform/setup-llm-gateway/examples/litellm-gateway-config.yaml +28 -0
  298. package/core/skills/platform/setup-llm-gateway/references/litellm-routing-budget-failover-specs.md +16 -0
  299. package/core/skills/platform/supply-chain-security/SKILL.md +3 -2
  300. package/core/skills/platform/supply-chain-security/examples/github-actions-sbom-cosign.yaml +57 -0
  301. package/core/skills/platform/supply-chain-security/references/slsa-provenance-and-sbom-sigstore.md +60 -0
  302. package/core/skills/platform/turnstile-spin/SKILL.md +2 -2
  303. package/core/skills/platform/web-perf/SKILL.md +2 -2
  304. package/core/skills/platform/workers-best-practices/SKILL.md +1 -0
  305. package/core/skills/platform/wrangler/SKILL.md +1 -0
  306. package/core/skills/product/build-story-map/SKILL.md +3 -0
  307. package/core/skills/product/define-product-strategy/SKILL.md +1 -0
  308. package/core/skills/product/model-saas-metrics/SKILL.md +1 -0
  309. package/core/skills/product/prioritize-roadmap/SKILL.md +1 -0
  310. package/core/skills/repo-ops/commit-code/SKILL.md +1 -0
  311. package/core/skills/repo-ops/navigate-service/SKILL.md +28 -132
  312. package/core/skills/repo-ops/navigate-service/examples/service-boundary-map-example.md +14 -0
  313. package/core/skills/repo-ops/navigate-service/references/service-topology-mapping-guide.md +18 -0
  314. package/core/skills/repo-ops/review-code/SKILL.md +12 -2
  315. package/core/skills/repo-ops/review-code/examples/adversarial-two-axis-pr-review.md +167 -0
  316. package/core/skills/repo-ops/review-code/examples/ai-vibe-slop-remediation.md +220 -0
  317. package/core/skills/repo-ops/review-code/references/supply-chain-and-migration-safety.md +103 -0
  318. package/core/skills/repo-ops/review-service/SKILL.md +4 -1
  319. package/core/skills/repo-ops/review-service/examples/service-release-audit-report.md +21 -0
  320. package/core/skills/repo-ops/review-service/references/release-readiness-audit-rubric.md +21 -0
  321. package/core/skills/repo-ops/troubleshoot-service/SKILL.md +1 -0
  322. package/core/skills/security-data/database-maintenance/SKILL.md +1 -1
  323. package/core/skills/security-data/manage-secrets/SKILL.md +2 -0
  324. package/core/skills/security-data/manage-secrets/examples/external-secrets-vault-crds.yaml +53 -0
  325. package/core/skills/security-data/manage-secrets/references/zero-trust-secret-rotation-and-eso.md +30 -0
  326. package/core/skills/security-data/manage-vietnam-accounting/SKILL.md +8 -7
  327. package/core/skills/security-data/prompt-injection-defense/SKILL.md +2 -0
  328. package/core/skills/security-data/prompt-injection-defense/examples/bounded-tool-execution-wrapper.py +78 -0
  329. package/core/skills/security-data/prompt-injection-defense/references/prompt-injection-taxonomy-and-delimiters.md +37 -0
  330. package/core/skills/security-data/reverse-engineer-binary/SKILL.md +3 -0
  331. package/core/skills/security-data/reverse-engineer-binary/examples/binary-triage-and-vulnerability-dossier.md +58 -0
  332. package/core/skills/security-data/reverse-engineer-binary/references/ghidra-radare2-and-rea-evidence-ledgers.md +43 -0
  333. package/core/skills/security-data/security-audit/SKILL.md +3 -1
  334. package/core/skills/security-data/security-audit/examples/enterprise-service-security-audit-report.md +54 -0
  335. package/core/skills/security-data/security-audit/references/owasp-asi-and-cvss4-threat-modeling.md +39 -0
  336. package/core/skills/security-data/skill-preflight-ast-check/SKILL.md +3 -0
  337. package/core/skills/security-data/skill-preflight-ast-check/references/ast-lethal-trifecta-and-static-vetting.md +38 -0
  338. package/core/skills/security-data/skill-preflight-ast-check/scripts/scan-skill-ast.py +127 -0
  339. package/core/skills/seo/audit-technical-seo/SKILL.md +1 -0
  340. package/core/skills/seo/implement-schema-markup/SKILL.md +1 -0
  341. package/core/workflows/README.md +0 -20
  342. package/overlays/README.md +2 -22
  343. package/overlays/astro-cloudflare/README.md +0 -20
  344. package/overlays/astro-cloudflare/rules/astro-cloudflare-conventions.md +0 -31
  345. package/overlays/b2b-catalog-golf/README.md +0 -20
  346. package/overlays/b2b-catalog-golf/rules/golf-project-rules.md +0 -31
  347. package/overlays/b2b-catalog-golf/skills/develop-b2b-golf-feature/SKILL.md +1 -0
  348. package/overlays/b2b-factory-catalog/README.md +0 -20
  349. package/overlays/b2b-factory-catalog/rules/icm-project-rules.md +0 -31
  350. package/overlays/b2b-factory-catalog/skills/develop-b2b-catalog-feature/SKILL.md +1 -0
  351. package/overlays/b2b-sport-catalog/README.md +0 -20
  352. package/overlays/b2b-sport-catalog/rules/sport-project-rules.md +0 -31
  353. package/overlays/cad-projection/README.md +0 -20
  354. package/overlays/cad-projection/rules/cad-conventions.md +0 -20
  355. package/overlays/cad-projection/skills/isometric-svg-projection/SKILL.md +1 -0
  356. package/overlays/data-analyst-stack/README.md +0 -20
  357. package/overlays/data-analyst-stack/rules/metric-dashboard-templates.md +0 -31
  358. package/overlays/data-analyst-stack/rules/stack-conventions.md +0 -31
  359. package/overlays/data-warehouse/README.md +0 -22
  360. package/overlays/data-warehouse/learning/learning-conventions.md +0 -31
  361. package/overlays/data-warehouse/learning/phase-roadmap.md +0 -31
  362. package/overlays/data-warehouse/rules/amis-accounting-standards.md +0 -33
  363. package/overlays/data-warehouse/rules/duckdb-concurrency.md +0 -37
  364. package/overlays/data-warehouse/rules/pii-scrubbing.md +0 -37
  365. package/overlays/data-warehouse/rules/stocktake-tolerance.md +0 -33
  366. package/overlays/ecommerce-microservices/README.md +22 -35
  367. package/overlays/ecommerce-microservices/config/README.md +3 -1
  368. package/overlays/ecommerce-microservices/rules/README.md +2 -1
  369. package/overlays/ecommerce-microservices/rules/microservices-conventions.md +30 -0
  370. package/overlays/ecommerce-microservices/skills/README.md +1 -1
  371. package/overlays/ecommerce-microservices/workflows/README.md +3 -1
  372. package/overlays/fintech-compliance/README.md +0 -20
  373. package/overlays/fintech-compliance/rules/credit-scorecard-rules.md +0 -20
  374. package/overlays/fintech-compliance/skills/build-credit-scorecard/SKILL.md +1 -0
  375. package/overlays/go-microservices/README.md +1 -21
  376. package/overlays/go-microservices/rules/go-conventions.md +0 -31
  377. package/overlays/hugo-authority-content/README.md +0 -20
  378. package/overlays/hugo-authority-content/roles/README.md +0 -20
  379. package/overlays/hugo-authority-content/rules/content-brand.md +0 -30
  380. package/overlays/hugo-authority-content/rules/link-topology.md +0 -30
  381. package/overlays/hugo-authority-content/rules/seo-authority.md +0 -30
  382. package/overlays/hugo-authority-content/rules/technical-article-2027.md +0 -30
  383. package/overlays/hugo-authority-content/skills/audit-technical-article/SKILL.md +1 -0
  384. package/overlays/hugo-authority-content/skills/write-hugo-twin-content/SKILL.md +1 -0
  385. package/overlays/hugo-authority-content/workflows/README.md +0 -20
  386. package/overlays/hvac-authority-content/README.md +0 -20
  387. package/overlays/hvac-authority-content/config/collections.md +0 -22
  388. package/overlays/hvac-authority-content/rules/content-schema.md +0 -30
  389. package/overlays/hvac-authority-content/rules/hvac-engineering-standards.md +0 -30
  390. package/overlays/hvac-authority-content/rules/silo-linking.md +0 -30
  391. package/overlays/hvac-authority-content/skills/write-hvac-authority-content/SKILL.md +1 -0
  392. package/overlays/hvac-authority-content/workflows/publish-hvac-content.md +0 -22
  393. package/overlays/laravel-ecommerce/README.md +0 -20
  394. package/overlays/laravel-ecommerce/rules/elomus-design-system.md +0 -31
  395. package/overlays/laravel-ecommerce/rules/laravel-ecommerce-rules.md +0 -31
  396. package/overlays/laravel-ecommerce/skills/develop-laravel-ecommerce-feature/SKILL.md +1 -0
  397. package/overlays/laravel-filament/README.md +0 -20
  398. package/overlays/laravel-filament/rules/laravel-conventions.md +0 -31
  399. package/overlays/laravel-filament/skills/develop-laravel-feature/SKILL.md +1 -0
  400. package/overlays/livestream-web/README.md +0 -20
  401. package/overlays/livestream-web/rules/livestream-web-ux-conventions.md +0 -31
  402. package/overlays/obj-configurator/README.md +0 -20
  403. package/overlays/obj-configurator/rules/obj-project-rules.md +0 -31
  404. package/overlays/obj-configurator/skills/develop-obj-feature/SKILL.md +1 -0
  405. package/overlays/r3f-stack/README.md +0 -20
  406. package/overlays/r3f-stack/rules/stub.md +0 -31
  407. package/overlays/r3f-stack/skills/debug-3d-scene/SKILL.md +4 -2
  408. package/overlays/r3f-stack/skills/integrate-r3f-three-legacy/SKILL.md +6 -5
  409. package/overlays/r3f-stack/skills/optimize-3d-assets/SKILL.md +4 -3
  410. package/overlays/real-estate-content/README.md +0 -20
  411. package/overlays/real-estate-content/roles/README.md +0 -20
  412. package/overlays/real-estate-content/rules/affiliate-links.md +0 -31
  413. package/overlays/real-estate-content/rules/content-schema.md +0 -31
  414. package/overlays/real-estate-content/rules/seo-baseline.md +0 -31
  415. package/overlays/real-estate-content/skills/write-real-estate-astro-data/SKILL.md +1 -0
  416. package/overlays/real-estate-content/workflows/README.md +0 -20
  417. package/overlays/security-research/README.md +0 -20
  418. package/overlays/security-research/rules/reverse-engineering-rules.md +0 -20
  419. package/overlays/seo-publishing/README.md +1 -21
  420. package/overlays/seo-publishing/rules/publish-log-conventions.md +0 -31
  421. package/overlays/seo-publishing/rules/publishing-cadence.md +0 -31
  422. package/overlays/seo-publishing/rules/site-mix-and-cannibalization.md +0 -31
  423. package/overlays/seo-publishing/rules/topic-board-template.md +0 -31
  424. package/overlays/ui-design-system/README.md +0 -20
  425. package/overlays/ui-design-system/rules/handoff-conventions.md +0 -31
  426. package/package.json +2 -2
  427. package/packs/README.md +3 -9
  428. package/packs/ecommerce-team/manifest.yaml +1 -1
  429. package/core/skills/commerce/2026_STANDARDS_SUMMARY.md +0 -316
  430. package/core/skills/commerce/handle-checkout-flow/UPGRADE_PLAN_2026.md +0 -99
  431. package/core/skills/commerce/integrate-payment-gateway/UPGRADE_PLAN_2026.md +0 -128
  432. package/core/skills/commerce/manage-order-fulfillment/UPGRADE_PLAN_2026.md +0 -136
  433. package/core/skills/commerce/manage-product-catalog/UPGRADE_PLAN_2026.md +0 -130
  434. package/core/skills/education/2026_STANDARDS_SUMMARY.md +0 -290
  435. package/core/skills/education/create-exercises/UPGRADE_PLAN_2026.md +0 -115
  436. package/core/skills/education/design-learning-plan/UPGRADE_PLAN_2026.md +0 -140
  437. package/core/skills/education/grade-and-review/UPGRADE_PLAN_2026.md +0 -141
  438. package/core/skills/frontend/2026_STANDARDS_SUMMARY.md +0 -345
  439. package/core/skills/frontend/add-page-route/UPGRADE_PLAN_2026.md +0 -102
  440. package/core/skills/frontend/add-ui-component/UPGRADE_PLAN_2026.md +0 -114
  441. package/core/skills/frontend/component-composition/UPGRADE_PLAN_2026.md +0 -103
  442. package/core/skills/frontend/frontend-testing/UPGRADE_PLAN_2026.md +0 -137
  443. package/core/skills/frontend/implement-view-transitions/UPGRADE_PLAN_2026.md +0 -118
  444. package/core/skills/frontend/implement-webmcp/UPGRADE_PLAN_2026.md +0 -108
  445. package/core/skills/frontend/integrate-api-client/UPGRADE_PLAN_2026.md +0 -118
  446. package/core/skills/frontend/setup-design-system/UPGRADE_PLAN_2026.md +0 -123
  447. package/core/skills/frontend/setup-visual-regression/UPGRADE_PLAN_2026.md +0 -121
  448. package/core/skills/meetings-analysis/2026_STANDARDS_SUMMARY.md +0 -236
  449. package/core/skills/meetings-analysis/analyze-business-requirements/UPGRADE_PLAN_2026.md +0 -97
  450. package/core/skills/meetings-analysis/analyze-data/UPGRADE_PLAN_2026.md +0 -143
  451. package/core/skills/meetings-analysis/meeting-review/UPGRADE_PLAN_2026.md +0 -125
  452. package/core/skills/mobile/2026_STANDARDS_SUMMARY.md +0 -209
  453. package/core/skills/mobile/deploy-mobile-app/UPGRADE_PLAN_2026.md +0 -122
  454. 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**: Set `maxDiffPixelRatio: 0.01` and `threshold: 0.2` to absorb sub-pixel text rendering while catching real layout regressions — unconfigured default thresholds are too loose
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 threshold tolerances (e.g., `maxDiffPixelRatio: 0.01`).
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 below the threshold is allowed. Mitigation: set the threshold per component category; reject thresholds looser than 0.1% pixel delta.
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`, `threshold: 0.2`
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-09-25
118
+ Last updated: 2026-11-08
@@ -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** | Layout family diversity, anti-center bias, hero viewport discipline, responsive grid orchestration | §4 (Layout & Composition), §10 (Copy & CTA) |
17
- | 3 | **shadcn/ui (v4)** | Compound component composition, `FieldGroup` + `Field`, `InputGroup`, semantic tokens, Base UI vs Radix | §5 (Component Composition), §6 (Token System) |
18
- | 4 | **Impeccable** | Micro-typography triad, perceptual contrast compliance, whitespace mathematics, visual polish | §3 (Design Read), §6 (Token System), §10 (Copy) |
19
- | 5 | **Emil Design Engineering** | Tactile interactions, gesture feedback, physical state models, fluid component dynamics | §5 (Component Composition), §7 (Motion Physics) |
20
- | 6 | **Animate** | Choreographed micro-interactions, transition curves, easing token governance, viewport reveals | §7 (Motion Physics & Skeletons) |
21
- | 7 | **Emil Kowalski's Bundle** | Frequency-based animation budget (0ms Cmd+K, 150-250ms modals), harmonic oscillator spring physics | §7 (Motion Physics & Timing Table) |
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 & Three-Dial Calibration
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. Baseline default across all projects is **`8 / 6 / 4`**. These are global variables — cross-references must use these exact names, never aliases like `LAYOUT_VARIANCE` or `ANIM_LEVEL`.
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
- │ (Default: 8) │ (Default: 6) │ (Default: 4) │
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 Dial Calibration Across Core Archetypes
97
+ ### 2.2 Domain-to-Aesthetic Lookup Matrix (Anti-Monoculture)
100
98
 
101
- | Archetype | VARIANCE | MOTION | DENSITY | Key Characteristics & Guidelines |
102
- |:---|:---:|:---:|:---:|:---|
103
- | **B2B Enterprise / Regulated / Gov** | **3** | **2** | **6** | Rigid 12-col grid, zero decorative whimsy, instantaneous transitions (0-150ms), high data density, WCAG AAA compliance. |
104
- | **Modern Developer Tool (Linear/Supabase style)** | **6** | **5** | **5** | Dark-mode precision, monospace accents, keyboard shortcuts (0ms), structured bento grids, snappy Kowalski springs. |
105
- | **Premium Consumer / Luxury Brand** | **7** | **6** | **3** | Cold luxury palette (slate/cobalt/monochrome), generous negative space, high-craft typography, tactile physical springs. |
106
- | **Editorial / Creative Portfolio** | **8** | **6** | **3** | Asymmetrical split screens, oversized typography, curated editorial pacing, staggered reveals, high whitespace. |
107
- | **Awwwards / Experiential Agency** | **9** | **8** | **3** | Broken grids, scroll-pinned sticky stacks, kinetic typography, magnetic interactions, bold expressive visual depth. |
108
- | **Universal SaaS Marketing Baseline** | **8** | **6** | **4** | Default anti-slop baseline. Asymmetric split hero, fluid micro-interactions, generous breathing room, semantic tokens. |
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.98] active spring on CTA; 0ms on keyboard shortcuts
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.98] transition-transform">
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 tokens. Without this anchor, code defaults to generic centered AI slop with pure black backgrounds and hardcoded hex colors.
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. Anti-Slop Layout & Composition Directives
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
- - **Serif Discipline**: Serif display fonts are banned as the default for creative or premium briefs. Default to high-craft sans display (`Geist Display`, `Cabinet Grotesk`, `Satoshi`, `Outfit`). Specifically banned default serifs: `Fraunces` and `Instrument_Serif`.
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
- - **Color Discipline & Lila Ban**: Maximum 1 accent color with saturation < 80%. Ban generic AI-purple/blue glow gradients on dark buttons and backgrounds. Use neutral bases with singular high-contrast accents.
612
- - **Palette Rotation**: Ban the default reach for warm-beige (`#f5f1ea`), brass/clay, and espresso text. Rotate to cold luxury, forest green, terracotta+slate, cobalt+cream, or sharp monochrome.
613
- - **Shape Consistency Lock**: Enforce a single corner-radius scale across the page (all-sharp, all-soft 12-16px, or documented pill buttons + soft cards).
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 }} // ❌ Sluggish 350ms delay on hotkey!
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. **Generic Functional Iconography**: Icons must be drawn strictly from approved packages (`lucide-react`, `@phosphor-icons/react`, `@radix-ui/react-icons`) and represent **functional UI actions** (`<Terminal />`, `<Database />`, `<ChevronRight />`), NEVER masquerading as corporate brand marks.
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 Documentation
977
- - **W3C DTCG Token Architecture**: Primitive -> Semantic -> Component. Components reference semantic tokens exclusively.
978
- - **Automated Pipeline**: Tokens Studio -> PR -> Style Dictionary.
979
- - **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.
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
+ }
@@ -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`