claude md update
This commit is contained in:
13
CLAUDE.md
13
CLAUDE.md
@@ -10,6 +10,19 @@ Pure Rust game: SDL3 windowing, wgpu rendering, rapier3d physics, low-res retro
|
|||||||
- **NO inline paths** — always add `use` statements at the top of files, never inline
|
- **NO inline paths** — always add `use` statements at the top of files, never inline
|
||||||
- **NO `use` statements inside functions or impl blocks** — all `use` must be at the file (module) level
|
- **NO `use` statements inside functions or impl blocks** — all `use` must be at the file (module) level
|
||||||
|
|
||||||
|
**Storage Parameters:**
|
||||||
|
- Functions should take specific storages they need rather than `&World` or `&mut World`
|
||||||
|
- Pass individual fields (`&world.transforms`, `&mut world.state_machines`) at the call site
|
||||||
|
- This makes data dependencies explicit for both the borrow checker and the reader
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
Pure ECS: entities are IDs, components are plain data in `HashMap<EntityHandle, T>` storages, systems are functions receiving `&mut World`. No `Rc<RefCell<>>`.
|
Pure ECS: entities are IDs, components are plain data in `HashMap<EntityHandle, T>` storages, systems are functions receiving `&mut World`. No `Rc<RefCell<>>`.
|
||||||
|
|
||||||
|
## Sub-Agents & Codebase Exploration
|
||||||
|
|
||||||
|
**Use the `explorer` sub-agent for all codebase work.** Unless the target is trivially obvious (e.g., you already know the exact file path and line number) and unless you are the explorer agent. This includes:
|
||||||
|
- Understanding existing code before making changes
|
||||||
|
- Searching for related functions/types
|
||||||
|
- Investigating bugs or architectural patterns
|
||||||
|
- Finding usages of a function across the codebase
|
||||||
|
|||||||
Reference in New Issue
Block a user