Summary
Implement an AgentAdapter for Aider, allowing CodeFrame to use Aider's established code editing capabilities as an execution engine.
Parent issue: #408
Motivation
Aider is a mature, open-source AI coding assistant with strong file editing capabilities and multi-model support. It has a different interaction model (message + explicit file list) that complements CodeFrame's orchestration.
Scope
New module: core/engines/aider.py
AiderAdapter implementing AgentAdapter:
class AiderAdapter:
name = "aider"
requires_api_key = {} # Aider manages its own API keys
def execute(self, task_prompt, workspace_path, context, timeout_ms):
# 1. Build file list from context
# 2. Launch: aider --message <prompt> --yes-always <files>
# with cwd=workspace_path
# 3. Capture output
# 4. Parse results into AgentResult
...
-
Aider CLI invocation:
--message: task prompt from context packager
--yes-always: auto-confirm for automated execution
--no-auto-commits: let CodeFrame manage git (important!)
- File list from
context.relevant_files
--model: configurable (default: whatever Aider's default is)
-
Output parsing:
- Parse Aider's output for success/failure indicators
- Detect modified files from Aider's output or git diff
- Extract summary from Aider's completion message
-
Configuration:
aider_path: path to Aider binary (default: aider)
aider_model: LLM model to use (optional override)
aider_flags: additional CLI flags
Key Design Decisions
--no-auto-commits: Critical — CodeFrame owns the git workflow, not Aider. Aider should modify files but not commit.
- File list management: CodeFrame's context packager identifies relevant files; Aider receives them explicitly. This avoids Aider's own repo-scanning which might conflict with CodeFrame's context.
- Model agnostic: Aider supports Claude, GPT-4, etc. Let users configure which model Aider uses independently.
Acceptance Criteria
Dependencies
Summary
Implement an
AgentAdapterfor Aider, allowing CodeFrame to use Aider's established code editing capabilities as an execution engine.Parent issue: #408
Motivation
Aider is a mature, open-source AI coding assistant with strong file editing capabilities and multi-model support. It has a different interaction model (message + explicit file list) that complements CodeFrame's orchestration.
Scope
New module:
core/engines/aider.pyAiderAdapterimplementingAgentAdapter:Aider CLI invocation:
--message: task prompt from context packager--yes-always: auto-confirm for automated execution--no-auto-commits: let CodeFrame manage git (important!)context.relevant_files--model: configurable (default: whatever Aider's default is)Output parsing:
Configuration:
aider_path: path to Aider binary (default:aider)aider_model: LLM model to use (optional override)aider_flags: additional CLI flagsKey Design Decisions
--no-auto-commits: Critical — CodeFrame owns the git workflow, not Aider. Aider should modify files but not commit.Acceptance Criteria
AiderAdapterimplementsAgentAdapterprotocol--message,--yes-always,--no-auto-commitscf work start <id> --execute --engine aiderDependencies
pip install aider-chat)