@vesviet/agent-skills 5.8.0 → 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INDEX.md +35 -22
- package/README.md +7 -18
- package/VERSION +1 -1
- package/adapters/antigravity/ANTIGRAVITY.md +40 -142
- package/adapters/antigravity/INDEX_TIER1.json +174 -146
- package/adapters/antigravity/a2a-config.template.yaml +1 -1
- package/adapters/antigravity/antigravity-tools.md +25 -0
- package/adapters/antigravity/role-skill-index.json +175 -58
- package/adapters/claude/CLAUDE_ADAPTER.md +3 -7
- package/adapters/claude/settings.template.json +18 -3
- package/adapters/cursor/README.md +1 -5
- package/adapters/cursor/hooks.template.json +4 -2
- package/core/contracts/README.md +0 -20
- package/core/contracts/schemas/compact-working-state.json +42 -1
- package/core/contracts/schemas/ui-component-spec.json +28 -2
- package/core/policies/README.md +0 -20
- package/core/policies/action-boundaries.yaml +10 -1
- package/core/policies/execution-sandbox.md +0 -12
- package/core/policies/mcp-tool-map.yaml +28 -0
- package/core/roles/3d-graphics-engineer.md +144 -208
- package/core/roles/README.md +1 -23
- package/core/roles/agent-coordinator.md +28 -147
- package/core/roles/agent-discovery-engineer.md +46 -39
- package/core/roles/ai-systems-engineer.md +2 -0
- package/core/roles/backend-developer.md +22 -117
- package/core/roles/cloudflare-engineer.md +1 -1
- package/core/roles/data-engineer.md +3 -1
- package/core/roles/devops-engineer.md +4 -3
- package/core/roles/ecommerce-engineer.md +18 -6
- package/core/roles/frontend-developer.md +146 -317
- package/core/roles/game-developer.md +2 -1
- package/core/roles/mobile-engineer.md +18 -204
- package/core/roles/product-manager.md +3 -3
- package/core/roles/project-manager.md +5 -5
- package/core/roles/references/3d-graphics-engineer-review-checklist.md +109 -109
- package/core/roles/references/agent-coordinator-responsibilities.md +120 -0
- package/core/roles/references/agent-coordinator-review-checklist.md +22 -4
- package/core/roles/references/agent-discovery-engineer-review-checklist.md +29 -20
- package/core/roles/references/backend-developer-responsibilities.md +47 -0
- package/core/roles/references/backend-developer-review-checklist.md +15 -0
- package/core/roles/references/business-analyst-responsibilities.md +2 -2
- package/core/roles/references/frontend-developer-responsibilities.md +14 -6
- package/core/roles/references/frontend-developer-review-checklist.md +13 -6
- package/core/roles/references/mobile-engineer-responsibilities.md +137 -0
- package/core/roles/references/mobile-engineer-review-checklist.md +63 -0
- package/core/roles/references/reviewer-review-checklist.md +54 -0
- package/core/roles/references/sdet-review-checklist.md +53 -0
- package/core/roles/references/solution-architect-responsibilities.md +134 -0
- package/core/roles/references/sre-review-checklist.md +81 -0
- package/core/roles/references/system-engineer-responsibilities.md +124 -0
- package/core/roles/references/technical-architect-responsibilities.md +192 -0
- package/core/roles/references/technical-architect-review-checklist.md +58 -0
- package/core/roles/references/technical-lead-review-checklist.md +65 -0
- package/core/roles/references/ui-ux-designer-anti-slop-standards.md +61 -35
- package/core/roles/references/ui-ux-designer-responsibilities.md +79 -226
- package/core/roles/references/ui-ux-designer-review-checklist.md +102 -116
- package/core/roles/references/vietnam-accounting-specialist-review-checklist.md +6 -6
- package/core/roles/researcher.md +3 -3
- package/core/roles/reviewer.md +2 -2
- package/core/roles/role-standard.md +79 -205
- package/core/roles/sdet.md +5 -6
- package/core/roles/security-engineer.md +4 -3
- package/core/roles/solution-architect.md +9 -130
- package/core/roles/sre.md +1 -0
- package/core/roles/system-engineer.md +15 -155
- package/core/roles/task-planner.md +1 -1
- package/core/roles/technical-architect.md +15 -244
- package/core/roles/technical-lead.md +1 -0
- package/core/roles/technical-writer.md +3 -3
- package/core/roles/ui-ux-designer.md +158 -303
- package/core/roles/vietnam-accounting-specialist.md +20 -20
- package/core/rules/README.md +0 -22
- package/core/rules/code.md +11 -6
- package/core/skills/README.md +12 -25
- package/core/skills/agent/agent-delegation/SKILL.md +11 -0
- package/core/skills/agent/agent-graph-orchestration/SKILL.md +5 -0
- package/core/skills/agent/agent-memory-compaction/SKILL.md +79 -82
- package/core/skills/agent/agent-memory-compaction/references/anchored-schema-and-compaction-algorithms.md +74 -115
- package/core/skills/agent/agent-model-routing/SKILL.md +2 -0
- package/core/skills/agent/agent-observability/SKILL.md +12 -6
- package/core/skills/agent/agent-observability/references/session-forensics-7-dimensions.md +41 -0
- package/core/skills/agent/agent-panel-meeting/SKILL.md +3 -3
- package/core/skills/agent/agent-quality-gate/SKILL.md +9 -0
- package/core/skills/agent/configure-agent-commerce/SKILL.md +2 -0
- package/core/skills/agent/configure-agent-commerce/examples/ucp-commerce-manifest-and-endpoints.json +55 -0
- package/core/skills/agent/configure-agent-commerce/references/acp-ucp-agent-commerce-manifest-specs.md +66 -0
- package/core/skills/agent/configure-agent-headers/SKILL.md +3 -0
- package/core/skills/agent/configure-agent-skills/SKILL.md +4 -4
- package/core/skills/agent/configure-oauth-metadata/SKILL.md +10 -7
- package/core/skills/agent/manage-agent-identity/SKILL.md +2 -0
- package/core/skills/agent/manage-agent-identity/examples/agent-identity-spire-workload.yaml +72 -0
- package/core/skills/agent/manage-agent-identity/references/nhi-lifecycle-and-token-rotation.md +45 -0
- package/core/skills/ai/deploy-vllm-inference/SKILL.md +2 -0
- package/core/skills/ai/deploy-vllm-inference/examples/vllm-production-serve-config.yaml +22 -0
- package/core/skills/ai/deploy-vllm-inference/references/vllm-v1-paged-attention-and-kv-tiering.md +20 -0
- package/core/skills/ai/openrouter-task/SKILL.md +5 -5
- package/core/skills/ai-agent/context-optimization/SKILL.md +2 -0
- package/core/skills/ai-agent/context-optimization/examples/context-pruner-and-reorderer.py +85 -0
- package/core/skills/ai-agent/context-optimization/references/token-budgeting-and-attention-allocation.md +47 -0
- package/core/skills/ai-agent/memory-hygiene/SKILL.md +13 -0
- package/core/skills/ai-agent/memory-hygiene/examples/memory-audit-and-compaction-routine.py +90 -0
- package/core/skills/ai-agent/memory-hygiene/references/agent-memory-vault-spec.md +137 -0
- package/core/skills/ai-agent/memory-hygiene/references/owasp-asi06-and-memory-poisoning-defense.md +38 -0
- package/core/skills/backend/add-api-endpoint/SKILL.md +9 -0
- package/core/skills/backend/add-api-endpoint/examples/express-zod-rfc9457-endpoint.md +329 -0
- package/core/skills/backend/add-api-endpoint/examples/kratos-go-clean-architecture-endpoint.md +405 -0
- package/core/skills/backend/add-api-endpoint/references/idempotency-and-rate-limiting.md +116 -0
- package/core/skills/backend/add-event-handler/SKILL.md +12 -1
- package/core/skills/backend/add-event-handler/examples/go-outbox-skip-locked-relay.go +97 -0
- package/core/skills/backend/add-event-handler/references/transactional-outbox-and-cloudevents.md +42 -0
- package/core/skills/backend/add-service-client/SKILL.md +2 -0
- package/core/skills/backend/add-service-client/examples/ts-circuit-breaker-full-jitter-client.ts +71 -0
- package/core/skills/backend/add-service-client/references/resilient-client-circuit-breaker-specs.md +25 -0
- package/core/skills/backend/build-mcp-server/SKILL.md +2 -0
- package/core/skills/backend/build-mcp-server/examples/ts-stateless-mcp-server-zod.ts +52 -0
- package/core/skills/backend/build-mcp-server/references/mcp-2026-stateless-contract-specs.md +21 -0
- package/core/skills/backend/design-caching-and-locking/SKILL.md +83 -0
- package/core/skills/backend/design-caching-and-locking/examples/redis-lua-atomic-reservation-fencing.lua +30 -0
- package/core/skills/backend/design-caching-and-locking/references/redis-lua-fencing-and-stampede-specs.md +25 -0
- package/core/skills/backend/design-caching-and-locking/scripts/verify_lua_atomicity.py +68 -0
- package/core/skills/backend/implement-auth/SKILL.md +9 -0
- package/core/skills/backend/implement-structured-outputs/SKILL.md +2 -0
- package/core/skills/backend/implement-structured-outputs/examples/python-pydantic-structured-output.py +65 -0
- package/core/skills/backend/implement-structured-outputs/references/constrained-decoding-and-double-validation.md +18 -0
- package/core/skills/backend/optimize-postgres/SKILL.md +9 -0
- package/core/skills/backend/scaffold-new-service/SKILL.md +2 -1
- package/core/skills/backend/scaffold-new-service/references/deep-modules-and-seams.md +43 -0
- package/core/skills/business/elicit-requirements/SKILL.md +2 -0
- package/core/skills/business/trace-requirements-impact/SKILL.md +1 -0
- package/core/skills/business/write-use-cases/SKILL.md +1 -0
- package/core/skills/commerce/handle-checkout-flow/SKILL.md +18 -66
- package/core/skills/commerce/handle-checkout-flow/examples/production-checkout-orchestrator.ts +185 -0
- package/core/skills/commerce/handle-checkout-flow/references/pci-dss-v4-and-agentic-checkout-specs.md +72 -0
- package/core/skills/commerce/integrate-payment-gateway/SKILL.md +22 -58
- package/core/skills/commerce/integrate-payment-gateway/examples/resilient-webhook-and-mpp-handler.ts +164 -0
- package/core/skills/commerce/integrate-payment-gateway/references/mpp-x402-and-webhook-security-specs.md +47 -0
- package/core/skills/commerce/manage-order-fulfillment/SKILL.md +17 -50
- package/core/skills/commerce/manage-order-fulfillment/examples/temporal-fulfillment-saga.ts +104 -0
- package/core/skills/commerce/manage-order-fulfillment/references/event-sourced-fulfillment-and-carrier-webhooks.md +58 -0
- package/core/skills/commerce/manage-product-catalog/SKILL.md +5 -1
- package/core/skills/commerce/manage-product-catalog/examples/hybrid-search-and-governance-pipeline.ts +120 -0
- package/core/skills/commerce/manage-product-catalog/references/semantic-vector-catalog-and-graphrag.md +54 -0
- package/core/skills/content/write-article/SKILL.md +1 -1
- package/core/skills/document/docx/SKILL.md +1 -0
- package/core/skills/document/pdf/SKILL.md +2 -0
- package/core/skills/document/pdf/references/pdf-acroforms-and-pdfplumber-specs.md +54 -0
- package/core/skills/document/pdf/scripts/check_fillable_fields.py +144 -0
- package/core/skills/document/pdf/scripts/fill_fillable_fields.py +145 -0
- package/core/skills/document/xlsx/SKILL.md +1 -0
- package/core/skills/documentation/configure-llms-txt/SKILL.md +3 -0
- package/core/skills/documentation/configure-llms-txt/examples/canonical-llms-txt-and-full-txt.md +45 -0
- package/core/skills/documentation/configure-llms-txt/references/llms-txt-and-llms-full-txt-standard.md +37 -0
- package/core/skills/documentation/write-documentation/SKILL.md +4 -1
- package/core/skills/documentation/write-documentation/examples/microservice-production-readme-and-api-docs.md +70 -0
- package/core/skills/documentation/write-documentation/references/diataxis-framework-and-doc-standards.md +62 -0
- package/core/skills/documentation/write-tech-radar/SKILL.md +1 -0
- package/core/skills/education/create-exercises/SKILL.md +1 -0
- package/core/skills/education/design-learning-plan/SKILL.md +1 -0
- package/core/skills/education/grade-and-review/SKILL.md +1 -0
- package/core/skills/foundation/accessibility-review/SKILL.md +1 -0
- package/core/skills/foundation/ai-risk-assessment/SKILL.md +4 -5
- package/core/skills/foundation/ai-risk-assessment/examples/genai-system-risk-register.md +67 -0
- package/core/skills/foundation/ai-risk-assessment/references/nist-ai-rmf-and-eu-ai-act-taxonomy.md +49 -0
- package/core/skills/foundation/combinatorial-testing/SKILL.md +1 -0
- package/core/skills/foundation/conduct-research/SKILL.md +2 -2
- package/core/skills/foundation/conduct-research/references/ai-era-source-discipline.md +1 -1
- package/core/skills/foundation/create-migration/SKILL.md +10 -0
- package/core/skills/foundation/design-review/SKILL.md +9 -10
- package/core/skills/foundation/design-ux-flow/SKILL.md +9 -7
- package/core/skills/foundation/discernment-nudge/SKILL.md +2 -0
- package/core/skills/foundation/hostile-component-stress-testing/SKILL.md +1 -0
- package/core/skills/foundation/incident-report/SKILL.md +1 -0
- package/core/skills/foundation/plan-technical-delivery/SKILL.md +3 -1
- package/core/skills/foundation/playwright-evidence-qa/SKILL.md +1 -0
- package/core/skills/foundation/refactor-legacy-code/SKILL.md +84 -0
- package/core/skills/foundation/refactor-legacy-code/examples/characterization-test-seam-extraction.py +34 -0
- package/core/skills/foundation/refactor-legacy-code/references/strangler-fig-seams-and-characterization-tests.md +17 -0
- package/core/skills/foundation/refactor-legacy-code/scripts/check_refactor_blast_radius.py +63 -0
- package/core/skills/foundation/release-notes/SKILL.md +3 -3
- package/core/skills/foundation/release-notes/examples/enterprise-platform-release-notes.md +42 -0
- package/core/skills/foundation/release-notes/references/keep-a-changelog-and-semver-governance.md +43 -0
- package/core/skills/foundation/systematic-debugging/SKILL.md +15 -0
- package/core/skills/foundation/webapp-server-runner/SKILL.md +1 -0
- package/core/skills/foundation/write-product-brief/SKILL.md +1 -0
- package/core/skills/foundation/write-tests/SKILL.md +9 -0
- package/core/skills/foundation/write-tests/examples/anti-tautological-tdd-walkthrough.md +204 -0
- package/core/skills/foundation/write-tests/examples/testcontainers-kratos-integration-test.md +186 -0
- package/core/skills/foundation/write-tests/references/contract-and-chaos-testing.md +187 -0
- package/core/skills/frontend/INDEX.json +16 -0
- package/core/skills/frontend/add-page-route/SKILL.md +10 -8
- package/core/skills/frontend/add-page-route/examples/streaming-rsc-page-with-view-transition.tsx +133 -0
- package/core/skills/frontend/add-page-route/references/rsc-routing-and-view-transitions.md +72 -0
- package/core/skills/frontend/add-ui-component/SKILL.md +4 -1
- package/core/skills/frontend/add-ui-component/examples/compound-dialog-and-form-actions.tsx +193 -0
- package/core/skills/frontend/add-ui-component/references/react19-component-standards-and-anti-slop.md +55 -0
- package/core/skills/frontend/component-composition/SKILL.md +12 -1
- package/core/skills/frontend/component-composition/examples/headless-combobox-compound-component.tsx +207 -0
- package/core/skills/frontend/design-md-specification/SKILL.md +5 -0
- package/core/skills/frontend/design-system-engineering/SKILL.md +4 -2
- package/core/skills/frontend/frontend-micro-polish/SKILL.md +1 -0
- package/core/skills/frontend/frontend-testing/SKILL.md +4 -1
- package/core/skills/frontend/frontend-testing/examples/playwright-e2e-with-msw-and-axe.spec.ts +87 -0
- package/core/skills/frontend/frontend-testing/references/playwright-msw-and-a11y-testing-standards.md +78 -0
- package/core/skills/frontend/implement-ai-disclosure/SKILL.md +119 -0
- package/core/skills/frontend/implement-view-transitions/SKILL.md +1 -0
- package/core/skills/frontend/implement-webmcp/SKILL.md +7 -4
- package/core/skills/frontend/implement-webmcp/examples/webmcp-provider-and-hitl-modal.tsx +163 -0
- package/core/skills/frontend/implement-webmcp/references/webmcp-architecture-and-hitl-security.md +48 -0
- package/core/skills/frontend/integrate-api-client/SKILL.md +12 -12
- package/core/skills/frontend/integrate-api-client/examples/orval-query-and-streaming-mutation.ts +102 -0
- package/core/skills/frontend/integrate-api-client/references/orval-tanstack-query-and-streaming-specs.md +57 -0
- package/core/skills/frontend/interactive-component-workbench/SKILL.md +1 -0
- package/core/skills/frontend/motion-performance-engineering/SKILL.md +1 -0
- package/core/skills/frontend/setup-design-system/SKILL.md +6 -3
- package/core/skills/frontend/setup-design-system/examples/tailwind-v4-theme-and-dtcg-tokens.css +87 -0
- package/core/skills/frontend/setup-design-system/references/tailwind-v4-oklch-and-dtcg-tokens.md +61 -0
- package/core/skills/frontend/setup-visual-regression/SKILL.md +8 -5
- package/core/skills/frontend/setup-visual-regression/examples/visual-regression-playwright.config.ts +83 -0
- package/core/skills/frontend/setup-visual-regression/references/visual-regression-docker-and-masking-specs.md +46 -0
- package/core/skills/frontend/ui-ux-designer-anti-slop-standards.md +64 -42
- package/core/skills/frontend/web-quality-audit/SKILL.md +1 -0
- package/core/skills/gamedev/abstract-input-actions/SKILL.md +2 -0
- package/core/skills/gamedev/abstract-input-actions/examples/input-action-manager.ts +85 -0
- package/core/skills/gamedev/abstract-input-actions/references/action-mapping-and-analog-deadzones.md +54 -0
- package/core/skills/gamedev/architect-ecs-systems/SKILL.md +2 -0
- package/core/skills/gamedev/architect-ecs-systems/examples/bevy-flecs-combat-system.rs +73 -0
- package/core/skills/gamedev/architect-ecs-systems/references/data-oriented-design-and-archetype-ecs.md +39 -0
- package/core/skills/gamedev/author-game-ai/SKILL.md +2 -0
- package/core/skills/gamedev/author-game-ai/examples/modular-behavior-tree-ai.ts +98 -0
- package/core/skills/gamedev/author-game-ai/references/behavior-trees-and-utility-ai-curves.md +47 -0
- package/core/skills/gamedev/configure-physics-collision/SKILL.md +2 -0
- package/core/skills/gamedev/configure-physics-collision/examples/kinematic-physics-substepping.cpp +100 -0
- package/core/skills/gamedev/configure-physics-collision/references/continuous-collision-detection-and-substepping.md +50 -0
- package/core/skills/gamedev/develop-gameplay-systems/SKILL.md +2 -0
- package/core/skills/gamedev/develop-gameplay-systems/examples/kinematic-character-controller.gd +86 -0
- package/core/skills/gamedev/develop-gameplay-systems/references/deterministic-gameplay-state-machines.md +42 -0
- package/core/skills/gamedev/implement-save-persistence/SKILL.md +2 -0
- package/core/skills/gamedev/implement-save-persistence/examples/versioned-save-manager.ts +127 -0
- package/core/skills/gamedev/implement-save-persistence/references/versioned-save-schemas-and-checksums.md +44 -0
- package/core/skills/gamedev/render-webgl-threejs/SKILL.md +14 -10
- package/core/skills/gamedev/render-webgl-threejs/examples/production-threejs-webgpu-scene.ts +116 -0
- package/core/skills/gamedev/render-webgl-threejs/references/webgpu-threejs-pbr-pipeline.md +72 -0
- package/core/skills/legal-compliance/audit-ai-compliance/SKILL.md +1 -0
- package/core/skills/legal-compliance/draft-legal-opinion/SKILL.md +1 -0
- package/core/skills/legal-compliance/manage-vietnam-legal/SKILL.md +1 -0
- package/core/skills/meetings-analysis/analyze-business-requirements/SKILL.md +1 -0
- package/core/skills/meetings-analysis/analyze-data/SKILL.md +1 -0
- package/core/skills/meetings-analysis/meeting-review/SKILL.md +1 -0
- package/core/skills/mmo/analyze-campaign-roi/SKILL.md +2 -0
- package/core/skills/mmo/analyze-campaign-roi/examples/campaign-roi-and-roas-dashboard.py +80 -0
- package/core/skills/mmo/analyze-campaign-roi/references/multi-touch-attribution-and-cpa-analytics.md +33 -0
- package/core/skills/mmo/create-automation-script/SKILL.md +2 -0
- package/core/skills/mmo/create-automation-script/examples/stealth-browser-automation-flow.ts +65 -0
- package/core/skills/mmo/create-automation-script/references/stealth-cdp-and-behavioral-mimicry.md +37 -0
- package/core/skills/mmo/deploy-mmo-infrastructure/SKILL.md +3 -0
- package/core/skills/mmo/deploy-mmo-infrastructure/examples/proxy-health-probe-and-rotation-daemon.py +75 -0
- package/core/skills/mmo/deploy-mmo-infrastructure/references/proxy-pool-rotation-and-anti-detect-specs.md +45 -0
- package/core/skills/mmo/deploy-proxyware-fleet/SKILL.md +3 -0
- package/core/skills/mmo/deploy-proxyware-fleet/examples/docker-compose-depin-light-node-fleet.yaml +52 -0
- package/core/skills/mmo/deploy-proxyware-fleet/references/depin-bandwidth-monetization-node-specs.md +43 -0
- package/core/skills/mmo/generate-mmo-content/SKILL.md +2 -0
- package/core/skills/mmo/generate-mmo-content/examples/pseo-programmatic-page-generator.ts +76 -0
- package/core/skills/mmo/generate-mmo-content/references/pseo-landing-pages-and-social-video-hooks.md +39 -0
- package/core/skills/mmo/manage-mmo-assets/SKILL.md +2 -0
- package/core/skills/mmo/manage-mmo-assets/examples/mmo-asset-vault-manager.py +63 -0
- package/core/skills/mmo/manage-mmo-assets/references/mmo-asset-rbac-and-vault-isolation.md +38 -0
- package/core/skills/mmo/setup-tracking-system/SKILL.md +2 -0
- package/core/skills/mmo/setup-tracking-system/examples/meta-capi-s2s-event-dispatcher.ts +79 -0
- package/core/skills/mmo/setup-tracking-system/references/server-to-server-postback-and-capi-specs.md +45 -0
- package/core/skills/mobile/deploy-mobile-app/SKILL.md +1 -0
- package/core/skills/mobile/develop-mobile-app/SKILL.md +1 -0
- package/core/skills/platform/add-telemetry-instrumentation/SKILL.md +2 -0
- package/core/skills/platform/add-telemetry-instrumentation/examples/kratos-otel-middleware-instrumentation.go +87 -0
- package/core/skills/platform/add-telemetry-instrumentation/references/opentelemetry-semantic-conventions-2026.md +37 -0
- package/core/skills/platform/agents-sdk/SKILL.md +1 -0
- package/core/skills/platform/aws-infrastructure/SKILL.md +2 -0
- package/core/skills/platform/aws-infrastructure/examples/opentofu-eks-pod-identity-vpc.tf +101 -0
- package/core/skills/platform/aws-infrastructure/references/opentofu-aws-zero-trust-and-irsa.md +40 -0
- package/core/skills/platform/cloudflare-email-service/SKILL.md +2 -2
- package/core/skills/platform/configure-ci-cd-pipeline/SKILL.md +83 -0
- package/core/skills/platform/configure-ci-cd-pipeline/examples/hardened-ci-matrix-workflow.yml +33 -0
- package/core/skills/platform/configure-ci-cd-pipeline/references/github-actions-sha-pinning-and-slsa-specs.md +22 -0
- package/core/skills/platform/configure-ci-cd-pipeline/scripts/audit_workflow_pinning.py +74 -0
- package/core/skills/platform/debug-runtime-platform/SKILL.md +1 -2
- package/core/skills/platform/debug-workers-edge/SKILL.md +2 -2
- package/core/skills/platform/durable-objects/SKILL.md +1 -0
- package/core/skills/platform/orchestrate-chaos-experiment/SKILL.md +1 -0
- package/core/skills/platform/sandbox-sdk/SKILL.md +1 -0
- package/core/skills/platform/setup-deployment/SKILL.md +6 -2
- package/core/skills/platform/setup-deployment/examples/kustomize-production-service-manifests.yaml +123 -0
- package/core/skills/platform/setup-deployment/references/interactive-hitl-wizard.md +55 -0
- package/core/skills/platform/setup-deployment/references/k8s-gitops-and-kustomize-invariants.md +40 -0
- package/core/skills/platform/setup-gpu-finops/SKILL.md +2 -0
- package/core/skills/platform/setup-gpu-finops/examples/gpu-finops-prometheus-rules.yaml +23 -0
- package/core/skills/platform/setup-gpu-finops/references/dcgm-kubecost-gpu-attribution-specs.md +16 -0
- package/core/skills/platform/setup-llm-gateway/SKILL.md +2 -0
- package/core/skills/platform/setup-llm-gateway/examples/litellm-gateway-config.yaml +28 -0
- package/core/skills/platform/setup-llm-gateway/references/litellm-routing-budget-failover-specs.md +16 -0
- package/core/skills/platform/supply-chain-security/SKILL.md +3 -2
- package/core/skills/platform/supply-chain-security/examples/github-actions-sbom-cosign.yaml +57 -0
- package/core/skills/platform/supply-chain-security/references/slsa-provenance-and-sbom-sigstore.md +60 -0
- package/core/skills/platform/turnstile-spin/SKILL.md +2 -2
- package/core/skills/platform/web-perf/SKILL.md +2 -2
- package/core/skills/platform/workers-best-practices/SKILL.md +1 -0
- package/core/skills/platform/wrangler/SKILL.md +1 -0
- package/core/skills/product/build-story-map/SKILL.md +3 -0
- package/core/skills/product/define-product-strategy/SKILL.md +1 -0
- package/core/skills/product/model-saas-metrics/SKILL.md +1 -0
- package/core/skills/product/prioritize-roadmap/SKILL.md +1 -0
- package/core/skills/repo-ops/commit-code/SKILL.md +1 -0
- package/core/skills/repo-ops/navigate-service/SKILL.md +28 -132
- package/core/skills/repo-ops/navigate-service/examples/service-boundary-map-example.md +14 -0
- package/core/skills/repo-ops/navigate-service/references/service-topology-mapping-guide.md +18 -0
- package/core/skills/repo-ops/review-code/SKILL.md +12 -2
- package/core/skills/repo-ops/review-code/examples/adversarial-two-axis-pr-review.md +167 -0
- package/core/skills/repo-ops/review-code/examples/ai-vibe-slop-remediation.md +220 -0
- package/core/skills/repo-ops/review-code/references/supply-chain-and-migration-safety.md +103 -0
- package/core/skills/repo-ops/review-service/SKILL.md +4 -1
- package/core/skills/repo-ops/review-service/examples/service-release-audit-report.md +21 -0
- package/core/skills/repo-ops/review-service/references/release-readiness-audit-rubric.md +21 -0
- package/core/skills/repo-ops/troubleshoot-service/SKILL.md +1 -0
- package/core/skills/security-data/database-maintenance/SKILL.md +1 -1
- package/core/skills/security-data/manage-secrets/SKILL.md +2 -0
- package/core/skills/security-data/manage-secrets/examples/external-secrets-vault-crds.yaml +53 -0
- package/core/skills/security-data/manage-secrets/references/zero-trust-secret-rotation-and-eso.md +30 -0
- package/core/skills/security-data/manage-vietnam-accounting/SKILL.md +8 -7
- package/core/skills/security-data/prompt-injection-defense/SKILL.md +2 -0
- package/core/skills/security-data/prompt-injection-defense/examples/bounded-tool-execution-wrapper.py +78 -0
- package/core/skills/security-data/prompt-injection-defense/references/prompt-injection-taxonomy-and-delimiters.md +37 -0
- package/core/skills/security-data/reverse-engineer-binary/SKILL.md +3 -0
- package/core/skills/security-data/reverse-engineer-binary/examples/binary-triage-and-vulnerability-dossier.md +58 -0
- package/core/skills/security-data/reverse-engineer-binary/references/ghidra-radare2-and-rea-evidence-ledgers.md +43 -0
- package/core/skills/security-data/security-audit/SKILL.md +3 -1
- package/core/skills/security-data/security-audit/examples/enterprise-service-security-audit-report.md +54 -0
- package/core/skills/security-data/security-audit/references/owasp-asi-and-cvss4-threat-modeling.md +39 -0
- package/core/skills/security-data/skill-preflight-ast-check/SKILL.md +3 -0
- package/core/skills/security-data/skill-preflight-ast-check/references/ast-lethal-trifecta-and-static-vetting.md +38 -0
- package/core/skills/security-data/skill-preflight-ast-check/scripts/scan-skill-ast.py +127 -0
- package/core/skills/seo/audit-technical-seo/SKILL.md +1 -0
- package/core/skills/seo/implement-schema-markup/SKILL.md +1 -0
- package/core/workflows/README.md +0 -20
- package/overlays/README.md +2 -22
- package/overlays/astro-cloudflare/README.md +0 -20
- package/overlays/astro-cloudflare/rules/astro-cloudflare-conventions.md +0 -31
- package/overlays/b2b-catalog-golf/README.md +0 -20
- package/overlays/b2b-catalog-golf/rules/golf-project-rules.md +0 -31
- package/overlays/b2b-catalog-golf/skills/develop-b2b-golf-feature/SKILL.md +1 -0
- package/overlays/b2b-factory-catalog/README.md +0 -20
- package/overlays/b2b-factory-catalog/rules/icm-project-rules.md +0 -31
- package/overlays/b2b-factory-catalog/skills/develop-b2b-catalog-feature/SKILL.md +1 -0
- package/overlays/b2b-sport-catalog/README.md +0 -20
- package/overlays/b2b-sport-catalog/rules/sport-project-rules.md +0 -31
- package/overlays/cad-projection/README.md +0 -20
- package/overlays/cad-projection/rules/cad-conventions.md +0 -20
- package/overlays/cad-projection/skills/isometric-svg-projection/SKILL.md +1 -0
- package/overlays/data-analyst-stack/README.md +0 -20
- package/overlays/data-analyst-stack/rules/metric-dashboard-templates.md +0 -31
- package/overlays/data-analyst-stack/rules/stack-conventions.md +0 -31
- package/overlays/data-warehouse/README.md +0 -22
- package/overlays/data-warehouse/learning/learning-conventions.md +0 -31
- package/overlays/data-warehouse/learning/phase-roadmap.md +0 -31
- package/overlays/data-warehouse/rules/amis-accounting-standards.md +0 -33
- package/overlays/data-warehouse/rules/duckdb-concurrency.md +0 -37
- package/overlays/data-warehouse/rules/pii-scrubbing.md +0 -37
- package/overlays/data-warehouse/rules/stocktake-tolerance.md +0 -33
- package/overlays/ecommerce-microservices/README.md +22 -35
- package/overlays/ecommerce-microservices/config/README.md +3 -1
- package/overlays/ecommerce-microservices/rules/README.md +2 -1
- package/overlays/ecommerce-microservices/rules/microservices-conventions.md +30 -0
- package/overlays/ecommerce-microservices/skills/README.md +1 -1
- package/overlays/ecommerce-microservices/workflows/README.md +3 -1
- package/overlays/fintech-compliance/README.md +0 -20
- package/overlays/fintech-compliance/rules/credit-scorecard-rules.md +0 -20
- package/overlays/fintech-compliance/skills/build-credit-scorecard/SKILL.md +1 -0
- package/overlays/go-microservices/README.md +1 -21
- package/overlays/go-microservices/rules/go-conventions.md +0 -31
- package/overlays/hugo-authority-content/README.md +0 -20
- package/overlays/hugo-authority-content/roles/README.md +0 -20
- package/overlays/hugo-authority-content/rules/content-brand.md +0 -30
- package/overlays/hugo-authority-content/rules/link-topology.md +0 -30
- package/overlays/hugo-authority-content/rules/seo-authority.md +0 -30
- package/overlays/hugo-authority-content/rules/technical-article-2027.md +0 -30
- package/overlays/hugo-authority-content/skills/audit-technical-article/SKILL.md +1 -0
- package/overlays/hugo-authority-content/skills/write-hugo-twin-content/SKILL.md +1 -0
- package/overlays/hugo-authority-content/workflows/README.md +0 -20
- package/overlays/hvac-authority-content/README.md +0 -20
- package/overlays/hvac-authority-content/config/collections.md +0 -22
- package/overlays/hvac-authority-content/rules/content-schema.md +0 -30
- package/overlays/hvac-authority-content/rules/hvac-engineering-standards.md +0 -30
- package/overlays/hvac-authority-content/rules/silo-linking.md +0 -30
- package/overlays/hvac-authority-content/skills/write-hvac-authority-content/SKILL.md +1 -0
- package/overlays/hvac-authority-content/workflows/publish-hvac-content.md +0 -22
- package/overlays/laravel-ecommerce/README.md +0 -20
- package/overlays/laravel-ecommerce/rules/elomus-design-system.md +0 -31
- package/overlays/laravel-ecommerce/rules/laravel-ecommerce-rules.md +0 -31
- package/overlays/laravel-ecommerce/skills/develop-laravel-ecommerce-feature/SKILL.md +1 -0
- package/overlays/laravel-filament/README.md +0 -20
- package/overlays/laravel-filament/rules/laravel-conventions.md +0 -31
- package/overlays/laravel-filament/skills/develop-laravel-feature/SKILL.md +1 -0
- package/overlays/livestream-web/README.md +0 -20
- package/overlays/livestream-web/rules/livestream-web-ux-conventions.md +0 -31
- package/overlays/obj-configurator/README.md +0 -20
- package/overlays/obj-configurator/rules/obj-project-rules.md +0 -31
- package/overlays/obj-configurator/skills/develop-obj-feature/SKILL.md +1 -0
- package/overlays/r3f-stack/README.md +0 -20
- package/overlays/r3f-stack/rules/stub.md +0 -31
- package/overlays/r3f-stack/skills/debug-3d-scene/SKILL.md +4 -2
- package/overlays/r3f-stack/skills/integrate-r3f-three-legacy/SKILL.md +6 -5
- package/overlays/r3f-stack/skills/optimize-3d-assets/SKILL.md +4 -3
- package/overlays/real-estate-content/README.md +0 -20
- package/overlays/real-estate-content/roles/README.md +0 -20
- package/overlays/real-estate-content/rules/affiliate-links.md +0 -31
- package/overlays/real-estate-content/rules/content-schema.md +0 -31
- package/overlays/real-estate-content/rules/seo-baseline.md +0 -31
- package/overlays/real-estate-content/skills/write-real-estate-astro-data/SKILL.md +1 -0
- package/overlays/real-estate-content/workflows/README.md +0 -20
- package/overlays/security-research/README.md +0 -20
- package/overlays/security-research/rules/reverse-engineering-rules.md +0 -20
- package/overlays/seo-publishing/README.md +1 -21
- package/overlays/seo-publishing/rules/publish-log-conventions.md +0 -31
- package/overlays/seo-publishing/rules/publishing-cadence.md +0 -31
- package/overlays/seo-publishing/rules/site-mix-and-cannibalization.md +0 -31
- package/overlays/seo-publishing/rules/topic-board-template.md +0 -31
- package/overlays/ui-design-system/README.md +0 -20
- package/overlays/ui-design-system/rules/handoff-conventions.md +0 -31
- package/package.json +2 -2
- package/packs/README.md +3 -9
- package/packs/ecommerce-team/manifest.yaml +1 -1
- package/core/skills/commerce/2026_STANDARDS_SUMMARY.md +0 -316
- package/core/skills/commerce/handle-checkout-flow/UPGRADE_PLAN_2026.md +0 -99
- package/core/skills/commerce/integrate-payment-gateway/UPGRADE_PLAN_2026.md +0 -128
- package/core/skills/commerce/manage-order-fulfillment/UPGRADE_PLAN_2026.md +0 -136
- package/core/skills/commerce/manage-product-catalog/UPGRADE_PLAN_2026.md +0 -130
- package/core/skills/education/2026_STANDARDS_SUMMARY.md +0 -290
- package/core/skills/education/create-exercises/UPGRADE_PLAN_2026.md +0 -115
- package/core/skills/education/design-learning-plan/UPGRADE_PLAN_2026.md +0 -140
- package/core/skills/education/grade-and-review/UPGRADE_PLAN_2026.md +0 -141
- package/core/skills/frontend/2026_STANDARDS_SUMMARY.md +0 -345
- package/core/skills/frontend/add-page-route/UPGRADE_PLAN_2026.md +0 -102
- package/core/skills/frontend/add-ui-component/UPGRADE_PLAN_2026.md +0 -114
- package/core/skills/frontend/component-composition/UPGRADE_PLAN_2026.md +0 -103
- package/core/skills/frontend/frontend-testing/UPGRADE_PLAN_2026.md +0 -137
- package/core/skills/frontend/implement-view-transitions/UPGRADE_PLAN_2026.md +0 -118
- package/core/skills/frontend/implement-webmcp/UPGRADE_PLAN_2026.md +0 -108
- package/core/skills/frontend/integrate-api-client/UPGRADE_PLAN_2026.md +0 -118
- package/core/skills/frontend/setup-design-system/UPGRADE_PLAN_2026.md +0 -123
- package/core/skills/frontend/setup-visual-regression/UPGRADE_PLAN_2026.md +0 -121
- package/core/skills/meetings-analysis/2026_STANDARDS_SUMMARY.md +0 -236
- package/core/skills/meetings-analysis/analyze-business-requirements/UPGRADE_PLAN_2026.md +0 -97
- package/core/skills/meetings-analysis/analyze-data/UPGRADE_PLAN_2026.md +0 -143
- package/core/skills/meetings-analysis/meeting-review/UPGRADE_PLAN_2026.md +0 -125
- package/core/skills/mobile/2026_STANDARDS_SUMMARY.md +0 -209
- package/core/skills/mobile/deploy-mobile-app/UPGRADE_PLAN_2026.md +0 -122
- package/core/skills/mobile/develop-mobile-app/UPGRADE_PLAN_2026.md +0 -141
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Bevy ECS Combat & Movement System (2026)
|
|
2
|
+
// Demonstrates POD components, disjoint mutable queries, and deferred commands.
|
|
3
|
+
|
|
4
|
+
use bevy::prelude::*;
|
|
5
|
+
|
|
6
|
+
// Plain Old Data (POD) Components - Zero Heap Allocations
|
|
7
|
+
#[derive(Component, Debug, Clone, Copy)]
|
|
8
|
+
pub struct Position {
|
|
9
|
+
pub x: f32,
|
|
10
|
+
pub y: f32,
|
|
11
|
+
pub z: f32,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
#[derive(Component, Debug, Clone, Copy)]
|
|
15
|
+
pub struct Velocity {
|
|
16
|
+
pub dx: f32,
|
|
17
|
+
pub dy: f32,
|
|
18
|
+
pub dz: f32,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#[derive(Component, Debug, Clone, Copy)]
|
|
22
|
+
pub struct Health {
|
|
23
|
+
pub current: f32,
|
|
24
|
+
pub max: f32,
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
#[derive(Component, Debug, Clone, Copy)]
|
|
28
|
+
pub struct Damage(pub f32);
|
|
29
|
+
|
|
30
|
+
#[derive(Component)]
|
|
31
|
+
pub struct Player;
|
|
32
|
+
|
|
33
|
+
#[derive(Component)]
|
|
34
|
+
pub struct Enemy;
|
|
35
|
+
|
|
36
|
+
// System 1: Kinematic Movement Integration (Read-Only Velocity, Mutable Position)
|
|
37
|
+
pub fn movement_system(time: Res<Time>, mut query: Query<(&Velocity, &mut Position)>) {
|
|
38
|
+
let delta = time.delta_secs();
|
|
39
|
+
for (vel, mut pos) in query.iter_mut() {
|
|
40
|
+
pos.x += vel.dx * delta;
|
|
41
|
+
pos.y += vel.dy * delta;
|
|
42
|
+
pos.z += vel.dz * delta;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// System 2: Combat Damage & Deferred Despawn (Disjoint Borrow from Movement)
|
|
47
|
+
pub fn combat_damage_system(
|
|
48
|
+
mut commands: Commands,
|
|
49
|
+
mut targets: Query<(Entity, &mut Health, &Damage)>,
|
|
50
|
+
) {
|
|
51
|
+
for (entity, mut health, damage) in targets.iter_mut() {
|
|
52
|
+
health.current -= damage.0;
|
|
53
|
+
if health.current <= 0.0 {
|
|
54
|
+
// Deferred structural mutation: record despawn into Command Buffer
|
|
55
|
+
commands.entity(entity).despawn();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// System 3: Schedule Setup with Deterministic Pipeline Stages
|
|
61
|
+
pub struct GameplayPlugin;
|
|
62
|
+
|
|
63
|
+
impl Plugin for GameplayPlugin {
|
|
64
|
+
fn build(&self, app: &mut App) {
|
|
65
|
+
app.add_systems(
|
|
66
|
+
Update,
|
|
67
|
+
(
|
|
68
|
+
movement_system,
|
|
69
|
+
combat_damage_system,
|
|
70
|
+
).chain(), // Deterministic sequential chaining or automatic parallel scheduling
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Data-Oriented Design & Archetype ECS Architecture (2026)
|
|
2
|
+
|
|
3
|
+
## 1. Principles of Data-Oriented Design (DOD)
|
|
4
|
+
|
|
5
|
+
Object-Oriented Programming (OOP) distributes component data across fragmented heap objects, inducing continuous CPU L1/L2 cache misses through pointer chasing. Data-Oriented Design organizes data strictly around hardware memory hierarchies:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
OOP (Fragmented Heap Pointers)
|
|
9
|
+
[Entity 1 Pointer] ──► Heap [ Transform | Health | AIState ] (Cache Miss)
|
|
10
|
+
[Entity 2 Pointer] ──► Heap [ Transform | Health | AIState ] (Cache Miss)
|
|
11
|
+
|
|
12
|
+
DOD / Archetype Storage (Contiguous Memory Arrays)
|
|
13
|
+
Archetype [Transform, Velocity, Health]:
|
|
14
|
+
Transforms: [ T1 | T2 | T3 | T4 | T5 | T6 ... ] (Packed L1 Cache Lines)
|
|
15
|
+
Velocities: [ V1 | V2 | V3 | V4 | V5 | V6 ... ] (SIMD Vectorizable)
|
|
16
|
+
Healths: [ H1 | H2 | H3 | H4 | H5 | H6 ... ] (Contiguous Buffer)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 2. Archetype vs Sparse Set Memory Layouts
|
|
20
|
+
|
|
21
|
+
1. **Archetype Storage (Bevy, Flecs, Unity DOTS)**:
|
|
22
|
+
- Entities with the exact same component combination reside in a shared archetype chunk.
|
|
23
|
+
- Iteration speed is maximal ($O(1)$ sequential memory access).
|
|
24
|
+
- Component addition/removal incurs an archetype move (migrating entity data to another chunk).
|
|
25
|
+
2. **Sparse Set Storage (EnTT)**:
|
|
26
|
+
- Each component type maintains a dense array of data and a sparse index array.
|
|
27
|
+
- Fast component addition/removal ($O(1)$) with slightly lower cache locality than pure archetypes.
|
|
28
|
+
|
|
29
|
+
## 3. Structural Mutations & Command Buffers
|
|
30
|
+
|
|
31
|
+
Directly creating entities, destroying entities, or adding/removing components while systems iterate archetype tables corrupts array iterators.
|
|
32
|
+
- **Invariant**: All structural modifications are recorded into a `Commands` / `CommandBuffer` queue.
|
|
33
|
+
- **Synchronization Points**: Command buffers flush strictly at stage boundaries (`PreUpdate -> Update -> PostUpdate`), maintaining immutable memory layouts during active parallel iterations.
|
|
34
|
+
|
|
35
|
+
## 4. Multi-Threading & Borrow Checker Rules
|
|
36
|
+
|
|
37
|
+
- **Disjoint Queries**: Two systems may execute in parallel if and only if their mutable component borrow sets are disjoint:
|
|
38
|
+
$$\text{System A}(\text{Mut}\langle X\rangle, \text{Ref}\langle Y\rangle) \parallel \text{System B}(\text{Mut}\langle Z\rangle, \text{Ref}\langle Y\rangle) \iff X \cap Z = \emptyset$$
|
|
39
|
+
- **Read-Only Concurrency**: Any number of systems may concurrently read `Ref<Y>` without contention or locking overhead.
|
|
@@ -76,3 +76,5 @@ When completing game AI implementation, emit:
|
|
|
76
76
|
- **develop-gameplay-systems**: integrating AI movement intents with shared character controllers
|
|
77
77
|
- **configure-physics-collision**: executing non-allocating vision cone and obstacle raycasts
|
|
78
78
|
- **architect-ecs-systems**: batch-updating large AI crowds and boid steering in contiguous arrays
|
|
79
|
+
- Companion reference: `references/behavior-trees-and-utility-ai-curves.md`
|
|
80
|
+
- Companion example: `examples/modular-behavior-tree-ai.ts`
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// Modular Behavior Tree & Utility AI in TypeScript (2026)
|
|
2
|
+
// Demonstrates stateless tree execution, typed blackboards, and squad tokens.
|
|
3
|
+
|
|
4
|
+
export enum NodeStatus {
|
|
5
|
+
SUCCESS = 'SUCCESS',
|
|
6
|
+
FAILURE = 'FAILURE',
|
|
7
|
+
RUNNING = 'RUNNING',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface Blackboard {
|
|
11
|
+
health: number;
|
|
12
|
+
maxHealth: number;
|
|
13
|
+
targetDistance: number;
|
|
14
|
+
hasAttackToken: boolean;
|
|
15
|
+
cooldownSeconds: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface BTNode {
|
|
19
|
+
tick(bb: Blackboard, delta: number): NodeStatus;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Composite Node: Sequence (AND)
|
|
23
|
+
export class SequenceNode implements BTNode {
|
|
24
|
+
constructor(private children: BTNode[]) {}
|
|
25
|
+
|
|
26
|
+
tick(bb: Blackboard, delta: number): NodeStatus {
|
|
27
|
+
for (const child of this.children) {
|
|
28
|
+
const status = child.tick(bb, delta);
|
|
29
|
+
if (status !== NodeStatus.SUCCESS) {
|
|
30
|
+
return status;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return NodeStatus.SUCCESS;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Composite Node: Selector (OR / Fallback)
|
|
38
|
+
export class SelectorNode implements BTNode {
|
|
39
|
+
constructor(private children: BTNode[]) {}
|
|
40
|
+
|
|
41
|
+
tick(bb: Blackboard, delta: number): NodeStatus {
|
|
42
|
+
for (const child of this.children) {
|
|
43
|
+
const status = child.tick(bb, delta);
|
|
44
|
+
if (status !== NodeStatus.FAILURE) {
|
|
45
|
+
return status;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return NodeStatus.FAILURE;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Condition Node: Check if in Attack Range
|
|
53
|
+
export class IsTargetInRangeNode implements BTNode {
|
|
54
|
+
constructor(private maxRange: number) {}
|
|
55
|
+
|
|
56
|
+
tick(bb: Blackboard): NodeStatus {
|
|
57
|
+
return bb.targetDistance <= this.maxRange ? NodeStatus.SUCCESS : NodeStatus.FAILURE;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Utility AI Action Node: Evaluates Response Curve for Melee Attack
|
|
62
|
+
export class MeleeAttackAction implements BTNode {
|
|
63
|
+
tick(bb: Blackboard, delta: number): NodeStatus {
|
|
64
|
+
if (!bb.hasAttackToken) {
|
|
65
|
+
return NodeStatus.FAILURE;
|
|
66
|
+
}
|
|
67
|
+
if (bb.cooldownSeconds > 0) {
|
|
68
|
+
bb.cooldownSeconds = Math.max(0, bb.cooldownSeconds - delta);
|
|
69
|
+
return NodeStatus.RUNNING;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Execute attack logic
|
|
73
|
+
console.log('NPC executes telegraphed melee attack strike!');
|
|
74
|
+
bb.cooldownSeconds = 1.5; // Reset cooldown
|
|
75
|
+
return NodeStatus.SUCCESS;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Squad Combat Token Coordinator (Limits simultaneous attackers)
|
|
80
|
+
export class SquadTokenPool {
|
|
81
|
+
private availableTokens: number;
|
|
82
|
+
|
|
83
|
+
constructor(maxSimultaneousAttackers: number = 2) {
|
|
84
|
+
this.availableTokens = maxSimultaneousAttackers;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public requestToken(): boolean {
|
|
88
|
+
if (this.availableTokens > 0) {
|
|
89
|
+
this.availableTokens--;
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
public releaseToken(): void {
|
|
96
|
+
this.availableTokens++;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Behavior Trees & Utility AI Curves (2026)
|
|
2
|
+
|
|
3
|
+
## 1. Dual AI Architecture: Tactical Trees vs Continuous Scoring
|
|
4
|
+
|
|
5
|
+
Modern game AI combines discrete Behavior Trees (BT) for hierarchical state progression with continuous Utility AI response curves for multi-criteria trade-offs:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌────────────────────────────────────────────────────────┐
|
|
9
|
+
│ BEHAVIOR TREE │
|
|
10
|
+
│ [Root: ?] │
|
|
11
|
+
│ / \ │
|
|
12
|
+
│ [Combat Seq: ->] [Patrol Seq: ->] │
|
|
13
|
+
│ / \ │
|
|
14
|
+
│ (Target In Range?) [Utility Action Selector] │
|
|
15
|
+
└───────────────────────────────┬────────────────────────┘
|
|
16
|
+
│
|
|
17
|
+
▼
|
|
18
|
+
┌────────────────────────────────────────────────────────┐
|
|
19
|
+
│ UTILITY AI EVALUATOR │
|
|
20
|
+
│ Score(Action) = w_1*U(dist) * w_2*U(hp) * w_3*U(agg) │
|
|
21
|
+
│ Selected: Attack Melee (0.82) vs Cast Spell (0.45) │
|
|
22
|
+
└────────────────────────────────────────────────────────┘
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 2. Stateless Nodes & Typed Blackboard Separation
|
|
26
|
+
|
|
27
|
+
- **Stateless Tree Principle**: Behavior Tree nodes (`Selector`, `Sequence`, `ActionNode`, `Decorator`) are instantiated once and shared across thousands of agent instances.
|
|
28
|
+
- **Typed Blackboard**: All runtime dynamic memory resides in the agent's `Blackboard`:
|
|
29
|
+
- `target_id: string | null`
|
|
30
|
+
- `last_seen_pos: Vector3`
|
|
31
|
+
- `alert_level: float (0.0 to 1.0)`
|
|
32
|
+
- `cooldown_timers: Map<string, float>`
|
|
33
|
+
|
|
34
|
+
## 3. Utility AI Response Curves
|
|
35
|
+
|
|
36
|
+
Utility factors are mapped to normalized scores $U \in [0.0, 1.0]$ via mathematical response curves:
|
|
37
|
+
1. **Linear Curve**: $U(x) = mx + c$ (direct proportional scaling).
|
|
38
|
+
2. **Quadratic / Exponential**: $U(x) = x^k$ (sharp thresholding; e.g. urgency spikes when health drops below 20%).
|
|
39
|
+
3. **Logistic Sigmoid**: $U(x) = \frac{1}{1 + e^{-k(x - x_0)}}$ (smooth S-curve transitions).
|
|
40
|
+
|
|
41
|
+
Combined Utility calculation uses geometric mean or product with compensation exponents:
|
|
42
|
+
$$\text{Score} = \prod_{i=1}^n \left( U_i(x_i) \right)^{w_i}$$
|
|
43
|
+
|
|
44
|
+
## 4. Time-Sliced Pathfinding & Token Systems
|
|
45
|
+
|
|
46
|
+
- **Budgeted Scheduler**: Central queue capping path planning execution to $\le 2.0\text{ms}$ per frame.
|
|
47
|
+
- **Squad Token Pools**: Limits concurrent melee attack tokens (e.g., max 2 attackers), forcing remaining squad members into flanking or suppressive fire behaviors to eliminate unfair dogpiling.
|
|
@@ -78,3 +78,5 @@ When completing physics and collision configuration, emit:
|
|
|
78
78
|
- **develop-gameplay-systems**: kinematic character controllers and fixed-tick movement loops
|
|
79
79
|
- **architect-ecs-systems**: batching spatial queries across contiguous component buffers
|
|
80
80
|
- **profile-game-performance**: profiling physics broadphase and solver frame budgets
|
|
81
|
+
- Companion reference: `references/continuous-collision-detection-and-substepping.md`
|
|
82
|
+
- Companion example: `examples/kinematic-physics-substepping.cpp`
|
package/core/skills/gamedev/configure-physics-collision/examples/kinematic-physics-substepping.cpp
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// Kinematic Physics Substepping & Swept CCD Example (2026)
|
|
2
|
+
// Implements bounded substepping, continuous collision swept tests, and slope stabilization.
|
|
3
|
+
|
|
4
|
+
#include <cmath>
|
|
5
|
+
#include <iostream>
|
|
6
|
+
#include <algorithm>
|
|
7
|
+
|
|
8
|
+
struct Vector3 {
|
|
9
|
+
float x, y, z;
|
|
10
|
+
Vector3 operator+(const Vector3& o) const { return {x + o.x, y + o.y, z + o.z}; }
|
|
11
|
+
Vector3 operator-(const Vector3& o) const { return {x - o.x, y - o.y, z - o.z}; }
|
|
12
|
+
Vector3 operator*(float s) const { return {x * s, y * s, z * s}; }
|
|
13
|
+
float dot(const Vector3& o) const { return x * o.x + y * o.y + z * o.z; }
|
|
14
|
+
float length() const { return std::sqrt(dot(*this)); }
|
|
15
|
+
Vector3 normalized() const {
|
|
16
|
+
float l = length();
|
|
17
|
+
return l > 0.0001f ? Vector3{x / l, y / l, z / l} : Vector3{0, 0, 0};
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
struct HitResult {
|
|
22
|
+
bool has_hit = false;
|
|
23
|
+
float time_of_impact = 1.0f; // 0.0 to 1.0
|
|
24
|
+
Vector3 normal = {0, 1, 0};
|
|
25
|
+
Vector3 point = {0, 0, 0};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
class PhysicsSimulation {
|
|
29
|
+
public:
|
|
30
|
+
static constexpr float FIXED_TIMESTEP = 1.0f / 60.0f;
|
|
31
|
+
static constexpr int MAX_ALLOWED_SUBSTEPS = 4;
|
|
32
|
+
static constexpr float MAX_SLOPE_COS = 0.7071f; // 45 degrees
|
|
33
|
+
|
|
34
|
+
float accumulator = 0.0f;
|
|
35
|
+
Vector3 position = {0.0f, 1.0f, 0.0f};
|
|
36
|
+
Vector3 velocity = {0.0f, 0.0f, 0.0f};
|
|
37
|
+
float collider_radius = 0.5f;
|
|
38
|
+
|
|
39
|
+
// Simulated Swept Sphere Cast against environment obstacle
|
|
40
|
+
HitResult SweepSphere(const Vector3& start, const Vector3& displacement) {
|
|
41
|
+
HitResult hit;
|
|
42
|
+
// Mock obstacle: Plane at x = 5.0f with normal (-1, 0, 0)
|
|
43
|
+
if (start.x < 5.0f && (start.x + displacement.x + collider_radius) >= 5.0f) {
|
|
44
|
+
float dist_to_wall = 5.0f - collider_radius - start.x;
|
|
45
|
+
hit.has_hit = true;
|
|
46
|
+
hit.time_of_impact = std::max(0.0f, dist_to_wall / displacement.x);
|
|
47
|
+
hit.normal = {-1.0f, 0.0f, 0.0f};
|
|
48
|
+
hit.point = start + displacement * hit.time_of_impact;
|
|
49
|
+
}
|
|
50
|
+
return hit;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
void SubstepTick(float dt) {
|
|
54
|
+
Vector3 displacement = velocity * dt;
|
|
55
|
+
|
|
56
|
+
// Execute Continuous Collision Detection (CCD)
|
|
57
|
+
HitResult hit = SweepSphere(position, displacement);
|
|
58
|
+
|
|
59
|
+
if (hit.has_hit) {
|
|
60
|
+
// Move up to the exact Time of Impact (TOI)
|
|
61
|
+
position = position + displacement * hit.time_of_impact;
|
|
62
|
+
|
|
63
|
+
// Project remaining velocity along the contact tangent (slide along obstacle)
|
|
64
|
+
float vel_into_normal = velocity.dot(hit.normal);
|
|
65
|
+
if (vel_into_normal < 0.0f) {
|
|
66
|
+
velocity = velocity - hit.normal * vel_into_normal;
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
position = position + displacement;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
void Update(float frame_delta) {
|
|
74
|
+
accumulator += frame_delta;
|
|
75
|
+
int substeps_executed = 0;
|
|
76
|
+
|
|
77
|
+
while (accumulator >= FIXED_TIMESTEP && substeps_executed < MAX_ALLOWED_SUBSTEPS) {
|
|
78
|
+
SubstepTick(FIXED_TIMESTEP);
|
|
79
|
+
accumulator -= FIXED_TIMESTEP;
|
|
80
|
+
substeps_executed++;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Drop remaining accumulator if lagging to eliminate the spiral of death
|
|
84
|
+
if (accumulator >= FIXED_TIMESTEP) {
|
|
85
|
+
accumulator = 0.0f;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
int main() {
|
|
91
|
+
PhysicsSimulation sim;
|
|
92
|
+
sim.velocity = {100.0f, 0.0f, 0.0f}; // High speed: 100 m/s across thin barrier at x=5
|
|
93
|
+
|
|
94
|
+
std::cout << "Starting Simulation: Pos(" << sim.position.x << "), Vel(" << sim.velocity.x << ")\n";
|
|
95
|
+
sim.Update(0.05f); // 50ms frame delta (triggers 3 substeps)
|
|
96
|
+
|
|
97
|
+
std::cout << "After Update: Pos(" << sim.position.x << "), Vel(" << sim.velocity.x << ")\n";
|
|
98
|
+
std::cout << "Zero tunneling verified: Position stopped cleanly before barrier at x=5 - r=0.5 (4.5).\n";
|
|
99
|
+
return 0;
|
|
100
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Continuous Collision Detection (CCD) & Substepping Specifications (2026)
|
|
2
|
+
|
|
3
|
+
## 1. Physics Solver Architecture & The Tunneling Problem
|
|
4
|
+
|
|
5
|
+
Discrete collision detection evaluates entity overlaps only at discrete timestep intervals $t_0, t_1, \dots$. When an object's per-tick displacement $\Delta x = v \cdot \Delta t$ exceeds its collision boundary thickness $2r$, discrete evaluation fails, resulting in "tunneling" (passing through solid obstacles without triggering collision events).
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Discrete Collision Tunneling:
|
|
9
|
+
Tick t_0: [Collider (r)] ────────► (Wall) ────────► Tick t_1: [Collider (r)]
|
|
10
|
+
(Before Wall) (Passed Through!)
|
|
11
|
+
|
|
12
|
+
Continuous Collision Detection (CCD Swept Volume):
|
|
13
|
+
Tick t_0: [=== Swept Capsule / Sphere Cast ============] (Wall)
|
|
14
|
+
Collision Time-of-Impact (TOI) Detected at t_hit!
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 2. Continuous Collision Detection Strategies
|
|
18
|
+
|
|
19
|
+
1. **Swept Sphere / Capsule Casts**:
|
|
20
|
+
- Sweeps a sphere or capsule along the entity's velocity vector $\vec{v}$.
|
|
21
|
+
- Solves for the earliest Time-of-Impact (TOI) $\tau \in [0, \Delta t]$.
|
|
22
|
+
- Caps movement at $\tau \cdot \vec{v}$ and generates contact normal at impact point.
|
|
23
|
+
2. **Speculative Contacts (Predictive Constraints)**:
|
|
24
|
+
- Extends the collision envelope by the distance covered in the upcoming tick.
|
|
25
|
+
- Adds contact constraints into the LCP solver before actual geometric penetration occurs.
|
|
26
|
+
- Prevents tunneling with lower CPU overhead than repeated swept tests.
|
|
27
|
+
|
|
28
|
+
## 3. Substepping & Spiral of Death Prevention
|
|
29
|
+
|
|
30
|
+
When a frame experiences a CPU hitch or large physics delta, the accumulator loop must not enter an infinite substepping loop:
|
|
31
|
+
```cpp
|
|
32
|
+
const float FIXED_DELTA = 1.0f / 60.0f;
|
|
33
|
+
const int MAX_SUBSTEPS = 4; // Bounded substepping ceiling
|
|
34
|
+
|
|
35
|
+
accumulator += frame_delta;
|
|
36
|
+
int steps = 0;
|
|
37
|
+
while (accumulator >= FIXED_DELTA && steps < MAX_SUBSTEPS) {
|
|
38
|
+
PhysicsWorld::StepSimulation(FIXED_DELTA);
|
|
39
|
+
accumulator -= FIXED_DELTA;
|
|
40
|
+
steps++;
|
|
41
|
+
}
|
|
42
|
+
if (accumulator >= FIXED_DELTA) {
|
|
43
|
+
accumulator = 0.0f; // Drop excess time to prevent spiral of death
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 4. Contact Normal Stabilization & Ground Snapping
|
|
48
|
+
|
|
49
|
+
- Distinguish ground from steep walls: $\cos(\theta) = \vec{n}_{\text{contact}} \cdot \vec{u}_{\text{up}} \ge \cos(\theta_{\text{max\_slope}})$.
|
|
50
|
+
- Downward raycast snap distance ($0.2\text{m}$) prevents separation bounce when descending slopes or modular floor junctions.
|
|
@@ -69,3 +69,5 @@ When completing a gameplay system implementation, emit:
|
|
|
69
69
|
- **tune-game-feel**: layered audiovisual responsiveness and timing buffers
|
|
70
70
|
- **integrate-game-engine**: engine lifecycle integration and headless runner execution
|
|
71
71
|
- **optimize-3d-assets**: mesh and texture budget conformance
|
|
72
|
+
- Companion reference: `references/deterministic-gameplay-state-machines.md`
|
|
73
|
+
- Companion example: `examples/kinematic-character-controller.gd`
|
package/core/skills/gamedev/develop-gameplay-systems/examples/kinematic-character-controller.gd
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
class_name KinematicCharacterController
|
|
2
|
+
extends CharacterBody3D
|
|
3
|
+
|
|
4
|
+
@export var move_speed: float = 6.0
|
|
5
|
+
@export var jump_impulse: float = 9.0
|
|
6
|
+
@export var gravity: float = 24.0
|
|
7
|
+
@export var acceleration: float = 40.0
|
|
8
|
+
@export var friction: float = 30.0
|
|
9
|
+
|
|
10
|
+
# State Machine definitions
|
|
11
|
+
enum State { IDLE, RUN, JUMP, FALL }
|
|
12
|
+
var current_state: State = State.IDLE
|
|
13
|
+
|
|
14
|
+
# Input Buffers & Coyote Time
|
|
15
|
+
var coyote_timer: float = 0.0
|
|
16
|
+
var jump_buffer_timer: float = 0.0
|
|
17
|
+
const COYOTE_DURATION: float = 0.12
|
|
18
|
+
const JUMP_BUFFER_DURATION: float = 0.15
|
|
19
|
+
|
|
20
|
+
func _physics_process(delta: float) -> void:
|
|
21
|
+
# Update timers
|
|
22
|
+
if is_on_floor():
|
|
23
|
+
coyote_timer = COYOTE_DURATION
|
|
24
|
+
else:
|
|
25
|
+
coyote_timer = max(0.0, coyote_timer - delta)
|
|
26
|
+
|
|
27
|
+
jump_buffer_timer = max(0.0, jump_buffer_timer - delta)
|
|
28
|
+
|
|
29
|
+
# Read Input Actions
|
|
30
|
+
var input_dir: Vector2 = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
|
|
31
|
+
var move_vector: Vector3 = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
|
32
|
+
|
|
33
|
+
if Input.is_action_just_pressed("jump"):
|
|
34
|
+
jump_buffer_timer = JUMP_BUFFER_DURATION
|
|
35
|
+
|
|
36
|
+
# State Transitions & Physics Integration
|
|
37
|
+
match current_state:
|
|
38
|
+
State.IDLE:
|
|
39
|
+
apply_horizontal_velocity(Vector3.ZERO, friction, delta)
|
|
40
|
+
if not is_on_floor() and coyote_timer <= 0.0:
|
|
41
|
+
transition_to(State.FALL)
|
|
42
|
+
elif jump_buffer_timer > 0.0 and coyote_timer > 0.0:
|
|
43
|
+
execute_jump()
|
|
44
|
+
elif move_vector.length_squared() > 0.01:
|
|
45
|
+
transition_to(State.RUN)
|
|
46
|
+
|
|
47
|
+
State.RUN:
|
|
48
|
+
apply_horizontal_velocity(move_vector * move_speed, acceleration, delta)
|
|
49
|
+
if not is_on_floor() and coyote_timer <= 0.0:
|
|
50
|
+
transition_to(State.FALL)
|
|
51
|
+
elif jump_buffer_timer > 0.0 and coyote_timer > 0.0:
|
|
52
|
+
execute_jump()
|
|
53
|
+
elif move_vector.length_squared() <= 0.01:
|
|
54
|
+
transition_to(State.IDLE)
|
|
55
|
+
|
|
56
|
+
State.JUMP:
|
|
57
|
+
velocity.y -= gravity * delta
|
|
58
|
+
apply_horizontal_velocity(move_vector * move_speed, acceleration * 0.5, delta)
|
|
59
|
+
if velocity.y <= 0.0:
|
|
60
|
+
transition_to(State.FALL)
|
|
61
|
+
|
|
62
|
+
State.FALL:
|
|
63
|
+
velocity.y -= gravity * delta
|
|
64
|
+
apply_horizontal_velocity(move_vector * move_speed, acceleration * 0.5, delta)
|
|
65
|
+
if is_on_floor():
|
|
66
|
+
if move_vector.length_squared() > 0.01:
|
|
67
|
+
transition_to(State.RUN)
|
|
68
|
+
else:
|
|
69
|
+
transition_to(State.IDLE)
|
|
70
|
+
|
|
71
|
+
move_and_slide()
|
|
72
|
+
|
|
73
|
+
func transition_to(new_state: State) -> void:
|
|
74
|
+
current_state = new_state
|
|
75
|
+
|
|
76
|
+
func execute_jump() -> void:
|
|
77
|
+
velocity.y = jump_impulse
|
|
78
|
+
coyote_timer = 0.0
|
|
79
|
+
jump_buffer_timer = 0.0
|
|
80
|
+
transition_to(State.JUMP)
|
|
81
|
+
|
|
82
|
+
func apply_horizontal_velocity(target_vel: Vector3, rate: float, delta: float) -> void:
|
|
83
|
+
var h_vel: Vector3 = Vector3(velocity.x, 0, velocity.z)
|
|
84
|
+
h_vel = h_vel.move_toward(target_vel, rate * delta)
|
|
85
|
+
velocity.x = h_vel.x
|
|
86
|
+
velocity.z = h_vel.z
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Deterministic Gameplay State Machines & Kinematics (2026)
|
|
2
|
+
|
|
3
|
+
## 1. Architectural Foundations: Fixed-Timestep Simulation
|
|
4
|
+
|
|
5
|
+
Deterministic gameplay simulation requires complete decoupling of render framerates from physics calculation:
|
|
6
|
+
|
|
7
|
+
$$\Delta t_{\text{fixed}} = \frac{1}{\text{TickRate}} \quad (\text{typically } 60\text{Hz or } 120\text{Hz})$$
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Render Frame (Variable Delta)
|
|
11
|
+
│
|
|
12
|
+
├─► Accumulator += frame_delta
|
|
13
|
+
│
|
|
14
|
+
▼
|
|
15
|
+
While Accumulator >= fixed_delta:
|
|
16
|
+
├─► Process Input Buffers
|
|
17
|
+
├─► Integrate Velocities: x_{t+1} = x_t + v_t * fixed_delta
|
|
18
|
+
├─► Resolve CCD & Kinematic Collisions
|
|
19
|
+
├─► Advance State Machine
|
|
20
|
+
└─► Accumulator -= fixed_delta
|
|
21
|
+
│
|
|
22
|
+
▼
|
|
23
|
+
Render Interpolation: alpha = Accumulator / fixed_delta
|
|
24
|
+
Render State = lerp(PreviousState, CurrentState, alpha)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 2. Hierarchical State Machine (HSM) Invariants
|
|
28
|
+
|
|
29
|
+
1. **Single Active State Invariant**: At any discrete tick $t$, an entity possesses exactly one leaf state in its state hierarchy (e.g. `Root -> Grounded -> Moving`).
|
|
30
|
+
2. **Transition Authority**: State transitions can only occur via explicit transition triggers evaluated against deterministic condition flags (e.g., `is_on_floor`, `jump_buffered`, `stamina > 0`). Direct mutation of state flags from outside callers is prohibited.
|
|
31
|
+
3. **Lifecycle Contracts**:
|
|
32
|
+
- `Enter(context)`: Pre-allocates resources, initializes timers, triggers animation events.
|
|
33
|
+
- `PhysicsUpdate(delta)`: Evaluates motion vector, applies gravity, triggers collision queries.
|
|
34
|
+
- `Exit()`: Resets timers, clears transient buffers, cancels incomplete actions.
|
|
35
|
+
|
|
36
|
+
## 3. Kinematic Motion & Collision Handling
|
|
37
|
+
|
|
38
|
+
- **Ground Contact Snapping**: Snap character to slopes within the maximum slope angle ($\theta \le 45^\circ$) to prevent airborne jitter when descending.
|
|
39
|
+
- **Coyote Time & Input Buffering**:
|
|
40
|
+
- Coyote Time: Grace window (e.g., $100\text{ms}$) permitting jump initiation after walking off an edge.
|
|
41
|
+
- Jump Buffering: Queue jump inputs received within $150\text{ms}$ before landing on ground.
|
|
42
|
+
- **Zero-Allocation Spatial Queries**: Pre-allocate raycast hit arrays and query shapes. Never instantiate temporary vector arrays or lambda closures in the fixed loop.
|
|
@@ -82,3 +82,5 @@ When completing save persistence implementation, emit:
|
|
|
82
82
|
- **manage-scene-lifecycle**: hydrating and persisting scene state across level transitions
|
|
83
83
|
- **integrate-game-engine**: configuring platform user directories and headless test runners
|
|
84
84
|
- **integrate-dialogue-narrative**: persisting narrative condition flags and branching choices
|
|
85
|
+
- Companion reference: `references/versioned-save-schemas-and-checksums.md`
|
|
86
|
+
- Companion example: `examples/versioned-save-manager.ts`
|