# rfxlamia/claude-foreman architecture

> Architecture diagram of the GitHub repository rfxlamia/claude-foreman, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rfxlamia/claude-foreman
- Repository: https://github.com/rfxlamia/claude-foreman

## Overview

Foreman is a Claude-operated delegation workflow: Claude prepares a self-contained task brief, dispatches work to an external coding-agent CLI, then reviews and verifies the changes before integration. Write tasks use an isolated Git worktree and adapter sandbox; read-only tasks run in the repository. Optional live mode uses tmux. The README documents these relationships, but no source excerpts were provided, so implementation-level call paths cannot be confirmed.

Main entry points: [`scripts/dispatch.sh`](https://github.com/rfxlamia/claude-foreman/blob/main/scripts/dispatch.sh) (Worker dispatch), [`SKILL.md`](https://github.com/rfxlamia/claude-foreman/blob/main/SKILL.md) (Foreman skill), [`references/live-mode.md`](https://github.com/rfxlamia/claude-foreman/blob/main/references/live-mode.md) (Live session), [`references/brief-template.md`](https://github.com/rfxlamia/claude-foreman/blob/main/references/brief-template.md) (Task brief)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Delegation workflow"]
  node_foreman["Foreman skill<br/>[SKILL.md]"]
  node_brief["Task brief<br/>[brief-template.md]"]
end

subgraph group_execution["Execution modes"]
  node_dispatch["Worker dispatch<br/>[dispatch.sh]"]
  node_worktree["Task worktree<br/>[dispatch.sh]"]
  node_live["Live session<br/>[live-mode.md]"]
end

subgraph group_adapters["Worker adapters"]
  node_codex["Codex adapter<br/>[codex.sh]"]
  node_agy["Antigravity adapter<br/>[agy.sh]"]
end

node_claude(("Claude foreman"))
node_workers(("Worker CLIs"))
node_tmux(("tmux"))

node_claude -->|"invokes"| node_foreman
node_claude -->|"writes"| node_brief
node_foreman -->|"dispatches"| node_dispatch
node_dispatch -->|"isolates writes"| node_worktree
node_dispatch -->|"runs worker"| node_workers
node_dispatch -->|"selects adapter"| node_codex
node_dispatch -->|"selects adapter"| node_agy
node_claude -->|"reviews changes"| node_worktree
node_claude -->|"opts into"| node_live
node_live -->|"uses session"| node_tmux

click node_foreman "https://github.com/rfxlamia/claude-foreman/blob/main/SKILL.md"
click node_brief "https://github.com/rfxlamia/claude-foreman/blob/main/references/brief-template.md"
click node_dispatch "https://github.com/rfxlamia/claude-foreman/blob/main/scripts/dispatch.sh"
click node_worktree "https://github.com/rfxlamia/claude-foreman/blob/main/scripts/dispatch.sh"
click node_live "https://github.com/rfxlamia/claude-foreman/blob/main/references/live-mode.md"
click node_codex "https://github.com/rfxlamia/claude-foreman/blob/main/adapters/codex.sh"
click node_agy "https://github.com/rfxlamia/claude-foreman/blob/main/adapters/agy.sh"

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_foreman,node_brief toneBlue
class node_dispatch,node_worktree,node_live toneAmber
class node_codex,node_agy toneMint
class node_claude,node_tmux toneIndigo
class node_workers toneRose
```

## Components

### Delegation workflow

- [Foreman skill](https://github.com/rfxlamia/claude-foreman/blob/main/SKILL.md): `SKILL.md`
- [Task brief](https://github.com/rfxlamia/claude-foreman/blob/main/references/brief-template.md): `references/brief-template.md`

### Execution modes

- [Worker dispatch](https://github.com/rfxlamia/claude-foreman/blob/main/scripts/dispatch.sh): `scripts/dispatch.sh`
- [Task worktree](https://github.com/rfxlamia/claude-foreman/blob/main/scripts/dispatch.sh): `scripts/dispatch.sh`
- [Live session](https://github.com/rfxlamia/claude-foreman/blob/main/references/live-mode.md): `references/live-mode.md`

### Worker adapters

- [Codex adapter](https://github.com/rfxlamia/claude-foreman/blob/main/adapters/codex.sh): `adapters/codex.sh`
- [Antigravity adapter](https://github.com/rfxlamia/claude-foreman/blob/main/adapters/agy.sh): `adapters/agy.sh`

### Other components

- **Claude foreman**
- **Worker CLIs**
- **tmux**

## Connections

- Claude foreman → Foreman skill: invokes (evidence: `README.md`)
- Claude foreman → Task brief: writes (evidence: `README.md`)
- Foreman skill → Worker dispatch: dispatches (evidence: `README.md`)
- Worker dispatch → Task worktree: isolates writes (evidence: `README.md`)
- Worker dispatch → Worker CLIs: runs worker (evidence: `README.md`)
- Worker dispatch → Codex adapter: selects adapter (evidence: `README.md`)
- Worker dispatch → Antigravity adapter: selects adapter (evidence: `README.md`)
- Claude foreman → Task worktree: reviews changes (evidence: `README.md`)
- Claude foreman → Live session: opts into (evidence: `README.md`)
- Live session → tmux: uses session (evidence: `README.md`)
