# bb-ai-arena/jarvis-chief-of-staff architecture

> Architecture diagram of the GitHub repository bb-ai-arena/jarvis-chief-of-staff, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bb-ai-arena/jarvis-chief-of-staff
- Repository: https://github.com/bb-ai-arena/jarvis-chief-of-staff

## Overview

Jarvis is a native, voice-first macOS chief-of-staff app. The main loop is an owner’s spoken or typed request, conversation and routing, owner-approved director assignment, task tracking, and opening the saved result. The boardroom debate, workspace exploration, and experimental film Studio are distinct capabilities alongside that loop. The map uses the README and SOURCE INDEX relationships; many app subsystems are unsampled, so their internal call paths are not asserted.

Main entry points: [`Sources/Jarvis/TaskLedger.swift`](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/TaskLedger.swift) (Task ledger), [`Sources/Jarvis/JarvisApp.swift`](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/JarvisApp.swift) (Native app), [`Sources/Jarvis/BoardDebate.swift`](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/BoardDebate.swift) (Board debate), [`Sources/Jarvis/ClaudeClient.swift`](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/ClaudeClient.swift) (Technology director)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Conversation and presence"]
  node_app["Native app<br/>[JarvisApp.swift]"]
  node_voice["Voice turns<br/>[VoiceTurn.swift]"]
  node_conversation["Conversation brain"]
  node_presence["Cinematic presence<br/>[presence.mjs]"]
  node_workspace["Workspace UI<br/>[LiveUI.swift]"]
end

subgraph group_coordination["Routing and coordination"]
  node_router["Request router<br/>[JarvisRouter.swift]"]
  node_decision["Route decision"]
  node_debate["Board debate<br/>[BoardDebate.swift]"]
end

subgraph group_directors["Director execution"]
  node_claude["Technology director<br/>[ClaudeClient.swift]"]
  node_research["Research director<br/>[GrokClient.swift]"]
  node_projects["Projects director<br/>[OllamaClient.swift]"]
  node_cursor["Creative cloud agent<br/>[CursorClient.swift]"]
  node_operations["Operations workers<br/>[AgentRuntime.swift]"]
end

subgraph group_governance["Tasks and results"]
  node_ledger[("Task ledger<br/>[TaskLedger.swift]")]
  node_budget["Spending controls<br/>[SpendBudget.swift]"]
  node_usage[("Token metering<br/>[TokenMeter.swift]")]
  node_results["Saved results<br/>[AppResults.swift]"]
  node_workspace_tools["Workspace tools"]
end

subgraph group_studio["Film Studio"]
  node_film_story["Film story workflow"]
  node_video_plan["Shot planning<br/>[VideoPlan.swift]"]
  node_artwork["Video artwork<br/>[VideoArtwork.swift]"]
  node_film_worker["Local film worker<br/>[film_worker.py]"]
end

node_owner(("Mac owner"))
node_providers{{"AI providers"}}
node_gpu{{"GPU host"}}

node_owner -->|"speaks or types"| node_app
node_app -->|"starts voice turns"| node_voice
node_app -->|"starts conversation"| node_conversation
node_app -.->|"hosts face"| node_presence
node_app -.->|"shows workspace"| node_workspace
node_conversation -->|"routes request"| node_router
node_router -->|"decodes route"| node_decision
node_decision -.->|"proposes assignment"| node_ledger
node_owner -->|"approves task"| node_ledger
node_ledger -.->|"tracks director work"| node_claude
node_ledger -.->|"tracks director work"| node_research
node_ledger -.->|"tracks director work"| node_projects
node_ledger -.->|"tracks director work"| node_cursor
node_ledger -.->|"tracks worker work"| node_operations
node_claude -->|"calls Claude"| node_providers
node_research -->|"calls xAI"| node_providers
node_projects -->|"calls Ollama"| node_providers
node_cursor -->|"calls Cursor"| node_providers
node_claude -->|"records usage"| node_usage
node_research -->|"records usage"| node_usage
node_projects -->|"records usage"| node_usage
node_ledger -.->|"retains task outcomes"| node_results
node_owner -->|"opens saved result"| node_results
node_app -.->|"offers live debate"| node_debate
node_debate -.->|"convenes directors"| node_claude
node_debate -.->|"convenes directors"| node_research
node_debate -.->|"convenes directors"| node_projects
node_owner -.->|"explores files"| node_workspace_tools
node_film_story -.->|"plans shots"| node_video_plan
node_video_plan -.->|"prepares artwork"| node_artwork
node_artwork -->|"uses GPU host"| node_gpu
node_film_story -.->|"starts film work"| node_film_worker
node_film_worker -->|"renders on host"| node_gpu
node_film_worker -.->|"requests model work"| node_providers

