# AI Development Core Rules

**Activation Mode**: Always On

<ai_development_guidelines>
- This is an AI setup repository template designed for AI-related projects
- Prioritize AI integration patterns and best practices in all code suggestions
- Consider model performance, API efficiency, and token usage optimization
- Design for scalability with AI workloads and multiple service integrations
- Follow Node.js/Next.js development patterns as the primary technology stack
</ai_development_guidelines>

<repository_context>
- Repository is currently in minimal state with basic configuration files
- Use TypeScript when adding JavaScript functionality for better type safety
- Implement comprehensive error handling for AI service failures and rate limits
- Structure AI-related code in logical, modular components under src/lib/
- Follow the existing patterns established in .cursorrules and other AI configuration files
</repository_context>

<code_quality_standards>
- Write clean, readable, and well-documented code with meaningful function names
- Use modern ES6+ JavaScript/TypeScript features and async/await patterns
- Implement proper async/await patterns for AI API calls with timeout handling
- Include JSDoc comments for complex AI algorithms and integrations
- Follow established linting and formatting rules when they exist
</code_quality_standards>