Files
xpack-mcp/.github/copilot-instructions.md
lidongjie bf9071122b feat: Add platform reporting service with fail-safe design
- Add PlatformReportService for reporting platform info to XPack official platform
- Implement non-blocking background reporting to avoid impacting main operations
- Add comprehensive error handling and timeout management
- Integrate platform reporting into system configuration update workflow
- Ensure reporting failures do not affect core business logic
- Support both synchronous and asynchronous reporting modes
- Add proper logging with appropriate levels for monitoring
2025-07-30 10:48:52 +08:00

1.3 KiB

XPack Open Source Edition - Copilot Programming Guidelines

Project Architecture

Service Dependencies

  • admin_service and api_service are independent of each other, both depend on common
  • Follow layered architecture: Controller → Service → Repository

Directory Structure

services/
├── admin_service/    # Admin service
├── api_service/      # API service  
└── common/          # Common modules

Coding Standards

Code Style

  • Follow PEP 8, use type annotations and docstrings
  • Naming: use snake_case for functions/variables, PascalCase for classes
  • Imports: prioritize services/common, avoid cross-service imports

Logging Requirements

  • Must use English, use services/common/logging_config.py
  • Format: logger.info("Action completed: {context}")
  • Avoid sensitive information, include necessary context

Error Handling

  • Use error messages defined in services/common/error_msg.py
  • Unified exception handling and logging

Development Guidelines

  • Think and analyze requirements first, wait for user confirmation before writing code
  • Include appropriate logging (English format, consistent style)
  • Add method-level English comments, keep them concise
  • All comments must be written in English