# begindtheseen/seen-command architecture

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

- Interactive diagram: https://gitdiagram.com/begindtheseen/seen-command
- Repository: https://github.com/begindtheseen/seen-command
- Video tour (about a minute): https://gitdiagram.com/begindtheseen/seen-command/video

## Overview

Seen Command is an agentic executive command center: a user starts a board meeting, the orchestrator allocates work to departments, proposals and mutating actions pass through an approval gate, and the resulting state is rendered as a dashboard. Its shared-memory/Chronos system and documented CMO capabilities form important supporting branches. The graph also shows the Instagram knowledge workflow and coding support present in the source tree. Some subsystems are represented at directory level because their implementation was not sampled; those connections are omitted where evidence was unavailable.

Main entry points: [`engine/run.mjs`](https://github.com/begindtheseen/seen-command/blob/main/engine/run.mjs) (Meeting Runner), [`lib/brain.mjs`](https://github.com/begindtheseen/seen-command/blob/main/lib/brain.mjs) (Brain Adapter), [`lib/instagram/routes.mjs`](https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/routes.mjs) (Instagram API), [`lib/connectors/index.mjs`](https://github.com/begindtheseen/seen-command/blob/main/lib/connectors/index.mjs) (Connector Registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_meeting["Board Meeting"]
  node_server["Command Server<br/>[server.mjs]"]
  node_orchestrator["Meeting Runner<br/>[run.mjs]"]
  node_departments["Department Charters<br/>[org.mjs]"]
  node_proposals["Agent Proposals<br/>[agent-chat.mjs]"]
  node_approval["Approval Gate"]
  node_state[("Run State<br/>[paths.mjs]")]
  node_dashboard["Dashboard Builder"]
  node_coder["Code Worker<br/>[coder.mjs]"]
  node_llm["LLM Adapter<br/>[llm.mjs]"]
end

subgraph group_integrations["Signals and Actions"]
  node_signals["Connector Registry<br/>[index.mjs]"]
  node_github["GitHub Connector<br/>[github.mjs]"]
  node_stripe["Stripe Connector<br/>[stripe.mjs]"]
end

subgraph group_memory["Shared Memory"]
  node_brain["Brain Adapter<br/>[brain.mjs]"]
  node_sources["Vault Sources<br/>[sources.mjs]"]
  node_vault["Vault Reader<br/>[vault.mjs]"]
  node_graph["Temporal Graph<br/>[memoryGraph.mjs]"]
  node_unify["Graph Unifier<br/>[unify.mjs]"]
  node_memorywrite["Memory Writer<br/>[memory-write.mjs]"]
  node_cloud["Cloud Sync<br/>[cloud.mjs]"]
  node_chronosapp["Chronos Desktop<br/>[main.js]"]
  node_mcp["Memory Tools<br/>[server.mjs]"]
end

subgraph group_instagram["Instagram Knowledge"]
  node_instagramroutes["Instagram API<br/>[routes.mjs]"]
  node_jobs["Video Jobs<br/>[jobs.mjs]"]
  node_adapter["Instagram Adapter<br/>[adapter.mjs]"]
  node_library[("Creator Library<br/>[library.mjs]")]
  node_synthesis["Key-point Synthesis<br/>[synthesis.mjs]"]
end

node_user(("Operator"))
node_social["External Services"]

node_user -->|"requests meeting"| node_server
node_server -->|"starts meeting"| node_orchestrator
node_orchestrator -->|"routes work"| node_departments
node_orchestrator -->|"requests proposals"| node_proposals
node_orchestrator -->|"writes results"| node_state
node_orchestrator -->|"gates actions"| node_approval
node_approval -->|"requests decision"| node_user
node_state -->|"renders state"| node_dashboard
node_orchestrator -->|"gathers live data"| node_signals
node_signals -->|"fetches snapshot"| node_github
node_signals -->|"fetches snapshot"| node_stripe
node_approval -->|"executes approved action"| node_signals
node_proposals -.->|"reasons with"| node_llm
node_coder -->|"uses"| node_llm
node_orchestrator -.->|"uses shared memory"| node_brain
node_brain -->|"resolves sources"| node_sources
node_brain -->|"reads index"| node_vault
node_vault -->|"builds index"| node_graph
node_sources -.->|"feeds graph build"| node_unify
node_unify -->|"uses graph engine"| node_graph
node_brain -->|"writes memory"| node_memorywrite
node_chronosapp -->|"resolves sources"| node_sources
node_chronosapp -->|"builds unified graph"| node_unify
node_chronosapp -->|"syncs vault"| node_cloud
node_cloud -->|"reads notes"| node_vault
node_mcp -->|"reads index"| node_vault
node_mcp -->|"queries changes"| node_graph
node_mcp -->|"exposes writer"| node_memorywrite
node_server -.->|"forwards requests"| node_instagramroutes
node_instagramroutes -->|"starts jobs"| node_jobs
node_jobs -->|"checks setup"| node_adapter
node_instagramroutes -->|"requests key points"| node_synthesis
node_instagramroutes -->|"serves library"| node_library
node_adapter -.->|"uses provider"| node_social

click node_server "https://github.com/begindtheseen/seen-command/blob/main/engine/server.mjs"
click node_orchestrator "https://github.com/begindtheseen/seen-command/blob/main/engine/run.mjs"
click node_departments "https://github.com/begindtheseen/seen-command/blob/main/org/org.mjs"
click node_proposals "https://github.com/begindtheseen/seen-command/blob/main/engine/agent-chat.mjs"
click node_approval "https://github.com/begindtheseen/seen-command/blob/main/engine/approval-control.mjs"
click node_state "https://github.com/begindtheseen/seen-command/blob/main/lib/paths.mjs"
click node_dashboard "https://github.com/begindtheseen/seen-command/blob/main/scripts/build-dashboard.mjs"
click node_signals "https://github.com/begindtheseen/seen-command/blob/main/lib/connectors/index.mjs"
click node_github "https://github.com/begindtheseen/seen-command/blob/main/lib/connectors/github.mjs"
click node_stripe "https://github.com/begindtheseen/seen-command/blob/main/lib/connectors/stripe.mjs"
click node_coder "https://github.com/begindtheseen/seen-command/blob/main/engine/coder.mjs"
click node_llm "https://github.com/begindtheseen/seen-command/blob/main/lib/llm.mjs"
click node_brain "https://github.com/begindtheseen/seen-command/blob/main/lib/brain.mjs"
click node_sources "https://github.com/begindtheseen/seen-command/blob/main/brain/lib/sources.mjs"
click node_vault "https://github.com/begindtheseen/seen-command/blob/main/brain/lib/vault.mjs"
click node_graph "https://github.com/begindtheseen/seen-command/blob/main/brain/lib/chronos/memoryGraph.mjs"
click node_unify "https://github.com/begindtheseen/seen-command/blob/main/brain/lib/unify.mjs"
click node_memorywrite "https://github.com/begindtheseen/seen-command/blob/main/brain/lib/memory-write.mjs"
click node_cloud "https://github.com/begindtheseen/seen-command/blob/main/brain/lib/cloud.mjs"
click node_chronosapp "https://github.com/begindtheseen/seen-command/blob/main/brain/main.js"
click node_mcp "https://github.com/begindtheseen/seen-command/blob/main/brain/mcp/server.mjs"
click node_instagramroutes "https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/routes.mjs"
click node_jobs "https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/jobs.mjs"
click node_adapter "https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/adapter.mjs"
click node_library "https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/library.mjs"
click node_synthesis "https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/synthesis.mjs"

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_orchestrator,node_departments,node_proposals,node_approval,node_state,node_dashboard,node_coder,node_llm toneBlue
class node_signals,node_github,node_stripe toneAmber
class node_brain,node_sources,node_vault,node_graph,node_unify,node_memorywrite,node_cloud,node_chronosapp,node_mcp toneMint
class node_instagramroutes,node_jobs,node_adapter,node_library,node_synthesis toneRose
class node_user,node_social toneIndigo
```

## Components

### Board Meeting

- [Command Server](https://github.com/begindtheseen/seen-command/blob/main/engine/server.mjs): `engine/server.mjs`
- [Meeting Runner](https://github.com/begindtheseen/seen-command/blob/main/engine/run.mjs): `engine/run.mjs`
- [Department Charters](https://github.com/begindtheseen/seen-command/blob/main/org/org.mjs): `org/org.mjs`
- [Agent Proposals](https://github.com/begindtheseen/seen-command/blob/main/engine/agent-chat.mjs): `engine/agent-chat.mjs`
- [Approval Gate](https://github.com/begindtheseen/seen-command/blob/main/engine/approval-control.mjs): `engine/approval-control.mjs`
- [Run State](https://github.com/begindtheseen/seen-command/blob/main/lib/paths.mjs): `lib/paths.mjs`
- [Dashboard Builder](https://github.com/begindtheseen/seen-command/blob/main/scripts/build-dashboard.mjs): `scripts/build-dashboard.mjs`
- [Code Worker](https://github.com/begindtheseen/seen-command/blob/main/engine/coder.mjs): `engine/coder.mjs`
- [LLM Adapter](https://github.com/begindtheseen/seen-command/blob/main/lib/llm.mjs): `lib/llm.mjs`

### Signals and Actions

- [Connector Registry](https://github.com/begindtheseen/seen-command/blob/main/lib/connectors/index.mjs): `lib/connectors/index.mjs`
- [GitHub Connector](https://github.com/begindtheseen/seen-command/blob/main/lib/connectors/github.mjs): `lib/connectors/github.mjs`
- [Stripe Connector](https://github.com/begindtheseen/seen-command/blob/main/lib/connectors/stripe.mjs): `lib/connectors/stripe.mjs`

### Shared Memory

- [Brain Adapter](https://github.com/begindtheseen/seen-command/blob/main/lib/brain.mjs): `lib/brain.mjs`
- [Vault Sources](https://github.com/begindtheseen/seen-command/blob/main/brain/lib/sources.mjs): `brain/lib/sources.mjs`
- [Vault Reader](https://github.com/begindtheseen/seen-command/blob/main/brain/lib/vault.mjs): `brain/lib/vault.mjs`
- [Temporal Graph](https://github.com/begindtheseen/seen-command/blob/main/brain/lib/chronos/memoryGraph.mjs): `brain/lib/chronos/memoryGraph.mjs`
- [Graph Unifier](https://github.com/begindtheseen/seen-command/blob/main/brain/lib/unify.mjs): `brain/lib/unify.mjs`
- [Memory Writer](https://github.com/begindtheseen/seen-command/blob/main/brain/lib/memory-write.mjs): `brain/lib/memory-write.mjs`
- [Cloud Sync](https://github.com/begindtheseen/seen-command/blob/main/brain/lib/cloud.mjs): `brain/lib/cloud.mjs`
- [Chronos Desktop](https://github.com/begindtheseen/seen-command/blob/main/brain/main.js): `brain/main.js`
- [Memory Tools](https://github.com/begindtheseen/seen-command/blob/main/brain/mcp/server.mjs): `brain/mcp/server.mjs`

### Instagram Knowledge

- [Instagram API](https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/routes.mjs): `lib/instagram/routes.mjs`
- [Video Jobs](https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/jobs.mjs): `lib/instagram/jobs.mjs`
- [Instagram Adapter](https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/adapter.mjs): `lib/instagram/adapter.mjs`
- [Creator Library](https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/library.mjs): `lib/instagram/library.mjs`
- [Key-point Synthesis](https://github.com/begindtheseen/seen-command/blob/main/lib/instagram/synthesis.mjs): `lib/instagram/synthesis.mjs`

### Other components

- **Operator**
- **External Services**

## Connections

- Operator → Command Server: requests meeting
- Command Server → Meeting Runner: starts meeting (evidence: `engine/server.mjs`)
- Meeting Runner → Department Charters: routes work
- Meeting Runner → Agent Proposals: requests proposals
- Meeting Runner → Run State: writes results
- Meeting Runner → Approval Gate: gates actions
- Approval Gate → Operator: requests decision
- Run State → Dashboard Builder: renders state
- Meeting Runner → Connector Registry: gathers live data (evidence: `lib/connectors/index.mjs`)
- Connector Registry → GitHub Connector: fetches snapshot (evidence: `lib/connectors/index.mjs`)
- Connector Registry → Stripe Connector: fetches snapshot (evidence: `lib/connectors/index.mjs`)
- Approval Gate → Connector Registry: executes approved action (evidence: `lib/connectors/index.mjs`)
- Agent Proposals → LLM Adapter: reasons with
- Code Worker → LLM Adapter: uses (evidence: `engine/coder.mjs`)
- Meeting Runner → Brain Adapter: uses shared memory
- Brain Adapter → Vault Sources: resolves sources (evidence: `lib/brain.mjs`)
- Brain Adapter → Vault Reader: reads index (evidence: `lib/brain.mjs`)
- Vault Reader → Temporal Graph: builds index (evidence: `brain/lib/vault.mjs`)
- Vault Sources → Graph Unifier: feeds graph build
- Graph Unifier → Temporal Graph: uses graph engine (evidence: `brain/lib/unify.mjs`)
- Brain Adapter → Memory Writer: writes memory (evidence: `lib/brain.mjs`)
- Chronos Desktop → Vault Sources: resolves sources (evidence: `brain/main.js`)
- Chronos Desktop → Graph Unifier: builds unified graph (evidence: `brain/main.js`)
- Chronos Desktop → Cloud Sync: syncs vault (evidence: `brain/main.js`)
- Cloud Sync → Vault Reader: reads notes (evidence: `brain/lib/cloud.mjs`)
- Memory Tools → Vault Reader: reads index (evidence: `brain/mcp/server.mjs`)
- Memory Tools → Temporal Graph: queries changes (evidence: `brain/mcp/server.mjs`)
- Memory Tools → Memory Writer: exposes writer (evidence: `brain/mcp/server.mjs`)
- Command Server → Instagram API: forwards requests (evidence: `engine/server.mjs`)
- Instagram API → Video Jobs: starts jobs (evidence: `lib/instagram/routes.mjs`)
- Video Jobs → Instagram Adapter: checks setup (evidence: `lib/instagram/jobs.mjs`)
- Instagram API → Key-point Synthesis: requests key points (evidence: `lib/instagram/routes.mjs`)
- Instagram API → Creator Library: serves library (evidence: `lib/instagram/routes.mjs`)
- Instagram Adapter → External Services: uses provider
