Files
labFusion/AGENTS.md

81 lines
3.1 KiB
Markdown

# LabFusion Agent Instructions
## Project Overview
LabFusion is a unified dashboard and integration hub for homelab services, built with a polyglot microservices architecture using Java Spring Boot, Python FastAPI, Node.js Express, and React.
## Documentation References
- **Main README**: @README.md
- **Project Structure**: @docs/structure.txt
- **Progress Tracking**: @docs/progress.md
- **Clean Code Guide**: @CLEAN_CODE.md
## Service Documentation
Each service has comprehensive documentation:
- **API Gateway**: @services/api-gateway/README.md and @services/api-gateway/CLEAN_CODE.md
- **Service Adapters**: @services/service-adapters/README.md and @services/service-adapters/CLEAN_CODE.md
- **API Docs**: @services/api-docs/README.md and @services/api-docs/CLEAN_CODE.md
## Frontend Documentation
- **Frontend README**: @frontend/README.md
- **Clean Code Guide**: @frontend/CLEAN_CODE.md
- **Resilience Features**: @frontend/RESILIENCE.md
## Code Style
Follow the naming conventions and standards defined in @CLEAN_CODE.md:
- **Java**: PascalCase classes, camelCase methods, UPPER_SNAKE_CASE constants
- **Python**: PascalCase classes, snake_case functions, UPPER_SNAKE_CASE constants
- **JavaScript/TypeScript**: PascalCase classes, camelCase functions, UPPER_SNAKE_CASE constants
## Architecture
Follow the architecture patterns detailed in each service's CLEAN_CODE.md:
- **Service Structure**: Repository pattern, dependency injection, clear separation of concerns
- **Frontend Structure**: Functional components, custom hooks, error boundaries, component composition
## Clean Code Principles
Apply the SOLID principles detailed in @CLEAN_CODE.md:
- Single Responsibility Principle
- Open/Closed Principle
- Dependency Inversion Principle
- Interface Segregation Principle
## API Standards
Follow the API standards defined in each service's documentation:
- OpenAPI documentation for all endpoints
- Consistent error response format
- Proper HTTP status codes
- Input validation and sanitization
## Testing
Follow the testing strategies outlined in each service's CLEAN_CODE.md:
- Unit tests for business logic
- Integration tests for API endpoints
- End-to-end tests for critical flows
## Quality Assurance
Use the code review checklists from @CLEAN_CODE.md:
- Naming conventions followed
- Error handling implemented
- Documentation updated
- Tests written and passing
- Clean code principles followed
## Performance
Follow the performance guidelines from @CLEAN_CODE.md:
- Database optimization
- Caching strategies
- Resource management
- API performance optimization
## When Working on This Project
1. **Always update documentation** when making changes
2. **Follow clean code principles** in all implementations
3. **Write tests** for new functionality
4. **Use consistent naming conventions** across all languages
5. **Implement proper error handling** in all services
6. **Update progress tracking** when completing tasks
7. **Maintain code quality** through regular reviews
8. **Keep documentation current** and comprehensive
Remember: Good documentation is as important as good code. When in doubt, document it!