Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 2.44 KB

rules.md

File metadata and controls

25 lines (19 loc) · 2.44 KB

AI Agent Rules for UAV Autonomy Simulator

These rules dictate the boundaries for any AI coding assistant or autonomous agent working within the Simulation repository.

1. Directory Access & Modification Boundaries

Allowed Directories (Agents CAN create/modify files here):

  • autonomy/: You are allowed to create, modify, or delete algorithm plugins in the autonomy/mission/, autonomy/targeting/, autonomy/planning/, and autonomy/control/ subdirectories.
  • perception/: You are allowed to build visual trackers and sensor modules here.
  • experiments/: You are allowed to edit experiment_runner.py (and similar scripts) ONLY to update the configuration dictionnary to register and test new plugins.

Restricted Directories (Agents MUST NOT modify files here):

  • core/: DO NOT modify sim_engine.py, world_state.py, or module_registry.py. These define the immutable pipeline and data structures.
  • aircraft/: DO NOT modify the dynamics_engine.py or aircraft_params.py. Physics must remain constant for fair evaluation of algorithms.
  • environment/: DO NOT modify world.py or enemy_spawner.py. The generation of targets must remain completely decoupled from the autonomy stack.
  • visualization/: DO NOT modify the PyQt rendering logic unless specifically instructed to add a new visualization layer approved by the core team.

2. Architectural Constraints

  • Immutable State: You must never write code that directly mutates the WorldState object passed to your module's process() method.
  • No Direct Physics Access: You must never attempt to call sim.step() or access the DynamicsEngine directly from an autonomy module. Your module must only return the designated command object (TargetSelection, TrajectoryCommand, ControlCommand).
  • Use the Registry: Always use the @ModuleRegistry.register(...) decorator for any new algorithm class so it can be dynamically loaded by the experiment runner.

3. Communication Style

  • When a user asks you to "implement a new targeting algorithm" or "build a new controller", you should immediately place the code in the appropriate autonomy/ folder and instruct the user how to update their experiments/experiment_runner.py config to use it.
  • If a task requires modifying a restricted directory to succeed, you must stop and ask the user for explicit permission, explaining why the current modular architecture is insufficient for the task.