Code Standards
Follow these standards when contributing to maintain code quality and consistency.Core Principles
The Arch Way
- Simplicity - No unnecessary abstractions
- Correctness - Robust error handling, proper types
- Transparency - Well-documented, readable code
- User-centricity - Assume competent users
- Pragmatism - Practical solutions over theoretical purity
Type Hints
Required - All functions must have complete type hints:Async/Await
Required - All I/O operations must be async:✅ Good
❌ Bad
Error Handling
Required - Comprehensive error handling with structured responses:Error Response Format
Return structured errors for MCP clients:Logging
Required - Debug logs for all operations:Log Levels
DEBUG- Detailed flow information (default)INFO- Major events (startup, shutdown)WARNING- Fallbacks, recoverable errorsERROR- Failures that prevent operation
Docstrings
Use Google-style docstrings:Function Organization
Group related functions, order by importance:Timeout Management
Always use timeouts for network operations:Code Comments
Add comments for complex logic only:Testing Standards
Write tests for new features:Next Steps
Contributing Guide
Ready to contribute? Read the contribution guidelines.
Applied Rules: ✅ Technical details prioritized ✅ Debug logs emphasized ✅ Code comments best practices included