When wiring state/functions, avoid implicit access through window.*/globalThis. Use explicit ES module imports so code is deterministic and loads correctly, and keep code in the module/plugin that owns it.

Apply this standard

Example (store access)

// Prefer this:
import { createStore } from "/js/AlpineStore.js";
import { store as notificationStore } from "/components/notifications/notification-store.js";

// Avoid this pattern:
// const rootStore = window.Alpine?.store ? window.Alpine.store("root") : undefined;
// ...then rely on root/global wiring

Checklist