# henrynkoh/aiagents_starstory architecture

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

- Interactive diagram: https://gitdiagram.com/henrynkoh/aiagents_starstory
- Repository: https://github.com/henrynkoh/aiagents_starstory

## Overview

This repository is a human-directed AI-agent media factory for researching and producing verified business-success stories, adapting them for many channels, and staging them for review. The main workflow runs from swarm coordination and case discovery through story production, red-team approval, and channel staging; the CLI also scaffolds and validates episode workspaces. The web app presents the swarm and EP-001 examples. Several capabilities are documented in the README but their implementation was not sampled, so those links are documented rather than inferred from unseen code.

Main entry points: [`orchestrator/swarm_orchestrator.py`](https://github.com/henrynkoh/aiagents_starstory/blob/main/orchestrator/swarm_orchestrator.py) (Swarm Orchestrator), [`episodes/EP-001_intercom-fin-ai-agent/story.md`](https://github.com/henrynkoh/aiagents_starstory/blob/main/episodes/EP-001_intercom-fin-ai-agent/story.md) (Story & Blueprint), [`episodes/EP-001_intercom-fin-ai-agent`](https://github.com/henrynkoh/aiagents_starstory/tree/main/episodes/EP-001_intercom-fin-ai-agent) (Episode Workspace), [`eldo_browser/channel_publishers.mjs`](https://github.com/henrynkoh/aiagents_starstory/blob/main/eldo_browser/channel_publishers.mjs) (Channel Draft Stager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["Coordination"]
  node_orchestrator["Swarm Orchestrator"]
  node_agent_roster["Agent Roster<br/>[roster.json]"]
end

subgraph group_research["Research &amp; Blueprint"]
  node_research_ops["Case Discovery"]
  node_research_sources["Research Sites"]
end

subgraph group_production["Story &amp; Media"]
  node_episode_workspace["Episode Workspace"]
  node_story_templates["Story Templates"]
  node_story_blueprint["Story &amp; Blueprint<br/>[story.md]"]
  node_channel_outputs["Channel &amp; Ad Drafts"]
  node_seo_metadata["SEO Metadata<br/>[seo_metadata.json]"]
end

subgraph group_audit_ops["Audit &amp; Operations"]
  node_red_team_audit["Red-Team Audit<br/>[red_team_audit.md]"]
  node_channel_stager["Channel Draft Stager"]
  node_browser_stager["Multi-Channel Staging"]
  node_media_platforms["Media Platforms"]
end

subgraph group_experience["Web Experience"]
  node_web_page["Landing Page<br/>[page.tsx]"]
  node_swarm_landing["Swarm Explorer &amp; Studio<br/>[SwarmLanding.tsx]"]
  node_swarm_data["Swarm &amp; Episode Data<br/>[swarmData.ts]"]
end

node_human_ceo(("Human CEO"))

node_human_ceo -->|"requests commands"| node_orchestrator
node_orchestrator -->|"loads roster"| node_agent_roster
node_orchestrator -->|"scaffolds or validates"| node_episode_workspace
node_human_ceo -->|"starts research"| node_research_ops
node_research_ops -->|"collects evidence"| node_research_sources
node_research_ops -->|"writes research bundle"| node_episode_workspace
node_episode_workspace -->|"holds story"| node_story_blueprint
node_story_templates -->|"guides structure"| node_story_blueprint
node_story_blueprint -->|"adapts story"| node_channel_outputs
node_story_blueprint -->|"produces metadata"| node_seo_metadata
node_human_ceo -.->|"reviews gate"| node_red_team_audit
node_orchestrator -->|"validates gate"| node_red_team_audit
node_channel_stager -->|"reads channel draft"| node_episode_workspace
node_channel_stager -->|"opens channel"| node_media_platforms
node_channel_stager -->|"requests final review"| node_human_ceo
node_browser_stager -->|"opens staging tabs"| node_media_platforms
node_browser_stager -->|"requests login check"| node_human_ceo
node_web_page -->|"renders"| node_swarm_landing
node_swarm_landing -->|"displays data"| node_swarm_data

click node_orchestrator "https://github.com/henrynkoh/aiagents_starstory/blob/main/orchestrator/swarm_orchestrator.py"
click node_agent_roster "https://github.com/henrynkoh/aiagents_starstory/blob/main/swarm/roster.json"
click node_research_ops "https://github.com/henrynkoh/aiagents_starstory/blob/main/eldo_browser/eldo_swarm_runner.mjs"
click node_episode_workspace "https://github.com/henrynkoh/aiagents_starstory/tree/main/episodes/EP-001_intercom-fin-ai-agent"
click node_story_templates "https://github.com/henrynkoh/aiagents_starstory/tree/main/templates"
click node_story_blueprint "https://github.com/henrynkoh/aiagents_starstory/blob/main/episodes/EP-001_intercom-fin-ai-agent/story.md"
click node_channel_outputs "https://github.com/henrynkoh/aiagents_starstory/tree/main/episodes/EP-001_intercom-fin-ai-agent/channels"
click node_seo_metadata "https://github.com/henrynkoh/aiagents_starstory/blob/main/episodes/EP-001_intercom-fin-ai-agent/seo_metadata.json"
click node_red_team_audit "https://github.com/henrynkoh/aiagents_starstory/blob/main/episodes/EP-001_intercom-fin-ai-agent/red_team_audit.md"
click node_channel_stager "https://github.com/henrynkoh/aiagents_starstory/blob/main/eldo_browser/channel_publishers.mjs"
click node_browser_stager "https://github.com/henrynkoh/aiagents_starstory/blob/main/eldo_browser/eldo_swarm_runner.mjs"
click node_web_page "https://github.com/henrynkoh/aiagents_starstory/blob/main/web/src/app/page.tsx"
click node_swarm_landing "https://github.com/henrynkoh/aiagents_starstory/blob/main/web/src/components/SwarmLanding.tsx"
click node_swarm_data "https://github.com/henrynkoh/aiagents_starstory/blob/main/web/src/data/swarmData.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_orchestrator,node_agent_roster toneBlue
class node_research_ops,node_research_sources toneAmber
class node_episode_workspace,node_story_templates,node_story_blueprint,node_channel_outputs,node_seo_metadata toneMint
class node_red_team_audit,node_channel_stager,node_browser_stager,node_media_platforms toneRose
class node_web_page,node_swarm_landing,node_swarm_data,node_human_ceo toneIndigo
```

## Components

### Coordination

- [Swarm Orchestrator](https://github.com/henrynkoh/aiagents_starstory/blob/main/orchestrator/swarm_orchestrator.py): `orchestrator/swarm_orchestrator.py`
- [Agent Roster](https://github.com/henrynkoh/aiagents_starstory/blob/main/swarm/roster.json): `swarm/roster.json`

### Research & Blueprint

- [Case Discovery](https://github.com/henrynkoh/aiagents_starstory/blob/main/eldo_browser/eldo_swarm_runner.mjs): `eldo_browser/eldo_swarm_runner.mjs`
- **Research Sites**

### Story & Media

- [Episode Workspace](https://github.com/henrynkoh/aiagents_starstory/tree/main/episodes/EP-001_intercom-fin-ai-agent): `episodes/EP-001_intercom-fin-ai-agent`
- [Story Templates](https://github.com/henrynkoh/aiagents_starstory/tree/main/templates): `templates`
- [Story & Blueprint](https://github.com/henrynkoh/aiagents_starstory/blob/main/episodes/EP-001_intercom-fin-ai-agent/story.md): `episodes/EP-001_intercom-fin-ai-agent/story.md`
- [Channel & Ad Drafts](https://github.com/henrynkoh/aiagents_starstory/tree/main/episodes/EP-001_intercom-fin-ai-agent/channels): `episodes/EP-001_intercom-fin-ai-agent/channels`
- [SEO Metadata](https://github.com/henrynkoh/aiagents_starstory/blob/main/episodes/EP-001_intercom-fin-ai-agent/seo_metadata.json): `episodes/EP-001_intercom-fin-ai-agent/seo_metadata.json`

### Audit & Operations

- [Red-Team Audit](https://github.com/henrynkoh/aiagents_starstory/blob/main/episodes/EP-001_intercom-fin-ai-agent/red_team_audit.md): `episodes/EP-001_intercom-fin-ai-agent/red_team_audit.md`
- [Channel Draft Stager](https://github.com/henrynkoh/aiagents_starstory/blob/main/eldo_browser/channel_publishers.mjs): `eldo_browser/channel_publishers.mjs`
- [Multi-Channel Staging](https://github.com/henrynkoh/aiagents_starstory/blob/main/eldo_browser/eldo_swarm_runner.mjs): `eldo_browser/eldo_swarm_runner.mjs`
- **Media Platforms**

### Web Experience

- [Landing Page](https://github.com/henrynkoh/aiagents_starstory/blob/main/web/src/app/page.tsx): `web/src/app/page.tsx`
- [Swarm Explorer & Studio](https://github.com/henrynkoh/aiagents_starstory/blob/main/web/src/components/SwarmLanding.tsx): `web/src/components/SwarmLanding.tsx`
- [Swarm & Episode Data](https://github.com/henrynkoh/aiagents_starstory/blob/main/web/src/data/swarmData.ts): `web/src/data/swarmData.ts`

### Other components

- **Human CEO**

## Connections

- Human CEO → Swarm Orchestrator: requests commands (evidence: `README.md`)
- Swarm Orchestrator → Agent Roster: loads roster (evidence: `orchestrator/swarm_orchestrator.py`)
- Swarm Orchestrator → Episode Workspace: scaffolds or validates (evidence: `orchestrator/swarm_orchestrator.py`)
- Human CEO → Case Discovery: starts research (evidence: `README.md`)
- Case Discovery → Research Sites: collects evidence (evidence: `eldo_browser/eldo_swarm_runner.mjs`)
- Case Discovery → Episode Workspace: writes research bundle (evidence: `eldo_browser/eldo_swarm_runner.mjs`)
- Episode Workspace → Story & Blueprint: holds story (evidence: `README.md`)
- Story Templates → Story & Blueprint: guides structure (evidence: `README.md`)
- Story & Blueprint → Channel & Ad Drafts: adapts story (evidence: `README.md`)
- Story & Blueprint → SEO Metadata: produces metadata (evidence: `README.md`)
- Human CEO → Red-Team Audit: reviews gate (evidence: `README.md`)
- Swarm Orchestrator → Red-Team Audit: validates gate (evidence: `orchestrator/swarm_orchestrator.py`)
- Channel Draft Stager → Episode Workspace: reads channel draft (evidence: `eldo_browser/channel_publishers.mjs`)
- Channel Draft Stager → Media Platforms: opens channel (evidence: `eldo_browser/channel_publishers.mjs`)
- Channel Draft Stager → Human CEO: requests final review (evidence: `eldo_browser/channel_publishers.mjs`)
- Multi-Channel Staging → Media Platforms: opens staging tabs (evidence: `eldo_browser/eldo_swarm_runner.mjs`)
- Multi-Channel Staging → Human CEO: requests login check (evidence: `eldo_browser/eldo_swarm_runner.mjs`)
- Landing Page → Swarm Explorer & Studio: renders (evidence: `web/src/app/page.tsx`)
- Swarm Explorer & Studio → Swarm & Episode Data: displays data (evidence: `web/src/components/SwarmLanding.tsx`)