click node_app "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/JarvisApp.swift"
click node_voice "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/VoiceTurn.swift"
click node_conversation "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/ConversationBrain.swift"
click node_presence "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Frontend/presence.mjs"
click node_workspace "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/LiveUI.swift"
click node_router "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/JarvisRouter.swift"
click node_decision "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/RouteDecision.swift"
click node_debate "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/BoardDebate.swift"
click node_claude "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/ClaudeClient.swift"
click node_research "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/GrokClient.swift"
click node_projects "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/OllamaClient.swift"
click node_cursor "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/CursorClient.swift"
click node_operations "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/AgentRuntime.swift"
click node_ledger "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/TaskLedger.swift"
click node_budget "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/SpendBudget.swift"
click node_usage "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/TokenMeter.swift"
click node_results "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/AppResults.swift"
click node_workspace_tools "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/WorkspaceTools.swift"
click node_film_story "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/FilmStoryWorkflow.swift"
click node_video_plan "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/VideoPlan.swift"
click node_artwork "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/VideoArtwork.swift"
click node_film_worker "https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Resources/film_worker.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_app,node_voice,node_conversation,node_presence,node_workspace toneBlue
class node_router,node_decision,node_debate toneAmber
class node_claude,node_research,node_projects,node_cursor,node_operations toneMint
class node_ledger,node_budget,node_usage,node_results,node_workspace_tools toneRose
class node_film_story,node_video_plan,node_artwork,node_film_worker,node_owner,node_providers,node_gpu toneIndigo
```

## Components

### Conversation and presence

- [Native app](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/JarvisApp.swift): `Sources/Jarvis/JarvisApp.swift`
- [Voice turns](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/VoiceTurn.swift): `Sources/Jarvis/VoiceTurn.swift`
- [Conversation brain](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/ConversationBrain.swift): `Sources/Jarvis/ConversationBrain.swift`
- [Cinematic presence](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Frontend/presence.mjs): `Frontend/presence.mjs`
- [Workspace UI](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/LiveUI.swift): `Sources/Jarvis/LiveUI.swift`

### Routing and coordination

- [Request router](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/JarvisRouter.swift): `Sources/Jarvis/JarvisRouter.swift`
- [Route decision](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/RouteDecision.swift): `Sources/Jarvis/RouteDecision.swift`
- [Board debate](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/BoardDebate.swift): `Sources/Jarvis/BoardDebate.swift`

### Director execution

- [Technology director](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/ClaudeClient.swift): `Sources/Jarvis/ClaudeClient.swift`
- [Research director](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/GrokClient.swift): `Sources/Jarvis/GrokClient.swift`
- [Projects director](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/OllamaClient.swift): `Sources/Jarvis/OllamaClient.swift`
- [Creative cloud agent](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/CursorClient.swift): `Sources/Jarvis/CursorClient.swift`
- [Operations workers](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/AgentRuntime.swift): `Sources/Jarvis/AgentRuntime.swift`

### Tasks and results

- [Task ledger](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/TaskLedger.swift): `Sources/Jarvis/TaskLedger.swift`
- [Spending controls](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/SpendBudget.swift): `Sources/Jarvis/SpendBudget.swift`
- [Token metering](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/TokenMeter.swift): `Sources/Jarvis/TokenMeter.swift`
- [Saved results](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/AppResults.swift): `Sources/Jarvis/AppResults.swift`
- [Workspace tools](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/WorkspaceTools.swift): `Sources/Jarvis/WorkspaceTools.swift`

### Film Studio

- [Film story workflow](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/FilmStoryWorkflow.swift): `Sources/Jarvis/FilmStoryWorkflow.swift`
- [Shot planning](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/VideoPlan.swift): `Sources/Jarvis/VideoPlan.swift`
- [Video artwork](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Sources/Jarvis/VideoArtwork.swift): `Sources/Jarvis/VideoArtwork.swift`
- [Local film worker](https://github.com/bb-ai-arena/jarvis-chief-of-staff/blob/main/Resources/film_worker.py): `Resources/film_worker.py`

### Other components

- **Mac owner**
- **AI providers**
- **GPU host**

## Connections

- Mac owner → Native app: speaks or types
- Native app → Voice turns: starts voice turns (evidence: `Sources/Jarvis/JarvisApp.swift`)
- Native app → Conversation brain: starts conversation (evidence: `Sources/Jarvis/JarvisApp.swift`)
- Native app → Cinematic presence: hosts face
- Native app → Workspace UI: shows workspace (evidence: `Sources/Jarvis/JarvisApp.swift`)
- Conversation brain → Request router: routes request (evidence: `Sources/Jarvis/ConversationBrain.swift`)
- Request router → Route decision: decodes route (evidence: `Sources/Jarvis/JarvisRouter.swift`)
- Route decision → Task ledger: proposes assignment
- Mac owner → Task ledger: approves task
- Task ledger → Technology director: tracks director work
- Task ledger → Research director: tracks director work
- Task ledger → Projects director: tracks director work
- Task ledger → Creative cloud agent: tracks director work
- Task ledger → Operations workers: tracks worker work
- Technology director → AI providers: calls Claude (evidence: `Sources/Jarvis/ClaudeClient.swift`)
- Research director → AI providers: calls xAI (evidence: `Sources/Jarvis/GrokClient.swift`)
- Projects director → AI providers: calls Ollama (evidence: `Sources/Jarvis/OllamaClient.swift`)
- Creative cloud agent → AI providers: calls Cursor (evidence: `Sources/Jarvis/CursorClient.swift`)
- Technology director → Token metering: records usage (evidence: `Sources/Jarvis/ClaudeClient.swift`)
- Research director → Token metering: records usage (evidence: `Sources/Jarvis/GrokClient.swift`)
- Projects director → Token metering: records usage (evidence: `Sources/Jarvis/OllamaClient.swift`)
- Task ledger → Saved results: retains task outcomes
- Mac owner → Saved results: opens saved result
- Native app → Board debate: offers live debate
- Board debate → Technology director: convenes directors
- Board debate → Research director: convenes directors
- Board debate → Projects director: convenes directors
- Mac owner → Workspace tools: explores files
- Film story workflow → Shot planning: plans shots
- Shot planning → Video artwork: prepares artwork (evidence: `Sources/Jarvis/VideoArtwork.swift`)
- Video artwork → GPU host: uses GPU host (evidence: `Sources/Jarvis/VideoArtwork.swift`)
- Film story workflow → Local film worker: starts film work
- Local film worker → GPU host: renders on host (evidence: `Resources/film_worker.py`)
- Local film worker → AI providers: requests model work (evidence: `Resources/film_worker.py`)
