docs: establish modular architecture rules — app.js is thin orchestrator #430

Merged
Timmy merged 1 commits from claude/modular-architecture-rules into main 2026-03-24 17:12:49 +00:00

1 Commits

Author SHA1 Message Date
4d19042566 docs: establish modular architecture rules — app.js is thin orchestrator
All checks were successful
CI / validate (pull_request) Successful in 4s
CI / auto-merge (pull_request) Successful in 2s
- Replace single-file architecture with ES module system
- Define modules/ directory structure (core, data, panels, effects, terrain, portals, narrative, utils)
- Establish module contract: init(scene, state, theme) + update(elapsed, delta)
- Single animation clock (ticker.js) — no direct RAF calls from modules
- Theme is law — no inline hex codes
- Data flows through state.js — no fetch() outside data/ modules
- Atomic PRs — target <150 lines per PR
- No new code in app.js — new features go in modules

Refs #409, #429
2026-03-24 17:12:22 +00:00