Files
pixelheros/.claude/rules/ai-code.md
2026-05-15 14:52:29 +08:00

678 B

paths
paths
src/ai/**

AI Code Rules

  • AI update budget: 2ms per frame maximum — profile to verify
  • All AI parameters must be tunable from data files (behavior tree weights, perception ranges, timers)
  • AI must be debuggable: implement visualization hooks for all AI state (paths, perception cones, decision trees)
  • AI should telegraph intentions — players need time to read and react
  • Prefer utility-based or behavior tree approaches over hard-coded if/else chains
  • Group AI must support formation, flanking, and role assignment from data
  • All AI state machines must log transitions for debugging
  • Never trust AI input from the network without validation