# zhang-andrew888/ember architecture

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

- Interactive diagram: https://gitdiagram.com/zhang-andrew888/ember
- Repository: https://github.com/zhang-andrew888/ember

## Overview

Ember Line is a design-stage wildfire coordination simulation, not an implemented or benchmarked application. Its intended workflow is a coordinator directing autonomous crews through conversational control while viewing an incident, as the authoritative simulation advances and crews act with incomplete information. The design also specifies forecasting, navigation, agent knowledge, and replay. The graph distinguishes these documented capabilities from the thin sampled TypeScript contracts; arrows are limited to relationships stated in the README, so many runtime connections remain unverified.

Main entry points: [`packages/simulation/src/index.ts`](https://github.com/zhang-andrew888/ember/blob/main/packages/simulation/src/index.ts) (Authoritative Simulation), [`apps/server/src/index.ts`](https://github.com/zhang-andrew888/ember/blob/main/apps/server/src/index.ts) (Node Server), [`packages/agents/src/types.ts`](https://github.com/zhang-andrew888/ember/blob/main/packages/agents/src/types.ts) (Autonomous Crews), [`packages/forecast/src/types.ts`](https://github.com/zhang-andrew888/ember/blob/main/packages/forecast/src/types.ts) (Fire Forecasts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Coordinator Experience"]
  node_web["Incident View<br/>[main.tsx]"]
  node_communication["Conversational Control<br/>[types.ts]"]
end

subgraph group_runtime["Simulation Runtime"]
  node_server["Node Server<br/>[index.ts]"]
  node_simulation["Authoritative Simulation<br/>[index.ts]"]
  node_scenario["Scenario and Fire<br/>[SIMULATION.md]"]
  node_replay["Incident Replay<br/>[types.ts]"]
end

subgraph group_autonomy["Crew Autonomy"]
  node_agents["Autonomous Crews<br/>[types.ts]"]
  node_forecast["Fire Forecasts<br/>[types.ts]"]
  node_navigation["Mission Navigation<br/>[types.ts]"]
  node_knowledge["Crew Knowledge<br/>[types.ts]"]
end

subgraph group_contracts["Domain Contracts"]
  node_domain["Simulation Contracts<br/>[simulation-api.ts]"]
  node_records["World and Event Records<br/>[records.ts]"]
  node_projection["Coordinator Projection"]
  node_geometry["Positions and Units<br/>[position.ts]"]
  node_identifiers["Domain Identifiers<br/>[ids.ts]"]
end

node_coordinator(("Incident Coordinator"))

node_coordinator -->|"views incident"| node_web
node_coordinator -->|"issues commands"| node_communication
node_server -->|"owns authority"| node_simulation
node_server -->|"separates workers"| node_forecast
node_agents -->|"act autonomously"| node_simulation
node_domain -->|"contracts specify"| node_simulation
node_records -->|"projects views"| node_projection
node_agents -->|"use incomplete information"| node_knowledge
node_forecast -->|"guides route planning"| node_navigation
node_simulation -->|"supports replay"| node_replay

click node_web "https://github.com/zhang-andrew888/ember/blob/main/apps/web/src/main.tsx"
click node_communication "https://github.com/zhang-andrew888/ember/blob/main/packages/communication/src/types.ts"
click node_server "https://github.com/zhang-andrew888/ember/blob/main/apps/server/src/index.ts"
click node_simulation "https://github.com/zhang-andrew888/ember/blob/main/packages/simulation/src/index.ts"
click node_scenario "https://github.com/zhang-andrew888/ember/blob/main/docs/SIMULATION.md"
click node_agents "https://github.com/zhang-andrew888/ember/blob/main/packages/agents/src/types.ts"
click node_forecast "https://github.com/zhang-andrew888/ember/blob/main/packages/forecast/src/types.ts"
click node_navigation "https://github.com/zhang-andrew888/ember/blob/main/packages/navigation/src/types.ts"
click node_knowledge "https://github.com/zhang-andrew888/ember/blob/main/packages/knowledge/src/types.ts"
click node_replay "https://github.com/zhang-andrew888/ember/blob/main/packages/replay/src/types.ts"
click node_domain "https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/simulation-api.ts"
click node_records "https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/records.ts"
click node_projection "https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/coordinator-view.ts"
click node_geometry "https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/position.ts"
click node_identifiers "https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/ids.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_web,node_communication toneBlue
class node_server,node_simulation,node_scenario,node_replay toneAmber
class node_agents,node_forecast,node_navigation,node_knowledge toneMint
class node_domain,node_records,node_projection,node_geometry,node_identifiers toneRose
class node_coordinator toneIndigo
```

## Components

### Coordinator Experience

- [Incident View](https://github.com/zhang-andrew888/ember/blob/main/apps/web/src/main.tsx): `apps/web/src/main.tsx`
- [Conversational Control](https://github.com/zhang-andrew888/ember/blob/main/packages/communication/src/types.ts): `packages/communication/src/types.ts`

### Simulation Runtime

- [Node Server](https://github.com/zhang-andrew888/ember/blob/main/apps/server/src/index.ts): `apps/server/src/index.ts`
- [Authoritative Simulation](https://github.com/zhang-andrew888/ember/blob/main/packages/simulation/src/index.ts): `packages/simulation/src/index.ts`
- [Scenario and Fire](https://github.com/zhang-andrew888/ember/blob/main/docs/SIMULATION.md): `docs/SIMULATION.md`
- [Incident Replay](https://github.com/zhang-andrew888/ember/blob/main/packages/replay/src/types.ts): `packages/replay/src/types.ts`

### Crew Autonomy

- [Autonomous Crews](https://github.com/zhang-andrew888/ember/blob/main/packages/agents/src/types.ts): `packages/agents/src/types.ts`
- [Fire Forecasts](https://github.com/zhang-andrew888/ember/blob/main/packages/forecast/src/types.ts): `packages/forecast/src/types.ts`
- [Mission Navigation](https://github.com/zhang-andrew888/ember/blob/main/packages/navigation/src/types.ts): `packages/navigation/src/types.ts`
- [Crew Knowledge](https://github.com/zhang-andrew888/ember/blob/main/packages/knowledge/src/types.ts): `packages/knowledge/src/types.ts`

### Domain Contracts

- [Simulation Contracts](https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/simulation-api.ts): `packages/domain/src/simulation-api.ts`
- [World and Event Records](https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/records.ts): `packages/domain/src/records.ts`
- [Coordinator Projection](https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/coordinator-view.ts): `packages/domain/src/coordinator-view.ts`
- [Positions and Units](https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/position.ts): `packages/domain/src/position.ts`
- [Domain Identifiers](https://github.com/zhang-andrew888/ember/blob/main/packages/domain/src/ids.ts): `packages/domain/src/ids.ts`

### Other components

- **Incident Coordinator**

## Connections

- Incident Coordinator → Incident View: views incident (evidence: `README.md`)
- Incident Coordinator → Conversational Control: issues commands (evidence: `README.md`)
- Node Server → Authoritative Simulation: owns authority (evidence: `README.md`)
- Node Server → Fire Forecasts: separates workers (evidence: `README.md`)
- Autonomous Crews → Authoritative Simulation: act autonomously (evidence: `README.md`)
- Simulation Contracts → Authoritative Simulation: contracts specify (evidence: `packages/domain/src/simulation-api.ts`)
- World and Event Records → Coordinator Projection: projects views (evidence: `packages/domain/src/coordinator-view.ts`)
- Autonomous Crews → Crew Knowledge: use incomplete information (evidence: `README.md`)
- Fire Forecasts → Mission Navigation: guides route planning (evidence: `README.md`)
- Authoritative Simulation → Incident Replay: supports replay (evidence: `README.md`)
