@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
@@ -150,6 +150,7 @@ Contracts owned by other roles — do not author these as Game Developer:
150
150
  - `optimize-3d-assets`
151
151
  - `performance-profiling`
152
152
  - `systematic-debugging`
153
+ - `commit-code`
153
154
  - `write-tests`
154
155
  - `review-code`
155
156
  - `security-audit`
@@ -238,4 +239,4 @@ Refer to the complete, authoritative operational checklist in [references/game-d
238
239
  - implementation result is documented and emitted via `contracts/schemas/implementation-result.json` with schema validation passing exit code 0
239
240
  - **OWASP ASI and AST10 compliance verified**: zero lethal trifecta skills invoked; identity files deny-write protected
240
241
 
241
- Last updated: 2026-11-04
242
+ Last updated: 2026-11-27
@@ -34,139 +34,14 @@ This role must follow [role-standard](role-standard.md) first.
34
34
 
35
35
  ## Core Responsibilities
36
36
 
37
- ### Mobile App Integrity & Performance Engineering
38
-
39
- - implement mobile UI and business logic faithfully to requirements, roles, and platform conventions
40
- - enforce React Native New Architecture: Hermes bytecode compilation, direct C++ JSI bindings, TurboModules lazy loading, and Bridgeless mode without legacy bridge bottlenecks
41
- - mandate Shopify FlashList cell recycling over FlatList for dynamic feeds > 10 items; calibrate estimatedItemSize to eliminate scroll jank and blank frames
42
- - isolate gesture handling and continuous animations on the native UI thread using React Native Reanimated worklets at steady 60/120 FPS
43
- - reason through logic paths before coding: entry conditions, navigation transitions, derived state, failure handling, and platform edge cases
44
- - validate bug fixes against the original defect, related screens, and shared components that reuse the same logic
45
- - manage state, validation, async flows, background behavior, and optimistic updates explicitly and predictably
46
- - handle loading, empty, success, error, offline, permission-denied, and stale-data states for all user-facing flows
47
- - keep mobile code testable and maintainable, with platform-specific behavior isolated from business logic where possible
48
- - preserve accessibility, localization readiness, and device-size responsiveness
49
- - identify when a mobile issue is caused by API, auth, push routing, or backend behavior and escalate with evidence
50
- - own mobile build, signing, and distribution configuration for the platforms in scope
51
-
52
- ### Offline-First Resilience & Sync Architecture
53
-
54
- - implement tiered local persistence: high-speed synchronous key-value caching via MMKV (JSI direct memory access) and relational SQLite persistence via WatermelonDB
55
- - monitor network state in real-time via NetInfo and bind connectivity status to TanStack Query onlineManager
56
- - implement optimistic mutations with local snapshot rollback on API rejections or network errors
57
- - enqueue offline writes in persistent local storage and replay deterministically upon reconnect
58
- - schedule background synchronization tasks via platform-native schedulers (BGTaskScheduler on iOS, WorkManager on Android) adhering to battery and network constraints
59
-
60
- ### EAS Release Engineering & Store Compliance
61
-
62
- - configure EAS Build multi-environment profiles (development, preview, production) in eas.json with isolated bundle identifiers and credentials
63
- - manage code signing certificates, provisioning profiles, and Android keystores securely in EAS Credentials with zero secrets committed to version control
64
- - enforce EAS Update OTA safety boundaries: mandate cryptographic runtime versioning ("fingerprint") and forbid OTA delivery of native module additions or permission changes
65
- - maintain emergency OTA rollback channels to instantly revert faulty JavaScript bundles
66
- - enforce Apple App Store Review Guideline 4.3(b) by verifying differentiated native functionality (device hardware, offline persistence, widgets) beyond thin web or LLM wrappers
67
- - enforce Apple Guideline 1.2 and Google Play AI policies: implement in-app AI disclosures, user-reporting mechanisms for AI content, and offensive content blocking
68
- - audit third-party SDKs, author Apple Privacy Manifests (PrivacyInfo.xcprivacy) with required reason APIs, and verify Google Play Data Safety declarations
69
- - upload Hermes bytecode sourcemaps, native iOS dSYMs, and Android ProGuard/R8 mappings to crash reporting platforms (Sentry, Bugsnag)
70
-
71
- ### Mobile AI-Generated Code Governance (2025-2026)
72
-
73
- In 2026, AI tools generate significant volumes of mobile code (React Native, Flutter, Swift, Kotlin). Mobile has unique failure modes that require a distinct tiered validation framework — not identical to the web frontend model.
74
-
75
- **Tiered validation by mobile risk level:**
76
- | Risk Tier | Mobile Examples | Validation Required |
77
- |-----------|----------------|---------------------|
78
- | **High** | Biometric auth UI, payment flows, deep link handlers, Keychain/Keystore access, permission request flows | Full manual review: correct platform API usage + security boundary + JSI/FFI bridge safety + store compliance |
79
- | **Medium** | Platform API integrations (camera, location, push notifications, background sync), navigation flows, shared state | Review logic paths, platform-specific API correctness, all UI states, offline behavior |
80
- | **Low** | Static layouts, presentational components, boilerplate scaffolding | Visual review + automated lint pass |
81
-
82
- **Mobile-specific AI validation concerns:**
83
- - **Platform API hallucination**: AI tools frequently generate calls to non-existent UIKit/SwiftUI/Compose methods, or mix iOS and Android APIs; verify every platform-specific API call against official SDK docs
84
- - **JSI/TurboModule bridge safety (React Native)**: AI-generated native module code may cause bridge crashes or memory leaks in the JSI layer; review all native module bindings manually regardless of tier
85
- - **Dart AOT compilation (Flutter)**: AI-generated Dart may generate code that fails tree shaking or produces excessive code size in AOT mode; run `flutter build --analyze-size` on AI-generated module additions
86
- - **Context anchor files**: maintain context anchor files that constrain AI coding tools to team-approved libraries (no unapproved native modules, no deprecated platform APIs)
87
-
88
- **Mandatory checklist for AI-generated mobile code (Medium and High tiers):**
89
- - **Platform API correctness**: all platform-specific API calls verified against official iOS/Android SDK docs; no hallucinated methods
90
- - **Bridge safety**: JSI (React Native) or FFI (Flutter) bindings reviewed for memory safety and crash risk
91
- - **Accessibility**: VoiceOver (iOS) and TalkBack (Android) compatibility; dynamic text size; focus order
92
- - **Offline behavior**: AI-generated async flows handle offline/low-connectivity states explicitly
93
- - **Permission handling**: permission requests are minimal, correctly declared in Info.plist/AndroidManifest.xml, and aligned with privacy policy
94
- - **Security boundary**: no sensitive data in client-side state; Keychain (iOS) / Keystore (Android) used for credentials
95
-
96
- ### On-Device AI & Mobile Agent Architecture (2025-2026)
97
-
98
- **On-device inference models (ML tasks):**
99
- - integrate on-device ML models (CoreML, TFLite/LiteRT) to reduce server inference cost and improve latency for classification, image processing, and NLP tasks
100
- - manage battery and thermal constraints: never run high-compute inference on the main thread; use background queues/isolates; measure and report battery impact in testing
101
- - **Server-Driven UI (SDUI) & Agent Fallbacks**: implement SDUI patterns allowing backend agents to dynamically push new interface layouts without app store updates
102
-
103
- **Mobile Agent Hosting Architecture (on-device LLMs — 2025-2026):**
104
-
105
- Beyond lightweight ML models, production apps now host full language model inference on-device. In 2026, prefer the OS-integrated first-party frameworks when the built-in model meets the need — they are free, privacy-preserving, and manage inference isolation and hardware offload for you — and reserve bundled third-party engines for custom, fine-tuned, or cross-platform models:
106
-
107
- - **Apple Foundation Models framework (default on iOS 26+)**: native Swift API to the on-device model powering Apple Intelligence (image input, guided generation, tool calling, context management, and on-device→Private Cloud Compute escalation); use `Core AI` when you need to run curated open models (Qwen, Mistral, etc.) on Apple silicon. Requires capable hardware (A17 Pro / M-series); gate the feature and provide a fallback on unsupported devices
108
- - **Android AICore + Gemini Nano (default on Android)**: access the on-device model via ML Kit GenAI APIs; availability is device- and OEM-dependent — detect capability at runtime and provide a cloud or classic fallback
109
- - **llama.cpp**: cross-platform C++ inference engine (Metal backend for iOS, Vulkan/NNAPI for Android) — use for custom/cross-platform models not served by the platform framework
110
- - **MLX**: Apple Silicon (M-series) and iOS; optimized for Neural Engine offload when bundling a custom model
111
- - **ExecuTorch**: PyTorch-native edge deployment path for Android; integrates with Android's NNAPI delegation
112
- - **GGUF format (4-bit quantization)**: de facto production model format for bundled mobile models — balances model quality against device memory and latency constraints
113
-
114
- **Hybrid local/cloud routing policy — choose explicitly for each agent capability:**
115
- | Route | Use when |
116
- |-------|----------|
117
- | **Local (on-device)** | Privacy-sensitive tasks, high-frequency low-latency queries, offline-required features, user data that must not leave device |
118
- | **Cloud delegate** | Complex reasoning requiring frontier models, long-context tasks exceeding device memory, multi-modal inputs, tasks requiring fresh world knowledge |
119
- | **Hybrid** | Local handles intent classification and simple queries; cloud handles escalation for complex or ambiguous cases |
120
-
121
- **Inference engine as isolated native service:**
122
- - when bundling a custom engine (llama.cpp, MLX, ExecuTorch), implement it as a **separate native service** in C++/Swift/Kotlin — never run LLM inference inline in the React Native JS thread or Flutter Dart isolate. When using a platform framework (Apple Foundation Models, Android AICore), the OS manages inference isolation — still invoke it off the main thread and stream results back
123
- - expose inference capability to the framework layer via a thin interface: JSI bridge (React Native) or FFI channel (Flutter) for control and output delivery only
124
- - isolating inference in native service prevents: JS thread blocking (RN), Dart GC pressure (Flutter), and enables independent restart/crash recovery for the inference service
125
-
126
- **Privacy-preserving cloud escalation:**
127
- - for the hybrid route, prefer a privacy-preserving cloud escalation path when the platform provides one (Apple Private Cloud Compute) so escalated requests keep the on-device privacy posture; document what data leaves the device and under which route
128
-
129
- ### Privacy-Preserving ML (2025-2026)
130
-
131
- On-device personalization via federated learning is production-ready in 2026 and used by major apps for keyboard, voice, and recommendation models. Standard ML training patterns do not apply — privacy constraints change the entire approach:
132
-
133
- **Federated Learning (FL) for on-device model personalization:**
134
- - full fine-tuning is infeasible on mobile → use **LoRA (Low-Rank Adaptation)** for parameter-efficient local updates, or split-learning for distributed training across device and server
135
- - FL training must be **resource-aware**: schedule FL tasks only when device is charging, on Wi-Fi, and above battery threshold (e.g., >20%); never interrupt user sessions for FL computation
136
- - **secure aggregation**: device model updates must be aggregated server-side using secure aggregation protocols; raw gradient updates from individual devices must never be accessible to the server in plaintext
137
-
138
- **Differential Privacy (DP) for gradient updates:**
139
- - apply **User-Level Differential Privacy**: add calibrated Gaussian or Laplace noise to model updates before transmission; the noise magnitude is calibrated to the privacy budget (ε)
140
- - ε (epsilon) is the privacy budget: lower ε = stronger privacy guarantee, lower model utility; track ε consumption per user across training rounds; enforce a maximum ε cap per user per period
141
- - disclose privacy budget and FL data usage in the app's privacy policy; ε values and FL participation must be disclosed under GDPR Article 13 and CCPA
142
-
143
- **Regulatory compliance for FL:**
144
- - FL is **not automatically GDPR/HIPAA compliant** — secure aggregation + differential privacy are both required for regulated data
145
- - do not implement FL for health or financial data without a Data Protection Impact Assessment (DPIA)
146
- - provide users with opt-out from FL participation; FL participation must be voluntary and clearly explained
147
-
148
- ### App Store AI Compliance (2025-2026)
149
-
150
- Apple and Google have introduced AI-specific review policies that affect app submission, content moderation, and privacy disclosure:
151
-
152
- **Apple App Store (enforced from 2025 App Store Review Guidelines):**
153
- - **Guideline 4.3(b) — Minimum Functionality (AI apps)**: apps that are "low-effort AI wrappers" (simple API call to an LLM with no differentiated value) are rejected; demonstrate meaningful, differentiated functionality beyond the underlying model capability
154
- - **Guideline 1.2 — User-Generated Content with AI**: if the app enables AI-generated content that users see (chatbots, AI image generators, AI writing tools), the developer is responsible for content moderation; must implement user-reporting mechanism for harmful AI-generated content; must have moderation review pipeline
155
- - **AI content labeling**: AI-generated content presented as real or factual must be labeled; not labeling AI-generated images, text, or audio as AI-generated risks rejection or removal
156
- - **Third-party AI SDK inventory**: all third-party AI SDKs must be declared in the Privacy Nutrition Label; AI SDKs that collect usage data or training data not disclosed in the privacy policy will cause rejection
157
-
158
- **Google Play (enforced from 2025 Developer Program Policies):**
159
- - **AI usage disclosure mandate**: apps using generative AI features must disclose AI usage to users in-product, not only in store listing
160
- - **Zero-tolerance AI-generated spam**: apps that use AI to generate bulk content (listings, reviews, app assets) are permanently banned; applies to AI-generated app icons, screenshots, and store descriptions
161
- - **Active moderation requirement**: apps enabling AI-generated UGC must have active content moderation; automated-only moderation without human escalation path does not satisfy the requirement
162
- - **AI SDK data collection**: third-party AI SDKs must be declared in the Data Safety section; undisclosed AI data collection is a policy violation
163
-
164
- **Store submission checklist for AI features:**
165
- - in-app AI disclosure visible to users (not buried in settings)
166
- - user-reporting mechanism for harmful AI-generated content implemented and functional
167
- - third-party AI SDK inventory completed and Data Safety/Privacy Nutrition Label updated
168
- - AI-generated content labeled appropriately
169
- - meaningful differentiated value demonstrated (not a low-effort LLM wrapper)
37
+ See [`references/mobile-engineer-responsibilities.md`](references/mobile-engineer-responsibilities.md) for detailed validation tiers, on-device LLM hosting tables, Federated Learning / DP rules, and store submission checklists.
38
+
39
+ - **Mobile Integrity & 60/120 FPS Performance**: Enforce React Native New Architecture (Hermes, TurboModules, JSI, Fabric, Bridgeless mode), Shopify FlashList cell recycling with explicit `estimatedItemSize`, and off-thread Reanimated worklets; handle all UI states (loading, empty, success, error, offline, permission-denied, stale), VoiceOver/TalkBack accessibility, and shared-state blast radius.
40
+ - **Offline-First Resilience & Sync**: Layer MMKV synchronous JSI storage with WatermelonDB SQLite persistence, bind NetInfo to TanStack Query `onlineManager`, implement optimistic mutations with rollback and persistent write replay, and schedule background sync via `BGTaskScheduler` (iOS) / `WorkManager` (Android).
41
+ - **EAS Release Engineering & Store Compliance**: Configure isolated `eas.json` profiles and EAS Credentials (zero repo secrets); enforce fingerprint runtime versioning and rollback channels on EAS Update (no native/permission changes via OTA); upload sourcemaps, dSYMs, and R8/ProGuard mappings; maintain `PrivacyInfo.xcprivacy` and Google Play Data Safety SDK inventories.
42
+ - **Mobile AI-Generated Code Governance**: Apply High/Medium/Low tiered validation verifying real iOS/Android SDK APIs (no hallucinated calls), manual JSI/TurboModule/FFI bridge memory safety review, Flutter AOT size checks (`flutter build --analyze-size`), and Keychain/Keystore secret boundaries.
43
+ - **On-Device AI, Hybrid Routing & Privacy-Preserving ML**: Prefer first-party frameworks (Apple Foundation Models / Android AICore + Gemini Nano) or isolated native services (`llama.cpp`, MLX, ExecuTorch, 4-bit GGUF) off the JS/Dart thread; enforce explicit Local / Cloud / Hybrid routing (preferring Private Cloud Compute); require LoRA + secure aggregation + User-Level Differential Privacy (tracked epsilon cap, DPIA, opt-out) for Federated Learning.
44
+ - **App Store AI Policy Compliance**: Satisfy Apple Guideline 4.3(b) differentiated native functionality (no thin LLM wrappers), Apple Guideline 1.2 & Google Play UGC AI moderation + user reporting, visible in-app AI disclosures, AI content labeling, and complete third-party AI SDK disclosures.
170
45
 
171
46
  ## Inputs Required
172
47
 
@@ -282,6 +157,7 @@ Apple and Google have introduced AI-specific review policies that affect app sub
282
157
  - `security-audit`
283
158
  - `commit-code`
284
159
  - `navigate-service`
160
+ - `systematic-debugging`
285
161
 
286
162
  ### Supporting Skills (use when collaborating)
287
163
 
@@ -359,76 +235,14 @@ The following skills are strictly prohibited from execution by Mobile Engineer (
359
235
 
360
236
  ## Review Checklist
361
237
 
362
- ### App Integrity
363
- - [ ] user flow matches requirements, business logic, and expected roles on both target platforms
364
- - [ ] bug fixes are verified against the original issue and nearby regression-prone screens or flows
365
- - [ ] loading, empty, error, success, offline, permission-denied, and retry states are explicit where relevant
366
- - [ ] conditional rendering, derived state, and validation logic are correct for edge cases and platform version differences
367
- - [ ] shared components, navigation state, or utilities affected by the fix have been re-checked
368
- - [ ] accessibility, screen-reader support, dynamic text size, and platform-specific interaction patterns are checked
369
- - [ ] API contracts, caching, mutation side effects, and optimistic updates are handled intentionally
370
- - [ ] permission requests are minimal, documented, and aligned with privacy policy
371
- - [ ] platform-specific behavior (iOS vs Android) is isolated and tested explicitly where it diverges
372
- - [ ] physical device testing on at least one primary target is performed for non-trivial changes
373
- - [ ] tests or manual scenarios cover important interactions and the impact radius of the change
374
- - [ ] store submission or OTA delivery requirements are met before marking as done
375
-
376
- ### React Native New Architecture & Performance
377
- - [ ] Hermes bytecode engine enabled with AOT compilation; cold-start TTI verified < 1.5s
378
- - [ ] TurboModules and C++ JSI direct native bindings verified; zero bridge serialization overhead
379
- - [ ] Bridgeless mode active with legacy bridge completely disabled
380
- - [ ] FlashList recycling verified for feeds > 10 items with calibrated estimatedItemSize and zero blank frames
381
- - [ ] gestures and continuous animations isolated on UI thread via Reanimated worklets at steady 60/120 FPS
382
-
383
- ### Offline-First Resilience & Sync
384
- - [ ] synchronous key-value caching implemented via MMKV; AsyncStorage eliminated
385
- - [ ] relational queries managed via WatermelonDB SQLite with observable UI subscriptions
386
- - [ ] network state monitored via NetInfo and bound to TanStack Query onlineManager
387
- - [ ] optimistic mutations provide immediate feedback with automatic error rollback
388
- - [ ] background tasks scheduled via native schedulers (BGTaskScheduler / WorkManager)
389
-
390
- ### EAS Release Engineering & Store Compliance
391
- - [ ] multi-profile eas.json separation (development, preview, production) verified
392
- - [ ] code signing certificates and Android keystores managed in EAS Credentials; zero secrets in repo
393
- - [ ] runtime version configured with fingerprint policy preventing broken OTA updates
394
- - [ ] emergency OTA rollback channel and procedure verified
395
- - [ ] Apple Guideline 4.3(b) anti-wrapper audit passed with demonstrated native capabilities
396
- - [ ] Apple Guideline 1.2 UGC moderation and in-app user reporting active
397
- - [ ] Google Play AI disclosures and Data Safety third-party SDK inventory verified
398
- - [ ] Hermes sourcemaps, native dSYMs, and ProGuard mapping files uploaded for crash symbolication
399
-
400
- ### Mobile AI-Generated Code Validation (when AI tools contributed)
401
- - [ ] risk tier classified: [high / medium / low]
402
- - [ ] platform API correctness: all platform-specific calls verified against official iOS/Android SDK docs; no hallucinated methods
403
- - [ ] bridge safety: JSI (React Native) or FFI (Flutter) bindings reviewed for memory safety and crash risk
404
- - [ ] accessibility validated on both platforms: VoiceOver (iOS) + TalkBack (Android)
405
- - [ ] offline/low-connectivity states handled explicitly in AI-generated async flows
406
- - [ ] permission handling: correctly declared in Info.plist/AndroidManifest.xml and aligned with privacy policy
407
- - [ ] security boundary: credentials in Keychain/Keystore, not in JS/Dart state or local unencrypted storage
408
-
409
- ### On-Device AI & Agent Features
410
- - [ ] platform framework preferred when it meets the need (Apple Foundation Models / Android AICore + Gemini Nano); bundled third-party engine justified only for custom/cross-platform models
411
- - [ ] device-capability gating + fallback in place for on-device LLM features (A17 Pro/M-series for Apple Intelligence; device/OEM support for Gemini Nano)
412
- - [ ] on-device LLM inference running off the main thread (native service layer for bundled engines; OS-managed for platform frameworks)
413
- - [ ] hybrid routing policy declared: which capabilities route local vs. cloud; privacy-preserving cloud escalation (e.g. Private Cloud Compute) used where available
414
- - [ ] battery/thermal impact measured and within acceptable bounds
415
- - [ ] SDUI fallbacks tested: agent-pushed layouts render correctly without app update
416
-
417
- ### App Store AI Compliance (when AI features are present)
418
- - [ ] in-app AI disclosure visible to users
419
- - [ ] user-reporting mechanism for harmful AI content implemented and functional
420
- - [ ] third-party AI SDK inventory completed; Data Safety/Privacy Nutrition Label updated
421
- - [ ] AI-generated content appropriately labeled
422
- - [ ] Apple 4.3(b) differentiated value check: not a low-effort LLM wrapper
423
-
424
- ### Privacy-Preserving ML (when FL/DP is in scope)
425
- - [ ] FL tasks scheduled only when charging + Wi-Fi + above battery threshold
426
- - [ ] secure aggregation implemented: raw gradient updates never accessible server-side
427
- - [ ] ε (privacy budget) tracked and within policy cap
428
- - [ ] FL participation opt-out available to users
429
- - [ ] DPIA completed for health or financial training data
430
-
431
- See [`references/mobile-engineer-review-checklist.md`](references/mobile-engineer-review-checklist.md) for full engineering, performance, offline resilience, and store compliance criteria.
238
+ See [`references/mobile-engineer-review-checklist.md`](references/mobile-engineer-review-checklist.md) for the full React Native New Architecture, offline-first, EAS Store Compliance, on-device AI, and federated learning checklist.
239
+
240
+ - [ ] **App & Cross-Platform Integrity**: requirements, offline/empty/error/permission-denied states, shared navigation state, VoiceOver/TalkBack accessibility, and physical device testing verified on iOS and Android
241
+ - [ ] **React Native New Architecture & 60/120 FPS**: Hermes `.hbc` bytecode (cold-start TTI `< 1.5s`), Bridgeless/JSI/TurboModules, FlashList recycling (`> 10` items), and UI-thread Reanimated worklets (`<= 16.6ms` / `8.3ms`) verified
242
+ - [ ] **Offline-First & Sync Resilience**: MMKV synchronous cache, WatermelonDB SQLite, NetInfo + TanStack Query `onlineManager`, atomic optimistic rollbacks, and `BGTaskScheduler` / `WorkManager` background sync tested
243
+ - [ ] **EAS Release & Store Compliance**: isolated `eas.json` profiles, fingerprint `runtimeVersion` OTA boundary (zero native diffs via OTA), Apple Guidelines 4.3(b) / 1.2 + `PrivacyInfo.xcprivacy`, Google Play AI disclosure & Data Safety, and symbolication uploads verified
244
+ - [ ] **Mobile AI, On-Device LLM & FL/DP**: risk-tiered validation of AI code, off-main-thread native/OS inference with capability fallback, hybrid routing policy, differential privacy noise + $\varepsilon$ budget cap (if FL active), and OWASP ASI/AST10 checks passed
245
+ - [ ] **Handoff Artifacts**: `contracts/schemas/implementation-result.json` (+ `edge-deployment-spec.json` for EAS releases) emitted and schema-validated exit code 0
432
246
 
433
247
  ## Failure Modes
434
248
 
@@ -498,4 +312,4 @@ See [`references/mobile-engineer-review-checklist.md`](references/mobile-enginee
498
312
  - **FL/DP compliance** (when federated learning in scope): secure aggregation + DP noise applied; ε tracked; user opt-out available
499
313
  - **OWASP ASI and AST10 compliance verified**: zero lethal trifecta skills invoked; identity files deny-write protected
500
314
 
501
- Last updated: 2026-11-04
315
+ Last updated: 2026-11-27
@@ -48,7 +48,7 @@ This role must follow [role-standard](role-standard.md) first.
48
48
  - identify affected user segments, workflows, and support implications when scope changes
49
49
  - make trade-off calls across scope, timing, and quality expectations
50
50
 
51
- ### AI Product Stewardship (2025-2026)
51
+ ### AI Product Stewardship
52
52
 
53
53
  When AI/LLM features or agentic capabilities are in scope, PM owns the following — not just the feature brief:
54
54
 
@@ -88,7 +88,7 @@ When AI/LLM features or agentic capabilities are in scope, PM owns the following
88
88
  - technical health: hallucination rate, latency P95, tool-call accuracy, output quality scores
89
89
  - product health: user satisfaction with AI-assisted outcomes, correction/override rate, abandonment at AI-generated steps
90
90
 
91
- ### Hypothesis-Driven Discovery (2025-2026)
91
+ ### Hypothesis-Driven Discovery
92
92
 
93
93
  In 2026, AI-accelerated development makes building faster than ever; the primary product risk has shifted from "can we build it?" to **"should we build it?"** PM owns the learning system:
94
94
 
@@ -114,7 +114,7 @@ In 2026, AI-accelerated development makes building faster than ever; the primary
114
114
  - if validation produces a strong negative signal (users don't have the problem, won't adopt the solution, or won't pay the price), kill or pivot before engineering builds — a rejected hypothesis is a success, not a failure
115
115
  - document kill decisions explicitly: what was learned, why the bet was abandoned, what alternatives to pursue
116
116
 
117
- ### Outcome Metrics Framework (2025-2026)
117
+ ### Outcome Metrics Framework
118
118
 
119
119
  PM owns the metrics architecture — not just the success metric on the ticket:
120
120
 
@@ -32,7 +32,7 @@ This role must follow [role-standard](role-standard.md) first.
32
32
 
33
33
  ## Core Responsibilities
34
34
 
35
- ### Human-Agent Orchestration & Fleet Governance (2025-2026)
35
+ ### Human-Agent Orchestration & Fleet Governance
36
36
 
37
37
  The PM role has formally expanded from schedule tracker to **Human-Agent Orchestration Lead**. Core competency now includes deciding when to delegate to an agent, when to intervene in autonomous execution, and maintaining accountability for agent-produced outputs:
38
38
 
@@ -44,19 +44,19 @@ The PM role has formally expanded from schedule tracker to **Human-Agent Orchest
44
44
  - define explicit fallback mechanisms when AI features fail or hallucinate
45
45
  - specify Human-In-The-Loop (HITL) review triggers for high-risk AI decisions at the *planning stage*, not reactively
46
46
 
47
- ### Probabilistic Estimation & Delivery Forecasting (2025-2026)
47
+ ### Probabilistic Estimation & Delivery Forecasting
48
48
 
49
49
  - **probabilistic completion percentiles**: replace single-point deterministic delivery dates with Monte Carlo simulation percentiles (P50 expected, P85 committed target, P95 conservative window)
50
50
  - **telemetry-driven forecasting**: ingest live signals from Git commit frequency, PR review cycles, CI/CD runtimes, and agent reasoning traces to predict blockers before schedule slippage occurs
51
51
  - **blast-radius replanning**: dynamically re-estimate delivery bands when regression scope or dependency depth expands
52
52
 
53
- ### Token Budget Tracking & AI FinOps Governance (2025-2026)
53
+ ### Token Budget Tracking & AI FinOps Governance
54
54
 
55
55
  - **token budget envelopes**: define and enforce per-initiative, per-workflow, and per-feature token ceilings (input/output/cached) to prevent recursive loop runaway
56
56
  - **Cost-Per-Task (CPT) economics**: track direct inference costs per successfully resolved and verified ticket, aligning compute spend with shipped business value
57
57
  - **prompt cache governance**: track prompt cache efficiency (>60% target) and ensure model routing policies are enforced across workflows
58
58
 
59
- ### HITL Review Flow & Permission Fatigue Mitigation (2025-2026)
59
+ ### HITL Review Flow & Permission Fatigue Mitigation
60
60
 
61
61
  - **4-Tier Approval Gating**: stratify agent actions into risk tiers:
62
62
  1. *Autonomous*: read-only queries, local linting, documentation drafting (no human gate)
@@ -66,7 +66,7 @@ The PM role has formally expanded from schedule tracker to **Human-Agent Orchest
66
66
  - **HITL dwell time tracking**: monitor human review latency (<4 hours median target) to prevent engineering approval queues from stalling autonomous agent velocity
67
67
  - **permission fatigue defense**: prevent reviewer burnout by eliminating low-risk gates; alert when review duration drops below reading speed (rubber-stamp indicator)
68
68
 
69
- ### GIST Technical Debt & AI Code Governance (2025-2026)
69
+ ### GIST Technical Debt & AI Code Governance
70
70
 
71
71
  - **GIST debt monitoring**: actively audit Generated, Implicit, Systemic, and Tacit (GIST) debt where AI code lacks architectural context or creates silent coupling
72
72
  - **code churn and duplication thresholds**: track AI-driven code churn (target <8% within 14 days) and duplication density; halt delivery to refactor when thresholds are breached
@@ -1,116 +1,116 @@
1
1
  ## 3D Graphics Engineer Review Checklist
2
2
 
3
- This reference checklist provides operational 3D graphics engineering, WebGPU rendering, shader optimization, and asset pipeline criteria to meet SOTA 2026–2027 standards. It establishes non-negotiable verification gates across WebGPU-first architecture with WebGL2 fallback, Draco and Meshopt geometry compression, complete VRAM resource disposal, generative 3D asset governance (Gaussian Splatting / NeRF), 60 FPS frame budgets, WGSL shader numerical stability, DPR clamping, and R3F canvas lifecycle integration.
4
-
5
- ### 1. WebGPU-First Modernization & Graceful WebGL2 Fallback (`WEBGPU-FALLBACK-LOCK`)
6
- - **Next-Generation WebGPU Pipeline**:
7
- - rendering pipelines prioritize WebGPU (`navigator.gpu`) leveraging WGSL compute shaders, uniform buffer layouts, and asynchronous command encoding
8
- - runtime capability detection implements automated, graceful fallback to WebGL2 for unsupported browsers or restricted mobile GPUs:
9
- ```typescript
10
- async function initRenderer(): Promise<RendererContext> {
11
- if ('gpu' in navigator) {
12
- const adapter = await navigator.gpu.requestAdapter({ powerPreference: 'high-performance' });
13
- if (adapter) {
14
- const device = await adapter.requestDevice({
15
- requiredLimits: { maxBufferSize: 256 * 1024 * 1024 }
16
- });
17
- return new WebGPURendererContext(device);
18
- }
19
- }
20
- return new WebGL2RendererFallback();
21
- }
22
- ```
23
- - feature tiering cleanly disables heavy compute effects (e.g., screen-space ambient occlusion, volumetric fog, GPU particle sorting) under WebGL2 fallback without throwing unhandled exceptions
24
-
25
- ### 2. Draco & Meshopt Geometry Compression (`DRACO-MESHOPT-LOCK`)
26
- - **Strict Asset Size Ceilings & Quantization**:
27
- - all glTF/GLB models must be compressed using Meshopt quantization (`EXT_meshopt_compression`) or Draco geometry compression; raw uncompressed `.obj` or unoptimized `.gltf` files are prohibited in production bundles
28
- - mobile 3D asset transfer budgets are strictly capped at $\le 2\text{MB}$ compressed payload per scene
29
- - textures encoded using KTX2 / Basis Universal (UASTC / ETC1S) for direct GPU VRAM transcoding (BC7 desktop, ASTC mobile, ETC2 fallback) without CPU decompression overhead:
30
- ```bash
31
- # Transcode and compress GLB assets using gltfpack with meshopt
32
- gltfpack -i scene_raw.gltf -o scene_optimized.glb -cc -tc -kn
33
- ```
34
-
35
- ### 3. VRAM Resource Lifecycle & Memory Leak Elimination (`MEMORY-DISPOSAL-LOCK`)
36
- - **Comprehensive Scene Teardown & Disposal**:
37
- - all geometries, textures, materials, shaders, and render targets must explicitly execute `.dispose()` upon component unmount or scene transition
38
- - Three.js / R3F scenes audited with memory profiling tools to verify zero orphaned GPU VRAM allocations across page navigations:
39
- ```typescript
40
- function disposeSceneNode(node: THREE.Object3D): void {
41
- if ((node as THREE.Mesh).geometry) {
42
- (node as THREE.Mesh).geometry.dispose();
43
- }
44
- if ((node as THREE.Mesh).material) {
45
- const mat = (node as THREE.Mesh).material;
46
- if (Array.isArray(mat)) {
47
- mat.forEach(m => m.dispose());
48
- } else {
49
- mat.dispose();
50
- }
51
- }
3
+ Operational verification gates for `@3d-graphics-engineer` deliverables across Three.js, React Three Fiber v9, WebGPU/WebGL2, shaders (TSL/WGSL/GLSL), and 3D asset pipelines.
4
+
5
+ ---
6
+
7
+ ### 1. Archetype Alignment & Backend Pairing (`RENDER-BACKEND-LOCK`)
8
+
9
+ - [ ] **Scene Archetype Classified**: explicitly tagged as `Product Configurator` (`frameloop="demand"`), `Spatial Showcase` (lazy-loaded + `MOTION_INTENSITY` synced), `Real-Time Game/Sim` (`frameloop="always"` + instancing), or `3DGS Scan Viewer`.
10
+ - [ ] **Clean Backend & Post-Processing Pairing**:
11
+ - *WebGPU path*: `WebGPURenderer` + `MeshStandardNodeMaterial` / TSL + Three.js node `PostProcessing` + WGSL compute; inspected via **Chrome DevTools Shader Editor** (never WebGL-only `Spector.js`).
12
+ - *WebGL2 fallback/path*: `WebGLRenderer` + `pmndrs/postprocessing` `EffectComposer` + `Spector.js` (dev-only, stripped in prod).
13
+ - *R3F v9 alignment*: uses `useThree((s) => s.renderer)` instead of legacy `s.gl`.
14
+ - [ ] **Deterministic Context Recovery**: `webglcontextlost`/`webglcontextrestored` and WebGPU `device.lost` handlers reinitialize GPU resources without requiring full page reload.
15
+
16
+ ---
17
+
18
+ ### 2. Anti-AI-3D-Slop Visual & Mathematical Craft (`AI-3D-CRAFT-LOCK`)
19
+
20
+ - [ ] **Lighting & Tone Mapping**: calibrated PMREM HDRI environment lighting (`PMREMGenerator`) + intentional key/fill/rim hierarchy + `THREE.AgX` or `THREE.ACESFilmicToneMapping`; flat `ambientLight` + white `directionalLight` on `#000000` void rejected.
21
+ - [ ] **Camera Framing & Frustum**: product views use `fov 35–45` with bounding-sphere fit ($d = r / \sin(\text{fov}/2)$), tight `near`/`far` ratio to avoid Z-fighting, and damped `OrbitControls` with polar/distance clamps.
22
+ - [ ] **Grounding & Shadow Hygiene**: shadow bias calibrated (`bias` / `normalBias`) to prevent shadow acne and peter-panning; product scenes include contact grounding (`ContactShadows` or baked AO).
23
+ - [ ] **Texture Color-Space Invariant**:
24
+ - `THREE.SRGBColorSpace` applied **only** to albedo/baseColor and emissive textures.
25
+ - `THREE.NoColorSpace` (Linear) enforced on normal, roughness, metalness, AO, and packed ORM (`R=AO, G=Roughness, B=Metalness`) maps; `flipY = false` preserved for glTF assets.
26
+ - [ ] **Zero-Allocation Render Loop**: zero `new THREE.Vector3()`, `new THREE.Matrix4()`, `.clone()`, or React `setState()` inside `useFrame` / RAF loops; $\Delta t \le 0.1\text{s}$ clamped.
27
+
28
+ ---
29
+
30
+ ### 3. Complete VRAM Resource Lifecycle (`VRAM-DISPOSAL-LOCK`)
31
+
32
+ JavaScript GC does not release GPU buffers or textures, and `material.dispose()` in Three.js does **not** dispose attached `Texture` instances:
33
+
34
+ ```typescript
35
+ const TEXTURE_KEYS = [
36
+ 'map', 'normalMap', 'roughnessMap', 'metalnessMap',
37
+ 'aoMap', 'emissiveMap', 'alphaMap', 'bumpMap', 'displacementMap', 'envMap',
38
+ ] as const;
39
+
40
+ function disposeMaterialAndTextures(mat: THREE.Material): void {
41
+ const record = mat as unknown as Record<string, unknown>;
42
+ for (const key of TEXTURE_KEYS) {
43
+ const tex = record[key];
44
+ if (tex && typeof (tex as THREE.Texture).dispose === 'function') {
45
+ (tex as THREE.Texture).dispose();
52
46
  }
53
- ```
54
-
55
- ### 4. Generative 3D Asset & Gaussian Splatting (3DGS) Governance (`GEN-3D LOCK`)
56
- - **Mathematical VRAM Allocation Bounds**:
57
- - 3D Gaussian Splatting scenes must enforce strict splat count ceilings ($\le 400\text{k}$ splats on mobile, $\le 1.2\text{M}$ on desktop) and adhere to the memory budget equation:
58
- $$VRAM_{\text{3DGS}} = N_{\text{splats}} \times (12 \times \text{sizeof(float32)} + 48 \times \text{sizeof(float16)}) \le 250\text{MB}$$
59
- - GPU texture memory consumption across all active mip levels must obey Little's Law VRAM bounds:
60
- $$VRAM_{\text{textures}} = \sum_{i=1}^M \left( W_i \times H_i \times Bpp_i \times 1.333 \right) \le 180\text{MB}$$
61
- - **Procedural Geometry Collision Isolation**:
62
- - AI-generated procedural geometry or Gaussian splat point clouds must never be used directly as physical collision meshes; simplified collision primitives (AABB / OBB / BVH) must wrap procedural assets
63
-
64
- ### 5. Strict 60 FPS Frame Budget & Draw Call Caps (`FRAME-BUDGET-LOCK`)
65
- - **Frame Timing & Render Complexity Limits**:
66
- - render loops must maintain steady 60 FPS ($16.6\text{ms}$ frame budget; $8.3\text{ms}$ for 120Hz displays) under standard device loads:
67
- $$\Delta t_{\text{frame}} \le 16.6\text{ms}, \quad \text{Jitter} \le \pm 2.0\text{ms}$$
68
- - draw calls strictly capped ($\le 100$ draw calls per frame on mobile, $\le 250$ on desktop) through material batching, texture atlasing, and geometry instancing (`InstancedMesh`)
69
- - dynamic resolution scaling (DRS) automatically engages if frame delta exceeds $22\text{ms}$ ($<45\text{ FPS}$) for $\ge 3$ consecutive seconds
70
-
71
- ### 6. WGSL Compute Shader Pipelines & Numerical Precision
72
- - **Compute Shader Particle & Sorting Passes**:
73
- - high-concurrency particle systems and Gaussian splat depth sorting must execute in WGSL compute passes; CPU-blocking sort loops in the main thread are strictly prohibited:
74
- ```wgsl
75
- // POSITIVE: WGSL Workgroup Parallel Bitonic Sorting Step
76
- @group(0) @binding(0) var<storage, read_write> splatIndices: array<u32>;
77
- @compute @workgroup_size(64)
78
- fn bitonicSortStep(@builtin(global_invocation_id) global_id: vec3<u32>) {
79
- let index = global_id.x;
80
- if (index >= arrayLength(&splatIndices)) { return; }
81
- // Parallel sorting logic without thread blocking
82
47
  }
83
- ```
84
- - numerical precision specified explicitly (`precision highp float` vs `mediump`); division-by-zero guards must protect all vector normalizations
85
-
86
- ### 7. Responsive Viewport & Device Pixel Ratio (DPR) Clamping
87
- - **Mobile Thermal & Power Preservation**:
88
- - Device Pixel Ratio (DPR) clamped to a maximum of `2.0` (`renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2.0))`) to prevent 4K/Retina rendering stalls and GPU thermal throttling on high-DPI mobile devices
89
- - animation delta time clamped ($\Delta t \le 0.1\text{s}$) to prevent physics tunneling or visual vertex exploding when tabs are backgrounded
90
-
91
- ### 8. Canvas / DOM Integration & Thread Synchronization
92
- - **Non-Blocking UI Thread Isolation**:
93
- - heavy asset parsing, texture decompression, and physics computations offloaded to Web Workers via `OffscreenCanvas` or worker pools
94
- - 3D canvas events pass through smoothly to DOM overlay elements without input lag or gesture hijacking
95
- - canvas elements provide alternative text descriptions and ARIA labels for non-visual assistive technology
96
-
97
- ### 9. Context Loss Recovery & Lifecycle Management
98
- - **Deterministic Context Restoration**:
99
- - WebGL `webglcontextlost` / `webglcontextrestored` and WebGPU `device.lost` listener lifecycles register automated asset rehydration without requiring full page reloads:
100
- ```typescript
101
- device.lost.then((info) => {
102
- console.warn(`WebGPU device lost: ${info.message}. Reason: ${info.reason}`);
103
- if (info.reason !== 'destroyed') {
104
- reinitializeWebGPUScene();
105
- }
106
- });
107
- ```
48
+ mat.dispose();
49
+ }
50
+
51
+ function disposeSceneNode(node: THREE.Object3D): void {
52
+ if ('geometry' in node && (node as THREE.Mesh).geometry) {
53
+ (node as THREE.Mesh).geometry.dispose();
54
+ }
55
+ if ('material' in node && (node as THREE.Mesh).material) {
56
+ const mat = (node as THREE.Mesh).material;
57
+ if (Array.isArray(mat)) mat.forEach(disposeMaterialAndTextures);
58
+ else disposeMaterialAndTextures(mat);
59
+ }
60
+ }
61
+ ```
62
+
63
+ - [ ] **Full Teardown Verified**: geometries, materials, **all attached texture maps**, `WebGLRenderTarget`s, and `PMREMGenerator`s disposed on unmount/scene switch.
64
+
65
+ ---
66
+
67
+ ### 4. Asset Budgets, Compression & LOD Hierarchy (`ASSET-BUDGET-AND-LOD-LOCK`)
68
+
69
+ - [ ] **Clear Per-Asset vs Per-Scene Ceilings**:
70
+ - *Compressed GLB transfer*: `<= 2 MB` per scene on mobile (Draco or Meshopt quantization; raw `.obj`/uncompressed `.gltf` rejected).
71
+ - *Per-prop interactive target*: `<= 10k` triangles for standard interactive props; meshes `> 50k` triangles require 3-tier LOD (`LOD0` / `LOD1` / `LOD2`).
72
+ - *Per-scene mobile frame ceiling*: `<= 500k` rendered triangles, `<= 100` draw calls (`<= 250` desktop web), `<= 25` shadow-casting draw calls, `DPR <= 2.0`.
73
+ - [ ] **KTX2 / Basis Universal Textures**: all textures `> 1024×1024` use KTX2 (UASTC/ETC1S) capped at `<= 1K` mobile / `<= 2K` desktop; total mipmapped texture VRAM obeys the **Geometric-Series Mipmap VRAM Bound**:
74
+ $$VRAM_{\text{textures}} = \sum_{i=1}^M \left( W_i \times H_i \times Bpp_i \times 1.333 \right) \le 180\text{ MB}$$
75
+ - [ ] **Bundled WASM Decoders**: Draco, Meshopt, and KTX2 decoders served from pinned local package assets, never unverified external CDNs.
76
+
77
+ ---
78
+
79
+ ### 5. Generative 3D & Gaussian Splatting (3DGS) Governance (`GEN-3D-PROVENANCE-LOCK`)
80
+
81
+ - [ ] **Splat & VRAM Ceilings**: `<= 400k` splats on mobile (`<= 1.2M` desktop) and $VRAM_{\text{3DGS}} \le 250\text{ MB}$ (`N_splats * 32 bytes + radix_sort` or explicit covariance layout).
82
+ - [ ] **Mesh & License Validation**: AI-generated meshes (Meshy, Tripo, Rodin, NeRF bakes) pass `gltf-validator`, UV/normal checks, simplified AABB/OBB/BVH collision proxies, and commercial license provenance logging.
83
+
84
+ ---
85
+
86
+ ### 6. Raycasting, Instancing & Device-Tier Calibration
87
+
88
+ - [ ] **BVH-Accelerated Raycasting**: interactive meshes `> 10k` triangles use `three-mesh-bvh` (accelerated raycast bounds tree) or proxy collision meshes; raw per-triangle CPU raycasting inside `pointermove` is rejected.
89
+ - [ ] **Draw-Call Batching & Instancing**: repeated geometry uses `THREE.InstancedMesh` or `THREE.BatchedMesh` with frustum culling verified; material permutations and shader recompilations are minimized via shared `NodeMaterial` / uniform updates.
90
+ - [ ] **Shader Warm-Up & Pipeline Caching**: heavy custom shaders (TSL/WGSL/GLSL) pre-compile via `renderer.compileAsync(scene, camera)` behind a loading state so first interaction never stalls the main thread.
91
+ - [ ] **Adaptive Device-Tier Scaling**: `PerformanceMonitor` / GPU tier detection dynamically steps DPR (`[1, 1.5]` mobile, `[1, 2]` desktop), shadow map resolution (`512`–`2048`), and post-processing passes when frame time exceeds $16.6\text{ ms}$ (60 FPS) or $11.1\text{ ms}$ (90 FPS XR).
92
+ - [ ] **Decal & Z-Order Stability**: projected decals apply `polygonOffset` (`polygonOffsetFactor: -4`, `polygonOffsetUnits: -4`) and explicit `renderOrder` without Z-fighting against curved base geometry.
93
+
94
+ ---
95
+
96
+ ### 7. Accessibility, Host Dials & Verification Gates
97
+
98
+ - [ ] **A11y & Motion Compliance**: `prefers-reduced-motion` pauses/simplifies camera & particle motion; non-3D fallback (static render/image/summary) and canvas ARIA labels present; host `DESIGN_VARIANCE` / `MOTION_INTENSITY` / `VISUAL_DENSITY` honored.
99
+ - [ ] **Keyboard & Focus Navigation**: camera presets, hotspot selection, and configurator controls are reachable via keyboard without trapping focus inside the canvas element.
108
100
 
109
- ### 10. Gate Review & Contract Conformance Verification Table
110
101
  | Verification Gate | Target Invariant | Required Tool / Command | Pass Criteria |
111
102
  | :--- | :--- | :--- | :--- |
112
- | **Asset Size Ceiling** | Scene payload $\le 2\text{MB}$ | `gltf-transform inspect scene.glb` | Compressed transfer size $\le 2\text{MB}$ |
113
- | **VRAM Splat Budget** | $VRAM_{\text{3DGS}} \le 250\text{MB}$ | Chrome DevTools Memory / WebGPU Tracer | Zero allocation breaches |
114
- | **Frame Rate Floor** | $\Delta t_{\text{frame}} \le 16.6\text{ms}$ | Stats.js / `requestAnimationFrame` monitor | Steady 60 FPS ($\ge 95\%$ of frames) |
115
- | **VRAM Teardown** | 0 retained textures/buffers | Automated Jest/Puppeteer disposal test | Zero lingering GPU buffers |
116
- | **glTF Spec Validation** | 0 schema validation errors | `gltf-validator -i scene.glb` | 0 errors, 0 warnings |
103
+ | **glTF / Asset Integrity** | 0 schema/normal/UV errors; GLB `<= 2 MB` | `gltf-validator` & `gltf-transform inspect` | 0 errors; payload `<= 2 MB` |
104
+ | **Frame Pacing** | $\Delta t \le 16.6\text{ ms}$ (60 FPS); mobile draw calls `<= 100` | R3F DevTools / Chrome Performance / Stats.js | $\ge 95\%$ frames within budget on target tier |
105
+ | **Shader & Draw Call Trace** | Valid WGSL/TSL/GLSL & batched draws | Chrome DevTools Shader Editor (WebGPU) / `Spector.js` dev (WebGL2) | 0 compile errors; instancing/batching active |
106
+ | **VRAM Disposal** | 0 retained geometries/textures/targets | Chrome Memory / `renderer.info.memory` diff | Counts return to baseline after unmount |
107
+ | **Raycasting & Interaction** | Pointer hit-test `< 2 ms` on dense meshes | Chrome Performance / BVH profiler | Zero main-thread hitch during orbit/hover |
108
+ | **Delivery Contracts** | Schema-valid handoff | `python3 core/scripts/validate-contracts.py` | `implementation-result.json` (+ `performance-audit.json`) valid |
109
+
110
+ ---
111
+
112
+ ### 8. Pre-Release Sign-Off & Escalation Triggers
113
+
114
+ - [ ] **Escalation to `@frontend-developer` / `@ui-ux-designer`**: flag any DOM overlay Z-index collision, canvas pointer-event capture conflict, or missing `DESIGN.md` motion/density dial before merging.
115
+ - [ ] **Escalation to `@qa-engineer` / `@sre`**: require cross-GPU verification (Apple Silicon WebGPU, Intel/AMD Windows WebGL2, mid-tier mobile GPU) whenever custom shaders, KTX2 transcoding, or 3DGS renderers change.
116
+ - [ ] **Zero Production Debug Leaks**: verify `Stats.js`, `Spector.js`, `r3f-perf`, wireframe helpers, and `console.log` inside `useFrame` are stripped from production bundles.