Loading...
Loading...
Loading...
include: .cursorrules.base
# Cursor Rules: Development Flavor # Rapid prototyping, debugging, and code quality enforcement include: .cursorrules.base ## Development Architecture - **API-First**: Design APIs before implementation - **Schema-Driven**: Use JSON schemas to validate all data structures - **Test-Driven**: Write tests for all DUX object validations - **Containerized**: Docker-based development environment ## Code Quality Standards - **Type Safety**: Use type hints and validation for all DUX objects - **Error Handling**: Graceful degradation and meaningful error messages - **Logging**: Structured logging for debugging and monitoring - **Documentation**: Inline docs for all public APIs and schemas ## DUX Object Processing - **Schema Validation**: All objects must pass JSON schema validation - **Evidence Linking**: Ensure all claims link to valid Provenance objects - **Atomic Operations**: Process objects independently for fault tolerance - **Batch Processing**: Support bulk operations for efficiency ## API Design Patterns - **RESTful**: Standard HTTP methods for CRUD operations - **Streaming**: Real-time processing for LLM responses - **Validation**: Input validation at API boundaries - **Error Responses**: Consistent error format with actionable messages ## Database Integration - **Neo4j**: Graph database for DUX object relationships - **Vector Search**: Embedding-based similarity search - **Indexing**: Optimize queries for common access patterns - **Backup**: Regular backups of research data and schemas ## LLM Integration - **Prompt Engineering**: Structured prompts for consistent object extraction - **Streaming**: Real-time token streaming for user feedback - **Error Recovery**: Handle LLM failures gracefully - **Cost Optimization**: Monitor and optimize token usage ## Testing Strategy - **Unit Tests**: Test individual object validation and processing - **Integration Tests**: Test API endpoints and database operations - **Schema Tests**: Validate all JSON schemas are correct - **End-to-End Tests**: Test complete workflows from upload to storage ## Development Workflow - **Local Development**: Docker Compose for local environment - **Hot Reloading**: Fast iteration for API development - **Debugging**: Comprehensive logging and error tracking - **Code Review**: Automated checks for schema compliance ## Performance Optimization - **Caching**: Cache frequently accessed DUX objects - **Async Processing**: Non-blocking operations for better UX - **Batch Operations**: Efficient bulk processing of objects - **Resource Monitoring**: Track memory and CPU usage ## Security Considerations - **Input Sanitization**: Validate and sanitize all user inputs - **Authentication**: Secure access to research data - **Data Encryption**: Encrypt sensitive research data - **Audit Logging**: Track all data access and modifications ## Deployment Patterns - **Containerization**: Docker images for consistent deployment - **Environment Variables**: Configuration via environment variables - **Health Checks**: Monitor service health and dependencies - **Rollback Strategy**: Quick rollback for failed deployments ## Monitoring & Observability - **Metrics**: Track API performance and object processing rates - **Logging**: Structured logs for debugging and analysis - **Alerting**: Notify on errors and performance issues - **Tracing**: Track requests through the system
Create React component following:
date: 2025-07-03T22:11:02.060257
This is an Elixir library that recompiles Elixir code in its AST form.
这是一个面向海外市场的环境音效网站,目标是与 A Soft Murmur 竞争。