Isle-Slingers/js/physics/agents.md
Relay dff5dd5b30 Clean release scrub: remove internal fleet references
Removes internal process references so the repo is presentable to an
outside audience: dropped the internal build-retrospective doc
(process log with internal terms, not useful to an outside reader),
and reworded remaining internal references in code comments and
module docs (agents.md cards, architecture.md, MODULES.md,
index.html, package.json) to generic descriptions of what changed
and when, with no behavior change -- full 47/47 suite re-run green
after the scrub, every edit verified comment/doc-only via diff.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:36:52 +00:00

1.4 KiB

js/physics/ — agents.md

Part of the modularization pass. Module map: MODULES.md; runtime model: architecture.md.

The physics module (aggregator). Deterministic, DOM-free.

  • index.js is the ONLY public face: it builds the shared scope P, runs every submodule installer against it, and exports ISLE_CORE (20-key API, see the return literal — keep it key-for-key stable; adding a key is fine, renaming or dropping one is not).
  • Submodules must load BEFORE this file in the browser (index.html order); under Node this file requires them in dependency order. Do not add a submodule without registering it in BOTH the index.html script list and this file's require list.
  • The core is the simulation's single source of truth: step(state, dt) is the only thing that mutates gameplay state. Everything else is either setup (createGame), input translation (launch), or read-only queries (activeBird, trajectory, aimVector, starsFor, birdsRemaining).
  • Invariants: fixed-timestep consumer (tests run 1/120 s); no Math.random() in gameplay paths (determinism is a test arm); no DOM access.
  • New physics behavior lands in the owning submodule, NOT here. The physics pass S-3..S-5 (landed 2026-09-29): topple/ owns board tip-over (Q1 full continuous rotation), collision/ owns velocity-aware crush + mass-weighted stacks (S-4), step/ owns the landed-bird state and its integration (S-5).