# js/physics/rules/ — agents.md RC-375D84 S-2. Module map: `MODULES.md`; runtime model: `architecture.md`. Installs into `P`: checkEndStates, birdsRemaining, starsFor. - Win/lose arbitration (called from step): all enemies dead -> won, no bird left in play with enemies alive -> lost. S-5 (RC-375D84, landed 2026-09-29): a LANDED bird counts as a bird still in play — do not declare `lost` while one is out in the world (it can still fall, smash and kill). `starsFor(g)` maps score to the level's three star thresholds. - Keep this submodule free of physics: it decides, it does not move anything.