# RULES.md: Operational Guidelines for Lootah Robotics G1 3D Configurator Development This document outlines the strict rules and operational boundaries that an AI developer (such as MiniMax M2.7) must adhere to during the development of the Lootah Robotics G1 3D Configurator. These rules ensure consistency, quality, security, and alignment with project goals. ## 1. Prompt Adherence & Interpretation | Rule Category | Specific Rule | | :--- | :--- | | **Strict Prompt Following** | ALWAYS adhere strictly to the provided prompt instructions, including Context, Objective, Constraints, File Structure, and Implementation Details. | | **No Deviations** | DO NOT introduce features, libraries, or architectural changes not explicitly requested or implied by the prompt. If ambiguity arises, seek clarification. | | **Sequential Execution** | Prompts MUST be executed sequentially. The output of a previous prompt forms the context for the next. DO NOT skip or reorder prompts. | | **Contextual Awareness** | Maintain awareness of the overall project goal and the progress made in previous prompts. Each prompt builds upon the last. | ## 2. Coding Standards & Best Practices | Rule Category | Specific Rule | | :--- | :--- | | **Code Quality** | Write clean, readable, well-structured, and maintainable code. Adhere to established coding conventions (e.g., ESLint, Prettier). | | **TypeScript First** | ALWAYS use TypeScript for all new code and ensure strict type checking. Avoid `any` type unless absolutely necessary and justified. | | **Performance Minded** | Prioritize performance in all implementations, especially for 3D rendering and state management. Utilize memoization, lazy loading, and efficient algorithms. | | **Security Conscious** | Implement secure coding practices. Avoid hardcoding sensitive information. Ensure proper input validation and sanitization where applicable. | | **Error Handling** | Implement robust and graceful error handling for all potential failure points, providing informative feedback to the user and logging errors appropriately. | | **Modularity** | Design components and modules with clear responsibilities and minimal coupling. Favor composition over inheritance. | ## 3. UI/UX & Design Principles | Rule Category | Specific Rule | | :--- | :--- | | **Design System Adherence** | STRICTLY adhere to the corporate dark-tech theme of `yslootahtech.com` and the specified glassmorphism design principles. | | **Responsiveness** | ALL UI components and the 3D scene MUST be fully responsive and adapt seamlessly to various screen sizes and device orientations. | | **Accessibility (WCAG)** | Implement all UI elements with WCAG compliance in mind, including keyboard navigation, appropriate ARIA attributes, and sufficient color contrast. | | **Immersive Experience** | Ensure smooth transitions, intuitive interactions, and subtle animations to create an immersive and engaging user experience. Avoid jarring changes or performance drops. | | **User Feedback** | Provide clear and immediate visual feedback for all user interactions, loading states, and system responses. | ## 4. Asset Management | Rule Category | Specific Rule | | :--- | :--- | | **Optimized Assets** | ALL 3D models (GLB/GLTF), textures, and other media assets MUST be optimized for web delivery (e.g., compressed, appropriate polycount) without compromising visual quality. | | **External Asset Handling** | External 3D models for personas and payloads MUST be loaded dynamically and attached to the base G1 model without altering its original geometry or materials. | | **Asset Paths** | Use relative paths for assets (e.g., `public/g1-model.glb`) as specified in the prompts. | ## 5. General Operational Rules | Rule Category | Specific Rule | | :--- | :--- | | **No External Dependencies (Unapproved)** | DO NOT introduce any external libraries, packages, or APIs unless explicitly mentioned in the prompt or approved through a clarification process. | | **Self-Correction** | If an error occurs during code generation or execution, analyze the error, identify the root cause, and implement a fix. DO NOT repeat the same mistake. | | **Documentation** | Generate clear and concise inline comments for complex logic, and ensure code structure is self-documenting where possible. | | **Testing** | Implement automated tests for critical functionalities as specified in the prompts, especially for state management and core 3D interactions. | | **Ethical Considerations** | Ensure all generated code and content is ethical, unbiased, and adheres to privacy best practices. |