@djm204/agent-skills 1.0.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/README.md +597 -0
- package/bin/cli.js +8 -0
- package/package.json +55 -0
- package/src/index.js +1817 -0
- package/src/index.test.js +1264 -0
- package/templates/_shared/code-quality.mdc +52 -0
- package/templates/_shared/communication.mdc +43 -0
- package/templates/_shared/core-principles.mdc +67 -0
- package/templates/_shared/git-workflow.mdc +48 -0
- package/templates/_shared/security-fundamentals.mdc +41 -0
- package/templates/agents/utility-agent/.cursor/rules/action-control.mdc +71 -0
- package/templates/agents/utility-agent/.cursor/rules/context-management.mdc +61 -0
- package/templates/agents/utility-agent/.cursor/rules/hallucination-prevention.mdc +58 -0
- package/templates/agents/utility-agent/.cursor/rules/overview.mdc +34 -0
- package/templates/agents/utility-agent/.cursor/rules/token-optimization.mdc +71 -0
- package/templates/agents/utility-agent/CLAUDE.md +513 -0
- package/templates/business/market-intelligence/.cursor/rules/data-sources.mdc +62 -0
- package/templates/business/market-intelligence/.cursor/rules/overview.mdc +55 -0
- package/templates/business/market-intelligence/.cursor/rules/reporting.mdc +59 -0
- package/templates/business/market-intelligence/.cursor/rules/risk-signals.mdc +63 -0
- package/templates/business/market-intelligence/.cursor/rules/sentiment-analysis.mdc +70 -0
- package/templates/business/market-intelligence/.cursor/rules/trend-detection.mdc +72 -0
- package/templates/business/market-intelligence/CLAUDE.md +371 -0
- package/templates/business/marketing-expert/.cursor/rules/brand-strategy.mdc +74 -0
- package/templates/business/marketing-expert/.cursor/rules/campaign-planning.mdc +60 -0
- package/templates/business/marketing-expert/.cursor/rules/growth-frameworks.mdc +69 -0
- package/templates/business/marketing-expert/.cursor/rules/market-analysis.mdc +70 -0
- package/templates/business/marketing-expert/.cursor/rules/marketing-analytics.mdc +71 -0
- package/templates/business/marketing-expert/.cursor/rules/overview.mdc +56 -0
- package/templates/business/marketing-expert/CLAUDE.md +567 -0
- package/templates/business/predictive-maintenance/.cursor/rules/alerting.mdc +56 -0
- package/templates/business/predictive-maintenance/.cursor/rules/asset-lifecycle.mdc +71 -0
- package/templates/business/predictive-maintenance/.cursor/rules/failure-prediction.mdc +65 -0
- package/templates/business/predictive-maintenance/.cursor/rules/maintenance-scheduling.mdc +61 -0
- package/templates/business/predictive-maintenance/.cursor/rules/overview.mdc +55 -0
- package/templates/business/predictive-maintenance/.cursor/rules/sensor-analytics.mdc +66 -0
- package/templates/business/predictive-maintenance/CLAUDE.md +529 -0
- package/templates/business/product-manager/.cursor/rules/communication.mdc +77 -0
- package/templates/business/product-manager/.cursor/rules/discovery.mdc +79 -0
- package/templates/business/product-manager/.cursor/rules/metrics.mdc +75 -0
- package/templates/business/product-manager/.cursor/rules/overview.mdc +47 -0
- package/templates/business/product-manager/.cursor/rules/prioritization.mdc +66 -0
- package/templates/business/product-manager/.cursor/rules/requirements.mdc +79 -0
- package/templates/business/product-manager/CLAUDE.md +593 -0
- package/templates/business/project-manager/.cursor/rules/overview.mdc +53 -0
- package/templates/business/project-manager/.cursor/rules/reporting.mdc +68 -0
- package/templates/business/project-manager/.cursor/rules/risk-management.mdc +71 -0
- package/templates/business/project-manager/.cursor/rules/scheduling.mdc +67 -0
- package/templates/business/project-manager/.cursor/rules/scope-management.mdc +66 -0
- package/templates/business/project-manager/.cursor/rules/stakeholder-management.mdc +70 -0
- package/templates/business/project-manager/CLAUDE.md +540 -0
- package/templates/business/regulatory-sentinel/.cursor/rules/compliance-tracking.mdc +74 -0
- package/templates/business/regulatory-sentinel/.cursor/rules/impact-assessment.mdc +62 -0
- package/templates/business/regulatory-sentinel/.cursor/rules/monitoring.mdc +67 -0
- package/templates/business/regulatory-sentinel/.cursor/rules/overview.mdc +55 -0
- package/templates/business/regulatory-sentinel/.cursor/rules/reporting.mdc +61 -0
- package/templates/business/regulatory-sentinel/.cursor/rules/risk-classification.mdc +73 -0
- package/templates/business/regulatory-sentinel/CLAUDE.md +572 -0
- package/templates/business/resource-allocator/.cursor/rules/capacity-modeling.mdc +65 -0
- package/templates/business/resource-allocator/.cursor/rules/coordination.mdc +67 -0
- package/templates/business/resource-allocator/.cursor/rules/crisis-management.mdc +64 -0
- package/templates/business/resource-allocator/.cursor/rules/demand-prediction.mdc +52 -0
- package/templates/business/resource-allocator/.cursor/rules/overview.mdc +76 -0
- package/templates/business/resource-allocator/.cursor/rules/scheduling.mdc +63 -0
- package/templates/business/resource-allocator/CLAUDE.md +525 -0
- package/templates/business/strategic-negotiator/.cursor/rules/contract-analysis.mdc +60 -0
- package/templates/business/strategic-negotiator/.cursor/rules/deal-structuring.mdc +66 -0
- package/templates/business/strategic-negotiator/.cursor/rules/game-theory.mdc +64 -0
- package/templates/business/strategic-negotiator/.cursor/rules/overview.mdc +55 -0
- package/templates/business/strategic-negotiator/.cursor/rules/preparation.mdc +79 -0
- package/templates/business/strategic-negotiator/.cursor/rules/scenario-modeling.mdc +66 -0
- package/templates/business/strategic-negotiator/CLAUDE.md +640 -0
- package/templates/business/supply-chain/.cursor/rules/cost-modeling.mdc +67 -0
- package/templates/business/supply-chain/.cursor/rules/demand-forecasting.mdc +67 -0
- package/templates/business/supply-chain/.cursor/rules/inventory-management.mdc +69 -0
- package/templates/business/supply-chain/.cursor/rules/logistics.mdc +61 -0
- package/templates/business/supply-chain/.cursor/rules/overview.mdc +64 -0
- package/templates/business/supply-chain/.cursor/rules/supplier-evaluation.mdc +66 -0
- package/templates/business/supply-chain/CLAUDE.md +590 -0
- package/templates/business/supply-chain-harmonizer/.cursor/rules/disruption-response.mdc +67 -0
- package/templates/business/supply-chain-harmonizer/.cursor/rules/inventory-rebalancing.mdc +63 -0
- package/templates/business/supply-chain-harmonizer/.cursor/rules/overview.mdc +65 -0
- package/templates/business/supply-chain-harmonizer/.cursor/rules/rerouting.mdc +64 -0
- package/templates/business/supply-chain-harmonizer/.cursor/rules/scenario-simulation.mdc +68 -0
- package/templates/business/supply-chain-harmonizer/.cursor/rules/stakeholder-notifications.mdc +61 -0
- package/templates/business/supply-chain-harmonizer/CLAUDE.md +600 -0
- package/templates/creative/brand-guardian/.cursor/rules/brand-voice.mdc +64 -0
- package/templates/creative/brand-guardian/.cursor/rules/content-review.mdc +47 -0
- package/templates/creative/brand-guardian/.cursor/rules/ethical-guidelines.mdc +47 -0
- package/templates/creative/brand-guardian/.cursor/rules/multi-channel.mdc +49 -0
- package/templates/creative/brand-guardian/.cursor/rules/overview.mdc +58 -0
- package/templates/creative/brand-guardian/.cursor/rules/visual-identity.mdc +64 -0
- package/templates/creative/brand-guardian/CLAUDE.md +634 -0
- package/templates/creative/content-creation-expert/.cursor/rules/content-strategy.mdc +65 -0
- package/templates/creative/content-creation-expert/.cursor/rules/copywriting.mdc +59 -0
- package/templates/creative/content-creation-expert/.cursor/rules/editorial-operations.mdc +65 -0
- package/templates/creative/content-creation-expert/.cursor/rules/multimedia-production.mdc +64 -0
- package/templates/creative/content-creation-expert/.cursor/rules/overview.mdc +58 -0
- package/templates/creative/content-creation-expert/.cursor/rules/seo-content.mdc +75 -0
- package/templates/creative/content-creation-expert/CLAUDE.md +568 -0
- package/templates/creative/narrative-architect/.cursor/rules/collaboration.mdc +62 -0
- package/templates/creative/narrative-architect/.cursor/rules/continuity-tracking.mdc +56 -0
- package/templates/creative/narrative-architect/.cursor/rules/overview.mdc +68 -0
- package/templates/creative/narrative-architect/.cursor/rules/story-bible.mdc +77 -0
- package/templates/creative/narrative-architect/.cursor/rules/timeline-management.mdc +60 -0
- package/templates/creative/narrative-architect/.cursor/rules/world-building.mdc +78 -0
- package/templates/creative/narrative-architect/CLAUDE.md +737 -0
- package/templates/creative/social-media-expert/.cursor/rules/audience-growth.mdc +62 -0
- package/templates/creative/social-media-expert/.cursor/rules/community-management.mdc +67 -0
- package/templates/creative/social-media-expert/.cursor/rules/content-strategy.mdc +60 -0
- package/templates/creative/social-media-expert/.cursor/rules/overview.mdc +48 -0
- package/templates/creative/social-media-expert/.cursor/rules/platform-strategy.mdc +64 -0
- package/templates/creative/social-media-expert/.cursor/rules/social-analytics.mdc +64 -0
- package/templates/creative/social-media-expert/CLAUDE.md +624 -0
- package/templates/creative/trend-forecaster/.cursor/rules/cultural-analysis.mdc +59 -0
- package/templates/creative/trend-forecaster/.cursor/rules/forecasting-methods.mdc +63 -0
- package/templates/creative/trend-forecaster/.cursor/rules/overview.mdc +58 -0
- package/templates/creative/trend-forecaster/.cursor/rules/reporting.mdc +61 -0
- package/templates/creative/trend-forecaster/.cursor/rules/signal-analysis.mdc +74 -0
- package/templates/creative/trend-forecaster/.cursor/rules/trend-lifecycle.mdc +75 -0
- package/templates/creative/trend-forecaster/CLAUDE.md +717 -0
- package/templates/creative/ux-designer/.cursor/rules/accessibility.mdc +69 -0
- package/templates/creative/ux-designer/.cursor/rules/emotional-design.mdc +59 -0
- package/templates/creative/ux-designer/.cursor/rules/handoff.mdc +73 -0
- package/templates/creative/ux-designer/.cursor/rules/information-architecture.mdc +62 -0
- package/templates/creative/ux-designer/.cursor/rules/interaction-design.mdc +66 -0
- package/templates/creative/ux-designer/.cursor/rules/overview.mdc +61 -0
- package/templates/creative/ux-designer/.cursor/rules/research.mdc +61 -0
- package/templates/creative/ux-designer/.cursor/rules/visual-design.mdc +68 -0
- package/templates/creative/ux-designer/CLAUDE.md +124 -0
- package/templates/dogfood/project-overview.mdc +12 -0
- package/templates/dogfood/project-structure.mdc +82 -0
- package/templates/dogfood/rules-creation-best-practices.mdc +45 -0
- package/templates/education/educator/.cursor/rules/accessibility.mdc +67 -0
- package/templates/education/educator/.cursor/rules/assessment.mdc +68 -0
- package/templates/education/educator/.cursor/rules/curriculum.mdc +57 -0
- package/templates/education/educator/.cursor/rules/engagement.mdc +65 -0
- package/templates/education/educator/.cursor/rules/instructional-design.mdc +69 -0
- package/templates/education/educator/.cursor/rules/overview.mdc +57 -0
- package/templates/education/educator/.cursor/rules/retention.mdc +64 -0
- package/templates/education/educator/CLAUDE.md +338 -0
- package/templates/engineering/blockchain/.cursor/rules/defi-patterns.mdc +48 -0
- package/templates/engineering/blockchain/.cursor/rules/gas-optimization.mdc +77 -0
- package/templates/engineering/blockchain/.cursor/rules/overview.mdc +41 -0
- package/templates/engineering/blockchain/.cursor/rules/security.mdc +61 -0
- package/templates/engineering/blockchain/.cursor/rules/smart-contracts.mdc +64 -0
- package/templates/engineering/blockchain/.cursor/rules/testing.mdc +77 -0
- package/templates/engineering/blockchain/.cursor/rules/web3-integration.mdc +47 -0
- package/templates/engineering/blockchain/CLAUDE.md +389 -0
- package/templates/engineering/cli-tools/.cursor/rules/architecture.mdc +76 -0
- package/templates/engineering/cli-tools/.cursor/rules/arguments.mdc +65 -0
- package/templates/engineering/cli-tools/.cursor/rules/distribution.mdc +40 -0
- package/templates/engineering/cli-tools/.cursor/rules/error-handling.mdc +67 -0
- package/templates/engineering/cli-tools/.cursor/rules/overview.mdc +58 -0
- package/templates/engineering/cli-tools/.cursor/rules/testing.mdc +42 -0
- package/templates/engineering/cli-tools/.cursor/rules/user-experience.mdc +43 -0
- package/templates/engineering/cli-tools/CLAUDE.md +356 -0
- package/templates/engineering/data-engineering/.cursor/rules/data-modeling.mdc +71 -0
- package/templates/engineering/data-engineering/.cursor/rules/data-quality.mdc +78 -0
- package/templates/engineering/data-engineering/.cursor/rules/overview.mdc +49 -0
- package/templates/engineering/data-engineering/.cursor/rules/performance.mdc +71 -0
- package/templates/engineering/data-engineering/.cursor/rules/pipeline-design.mdc +79 -0
- package/templates/engineering/data-engineering/.cursor/rules/security.mdc +79 -0
- package/templates/engineering/data-engineering/.cursor/rules/testing.mdc +75 -0
- package/templates/engineering/data-engineering/CLAUDE.md +974 -0
- package/templates/engineering/devops-sre/.cursor/rules/capacity-planning.mdc +49 -0
- package/templates/engineering/devops-sre/.cursor/rules/change-management.mdc +51 -0
- package/templates/engineering/devops-sre/.cursor/rules/chaos-engineering.mdc +50 -0
- package/templates/engineering/devops-sre/.cursor/rules/disaster-recovery.mdc +54 -0
- package/templates/engineering/devops-sre/.cursor/rules/incident-management.mdc +56 -0
- package/templates/engineering/devops-sre/.cursor/rules/observability.mdc +50 -0
- package/templates/engineering/devops-sre/.cursor/rules/overview.mdc +76 -0
- package/templates/engineering/devops-sre/.cursor/rules/postmortems.mdc +49 -0
- package/templates/engineering/devops-sre/.cursor/rules/runbooks.mdc +49 -0
- package/templates/engineering/devops-sre/.cursor/rules/slo-sli.mdc +46 -0
- package/templates/engineering/devops-sre/.cursor/rules/toil-reduction.mdc +52 -0
- package/templates/engineering/devops-sre/CLAUDE.md +1007 -0
- package/templates/engineering/fullstack/.cursor/rules/api-contracts.mdc +79 -0
- package/templates/engineering/fullstack/.cursor/rules/architecture.mdc +79 -0
- package/templates/engineering/fullstack/.cursor/rules/overview.mdc +61 -0
- package/templates/engineering/fullstack/.cursor/rules/shared-types.mdc +77 -0
- package/templates/engineering/fullstack/.cursor/rules/testing.mdc +72 -0
- package/templates/engineering/fullstack/CLAUDE.md +349 -0
- package/templates/engineering/ml-ai/.cursor/rules/data-engineering.mdc +71 -0
- package/templates/engineering/ml-ai/.cursor/rules/deployment.mdc +43 -0
- package/templates/engineering/ml-ai/.cursor/rules/model-development.mdc +44 -0
- package/templates/engineering/ml-ai/.cursor/rules/monitoring.mdc +45 -0
- package/templates/engineering/ml-ai/.cursor/rules/overview.mdc +42 -0
- package/templates/engineering/ml-ai/.cursor/rules/security.mdc +51 -0
- package/templates/engineering/ml-ai/.cursor/rules/testing.mdc +44 -0
- package/templates/engineering/ml-ai/CLAUDE.md +1136 -0
- package/templates/engineering/mobile/.cursor/rules/navigation.mdc +75 -0
- package/templates/engineering/mobile/.cursor/rules/offline-first.mdc +68 -0
- package/templates/engineering/mobile/.cursor/rules/overview.mdc +76 -0
- package/templates/engineering/mobile/.cursor/rules/performance.mdc +78 -0
- package/templates/engineering/mobile/.cursor/rules/testing.mdc +77 -0
- package/templates/engineering/mobile/CLAUDE.md +233 -0
- package/templates/engineering/platform-engineering/.cursor/rules/ci-cd.mdc +51 -0
- package/templates/engineering/platform-engineering/.cursor/rules/developer-experience.mdc +48 -0
- package/templates/engineering/platform-engineering/.cursor/rules/infrastructure-as-code.mdc +62 -0
- package/templates/engineering/platform-engineering/.cursor/rules/kubernetes.mdc +51 -0
- package/templates/engineering/platform-engineering/.cursor/rules/observability.mdc +52 -0
- package/templates/engineering/platform-engineering/.cursor/rules/overview.mdc +44 -0
- package/templates/engineering/platform-engineering/.cursor/rules/security.mdc +74 -0
- package/templates/engineering/platform-engineering/.cursor/rules/testing.mdc +59 -0
- package/templates/engineering/platform-engineering/CLAUDE.md +850 -0
- package/templates/engineering/qa-engineering/.cursor/rules/automation.mdc +71 -0
- package/templates/engineering/qa-engineering/.cursor/rules/metrics.mdc +68 -0
- package/templates/engineering/qa-engineering/.cursor/rules/overview.mdc +45 -0
- package/templates/engineering/qa-engineering/.cursor/rules/quality-gates.mdc +54 -0
- package/templates/engineering/qa-engineering/.cursor/rules/test-design.mdc +59 -0
- package/templates/engineering/qa-engineering/.cursor/rules/test-strategy.mdc +62 -0
- package/templates/engineering/qa-engineering/CLAUDE.md +726 -0
- package/templates/engineering/testing/.cursor/rules/advanced-techniques.mdc +44 -0
- package/templates/engineering/testing/.cursor/rules/ci-cd-integration.mdc +43 -0
- package/templates/engineering/testing/.cursor/rules/overview.mdc +61 -0
- package/templates/engineering/testing/.cursor/rules/performance-testing.mdc +39 -0
- package/templates/engineering/testing/.cursor/rules/quality-metrics.mdc +74 -0
- package/templates/engineering/testing/.cursor/rules/reliability.mdc +39 -0
- package/templates/engineering/testing/.cursor/rules/tdd-methodology.mdc +52 -0
- package/templates/engineering/testing/.cursor/rules/test-data.mdc +46 -0
- package/templates/engineering/testing/.cursor/rules/test-design.mdc +45 -0
- package/templates/engineering/testing/.cursor/rules/test-types.mdc +71 -0
- package/templates/engineering/testing/CLAUDE.md +1134 -0
- package/templates/engineering/unity-dev-expert/.cursor/rules/csharp-architecture.mdc +61 -0
- package/templates/engineering/unity-dev-expert/.cursor/rules/multiplayer-networking.mdc +67 -0
- package/templates/engineering/unity-dev-expert/.cursor/rules/overview.mdc +56 -0
- package/templates/engineering/unity-dev-expert/.cursor/rules/performance-optimization.mdc +76 -0
- package/templates/engineering/unity-dev-expert/.cursor/rules/physics-rendering.mdc +59 -0
- package/templates/engineering/unity-dev-expert/.cursor/rules/ui-systems.mdc +59 -0
- package/templates/engineering/unity-dev-expert/CLAUDE.md +534 -0
- package/templates/engineering/web-backend/.cursor/rules/api-design.mdc +64 -0
- package/templates/engineering/web-backend/.cursor/rules/authentication.mdc +69 -0
- package/templates/engineering/web-backend/.cursor/rules/database-patterns.mdc +73 -0
- package/templates/engineering/web-backend/.cursor/rules/error-handling.mdc +66 -0
- package/templates/engineering/web-backend/.cursor/rules/overview.mdc +74 -0
- package/templates/engineering/web-backend/.cursor/rules/security.mdc +60 -0
- package/templates/engineering/web-backend/.cursor/rules/testing.mdc +74 -0
- package/templates/engineering/web-backend/CLAUDE.md +366 -0
- package/templates/engineering/web-frontend/.cursor/rules/accessibility.mdc +75 -0
- package/templates/engineering/web-frontend/.cursor/rules/component-patterns.mdc +76 -0
- package/templates/engineering/web-frontend/.cursor/rules/overview.mdc +77 -0
- package/templates/engineering/web-frontend/.cursor/rules/performance.mdc +73 -0
- package/templates/engineering/web-frontend/.cursor/rules/state-management.mdc +71 -0
- package/templates/engineering/web-frontend/.cursor/rules/styling.mdc +69 -0
- package/templates/engineering/web-frontend/.cursor/rules/testing.mdc +75 -0
- package/templates/engineering/web-frontend/CLAUDE.md +399 -0
- package/templates/languages/cpp-expert/.cursor/rules/concurrency.mdc +68 -0
- package/templates/languages/cpp-expert/.cursor/rules/error-handling.mdc +65 -0
- package/templates/languages/cpp-expert/.cursor/rules/memory-and-ownership.mdc +68 -0
- package/templates/languages/cpp-expert/.cursor/rules/modern-cpp.mdc +75 -0
- package/templates/languages/cpp-expert/.cursor/rules/overview.mdc +37 -0
- package/templates/languages/cpp-expert/.cursor/rules/performance.mdc +74 -0
- package/templates/languages/cpp-expert/.cursor/rules/testing.mdc +70 -0
- package/templates/languages/cpp-expert/.cursor/rules/tooling.mdc +77 -0
- package/templates/languages/cpp-expert/CLAUDE.md +242 -0
- package/templates/languages/csharp-expert/.cursor/rules/aspnet-core.mdc +78 -0
- package/templates/languages/csharp-expert/.cursor/rules/async-patterns.mdc +71 -0
- package/templates/languages/csharp-expert/.cursor/rules/dependency-injection.mdc +76 -0
- package/templates/languages/csharp-expert/.cursor/rules/error-handling.mdc +65 -0
- package/templates/languages/csharp-expert/.cursor/rules/language-features.mdc +74 -0
- package/templates/languages/csharp-expert/.cursor/rules/overview.mdc +47 -0
- package/templates/languages/csharp-expert/.cursor/rules/performance.mdc +66 -0
- package/templates/languages/csharp-expert/.cursor/rules/testing.mdc +78 -0
- package/templates/languages/csharp-expert/.cursor/rules/tooling.mdc +78 -0
- package/templates/languages/csharp-expert/CLAUDE.md +360 -0
- package/templates/languages/golang-expert/.cursor/rules/concurrency.mdc +79 -0
- package/templates/languages/golang-expert/.cursor/rules/error-handling.mdc +77 -0
- package/templates/languages/golang-expert/.cursor/rules/interfaces-and-types.mdc +77 -0
- package/templates/languages/golang-expert/.cursor/rules/overview.mdc +74 -0
- package/templates/languages/golang-expert/.cursor/rules/performance.mdc +76 -0
- package/templates/languages/golang-expert/.cursor/rules/production-patterns.mdc +76 -0
- package/templates/languages/golang-expert/.cursor/rules/stdlib-and-tooling.mdc +68 -0
- package/templates/languages/golang-expert/.cursor/rules/testing.mdc +77 -0
- package/templates/languages/golang-expert/CLAUDE.md +361 -0
- package/templates/languages/java-expert/.cursor/rules/concurrency.mdc +69 -0
- package/templates/languages/java-expert/.cursor/rules/error-handling.mdc +70 -0
- package/templates/languages/java-expert/.cursor/rules/modern-java.mdc +74 -0
- package/templates/languages/java-expert/.cursor/rules/overview.mdc +42 -0
- package/templates/languages/java-expert/.cursor/rules/performance.mdc +69 -0
- package/templates/languages/java-expert/.cursor/rules/persistence.mdc +74 -0
- package/templates/languages/java-expert/.cursor/rules/spring-boot.mdc +73 -0
- package/templates/languages/java-expert/.cursor/rules/testing.mdc +79 -0
- package/templates/languages/java-expert/.cursor/rules/tooling.mdc +76 -0
- package/templates/languages/java-expert/CLAUDE.md +325 -0
- package/templates/languages/javascript-expert/.cursor/rules/language-deep-dive.mdc +74 -0
- package/templates/languages/javascript-expert/.cursor/rules/node-patterns.mdc +77 -0
- package/templates/languages/javascript-expert/.cursor/rules/overview.mdc +66 -0
- package/templates/languages/javascript-expert/.cursor/rules/performance.mdc +64 -0
- package/templates/languages/javascript-expert/.cursor/rules/react-patterns.mdc +70 -0
- package/templates/languages/javascript-expert/.cursor/rules/testing.mdc +76 -0
- package/templates/languages/javascript-expert/.cursor/rules/tooling.mdc +72 -0
- package/templates/languages/javascript-expert/.cursor/rules/typescript-deep-dive.mdc +77 -0
- package/templates/languages/javascript-expert/CLAUDE.md +479 -0
- package/templates/languages/kotlin-expert/.cursor/rules/coroutines.mdc +75 -0
- package/templates/languages/kotlin-expert/.cursor/rules/error-handling.mdc +69 -0
- package/templates/languages/kotlin-expert/.cursor/rules/frameworks.mdc +76 -0
- package/templates/languages/kotlin-expert/.cursor/rules/language-features.mdc +78 -0
- package/templates/languages/kotlin-expert/.cursor/rules/overview.mdc +38 -0
- package/templates/languages/kotlin-expert/.cursor/rules/performance.mdc +73 -0
- package/templates/languages/kotlin-expert/.cursor/rules/testing.mdc +70 -0
- package/templates/languages/kotlin-expert/.cursor/rules/tooling.mdc +67 -0
- package/templates/languages/kotlin-expert/CLAUDE.md +276 -0
- package/templates/languages/python-expert/.cursor/rules/async-python.mdc +71 -0
- package/templates/languages/python-expert/.cursor/rules/overview.mdc +76 -0
- package/templates/languages/python-expert/.cursor/rules/patterns-and-idioms.mdc +77 -0
- package/templates/languages/python-expert/.cursor/rules/performance.mdc +74 -0
- package/templates/languages/python-expert/.cursor/rules/testing.mdc +77 -0
- package/templates/languages/python-expert/.cursor/rules/tooling.mdc +77 -0
- package/templates/languages/python-expert/.cursor/rules/type-system.mdc +77 -0
- package/templates/languages/python-expert/.cursor/rules/web-and-apis.mdc +76 -0
- package/templates/languages/python-expert/CLAUDE.md +264 -0
- package/templates/languages/ruby-expert/.cursor/rules/concurrency-and-threading.mdc +65 -0
- package/templates/languages/ruby-expert/.cursor/rules/error-handling.mdc +69 -0
- package/templates/languages/ruby-expert/.cursor/rules/idioms-and-style.mdc +76 -0
- package/templates/languages/ruby-expert/.cursor/rules/overview.mdc +60 -0
- package/templates/languages/ruby-expert/.cursor/rules/performance.mdc +68 -0
- package/templates/languages/ruby-expert/.cursor/rules/rails-and-frameworks.mdc +60 -0
- package/templates/languages/ruby-expert/.cursor/rules/testing.mdc +56 -0
- package/templates/languages/ruby-expert/.cursor/rules/tooling.mdc +52 -0
- package/templates/languages/ruby-expert/CLAUDE.md +102 -0
- package/templates/languages/rust-expert/.cursor/rules/concurrency.mdc +69 -0
- package/templates/languages/rust-expert/.cursor/rules/ecosystem-and-tooling.mdc +76 -0
- package/templates/languages/rust-expert/.cursor/rules/error-handling.mdc +76 -0
- package/templates/languages/rust-expert/.cursor/rules/overview.mdc +62 -0
- package/templates/languages/rust-expert/.cursor/rules/ownership-and-borrowing.mdc +70 -0
- package/templates/languages/rust-expert/.cursor/rules/performance-and-unsafe.mdc +70 -0
- package/templates/languages/rust-expert/.cursor/rules/testing.mdc +73 -0
- package/templates/languages/rust-expert/.cursor/rules/traits-and-generics.mdc +76 -0
- package/templates/languages/rust-expert/CLAUDE.md +283 -0
- package/templates/languages/swift-expert/.cursor/rules/concurrency.mdc +77 -0
- package/templates/languages/swift-expert/.cursor/rules/error-handling.mdc +76 -0
- package/templates/languages/swift-expert/.cursor/rules/language-features.mdc +78 -0
- package/templates/languages/swift-expert/.cursor/rules/overview.mdc +46 -0
- package/templates/languages/swift-expert/.cursor/rules/performance.mdc +69 -0
- package/templates/languages/swift-expert/.cursor/rules/swiftui.mdc +77 -0
- package/templates/languages/swift-expert/.cursor/rules/testing.mdc +75 -0
- package/templates/languages/swift-expert/.cursor/rules/tooling.mdc +77 -0
- package/templates/languages/swift-expert/CLAUDE.md +275 -0
- package/templates/professional/documentation/.cursor/rules/adr.mdc +65 -0
- package/templates/professional/documentation/.cursor/rules/api-documentation.mdc +64 -0
- package/templates/professional/documentation/.cursor/rules/code-comments.mdc +75 -0
- package/templates/professional/documentation/.cursor/rules/maintenance.mdc +58 -0
- package/templates/professional/documentation/.cursor/rules/overview.mdc +48 -0
- package/templates/professional/documentation/.cursor/rules/readme-standards.mdc +70 -0
- package/templates/professional/documentation/CLAUDE.md +120 -0
- package/templates/professional/executive-assistant/.cursor/rules/calendar.mdc +51 -0
- package/templates/professional/executive-assistant/.cursor/rules/confidentiality.mdc +53 -0
- package/templates/professional/executive-assistant/.cursor/rules/email.mdc +49 -0
- package/templates/professional/executive-assistant/.cursor/rules/meetings.mdc +39 -0
- package/templates/professional/executive-assistant/.cursor/rules/overview.mdc +42 -0
- package/templates/professional/executive-assistant/.cursor/rules/prioritization.mdc +48 -0
- package/templates/professional/executive-assistant/.cursor/rules/stakeholder-management.mdc +50 -0
- package/templates/professional/executive-assistant/.cursor/rules/travel.mdc +43 -0
- package/templates/professional/executive-assistant/CLAUDE.md +620 -0
- package/templates/professional/grant-writer/.cursor/rules/budgets.mdc +55 -0
- package/templates/professional/grant-writer/.cursor/rules/compliance.mdc +47 -0
- package/templates/professional/grant-writer/.cursor/rules/funding-research.mdc +47 -0
- package/templates/professional/grant-writer/.cursor/rules/narrative.mdc +58 -0
- package/templates/professional/grant-writer/.cursor/rules/overview.mdc +68 -0
- package/templates/professional/grant-writer/.cursor/rules/post-award.mdc +59 -0
- package/templates/professional/grant-writer/.cursor/rules/review-criteria.mdc +51 -0
- package/templates/professional/grant-writer/.cursor/rules/sustainability.mdc +48 -0
- package/templates/professional/grant-writer/CLAUDE.md +577 -0
- package/templates/professional/knowledge-synthesis/.cursor/rules/document-management.mdc +51 -0
- package/templates/professional/knowledge-synthesis/.cursor/rules/knowledge-graphs.mdc +63 -0
- package/templates/professional/knowledge-synthesis/.cursor/rules/overview.mdc +74 -0
- package/templates/professional/knowledge-synthesis/.cursor/rules/research-workflow.mdc +50 -0
- package/templates/professional/knowledge-synthesis/.cursor/rules/search-retrieval.mdc +62 -0
- package/templates/professional/knowledge-synthesis/.cursor/rules/summarization.mdc +61 -0
- package/templates/professional/knowledge-synthesis/CLAUDE.md +593 -0
- package/templates/professional/life-logistics/.cursor/rules/financial-optimization.mdc +78 -0
- package/templates/professional/life-logistics/.cursor/rules/negotiation.mdc +68 -0
- package/templates/professional/life-logistics/.cursor/rules/overview.mdc +75 -0
- package/templates/professional/life-logistics/.cursor/rules/research-methodology.mdc +76 -0
- package/templates/professional/life-logistics/.cursor/rules/scheduling.mdc +68 -0
- package/templates/professional/life-logistics/.cursor/rules/task-management.mdc +47 -0
- package/templates/professional/life-logistics/CLAUDE.md +601 -0
- package/templates/professional/research-assistant/.cursor/rules/citation-attribution.mdc +61 -0
- package/templates/professional/research-assistant/.cursor/rules/information-synthesis.mdc +65 -0
- package/templates/professional/research-assistant/.cursor/rules/overview.mdc +56 -0
- package/templates/professional/research-assistant/.cursor/rules/research-methodologies.mdc +54 -0
- package/templates/professional/research-assistant/.cursor/rules/search-strategies.mdc +57 -0
- package/templates/professional/research-assistant/.cursor/rules/source-evaluation.mdc +59 -0
- package/templates/professional/research-assistant/CLAUDE.md +318 -0
- package/templates/professional/wellness-orchestrator/.cursor/rules/adaptive-planning.mdc +69 -0
- package/templates/professional/wellness-orchestrator/.cursor/rules/data-integration.mdc +60 -0
- package/templates/professional/wellness-orchestrator/.cursor/rules/fitness-programming.mdc +66 -0
- package/templates/professional/wellness-orchestrator/.cursor/rules/nutrition-planning.mdc +57 -0
- package/templates/professional/wellness-orchestrator/.cursor/rules/overview.mdc +76 -0
- package/templates/professional/wellness-orchestrator/.cursor/rules/sleep-optimization.mdc +68 -0
- package/templates/professional/wellness-orchestrator/CLAUDE.md +573 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: C# Architecture
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# C# Architecture
|
|
7
|
+
|
|
8
|
+
Guidelines for C# scripting patterns, MonoBehaviour lifecycle, and testable code in Unity.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
|
|
12
|
+
- Prefer composition over inheritance for game object behaviour
|
|
13
|
+
- Keep MonoBehaviours thin; delegate logic to plain C# classes
|
|
14
|
+
- Use ScriptableObjects for shared data and event channels
|
|
15
|
+
- Favour async/await (UniTask) over coroutines for complex flows
|
|
16
|
+
- Design for testability: inject dependencies, avoid static singletons
|
|
17
|
+
|
|
18
|
+
## Lifecycle Method Usage
|
|
19
|
+
|
|
20
|
+
| Method | Use For | Avoid |
|
|
21
|
+
|--------|---------|-------|
|
|
22
|
+
| Awake | Cache component refs, self-init | Accessing other objects |
|
|
23
|
+
| OnEnable | Subscribe to events | Heavy computation |
|
|
24
|
+
| Start | Cross-object init | Anything needed by another Awake |
|
|
25
|
+
| Update | Per-frame game logic | Physics, heavy allocations |
|
|
26
|
+
| FixedUpdate | Physics forces, raycasts | Camera movement, input |
|
|
27
|
+
| LateUpdate | Camera follow | Physics manipulation |
|
|
28
|
+
| OnDisable | Unsubscribe events | Accessing destroyed objects |
|
|
29
|
+
|
|
30
|
+
## ScriptableObject Patterns
|
|
31
|
+
|
|
32
|
+
| Pattern | Purpose |
|
|
33
|
+
|---------|---------|
|
|
34
|
+
| Data Container | Decouple config from behaviour (WeaponData, EnemyConfig) |
|
|
35
|
+
| Event Channel | Decouple publishers/subscribers (OnPlayerDied) |
|
|
36
|
+
| Runtime Set | Track active instances without FindObjectsOfType |
|
|
37
|
+
| Enum Replacement | Extensible type-safe categories (DamageType) |
|
|
38
|
+
|
|
39
|
+
## Async: Coroutines vs UniTask
|
|
40
|
+
|
|
41
|
+
| Feature | Coroutines | UniTask |
|
|
42
|
+
|---------|------------|---------|
|
|
43
|
+
| Cancellation | StopCoroutine (fragile) | CancellationToken (robust) |
|
|
44
|
+
| Return values | Not supported | Full Task<T> support |
|
|
45
|
+
| Error handling | Silently swallowed | try/catch |
|
|
46
|
+
| GC allocation | IEnumerator allocates | Zero-alloc |
|
|
47
|
+
|
|
48
|
+
## Testable Code
|
|
49
|
+
|
|
50
|
+
- **Thin MonoBehaviours**: Cache refs, forward input, apply results, manage lifecycle
|
|
51
|
+
- **Pure C# classes**: State machines, damage calc, inventory logic, pathfinding
|
|
52
|
+
- **Edit Mode tests**: NUnit + Unity Test Framework for pure C#, ScriptableObjects
|
|
53
|
+
- **Play Mode tests**: Unity Test Framework for component interactions, scenes
|
|
54
|
+
|
|
55
|
+
## Common Pitfalls
|
|
56
|
+
|
|
57
|
+
**Deep Inheritance**: `BossEnemy : RangedEnemy : BaseEnemy` with 5 levels of overrides. Compose small components instead: Health, Attack, Movement.
|
|
58
|
+
|
|
59
|
+
**Singletons Everywhere**: Hidden dependencies, untestable code. Use a service locator or DI; pass deps explicitly.
|
|
60
|
+
|
|
61
|
+
**Not Caching GetComponent**: Calling `GetComponent<Rigidbody>()` every frame. Cache in Awake.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Multiplayer and Networking
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Multiplayer and Networking
|
|
7
|
+
|
|
8
|
+
Guidelines for building multiplayer games with Netcode for GameObjects.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
|
|
12
|
+
- Server is authoritative for all gameplay state; never trust the client
|
|
13
|
+
- Synchronize only gameplay state, not visual effects
|
|
14
|
+
- Design for latency from day one; add prediction and interpolation early
|
|
15
|
+
- Test with simulated latency and packet loss, not just localhost
|
|
16
|
+
|
|
17
|
+
## Data Flow
|
|
18
|
+
|
|
19
|
+
- Client sends input via **ServerRpc**
|
|
20
|
+
- Server validates, simulates, updates **NetworkVariables**
|
|
21
|
+
- Clients receive state, reconcile predictions, interpolate remote entities
|
|
22
|
+
|
|
23
|
+
## RPC and Sync Guidelines
|
|
24
|
+
|
|
25
|
+
| Type | Direction | Use For |
|
|
26
|
+
|------|-----------|---------|
|
|
27
|
+
| ServerRpc | Client -> Server | Player input, action requests |
|
|
28
|
+
| ClientRpc | Server -> Client(s) | VFX triggers, audio cues |
|
|
29
|
+
| NetworkVariable | Server -> All | Gameplay state (health, position) |
|
|
30
|
+
|
|
31
|
+
**Sync**: Position, health, score, equipped item, match timer
|
|
32
|
+
**Don't sync**: Particles, animation blends, footsteps, camera shake, UI animations
|
|
33
|
+
|
|
34
|
+
## Lag Compensation
|
|
35
|
+
|
|
36
|
+
| Technique | Purpose |
|
|
37
|
+
|-----------|---------|
|
|
38
|
+
| Client-side prediction | Responsive local movement; apply input immediately |
|
|
39
|
+
| Server reconciliation | Correct prediction errors from last confirmed state |
|
|
40
|
+
| Entity interpolation | Smooth remote entities; buffer 2-3 states |
|
|
41
|
+
| Lag compensation | Fair hit detection; rewind server to client view time |
|
|
42
|
+
|
|
43
|
+
## Network Testing
|
|
44
|
+
|
|
45
|
+
| Condition | Simulate | Expected |
|
|
46
|
+
|-----------|----------|----------|
|
|
47
|
+
| 50ms RTT | Typical broadband | Smooth with prediction |
|
|
48
|
+
| 150ms RTT | Mobile / cross-region | Noticeable but playable |
|
|
49
|
+
| 5% packet loss | Unstable WiFi | Interpolation hides gaps |
|
|
50
|
+
|
|
51
|
+
Use Unity Transport simulator or Clumsy/NetEm.
|
|
52
|
+
|
|
53
|
+
## Security
|
|
54
|
+
|
|
55
|
+
| Threat | Mitigation |
|
|
56
|
+
|--------|-----------|
|
|
57
|
+
| Speed hacking | Server validates movement delta per tick |
|
|
58
|
+
| Packet injection | Validate all ServerRpc params on server |
|
|
59
|
+
| State spoofing | Only server writes NetworkVariables |
|
|
60
|
+
|
|
61
|
+
## Common Pitfalls
|
|
62
|
+
|
|
63
|
+
**Trusting Client State**: Client sends `TakeDamageServerRpc(999)` and server applies directly. Server must calculate damage from weapon data and hit validation.
|
|
64
|
+
|
|
65
|
+
**Syncing Visual Data**: NetworkVariable for particle colors and animation params. Sync gameplay state; derive visuals locally.
|
|
66
|
+
|
|
67
|
+
**No Prediction on Owned Objects**: Waiting for server confirmation before moving local player. Apply input immediately, reconcile on server state arrival.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Unity Dev Expert Overview
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Unity Dev Expert Overview
|
|
7
|
+
|
|
8
|
+
Principal-level guidelines for Unity game development covering architecture, performance, and cross-platform delivery.
|
|
9
|
+
|
|
10
|
+
## Scope
|
|
11
|
+
|
|
12
|
+
- C# scripting architecture and MonoBehaviour lifecycle
|
|
13
|
+
- ECS/DOTS for high-performance scenarios
|
|
14
|
+
- Physics simulation, collision detection, raycasting
|
|
15
|
+
- Shader programming (Shader Graph, HLSL, URP, HDRP)
|
|
16
|
+
- UI development (UI Toolkit, UGUI)
|
|
17
|
+
- Multiplayer networking (Netcode for GameObjects)
|
|
18
|
+
- Performance profiling, memory management, optimization
|
|
19
|
+
- Asset pipeline, Addressables, platform builds
|
|
20
|
+
|
|
21
|
+
## Core Principles
|
|
22
|
+
|
|
23
|
+
- **Composition Over Inheritance**: MonoBehaviours are components, not base classes. Combine small, focused components.
|
|
24
|
+
- **Data-Oriented Mindset**: Think data layout, cache coherence, batch processing. ECS/DOTS formalizes this.
|
|
25
|
+
- **Profile Before Optimizing**: Use Unity Profiler on target device. Never guess bottlenecks.
|
|
26
|
+
- **Deterministic Lifecycle**: Know Awake/OnEnable/Start/Update/FixedUpdate/LateUpdate order. Init-order bugs are common.
|
|
27
|
+
- **Platform-Aware Design**: Frame budgets, input, memory, and rendering vary across mobile/console/VR/desktop.
|
|
28
|
+
- **Testable Architecture**: Separate logic from MonoBehaviour. Keep pure C# testable outside the engine.
|
|
29
|
+
|
|
30
|
+
## When to Use ECS vs MonoBehaviour
|
|
31
|
+
|
|
32
|
+
| Criteria | MonoBehaviour | ECS/DOTS |
|
|
33
|
+
|----------|---------------|----------|
|
|
34
|
+
| Entity count | <1,000 | 1,000-1,000,000+ |
|
|
35
|
+
| Team familiarity | Standard Unity | Requires DOTS training |
|
|
36
|
+
| Iteration speed | Fast prototyping | Slower initial setup |
|
|
37
|
+
| Performance ceiling | Moderate | Very high (Burst + Jobs) |
|
|
38
|
+
| Third-party assets | Full support | Limited |
|
|
39
|
+
|
|
40
|
+
## Key Technology Choices
|
|
41
|
+
|
|
42
|
+
| System | Primary | When to Consider Alternatives |
|
|
43
|
+
|--------|---------|-------------------------------|
|
|
44
|
+
| Input | Input System Package | Never use legacy Input |
|
|
45
|
+
| Asset Loading | Addressables | Avoid Resources.Load |
|
|
46
|
+
| UI | UI Toolkit (new) / UGUI (VR/world-space) | IMGUI for debug only |
|
|
47
|
+
| Networking | Netcode for GameObjects | Mirror/Photon for specific needs |
|
|
48
|
+
| Rendering | URP (most) / HDRP (high-end PC/console) | Built-in for legacy only |
|
|
49
|
+
|
|
50
|
+
## Common Pitfalls
|
|
51
|
+
|
|
52
|
+
**GC Allocations in Hot Paths**: Strings, LINQ, arrays in Update. Cache allocations, use StringBuilder.
|
|
53
|
+
|
|
54
|
+
**Ignoring Execution Order**: Assuming Start runs before another Awake. Use Script Execution Order or explicit init chains.
|
|
55
|
+
|
|
56
|
+
**Over-Networking**: Syncing particles and animations. Sync authoritative gameplay state; derive visuals locally.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Performance and Optimization
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Performance and Optimization
|
|
7
|
+
|
|
8
|
+
Guidelines for profiling, memory management, draw call reduction, and platform tuning in Unity.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
|
|
12
|
+
- Profile on the target device, not the Editor
|
|
13
|
+
- Fix the biggest bottleneck first; don't scatter-shot optimize
|
|
14
|
+
- Set explicit frame budgets per platform before development
|
|
15
|
+
- Measure before and after every optimization
|
|
16
|
+
|
|
17
|
+
## Frame Budgets
|
|
18
|
+
|
|
19
|
+
| Platform | FPS | Budget | Max Draw Calls | Max Tris |
|
|
20
|
+
|----------|-----|--------|----------------|----------|
|
|
21
|
+
| Mobile (low) | 30 | 33.3ms | <100 | <100K |
|
|
22
|
+
| Mobile (high) | 60 | 16.6ms | <200 | <300K |
|
|
23
|
+
| Console | 60 | 16.6ms | <2,000 | <2M |
|
|
24
|
+
| VR (Quest) | 72 | 13.8ms | <100 | <150K |
|
|
25
|
+
| VR (PCVR) | 90 | 11.1ms | <1,000 | <1M |
|
|
26
|
+
|
|
27
|
+
## GC Allocation Hotspots
|
|
28
|
+
|
|
29
|
+
| Source | Fix |
|
|
30
|
+
|--------|-----|
|
|
31
|
+
| String concat in Update | Use StringBuilder once |
|
|
32
|
+
| LINQ in hot paths | Manual loops |
|
|
33
|
+
| Boxing value types | Generic collections |
|
|
34
|
+
| Lambda captures | Cache delegate |
|
|
35
|
+
| FindObjectsOfType | Cache results, runtime sets |
|
|
36
|
+
| foreach on non-List | for-loop or List<T> |
|
|
37
|
+
|
|
38
|
+
## Draw Call Reduction
|
|
39
|
+
|
|
40
|
+
| Technique | How |
|
|
41
|
+
|-----------|-----|
|
|
42
|
+
| SRP Batcher | Auto with URP/HDRP; batches by shader |
|
|
43
|
+
| GPU Instancing | Same mesh + material in one call |
|
|
44
|
+
| Static Batching | Combines static meshes at build time |
|
|
45
|
+
| Texture Atlasing | Reduces material switches |
|
|
46
|
+
|
|
47
|
+
## Memory Budgets
|
|
48
|
+
|
|
49
|
+
| Platform | Budget | Texture Budget |
|
|
50
|
+
|----------|--------|----------------|
|
|
51
|
+
| Mobile (2GB) | <600MB | <200MB |
|
|
52
|
+
| Mobile (4GB) | <1.2GB | <400MB |
|
|
53
|
+
| Quest 2/3 | <1.5GB | <512MB |
|
|
54
|
+
|
|
55
|
+
## Texture Formats
|
|
56
|
+
|
|
57
|
+
- **iOS/Android (modern)**: ASTC 6x6
|
|
58
|
+
- **Android (old)**: ETC2 fallback
|
|
59
|
+
- **PC/Console**: BC7
|
|
60
|
+
|
|
61
|
+
## Platform-Specific Settings
|
|
62
|
+
|
|
63
|
+
| Platform | Critical Settings |
|
|
64
|
+
|----------|------------------|
|
|
65
|
+
| iOS | Metal API, ASTC textures, IL2CPP |
|
|
66
|
+
| Android | Vulkan primary, GLES 3.2 fallback |
|
|
67
|
+
| Quest VR | Single-pass instanced, fixed foveated rendering |
|
|
68
|
+
| WebGL | Code stripping, compressed textures, no threads |
|
|
69
|
+
|
|
70
|
+
## Common Pitfalls
|
|
71
|
+
|
|
72
|
+
**Editor-Only Profiling**: Editor overhead distorts results. Deploy dev builds to target device, connect Profiler via USB/IP.
|
|
73
|
+
|
|
74
|
+
**Premature Optimization**: Writing Burst jobs for menu screens. Identify actual bottlenecks via Profiler first.
|
|
75
|
+
|
|
76
|
+
**GC in Hot Loops**: LINQ, string concat, or `new List<T>()` inside Update/FixedUpdate. Pre-allocate everything.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Physics and Rendering
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Physics and Rendering
|
|
7
|
+
|
|
8
|
+
Guidelines for physics systems, collision management, render pipelines, and shaders in Unity.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
|
|
12
|
+
- Use physics for physics, not gameplay triggers (prefer overlap queries)
|
|
13
|
+
- Always set collision layers and layer masks to avoid unnecessary checks
|
|
14
|
+
- Select the render pipeline at project start; switching later is costly
|
|
15
|
+
- Profile GPU on target hardware, not in the Editor
|
|
16
|
+
|
|
17
|
+
## Physics System Selection
|
|
18
|
+
|
|
19
|
+
| Need | Recommended | Notes |
|
|
20
|
+
|------|-------------|-------|
|
|
21
|
+
| Player movement (arcade) | CharacterController | Built-in slopes, steps |
|
|
22
|
+
| Player movement (realistic) | Rigidbody + capsule | Responds to forces |
|
|
23
|
+
| Hitscan weapons | Physics.Raycast | Instant, use NonAlloc |
|
|
24
|
+
| Slow projectiles | Rigidbody + collider | Gravity, bounce for free |
|
|
25
|
+
| Fast projectiles | Raycast per frame | Prevents tunneling |
|
|
26
|
+
| Area detection | OverlapSphere/Box | No rigidbody needed |
|
|
27
|
+
|
|
28
|
+
## Render Pipeline Comparison
|
|
29
|
+
|
|
30
|
+
| Feature | URP | HDRP | Built-in |
|
|
31
|
+
|---------|-----|------|----------|
|
|
32
|
+
| Targets | All platforms | PC, Console | Legacy only |
|
|
33
|
+
| SRP Batcher | Yes | Yes | No |
|
|
34
|
+
| Ray tracing | Limited | Full | No |
|
|
35
|
+
| Custom passes | RenderFeature | CustomPass | CommandBuffer |
|
|
36
|
+
|
|
37
|
+
## Lighting Strategy
|
|
38
|
+
|
|
39
|
+
- **Static light?** Baked lightmaps (best performance)
|
|
40
|
+
- **Dynamic, few objects?** Realtime point/spot (limit range)
|
|
41
|
+
- **Dynamic, many objects?** Mixed lighting (bake indirect, realtime direct)
|
|
42
|
+
- **VR**: Baked strongly preferred; realtime shadows expensive at 90 FPS
|
|
43
|
+
|
|
44
|
+
## LOD Guidelines
|
|
45
|
+
|
|
46
|
+
| Level | Screen % | Detail |
|
|
47
|
+
|-------|----------|--------|
|
|
48
|
+
| LOD0 | 0-15% | Full mesh, all VFX |
|
|
49
|
+
| LOD1 | 15-30% | 50% polys, simplified VFX |
|
|
50
|
+
| LOD2 | 30-60% | 25% polys, no VFX |
|
|
51
|
+
| Culled | >60% | Not rendered |
|
|
52
|
+
|
|
53
|
+
## Common Pitfalls
|
|
54
|
+
|
|
55
|
+
**Moving Static Colliders**: Moving a collider without a Rigidbody rebuilds the collision tree every frame. Add Kinematic Rigidbody to moving colliders.
|
|
56
|
+
|
|
57
|
+
**Mesh Colliders on Dynamic Objects**: Expensive and limited. Approximate with box/sphere/capsule compound colliders.
|
|
58
|
+
|
|
59
|
+
**No Layer Masks on Raycasts**: `Physics.Raycast(ray, out hit, 100f)` checks everything. Always pass a layer mask.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: UI Systems
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UI Systems
|
|
7
|
+
|
|
8
|
+
Guidelines for building runtime user interfaces in Unity using UI Toolkit and UGUI.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
|
|
12
|
+
- Separate UI logic (presenter) from layout (view) and game state (model)
|
|
13
|
+
- UI Toolkit for new projects with complex layouts; UGUI for world-space and VR
|
|
14
|
+
- Design responsive layouts for different screen sizes and safe areas
|
|
15
|
+
- Minimize Canvas rebuilds (UGUI) and USS recalculations (UI Toolkit)
|
|
16
|
+
|
|
17
|
+
## System Selection
|
|
18
|
+
|
|
19
|
+
| Criteria | UI Toolkit | UGUI |
|
|
20
|
+
|----------|-----------|------|
|
|
21
|
+
| New runtime UI | Preferred | Acceptable |
|
|
22
|
+
| World-space / VR | Limited | Preferred |
|
|
23
|
+
| Data binding | Built-in | Manual |
|
|
24
|
+
| Layout system | Flexbox (USS) | RectTransform anchors |
|
|
25
|
+
| Editor extensions | Primary choice | Legacy |
|
|
26
|
+
|
|
27
|
+
## MVP Architecture
|
|
28
|
+
|
|
29
|
+
- **Model** (ScriptableObject / C#): Game state data, raises change events, no UI refs
|
|
30
|
+
- **Presenter** (MonoBehaviour): Queries view in OnEnable, subscribes to model, forwards input
|
|
31
|
+
- **View** (UXML+USS / Canvas): Pure layout and style, no game logic
|
|
32
|
+
|
|
33
|
+
## UGUI Performance
|
|
34
|
+
|
|
35
|
+
| Problem | Solution |
|
|
36
|
+
|---------|----------|
|
|
37
|
+
| Canvas rebuild spikes | Split static/dynamic into sub-canvases |
|
|
38
|
+
| Nested LayoutGroup stutter | Avoid nesting > 2 levels |
|
|
39
|
+
| Overdraw on mobile | Reduce layers, sprite packing |
|
|
40
|
+
| Raycast on everything | Disable Raycast Target on non-interactive elements |
|
|
41
|
+
|
|
42
|
+
Rule: Elements that change together share a Canvas. Different update rates get separate Canvases.
|
|
43
|
+
|
|
44
|
+
## Responsive Design
|
|
45
|
+
|
|
46
|
+
| Platform | Strategy | Key Consideration |
|
|
47
|
+
|----------|----------|-------------------|
|
|
48
|
+
| Mobile | Flex column | Touch target min 44x44 dp |
|
|
49
|
+
| Desktop | Fixed or scaled | Mouse hover states |
|
|
50
|
+
| Console TV | Overscan safe area | Large text, 10-foot UI |
|
|
51
|
+
| VR | World-space 2-3m | No small text, gaze targets |
|
|
52
|
+
|
|
53
|
+
## Common Pitfalls
|
|
54
|
+
|
|
55
|
+
**Querying Elements Every Frame**: Calling `root.Q<Label>("score")` in Update. Cache the reference in OnEnable.
|
|
56
|
+
|
|
57
|
+
**Ignoring Raycast Target**: Leaving it enabled on all Images and Text. Disable on non-interactive elements.
|
|
58
|
+
|
|
59
|
+
**Hardcoded Pixel Sizes**: Use USS relative units, CanvasScaler with reference resolution, or DPI scaling.
|