Cordenex v2 Architecture
This document describes the internal design and data flow of the Cordenex Autonomous Engineering system.
Component Overview
Cordenex is built in Go for maximum speed and zero-dependency binaries.
CLI Layer: Handles user input and displays the rich terminal UI.Orchestrator: Decides if a task is simple (Chat) or complex (Agent).Engine: The core execution loop that coordinates between LLMs and Tools.Tools: Specialized functions for filesystem, shell, and codebase search.Providers: Unified abstraction for Anthropic, OpenAI, etc.
The Agentic Loop
Cordenex follows a strict Plan-Act-Verify loop:
- Thinking: The AI generates a reasoning plan.
- Tool Call: The AI requests tool execution (e.g.,
write_file). - Approval: The PermissionManager checks if user confirmation is required.
- Parallel Execution: Tools are executed concurrently to minimize latency.
- Self-Healing: If a tool fails, the Engine provides corrective feedback to the AI.
Tool System
Tools are designed to be safe and robust:
- Secure Pathing: Prevents path traversal on all operating systems.
- Undo State: Every file modification is reversible.
- Search API: Built-in regex and glob support for deep codebase analysis.