# ravibaskey/autonomous-developer-agent architecture

> Architecture diagram of the GitHub repository ravibaskey/autonomous-developer-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ravibaskey/autonomous-developer-agent
- Repository: https://github.com/ravibaskey/autonomous-developer-agent

## Overview

myclaw is an AI coding assistant presented as a terminal CLI, with README-documented Ask, Plan, and Telegram capabilities. The evidenced runtime workflow is CLI selection → agent orchestration → model/tool calls → in-memory staging → diff review and approval → workspace changes. The sampled CLI currently dispatches Agent mode; its Ask and Plan selections only print messages, and Telegram startup is commented out. Ask-mode code is present, but Plan and Telegram implementation paths are absent from the supplied tree, so those documented capabilities are shown without inferred runtime wiring.

Main entry points: [`modes/agent/orchestrator.ts`](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/orchestrator.ts) (Agent orchestrator), [`modes/ask/orchestrator.ts`](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/ask/orchestrator.ts) (Ask mode), [`modes/agent/approval.ts`](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/approval.ts) (Approval review), [`modes/agent/tool-executor.ts`](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/tool-executor.ts) (Tool executor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Terminal entry"]
  node_wakeup["Wakeup menu<br/>[wakeup.ts]"]
  node_cli["CLI selector<br/>[cli.ts]"]
end

subgraph group_agent["Agent workflow"]
  node_agent_orch["Agent orchestrator<br/>[orchestrator.ts]"]
  node_agent_tools["Agent tools<br/>[agent-tools.ts]"]
  node_tracker["Action tracker<br/>[action-tracker.ts]"]
  node_approval["Approval review<br/>[approval.ts]"]
  node_diff["Diff formatter<br/>[diff-view.ts]"]
end

subgraph group_workspace["Workspace tools"]
  node_executor["Tool executor<br/>[tool-executor.ts]"]
  node_workspace_fs[("Project files")]
end

subgraph group_support["AI and rendering"]
  node_model_config["Model configuration<br/>[ai.config.ts]"]
  node_openrouter["OpenRouter model"]
  node_markdown["Terminal Markdown<br/>[terminal-md.ts]"]
end

subgraph group_other["Other documented modes"]
  node_ask["Ask mode<br/>[orchestrator.ts]"]
  node_plan["Plan mode"]
  node_telegram["Telegram control"]
  node_firecrawl["Firecrawl search"]
end

node_user(("User"))

node_user -->|"starts"| node_wakeup
node_wakeup -->|"opens CLI"| node_cli
node_cli -->|"starts agent"| node_agent_orch
node_agent_orch -->|"creates tools"| node_agent_tools
node_agent_orch -->|"gets model"| node_model_config
node_model_config -->|"configures provider"| node_openrouter
node_agent_orch -->|"renders response"| node_markdown
node_agent_orch -->|"requests review"| node_approval
node_agent_tools -->|"executes tools"| node_executor
node_executor -->|"logs actions"| node_tracker
node_executor -->|"reads and stages"| node_workspace_fs
node_approval -->|"updates decisions"| node_tracker
node_approval -->|"formats changes"| node_diff
node_approval -->|"renders diff"| node_markdown
node_agent_orch -->|"applies approved changes"| node_executor
node_user -->|"asks workspace"| node_ask
node_ask -->|"gets model"| node_model_config
node_ask -->|"reads workspace"| node_executor
node_ask -->|"renders answer"| node_markdown
node_ask -->|"creates web tools"| node_firecrawl
node_ask -->|"reviews saved answer"| node_approval
node_user -.->|"requests planning"| node_plan
node_user -.->|"controls remotely"| node_telegram

click node_wakeup "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/tui/wakeup.ts"
click node_cli "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/cli.ts"
click node_agent_orch "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/orchestrator.ts"
click node_agent_tools "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/agent-tools.ts"
click node_tracker "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/action-tracker.ts"
click node_approval "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/approval.ts"
click node_diff "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/diff-view.ts"
click node_executor "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/tool-executor.ts"
click node_model_config "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/ai/ai.config.ts"
click node_markdown "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/tui/terminal-md.ts"
click node_ask "https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/ask/orchestrator.ts"
click node_plan "https://github.com/ravibaskey/autonomous-developer-agent/tree/main/modes"
click node_telegram "https://github.com/ravibaskey/autonomous-developer-agent/tree/main/modes"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_wakeup,node_cli,node_user toneBlue
class node_agent_orch,node_agent_tools,node_tracker,node_approval,node_diff toneAmber
class node_executor,node_workspace_fs toneMint
class node_model_config,node_openrouter,node_markdown toneRose
class node_ask,node_plan,node_telegram,node_firecrawl toneIndigo
```

## Components

### Terminal entry

- [Wakeup menu](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/tui/wakeup.ts): `tui/wakeup.ts`
- [CLI selector](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/cli.ts): `modes/cli.ts`

### Agent workflow

- [Agent orchestrator](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/orchestrator.ts): `modes/agent/orchestrator.ts`
- [Agent tools](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/agent-tools.ts): `modes/agent/agent-tools.ts`
- [Action tracker](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/action-tracker.ts): `modes/agent/action-tracker.ts`
- [Approval review](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/approval.ts): `modes/agent/approval.ts`
- [Diff formatter](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/diff-view.ts): `modes/agent/diff-view.ts`

### Workspace tools

- [Tool executor](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/agent/tool-executor.ts): `modes/agent/tool-executor.ts`
- **Project files**

### AI and rendering

- [Model configuration](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/ai/ai.config.ts): `ai/ai.config.ts`
- **OpenRouter model**
- [Terminal Markdown](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/tui/terminal-md.ts): `tui/terminal-md.ts`

### Other documented modes

- [Ask mode](https://github.com/ravibaskey/autonomous-developer-agent/blob/main/modes/ask/orchestrator.ts): `modes/ask/orchestrator.ts`
- [Plan mode](https://github.com/ravibaskey/autonomous-developer-agent/tree/main/modes): `modes`
- [Telegram control](https://github.com/ravibaskey/autonomous-developer-agent/tree/main/modes): `modes`
- **Firecrawl search**

### Other components

- **User**

## Connections

- User → Wakeup menu: starts (evidence: `README.md`)
- Wakeup menu → CLI selector: opens CLI (evidence: `tui/wakeup.ts`)
- CLI selector → Agent orchestrator: starts agent (evidence: `modes/cli.ts`)
- Agent orchestrator → Agent tools: creates tools (evidence: `modes/agent/orchestrator.ts`)
- Agent orchestrator → Model configuration: gets model (evidence: `modes/agent/orchestrator.ts`)
- Model configuration → OpenRouter model: configures provider (evidence: `ai/ai.config.ts`)
- Agent orchestrator → Terminal Markdown: renders response (evidence: `modes/agent/orchestrator.ts`)
- Agent orchestrator → Approval review: requests review (evidence: `modes/agent/orchestrator.ts`)
- Agent tools → Tool executor: executes tools (evidence: `modes/agent/agent-tools.ts`)
- Tool executor → Action tracker: logs actions (evidence: `modes/agent/tool-executor.ts`)
- Tool executor → Project files: reads and stages (evidence: `modes/agent/tool-executor.ts`)
- Approval review → Action tracker: updates decisions (evidence: `modes/agent/approval.ts`)
- Approval review → Diff formatter: formats changes (evidence: `modes/agent/approval.ts`)
- Approval review → Terminal Markdown: renders diff (evidence: `modes/agent/approval.ts`)
- Agent orchestrator → Tool executor: applies approved changes (evidence: `modes/agent/orchestrator.ts`)
- User → Ask mode: asks workspace (evidence: `README.md`)
- Ask mode → Model configuration: gets model (evidence: `modes/ask/orchestrator.ts`)
- Ask mode → Tool executor: reads workspace (evidence: `modes/ask/orchestrator.ts`)
- Ask mode → Terminal Markdown: renders answer (evidence: `modes/ask/orchestrator.ts`)
- Ask mode → Firecrawl search: creates web tools (evidence: `modes/ask/orchestrator.ts`)
- Ask mode → Approval review: reviews saved answer (evidence: `modes/ask/orchestrator.ts`)
- User → Plan mode: requests planning (evidence: `README.md`)
- User → Telegram control: controls remotely (evidence: `README.md`)
