From 6b475825c29b76e6671b15ea0f08ad9fc91b1383 Mon Sep 17 00:00:00 2001 From: Jonas H Date: Sat, 28 Mar 2026 13:23:42 +0100 Subject: [PATCH] +1 --- CLAUDE.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 6078e45..82b2b5c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,6 +10,12 @@ 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 `use` statements inside functions or impl blocks** — all `use` must be at the file (module) level +**Intent-Based Architecture:** +- Systems don't call each other. Cross-system communication goes through **intents** — one-frame typed structs in `Storage` queues on `World` +- Producer inserts intent → consumer reads, acts, removes. Producer doesn't know which system processes it +- The main loop is a flat pipeline; systems self-gate based on data presence +- See `docs/self-gating-systems.md` for full pattern + examples + **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