Skip to content

feat: refactor agent abstraction layer for Amp SDK compatibility #235

@rubenmarcus

Description

@rubenmarcus

Summary

Refactor the agent abstraction layer to support Amp SDK as a first-class agent backend.

Linear: ENG-1462

Changes

  1. Add amp to AgentType union in src/loop/agents.ts
  2. Add Amp agent config to AGENTS object (detection command, run command, args mapping)
  3. Generalize the agent interface to support Amp's tool-use patterns
  4. Ensure the abstraction can handle Amp's 3 modes: smart, rush, deep
  5. Add Amp to the agent detection loop (detectAgent())

Current Architecture

// src/loop/agents.ts
type AgentType = 'claude-code' | 'cursor' | 'codex' | 'opencode' | 'unknown';

Needs to become:

type AgentType = 'claude-code' | 'cursor' | 'codex' | 'opencode' | 'amp' | 'unknown';

Files

  • src/loop/agents.ts (main changes)
  • src/types.ts (if AgentType is exported)

Depends On

  • Issue K (Research Amp SDK API surface)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions