# qingliangcn/codex-with-workbuddy architecture

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

- Interactive diagram: https://gitdiagram.com/qingliangcn/codex-with-workbuddy
- Repository: https://github.com/qingliangcn/codex-with-workbuddy

## Overview

Codex Agent Delegator is a Codex plugin that exposes a local MCP server and a companion Skill for bounded analysis and public-web research. The main workflow is Codex invoking an MCP tool: the server either delegates work to WorkBuddy or fetches and extracts public web content, then returns text for Codex to use. The README documents the tool capabilities and configuration; the sampled server excerpt shows dispatch, URL-fetch handling, and transcript fallback. Other internal details are represented only where those excerpts support them.

Main entry points: [`scripts/workbuddy_mcp_server.py`](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py) (Tool Dispatch), [`.codex-plugin/plugin.json`](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/.codex-plugin/plugin.json) (Plugin Manifest), [`skills/codex-agent-delegator/SKILL.md`](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/skills/codex-agent-delegator/SKILL.md) (Delegator Skill)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["Codex Integration"]
  node_plugin["Plugin Manifest<br/>[plugin.json]"]
  node_skill["Delegator Skill<br/>[SKILL.md]"]
  node_mcp["MCP Server"]
  node_dispatch["Tool Dispatch"]
end

subgraph group_delegation["WorkBuddy Delegation"]
  node_workbuddy["WorkBuddy CLI"]
  node_transcripts["Transcript Recovery"]
end

subgraph group_web["Web Research"]
  node_fetch["Public URL Fetch"]
  node_extract["Text Extraction"]
  node_temptext["Temporary Text Input"]
  node_internet(("Public Websites"))
end

node_codex(("Codex"))

node_codex -->|"installs"| node_plugin
node_codex -->|"invokes tools"| node_mcp
node_codex -->|"uses guidance"| node_skill
node_mcp -->|"dispatches"| node_dispatch
node_dispatch -->|"delegates analysis"| node_workbuddy
node_dispatch -->|"requests fetch"| node_fetch
node_fetch -->|"requests pages"| node_internet
node_fetch -->|"extracts text"| node_extract
node_dispatch -->|"writes fetched text"| node_temptext
node_temptext -->|"supplies summary input"| node_workbuddy
node_workbuddy -->|"recovers output from"| node_transcripts
node_dispatch -->|"returns results"| node_codex

click node_plugin "https://github.com/qingliangcn/codex-with-workbuddy/blob/main/.codex-plugin/plugin.json"
click node_skill "https://github.com/qingliangcn/codex-with-workbuddy/blob/main/skills/codex-agent-delegator/SKILL.md"
click node_mcp "https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py"
click node_dispatch "https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py"
click node_transcripts "https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py"
click node_fetch "https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py"
click node_extract "https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py"
click node_temptext "https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py"

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_plugin,node_skill,node_mcp,node_dispatch toneBlue
class node_workbuddy,node_transcripts toneAmber
class node_fetch,node_extract,node_temptext,node_internet toneMint
class node_codex toneIndigo
```

## Components

### Codex Integration

- [Plugin Manifest](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/.codex-plugin/plugin.json): `.codex-plugin/plugin.json`
- [Delegator Skill](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/skills/codex-agent-delegator/SKILL.md): `skills/codex-agent-delegator/SKILL.md`
- [MCP Server](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py): `scripts/workbuddy_mcp_server.py`
- [Tool Dispatch](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py): `scripts/workbuddy_mcp_server.py`

### WorkBuddy Delegation

- **WorkBuddy CLI**
- [Transcript Recovery](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py): `scripts/workbuddy_mcp_server.py`

### Web Research

- [Public URL Fetch](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py): `scripts/workbuddy_mcp_server.py`
- [Text Extraction](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py): `scripts/workbuddy_mcp_server.py`
- [Temporary Text Input](https://github.com/qingliangcn/codex-with-workbuddy/blob/main/scripts/workbuddy_mcp_server.py): `scripts/workbuddy_mcp_server.py`
- **Public Websites**

### Other components

- **Codex**

## Connections

- Codex → Plugin Manifest: installs (evidence: `README.md`)
- Codex → MCP Server: invokes tools (evidence: `README.md`)
- Codex → Delegator Skill: uses guidance (evidence: `README.md`)
- MCP Server → Tool Dispatch: dispatches (evidence: `scripts/workbuddy_mcp_server.py`)
- Tool Dispatch → WorkBuddy CLI: delegates analysis (evidence: `scripts/workbuddy_mcp_server.py`)
- Tool Dispatch → Public URL Fetch: requests fetch (evidence: `scripts/workbuddy_mcp_server.py`)
- Public URL Fetch → Public Websites: requests pages (evidence: `README.md`)
- Public URL Fetch → Text Extraction: extracts text (evidence: `scripts/workbuddy_mcp_server.py`)
- Tool Dispatch → Temporary Text Input: writes fetched text (evidence: `scripts/workbuddy_mcp_server.py`)
- Temporary Text Input → WorkBuddy CLI: supplies summary input (evidence: `scripts/workbuddy_mcp_server.py`)
- WorkBuddy CLI → Transcript Recovery: recovers output from (evidence: `README.md`)
- Tool Dispatch → Codex: returns results (evidence: `README.md`)
