# devlikemasta/bureau-des-agents architecture

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

- Interactive diagram: https://gitdiagram.com/devlikemasta/bureau-des-agents
- Repository: https://github.com/devlikemasta/bureau-des-agents

## Overview

Le Bureau des agents is a local browser-based pixel-art interface for running real Claude Code agent teams. The user gives Max a mission; the server runs Claude Code and its specialists, then streams activity, approvals and deliverables to the office, where the user can follow work and inspect results. The UI also documents replay, team history, settings, site previews, guided tours and audio. Some subsystem links are supported only by README or source-index references; unsampled implementations and unverified links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/App.tsx) (Office app), [`src/net/link.ts`](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/net/link.ts) (WebSocket link), [`src/state/store.ts`](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/state/store.ts) (Client mission state), [`server/bureau.ts`](https://github.com/devlikemasta/bureau-des-agents/blob/main/server/bureau.ts) (Mission coordinator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Mission orchestration"]
  node_server["Local server<br/>[index.ts]"]
  node_bureau["Mission coordinator<br/>[bureau.ts]"]
  node_claude["Claude runner<br/>[claude.ts]"]
  node_team["Agent team<br/>[team.ts]"]
  node_activity["Activity translation<br/>[activity.ts]"]
end

subgraph group_transport["Local bridge"]
  node_link["WebSocket link<br/>[link.ts]"]
  node_protocol["Message contract<br/>[protocol.ts]"]
end

subgraph group_client["Office interface"]
  node_app["Office app<br/>[App.tsx]"]
  node_dialog["Mission dialog<br/>[Dialog.tsx]"]
  node_panel["Team panel<br/>[Panel.tsx]"]
  node_rooms["Office rooms<br/>[Rooms.tsx]"]
  node_topbar["Controls<br/>[TopBar.tsx]"]
  node_store["Client mission state<br/>[store.ts]"]
  node_bus["Event bus<br/>[bus.ts]"]
end

subgraph group_simulation["Pixel-art simulation"]
  node_office["Canvas office<br/>[Office.tsx]"]
  node_instance["Simulation instance<br/>[instance.ts]"]
  node_world["Agent world<br/>[world.ts]"]
  node_renderer["Pixel renderer<br/>[render.ts]"]
end

subgraph group_support["History and media"]
  node_modals["Results and history<br/>[Modals.tsx]"]
  node_music["Jukebox<br/>[music.ts]"]
  node_voice["Max voice<br/>[voice.ts]"]
end

node_user(("User"))
node_claude_cli{{"Claude Code"}}

node_user -->|"uses"| node_app
node_app -->|"shows"| node_dialog
node_app -->|"shows"| node_office
node_app -->|"shows"| node_rooms
node_app -->|"shows"| node_modals
node_app -->|"shows"| node_topbar
node_dialog -.->|"sends mission"| node_link
node_topbar -->|"requests replay"| node_link
node_link -->|"exchanges messages"| node_server
node_server -->|"routes mission"| node_bureau
node_bureau -->|"runs session"| node_claude
node_bureau -->|"configures agents"| node_team
node_claude -->|"launches"| node_claude_cli
node_claude -->|"translates tools"| node_activity
node_bureau -->|"records activity"| node_activity
node_server -->|"streams events"| node_link
node_link -->|"delivers messages"| node_store
node_store -->|"publishes events"| node_bus
node_bus -->|"dispatches events"| node_instance
node_office -->|"reads simulation"| node_instance
node_instance -->|"updates"| node_world
node_instance -->|"creates"| node_renderer
node_rooms -->|"renders avatars"| node_panel
node_rooms -->|"reads mission state"| node_store
node_modals -->|"reads results"| node_store
node_app -->|"controls jukebox"| node_music
node_music -->|"publishes playback"| node_store
node_app -->|"starts guided tour"| node_voice

click node_app "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/App.tsx"
click node_dialog "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Dialog.tsx"
click node_panel "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Panel.tsx"
click node_rooms "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Rooms.tsx"
click node_modals "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Modals.tsx"
click node_topbar "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/TopBar.tsx"
click node_store "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/state/store.ts"
click node_bus "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/state/bus.ts"
click node_link "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/net/link.ts"
click node_protocol "https://github.com/devlikemasta/bureau-des-agents/blob/main/shared/protocol.ts"
click node_server "https://github.com/devlikemasta/bureau-des-agents/blob/main/server/index.ts"
click node_bureau "https://github.com/devlikemasta/bureau-des-agents/blob/main/server/bureau.ts"
click node_claude "https://github.com/devlikemasta/bureau-des-agents/blob/main/server/claude.ts"
click node_team "https://github.com/devlikemasta/bureau-des-agents/blob/main/server/team.ts"
click node_activity "https://github.com/devlikemasta/bureau-des-agents/blob/main/shared/activity.ts"
click node_office "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Office.tsx"
click node_instance "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/engine/instance.ts"
click node_world "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/engine/world.ts"
click node_renderer "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/engine/render.ts"
click node_music "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/audio/music.ts"
click node_voice "https://github.com/devlikemasta/bureau-des-agents/blob/main/src/audio/voice.ts"

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_server,node_bureau,node_claude,node_team,node_activity,node_user toneBlue
class node_link,node_protocol toneAmber
class node_app,node_dialog,node_panel,node_rooms,node_topbar,node_store,node_bus toneMint
class node_office,node_instance,node_world,node_renderer toneRose
class node_modals,node_music,node_voice,node_claude_cli toneIndigo
```

## Components

### Mission orchestration

- [Local server](https://github.com/devlikemasta/bureau-des-agents/blob/main/server/index.ts): `server/index.ts`
- [Mission coordinator](https://github.com/devlikemasta/bureau-des-agents/blob/main/server/bureau.ts): `server/bureau.ts`
- [Claude runner](https://github.com/devlikemasta/bureau-des-agents/blob/main/server/claude.ts): `server/claude.ts`
- [Agent team](https://github.com/devlikemasta/bureau-des-agents/blob/main/server/team.ts): `server/team.ts`
- [Activity translation](https://github.com/devlikemasta/bureau-des-agents/blob/main/shared/activity.ts): `shared/activity.ts`

### Local bridge

- [WebSocket link](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/net/link.ts): `src/net/link.ts`
- [Message contract](https://github.com/devlikemasta/bureau-des-agents/blob/main/shared/protocol.ts): `shared/protocol.ts`

### Office interface

- [Office app](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/App.tsx): `src/App.tsx`
- [Mission dialog](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Dialog.tsx): `src/ui/Dialog.tsx`
- [Team panel](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Panel.tsx): `src/ui/Panel.tsx`
- [Office rooms](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Rooms.tsx): `src/ui/Rooms.tsx`
- [Controls](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/TopBar.tsx): `src/ui/TopBar.tsx`
- [Client mission state](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/state/store.ts): `src/state/store.ts`
- [Event bus](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/state/bus.ts): `src/state/bus.ts`

### Pixel-art simulation

- [Canvas office](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Office.tsx): `src/ui/Office.tsx`
- [Simulation instance](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/engine/instance.ts): `src/engine/instance.ts`
- [Agent world](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/engine/world.ts): `src/engine/world.ts`
- [Pixel renderer](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/engine/render.ts): `src/engine/render.ts`

### History and media

- [Results and history](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/ui/Modals.tsx): `src/ui/Modals.tsx`
- [Jukebox](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/audio/music.ts): `src/audio/music.ts`
- [Max voice](https://github.com/devlikemasta/bureau-des-agents/blob/main/src/audio/voice.ts): `src/audio/voice.ts`

### Other components

- **User**
- **Claude Code**

## Connections

- User → Office app: uses (evidence: `README.md`)
- Office app → Mission dialog: shows (evidence: `src/App.tsx`)
- Office app → Canvas office: shows (evidence: `src/App.tsx`)
- Office app → Office rooms: shows (evidence: `src/App.tsx`)
- Office app → Results and history: shows (evidence: `src/App.tsx`)
- Office app → Controls: shows (evidence: `src/App.tsx`)
- Mission dialog → WebSocket link: sends mission
- Controls → WebSocket link: requests replay (evidence: `src/ui/TopBar.tsx`)
- WebSocket link → Local server: exchanges messages (evidence: `README.md`)
- Local server → Mission coordinator: routes mission (evidence: `server/index.ts`)
- Mission coordinator → Claude runner: runs session (evidence: `server/bureau.ts`)
- Mission coordinator → Agent team: configures agents (evidence: `server/bureau.ts`)
- Claude runner → Claude Code: launches (evidence: `README.md`)
- Claude runner → Activity translation: translates tools (evidence: `server/claude.ts`)
- Mission coordinator → Activity translation: records activity (evidence: `server/bureau.ts`)
- Local server → WebSocket link: streams events (evidence: `README.md`)
- WebSocket link → Client mission state: delivers messages (evidence: `src/net/link.ts`)
- Client mission state → Event bus: publishes events (evidence: `src/state/store.ts`)
- Event bus → Simulation instance: dispatches events (evidence: `src/engine/instance.ts`)
- Canvas office → Simulation instance: reads simulation (evidence: `src/ui/Office.tsx`)
- Simulation instance → Agent world: updates (evidence: `src/engine/instance.ts`)
- Simulation instance → Pixel renderer: creates (evidence: `src/engine/instance.ts`)
- Office rooms → Team panel: renders avatars (evidence: `src/ui/Rooms.tsx`)
- Office rooms → Client mission state: reads mission state (evidence: `src/ui/Rooms.tsx`)
- Results and history → Client mission state: reads results (evidence: `src/ui/Modals.tsx`)
- Office app → Jukebox: controls jukebox (evidence: `src/App.tsx`)
- Jukebox → Client mission state: publishes playback (evidence: `src/audio/music.ts`)
- Office app → Max voice: starts guided tour (evidence: `src/App.tsx`)
