# hugoblanc/strato architecture

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

- Interactive diagram: https://gitdiagram.com/hugoblanc/strato
- Repository: https://github.com/hugoblanc/strato
- Video tour (about a minute): https://gitdiagram.com/hugoblanc/strato/video

## Overview

Strato routes incoming Slack and connected-tool requests into topics, starts Claude Code work sessions to investigate and prepare proposed actions, then presents cards on a local board for a human to approve. Approved actions are carried out through the session or the relevant provider; the README emphasizes that nothing is posted or changed without approval. Source excerpts and the SOURCE INDEX support the core data model, provider interfaces, and selected orchestration links; unsampled modules are included where the README documents capabilities, with uncertain connections omitted.

Main entry points: [`scripts/app/ingest.ts`](https://github.com/hugoblanc/strato/blob/main/scripts/app/ingest.ts) (Slack intake), [`scripts/providers/registry.ts`](https://github.com/hugoblanc/strato/blob/main/scripts/providers/registry.ts) (Provider registry), [`scripts/core/sujet.ts`](https://github.com/hugoblanc/strato/blob/main/scripts/core/sujet.ts) (Topics and tasks), [`scripts/app/claude.ts`](https://github.com/hugoblanc/strato/blob/main/scripts/app/claude.ts) (Claude sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Request intake"]
  node_slack_ingest["Slack intake<br/>[ingest.ts]"]
  node_slack_model["Slack normalization<br/>[slack-model.ts]"]
  node_topic_model["Topics and tasks<br/>[sujet.ts]"]
  node_triage["Request triage<br/>[triage.ts]"]
end

subgraph group_work["Sessions and policy"]
  node_master["Master orchestration<br/>[master.ts]"]
  node_claude_sessions["Claude sessions<br/>[claude.ts]"]
  node_prompts["Session policy<br/>[prompts.ts]"]
  node_transcripts["Session transcripts<br/>[transcript.ts]"]
end

subgraph group_board["Board and approval"]
  node_board_server["Board server<br/>[serve.ts]"]
  node_board_ui["Board UI<br/>[board.ts]"]
  node_board_actions["Board actions<br/>[actions.js]"]
  node_action_gate["Approval gate<br/>[gate.ts]"]
  node_action_delivery["Action delivery<br/>[act.ts]"]
end

subgraph group_providers["Tools and providers"]
  node_provider_registry["Provider registry<br/>[registry.ts]"]
  node_provider_contract["Provider contract<br/>[sdk.ts]"]
  node_slack_provider["Slack provider<br/>[index.ts]"]
  node_linear_provider["Linear provider<br/>[index.ts]"]
  node_gitlab["GitLab integration<br/>[gitlab.ts]"]
  node_provider_settings["Provider links<br/>[links.ts]"]
end

subgraph group_state["Profile and state"]
  node_state_boot["Runtime configuration<br/>[env.ts]"]
  node_profile["Profile settings<br/>[settings.ts]"]
  node_persistent_state[("Local state<br/>[store.ts]")]
  node_topic_keys["Topic keys<br/>[keys.ts]"]
  node_card_tasks["Card tasks<br/>[tasks.ts]"]
end

node_person(("Person"))
node_slack(("Slack workspace"))
node_connected_tools(("Connected tools"))

node_slack -->|"provides messages"| node_slack_ingest
node_connected_tools -.->|"provides requests"| node_slack_ingest
node_slack_ingest -->|"normalizes events"| node_slack_model
node_slack_ingest -->|"updates topics"| node_topic_model
node_slack_ingest -->|"uses providers"| node_provider_registry
node_slack_model -->|"classifies requests"| node_triage
node_slack_model -->|"builds thread keys"| node_topic_keys
node_master -.->|"arms listener"| node_slack_ingest
node_master -.->|"starts sessions"| node_claude_sessions
node_claude_sessions -.->|"uses policy"| node_prompts
node_claude_sessions -.->|"records sessions"| node_transcripts
node_claude_sessions -.->|"updates topics"| node_topic_model
node_board_server -->|"serves board"| node_board_ui
node_person -->|"reviews cards"| node_board_ui
node_board_ui -.->|"dispatches clicks"| node_board_actions
node_board_actions -.->|"submits actions"| node_board_server
node_board_server -->|"checks approval"| node_action_gate
node_action_gate -.->|"authorizes action"| node_action_delivery
node_action_delivery -.->|"dispatches action"| node_provider_registry
node_provider_registry -->|"implements interface"| node_provider_contract
node_provider_registry -->|"registers provider"| node_slack_provider
node_provider_registry -->|"registers provider"| node_linear_provider
node_slack_provider -.->|"reads and acts"| node_connected_tools
node_linear_provider -.->|"reads and acts"| node_connected_tools
node_gitlab -->|"follows merge requests"| node_connected_tools
node_state_boot -->|"loads settings"| node_profile
node_state_boot -->|"installs descriptors"| node_provider_settings
node_state_boot -.->|"configures state"| node_persistent_state
node_persistent_state -->|"reads settings"| node_profile
node_persistent_state -->|"reads and writes topics"| node_topic_model
node_topic_model -->|"resolves keys"| node_topic_keys
node_topic_model -->|"syncs task status"| node_card_tasks
node_topic_keys -->|"resolves links"| node_provider_settings

click node_slack_ingest "https://github.com/hugoblanc/strato/blob/main/scripts/app/ingest.ts"
click node_slack_model "https://github.com/hugoblanc/strato/blob/main/scripts/chat/slack-model.ts"
click node_topic_model "https://github.com/hugoblanc/strato/blob/main/scripts/core/sujet.ts"
click node_triage "https://github.com/hugoblanc/strato/blob/main/scripts/core/triage.ts"
click node_master "https://github.com/hugoblanc/strato/blob/main/scripts/core/master.ts"
click node_claude_sessions "https://github.com/hugoblanc/strato/blob/main/scripts/app/claude.ts"
click node_prompts "https://github.com/hugoblanc/strato/blob/main/scripts/policy/prompts.ts"
click node_transcripts "https://github.com/hugoblanc/strato/blob/main/scripts/claude/transcript.ts"
click node_board_server "https://github.com/hugoblanc/strato/blob/main/scripts/server/serve.ts"
click node_board_ui "https://github.com/hugoblanc/strato/blob/main/scripts/board.ts"
click node_board_actions "https://github.com/hugoblanc/strato/blob/main/scripts/client/actions.js"
click node_action_gate "https://github.com/hugoblanc/strato/blob/main/scripts/core/gate.ts"
click node_action_delivery "https://github.com/hugoblanc/strato/blob/main/scripts/app/act.ts"
click node_provider_registry "https://github.com/hugoblanc/strato/blob/main/scripts/providers/registry.ts"
click node_provider_contract "https://github.com/hugoblanc/strato/blob/main/scripts/providers/sdk.ts"
click node_slack_provider "https://github.com/hugoblanc/strato/blob/main/scripts/providers/slack/index.ts"
click node_linear_provider "https://github.com/hugoblanc/strato/blob/main/scripts/providers/linear/index.ts"
click node_gitlab "https://github.com/hugoblanc/strato/blob/main/scripts/app/gitlab.ts"
click node_provider_settings "https://github.com/hugoblanc/strato/blob/main/scripts/core/links.ts"
click node_state_boot "https://github.com/hugoblanc/strato/blob/main/scripts/app/env.ts"
click node_profile "https://github.com/hugoblanc/strato/blob/main/scripts/core/settings.ts"
click node_persistent_state "https://github.com/hugoblanc/strato/blob/main/scripts/app/store.ts"
click node_topic_keys "https://github.com/hugoblanc/strato/blob/main/scripts/core/keys.ts"
click node_card_tasks "https://github.com/hugoblanc/strato/blob/main/scripts/core/tasks.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_slack_ingest,node_slack_model,node_topic_model,node_triage toneBlue
class node_master,node_claude_sessions,node_prompts,node_transcripts toneAmber
class node_board_server,node_board_ui,node_board_actions,node_action_gate,node_action_delivery toneMint
class node_provider_registry,node_provider_contract,node_slack_provider,node_linear_provider,node_gitlab,node_provider_settings toneRose
class node_state_boot,node_profile,node_persistent_state,node_topic_keys,node_card_tasks,node_person,node_slack,node_connected_tools toneIndigo
```

## Components

### Request intake

- [Slack intake](https://github.com/hugoblanc/strato/blob/main/scripts/app/ingest.ts): `scripts/app/ingest.ts`
- [Slack normalization](https://github.com/hugoblanc/strato/blob/main/scripts/chat/slack-model.ts): `scripts/chat/slack-model.ts`
- [Topics and tasks](https://github.com/hugoblanc/strato/blob/main/scripts/core/sujet.ts): `scripts/core/sujet.ts`
- [Request triage](https://github.com/hugoblanc/strato/blob/main/scripts/core/triage.ts): `scripts/core/triage.ts`

### Sessions and policy

- [Master orchestration](https://github.com/hugoblanc/strato/blob/main/scripts/core/master.ts): `scripts/core/master.ts`
- [Claude sessions](https://github.com/hugoblanc/strato/blob/main/scripts/app/claude.ts): `scripts/app/claude.ts`
- [Session policy](https://github.com/hugoblanc/strato/blob/main/scripts/policy/prompts.ts): `scripts/policy/prompts.ts`
- [Session transcripts](https://github.com/hugoblanc/strato/blob/main/scripts/claude/transcript.ts): `scripts/claude/transcript.ts`

### Board and approval

- [Board server](https://github.com/hugoblanc/strato/blob/main/scripts/server/serve.ts): `scripts/server/serve.ts`
- [Board UI](https://github.com/hugoblanc/strato/blob/main/scripts/board.ts): `scripts/board.ts`
- [Board actions](https://github.com/hugoblanc/strato/blob/main/scripts/client/actions.js): `scripts/client/actions.js`
- [Approval gate](https://github.com/hugoblanc/strato/blob/main/scripts/core/gate.ts): `scripts/core/gate.ts`
- [Action delivery](https://github.com/hugoblanc/strato/blob/main/scripts/app/act.ts): `scripts/app/act.ts`

### Tools and providers

- [Provider registry](https://github.com/hugoblanc/strato/blob/main/scripts/providers/registry.ts): `scripts/providers/registry.ts`
- [Provider contract](https://github.com/hugoblanc/strato/blob/main/scripts/providers/sdk.ts): `scripts/providers/sdk.ts`
- [Slack provider](https://github.com/hugoblanc/strato/blob/main/scripts/providers/slack/index.ts): `scripts/providers/slack/index.ts`
- [Linear provider](https://github.com/hugoblanc/strato/blob/main/scripts/providers/linear/index.ts): `scripts/providers/linear/index.ts`
- [GitLab integration](https://github.com/hugoblanc/strato/blob/main/scripts/app/gitlab.ts): `scripts/app/gitlab.ts`
- [Provider links](https://github.com/hugoblanc/strato/blob/main/scripts/core/links.ts): `scripts/core/links.ts`

### Profile and state

- [Runtime configuration](https://github.com/hugoblanc/strato/blob/main/scripts/app/env.ts): `scripts/app/env.ts`
- [Profile settings](https://github.com/hugoblanc/strato/blob/main/scripts/core/settings.ts): `scripts/core/settings.ts`
- [Local state](https://github.com/hugoblanc/strato/blob/main/scripts/app/store.ts): `scripts/app/store.ts`
- [Topic keys](https://github.com/hugoblanc/strato/blob/main/scripts/core/keys.ts): `scripts/core/keys.ts`
- [Card tasks](https://github.com/hugoblanc/strato/blob/main/scripts/core/tasks.ts): `scripts/core/tasks.ts`

### Other components

- **Person**
- **Slack workspace**
- **Connected tools**

## Connections

- Slack workspace → Slack intake: provides messages (evidence: `README.md`)
- Connected tools → Slack intake: provides requests
- Slack intake → Slack normalization: normalizes events (evidence: `scripts/app/ingest.ts`)
- Slack intake → Topics and tasks: updates topics (evidence: `scripts/app/ingest.ts`)
- Slack intake → Provider registry: uses providers (evidence: `scripts/app/ingest.ts`)
- Slack normalization → Request triage: classifies requests (evidence: `scripts/chat/slack-model.ts`)
- Slack normalization → Topic keys: builds thread keys (evidence: `scripts/chat/slack-model.ts`)
- Master orchestration → Slack intake: arms listener
- Master orchestration → Claude sessions: starts sessions
- Claude sessions → Session policy: uses policy
- Claude sessions → Session transcripts: records sessions
- Claude sessions → Topics and tasks: updates topics
- Board server → Board UI: serves board (evidence: `scripts/server/serve.ts`)
- Person → Board UI: reviews cards (evidence: `README.md`)
- Board UI → Board actions: dispatches clicks
- Board actions → Board server: submits actions
- Board server → Approval gate: checks approval (evidence: `scripts/server/serve.ts`)
- Approval gate → Action delivery: authorizes action
- Action delivery → Provider registry: dispatches action
- Provider registry → Provider contract: implements interface (evidence: `scripts/providers/registry.ts`)
- Provider registry → Slack provider: registers provider (evidence: `scripts/providers/registry.ts`)
- Provider registry → Linear provider: registers provider (evidence: `scripts/providers/registry.ts`)
- Slack provider → Connected tools: reads and acts
- Linear provider → Connected tools: reads and acts
- GitLab integration → Connected tools: follows merge requests (evidence: `README.md`)
- Runtime configuration → Profile settings: loads settings (evidence: `scripts/app/env.ts`)
- Runtime configuration → Provider links: installs descriptors (evidence: `scripts/app/env.ts`)
- Runtime configuration → Local state: configures state (evidence: `scripts/app/store.ts`)
- Local state → Profile settings: reads settings (evidence: `scripts/app/store.ts`)
- Local state → Topics and tasks: reads and writes topics (evidence: `scripts/app/store.ts`)
- Topics and tasks → Topic keys: resolves keys (evidence: `scripts/core/sujet.ts`)
- Topics and tasks → Card tasks: syncs task status (evidence: `scripts/core/sujet.ts`)
- Topic keys → Provider links: resolves links (evidence: `scripts/core/keys.ts`)
