This section provides comprehensive architectural documentation for Aurelis.
Aurelis follows enterprise software development principles:
Built exclusively for GitHub models via Azure AI Inference:
┌─────────────────────────────────────────────────────────────┐
│ Aurelis CLI Interface │
├─────────────────────────────────────────────────────────────┤
│ Commands: init | config | models | generate | analyze │
│ Shell: Interactive mode with context preservation │
└─────────────────────┬───────────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────────┐
│ Core Orchestration Layer │
├─────────────────────────────────────────────────────────────┤
│ Model Orchestrator: Request routing and processing │
│ Task Router: Intelligent model selection │
│ Cache Manager: Response caching and optimization │
└─────────────────────┬───────────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────────┐
│ GitHub Models Integration │
├─────────────────────────────────────────────────────────────┤
│ Azure AI Inference API Client │
│ Model Types: Codestral, GPT-4o, Cohere, Llama, Mistral │
│ Authentication: GitHub Token via Bearer Auth │
└─────────────────────┬───────────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────────┐
│ Supporting Services │
├─────────────────────────────────────────────────────────────┤
│ Configuration: YAML + Environment Variables │
│ Security: Encrypted token storage │
│ Logging: Structured logging with correlation IDs │
│ Error Handling: Custom exceptions with context │
└─────────────────────────────────────────────────────────────┘
Decision: Use only GitHub models via Azure AI Inference Rationale:
Decision: Built on asyncio for all I/O operations Rationale:
Decision: YAML configuration with environment overrides Rationale:
Decision: Clean separation of concerns Rationale:
1. User sets GITHUB_TOKEN environment variable
2. Aurelis reads token from environment or config
3. Token encrypted and stored in secure storage
4. API requests use Bearer token authentication
5. Token validation and refresh handled automatically
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Request Hash │───▶│ Cache Lookup │───▶│ Model API Call │
│ │ │ │ │ │
│ Prompt + Model │ │ TTL: 1 hour │ │ GitHub Models │
│ + System Prompt │ │ Max: 1000 items│ │ via Azure AI │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ Cached Response │
│ │
│ Content + Meta │
└─────────────────┘
AurelisError (Base)
├── ConfigurationError
│ ├── InvalidConfigError
│ └── MissingConfigError
├── ModelError
│ ├── ModelUnavailableError
│ ├── ModelTimeoutError
│ └── ModelQuotaExceededError
├── AuthenticationError
│ ├── InvalidTokenError
│ └── TokenExpiredError
└── ProcessingError
├── AnalysisError
└── GenerationError
Local Machine
├── Python 3.8+
├── GitHub Token
├── Project Configuration (.aurelis.yaml)
└── Cache Directory (~/.aurelis/cache)