How cortesi/tenx works
Main Components
a) Core Library (libtenx):
• Configuration Management
• Model Integration Layer
• Dialect System
• Patch Management
• Session Management
b) CLI Applications:
• tenx (main application)
• ttrial (benchmarking/testing tool)
Component Relationships
┌─ User Interface Layer ─────────────────────┐
• CLI (tenx, ttrial) │
• ┬─────────────────────────┘
• ↓
┌─ Core Library (libtenx) ──────────────────┐
• ┌─────────────┐ ┌──────────┐ ┌────────┐ │
• Configuration│ │ Session │ │Context │ │
• Management │←→│ Manager │←→│Handler │ │
• ┘ └──────────┘ └────────┘ │
• ↑ ↑ ↑ │
• ┌─────────────┐ ┌──────────┐ ┌────────┐ │
• Dialect │←→│ Model │←→│ Patch │ │
• System │ │Interface │ │Manager │ │
• ┘ └──────────┘ └────────┘ │
• ┬─────────────────────────┘
• ↓
┌─ External Services ──────────────────────┐
• OpenAI │ Anthropic │ Google │ DeepInfra │
• DeepSeek │ xAI │ Groq │ Ollama │
• ┘
Important Details
a) Model Integration Layer:
• Supported models (OpenAI, Anthropic, Google, etc.)
• Model-agnostic nature of the system
b) Dialect System:
• Various dialect types (edit, replace, smart, system, udiff)
• Connection to patch management
c) Session Management:
• Undo/retry capabilities
• Connection to configuration system
Specific Implementation Notes
• Notes about the preflight and post-patch check systems
• Where benchmarking occurs (ttrial integration)
• Configuration file (.tenx.ron) interaction points