# Code Guidlines **1. Asynchronous Programming Principles:** * **Primary Mechanism:** Use `async`/`await` and Promises for handling asynchronous operations. * **Non-Blocking:** Ensure the main thread remains responsive. Long-running operations (like Kokoro loading) should be handled in a way that doesn't block UI updates or animations (e.g., using `requestIdleCallback` if appropriate, or careful yielding). * **Event-Driven Communication:** Use a dedicated event system (like the `ModuleEvent` class created) for communication between the loader and modules (e.g., for progress updates, state changes, messages) instead of injecting callbacks directly from the loader into module methods. **2. Module System Standards & Dependency Management:** * **Native ES Modules:** Utilize the browser's native ES Module system (`import`/`export`, `