Blinkin 2.0 — Architecture

Implementation Status · Updated: 2026-03-22 · blinkin-2-platform monorepo

107K+
Lines of Code
+71K since Mar 15
1,028
TypeScript Files
+845 since Mar 15
57
Test Scripts
+32 since Mar 15
30
Contract Domains
Shared type system
62
Worker Stores
Runtime persistence
10
Web Pages
Full React frontend
7
Architecture Layers
Implemented + tested
Partial / in progress
Planned / contracts ready
External / existing repos
New since last update

Layer-by-Layer Implementation Status

Each component shows its current status, what files implement it, and which tests cover it. Components marked "New" were added or significantly expanded since the Mar 15 snapshot.

Layer 1 — Interfaces44,552 LOC
Chat Panel
Central chat window, free-form input, streaming responses, conversation history
Implemented
Tests: state-store, agent-loop
ChatPanel.tsx, use-agent-runner.ts
Executive Editor
TipTap-based inline document editor with versions, citations, PDF export
Implemented
ExecutiveEditor.tsx
Source Panel (Browse)
Source selection, feed import, RSS, article search
Implemented
BrowsePage.tsx
Widget Surface (Dashboard)
Live widget rendering, drag/drop layout, 17 widget components
Implemented
Tests: widget-renderer
LiveWidgetSurface.tsx
Review Inbox
Side-by-side diff, package review, approve/reject with notes, actor identity
Implemented
ReviewInbox.tsx
Control Plane Board
Kanban board for agent tasks, operator actions, live SSE, dependency graph
Implemented
Tests: operator-actions, scheduler
ControlPlaneBoard.tsx
Memory Panel
View/edit agent memory files, scope selection (org/agent/work-item)
Implemented
Tests: memory-api, memory-runtime
MemoryPanel.tsx
Actor Identity Bar
Operator / reviewer / supervisor identity switching
Implemented
Tests: actor-identity
Sidebar Navigation
Browse, Companions, Boards, Apps, Agents, Spaces, Controls, Collections, Favourites
Implemented
Sidebar.tsx
Spaces Workspace
Knowledge workspaces: assistant, knowledge, outputs, connectors, settings tabs
Implemented
26 Spaces components
SpaceWorkspacePage.tsx + 25 space-*.tsx
Insurance Monitor
RegWatch: signal stream, inbox mode, monitor mode, role tabs, channel list, output rail, briefing config
New — 10 components
Insurance*.tsx (10 files)
Agent Library + Public Share
Agent catalog, share locator system, external user management
Implemented
AgentsPage, ExternalUsersPage
Apps Page (Launcher)
Platform app launcher for agentic applications
Implemented
AppsPage.tsx, AppBuilderPage.tsx
Boards (Picasso Runtime)
Page/form/section/block renderer, 8+ Picasso component types, Material Design normalization
Implemented
BoardsPage.tsx + 25 picasso/*.tsx
Companions (Houston)
Mini-apps via link, 15+ component types, whitelabel
Via Host Bridge SDK
Data Controls
Governance settings, tool policies, org controls
Implemented
DataControlsPage.tsx
Layer 2 — Agents4,698 LOC orchestrator
Agent Loop
Plan-Act-Observe-Emit-Verify cycle, Anthropic tool use, 25+ registered tools
Implemented
Tests: agent-loop
orchestrator/agent-loop.ts
Agent Definitions
Full schema: persona, model routing, tools, constraints, triggers, skills, governance
Implemented + Contracts
Tests: agent-definition-mapping
contracts/agent-definition.ts (41KB)
Agent Standard (agents.md)
Import/export to Linux Foundation agents.md format. parseAgentsMd() + toAgentsMd()
Implemented
contracts/agent-standard.ts
Multi-Model Router
Claude (Opus/Sonnet/Haiku), Gemini, OpenAI, DeepSeek — per subtask routing
Implemented
orchestrator/provider-router.ts, gemini-language-provider.ts, openai-language-provider.ts
Executive Summary Agent
Sources → draft → TipTap → PDF. First E2E use case.
Implemented
Jingle Writer Agent
Write 3 jingles, save as documents
Preset defined
Tests: jingle-use-case
TTS Agent
Text → ElevenLabs → MP3, blob storage
Preset + TTS tool
Tests: tts-inference
Quality Review Agent
Fact check, style check, brand guideline check
Preset defined
Research Agent
Deep research with web search, source analysis, knowledge base
Preset defined
Zweistein Agent Mapping
mapZweisteinAgent() — existing agents to new AgentDefinition format
Implemented
Tests: agent-definition-mapping
Langfuse Telemetry
LLM observability — traces, spans, cost tracking per run
Implemented
orchestrator/langfuse-telemetry.ts
Partner Agents (A2A)
External agents via A2A protocol, marketplace
Planned — contracts defined
Layer 3 — Orchestration, Governance, EvalCore implemented
Scheduler Daemon
Autonomous loop: reconcile → lease → dispatch → heartbeat. Configurable interval (1.5s default) + drain limit
Implemented
Tests: autonomous-scheduler, scheduler
worker/runtime/scheduler.ts
Work Items + Dependency DAG
10 status columns, hard/soft/approval dependencies, artifact input/output links
Implemented
Tests: operator-actions
8 work-item-*.ts stores
Leasing + Timeout
Prevents double execution, expiry reconciliation, drain batching
Implemented
Artifact Provenance Graph
derived_from, input_to, reviews, publishes — full lineage tracking
Implemented
artifact-store.ts, artifact-edge.ts
Scheduler Coordinator
Multi-worker coordination: local (in-process), Postgres (distributed), Durable Object (Cloudflare)
Implemented
Tests: scheduler-coordinator-service, scheduler-coordination
Human Review Gate
Review column — only humans can approve. Configurable per work item type
Implemented
Review Packages
Widget bundles with selective or all-or-nothing approval, audit trail
Implemented
4 widget-review-package-*.ts stores
Policy Profiles
Tool allowlists/denylists, autonomy level, retry policy, publish policy, maxToolCalls budget
Implemented
policy-store.ts, server-policy-store.ts
Tool Audit Log
Every tool call logged: allow/deny/escalate, hash-chain, severity
Contracts + store
Notifications
Control plane notifications for reviewers/operators on status changes
Implemented
control-plane-notification-store.ts
Operator Actions
Retry, cancel, reassign, pause/resume scheduler, block/unblock
Implemented
Tests: operator-actions
Rate Limiter
Token-bucket per org. Tiers: free (20/min), starter (60), pro (200), enterprise (1000)
Implemented
Tests: rate-limiter
Cron Trigger Evaluator
Scheduled jobs with cron expressions, persistent job store
Implemented
cron-trigger-evaluator.ts, scheduled-job-store.ts
Supervisor Rules
Auto-generate child tasks (pdf_export, review_package), cascade artifacts
Implemented
Kanban Tools (Agent-Facing)
kanban_list_tasks, kanban_get_task, kanban_create_task, kanban_update_task, kanban_add_comment, kanban_block_task, kanban_collect_results
Contracts + tools
contracts/kanban-tools.ts
Eval Loop
Quality, accuracy, style, cost, user feedback scoring
Planned — spec written
specs/2026-03-20-eval-loop-design.md
Cost Tracking + Budget Enforcement
Immutable cost events, budget policies, hard-stop enforcement per org
Planned — spec written
specs/2026-03-22-multi-agent-coordination-architecture-design.md
Layer 4 — Blinkin Computer (Runtime)44,520 LOC worker
SSE Streaming
9 event types: run.started, text.delta, widget.spec, state.patch, document.op, tool.result, run.completed, run.failed
Implemented
contracts/agent-bus.ts, sse-client/
State Store (Client)
Unified: form + agent + chat + widgets + documents + memory + board editor
Implemented
Tests: state-store
state-store/ (2,173 LOC)
Memory Layer
8 model-agnostic tools + Claude-native bridge + scoping (org/agent/work-item/chat-room/app) + distillation + semantic index
Implemented
Tests: memory-api, memory-runtime, anthropic-memory, memory-tools
5 memory files across worker + orchestrator
Tool Router
25+ tools: render_widget, create_document, memory_*, kanban_*, web_scrape, web_search, text_to_speech, export_document_pdf
Implemented
orchestrator/tool-router.ts
Blob Store
Local filesystem + S3/R2 adapter, per-org namespace partitioning
Implemented
Tests: runtime-blob-store
PDF Export
Server-side via pdf-lib, document → PDF → blob store
Implemented
pdf-export.ts
Web Tools
web_scrape (text/html/screenshot), web_search (brave/tavily/duckduckgo/jina), SSRF protection
Implemented
contracts/web-tools.ts, contracts/security.ts
Multi-Tenant Isolation
SQLite per org (dev) + PostgreSQL (prod), lazy tenant loading, listKnownOrgIds()
Implemented
Tests: tenant-runtime-isolation, runtime-store-backend
tenant-runtime-store-manager.ts
Spaces Backend
Web scraping pipeline: discovery → fetch → scrape → processing daemon. Audio: processing → transcription (Whisper)
Implemented
10 space-*.ts files in worker/runtime
AgUI Events
9 AgUI event types for UI integration: RUN_STARTED, TEXT_MESSAGE_*, TOOL_CALL_RESULT, STATE_DELTA, RUN_FINISHED, RUN_ERROR, CUSTOM
Contracts
contracts/ag-ui.ts (9.5KB)
Heartbeat Service
Long-running task heartbeats for agent execution monitoring
Implemented
orchestrator/heartbeat-service.ts
Health + Readiness
GET /health + /api/ready with async dependency checks
Implemented
Tests: health
Structured Logger
JSON logging, level filtering, child loggers, no external deps
Contracts ready
Tests: logger
Graceful Shutdown
SIGTERM/SIGINT → scheduler stop → DB close, configurable timeout
Contracts ready
Audit Retention
Log cleanup jobs for old audit data
Implemented
jobs/audit-retention.ts
Layer 5 — Business Context (Secret Superpower)Contracts ready, store partial
Writing Rules
Tonality, style, formality (du/Sie/neutral), forbidden/required phrases, language
Contract defined
contracts/business-context.ts
Brand Guidelines
Company name, slogan, key messages, voice attributes, colors, logo
Contract defined
Personas
Target audiences with demographics, pain points, goals, tone override, language level
Contract defined
Templates
Document templates (executive, blog, social, etc.) with outlines + instructions
Contract defined
SOPs
Process descriptions with sequential steps, approval gates, approvers list
Contract defined
Domain Knowledge
Glossary, regulations, FAQ, domain-specific context
Contract defined
Skill Playbooks
Workflow recipes with agent roles, tools, and step sequences
Contract defined
Signal Backbone
Generic domain-agnostic signals: jurisdiction, topics, business units, functions, channels
New — contracts + UI
contracts/spaces.ts (SignalRecord, SignalChannel, SignalRolePreset)
Context Store + Loading
assembleContextPrompt() injects business context into agent system prompts
Prompt assembly yes, DB CRUD store no
Context Editor UI
Visual editor for writing rules, brand, templates, personas
Planned — spec written
specs/2026-03-20-business-context-editor-design.md
Layer 6 — Systems of RecordCore implemented
SQLite Runtime Store
62 specialized stores, isolated per org, schema migrations, seed data
Implemented
Tests: runtime-store-backend, tenant-runtime-isolation
PostgreSQL Store
Production-ready hybrid bridge — reads from SQLite, writes to Postgres for critical tables
Implemented
postgres-runtime-store.ts
Document Store
TipTap JSON, version history, 6 document operations (create, insert, rewrite, move, cite, export)
Implemented
document-store.ts, document-record-store.ts, document-operation-store.ts
Widget Store
Definitions, versioning, layout, persistence, runtime state, release publishing
Implemented
8 widget-*.ts stores
Blob Store
Local + S3/R2 adapter, per-org namespace, PDFs + audio + memory files + images
Implemented
Tests: runtime-blob-store
Memory File Store
Agent memory files scoped to work item / chat room / app / agent / org
Implemented
Tests: memory-api, memory-runtime
Feed / Source Store
RSS import, article management, source selection persistence
Implemented
feed-store.ts, feed-service.ts
Space Store
Space definitions, settings, knowledge items, connectors, workspace state
Implemented
space-store.ts
Agent Store
Agent definitions persistence, demo agents, presets
Implemented
agent-store.ts, demo-agent.ts
Studio API Adapter
Read/import flows from Studio, fixture support for testing
Implemented
adapters/studio-api.ts
Picasso Adapters
Board graph adapters for Picasso editor ↔ runtime model transformation
Implemented
adapters/picasso-boardgraph-adapters.ts, picasso-editor-boardgraph-adapters.ts
External APIs
CRM, CMS, Slack, Zammad, third-party integrations
Planned — web tools as bridge
Layer 7 — Platform ServicesPartial
Server Authorization
Actor headers, org routing, bearer token, CORS
Implemented
Tests: server-authorization
Actor Identity System
6 roles (operator, reviewer, supervisor, host, agent, system), 5 org roles (admin → external), source tracking
Implemented
contracts/actor.ts
Sharing System
Share locators for agents + resources, public/password/external_users access, slug validation + reserved words
Implemented
contracts/sharing.ts
Multi-Tenant Store Manager
SQLite per org, lazy loading, listKnownOrgIds(), tenant isolation
Implemented
Tests: tenant-runtime-isolation
Input Validation
Lightweight validators: isString, isNumber, isObject, requireOneOf — no external deps
Contracts ready
Tests: validation
SSRF Protection
URL validation: blocks private IPs, internal hostnames, non-HTTP schemes
Implemented
contracts/security.ts
Channel Gateway
Multi-platform messaging: Slack, Teams, Discord, Telegram, WhatsApp. Teams POC working.
Teams POC done, others planned
chat-gateway/ (672 LOC)
Host Bridge SDK
PostMessage SDK for embedding in Houston/Picasso, 9 host→app + 9 app→host message types
Implemented
host-bridge/, react-embed/, embed-widget/
SSE Client
Browser SSE client with auto-reconnect for agent streams
Implemented
sse-client/agent-stream-client.ts
Cloudflare Infrastructure
Workers entry, Durable Objects (memory + tenant), request security
Implemented
worker/cf/*.ts
Auth0 Integration
JWT validation, RBAC, SSO — pattern from Studio API
Planned
Stripe / Paddle Billing
Subscriptions, webhooks, usage metering, invoicing
Planned — pattern from stripemeter
PostHog Analytics
Product analytics events
Planned
Email Notifications
Invite, reset, verify templates
Planned

Contract Domain Map — 30 Shared Type Modules

All contracts live in packages/contracts/src/ (8,211 LOC total). Zero external dependencies. Pure TypeScript types shared between all apps and packages via @blinkin/contracts.

Core Agent & Orchestration

Agent Definition
agent-definition.ts (41KB)
Full agent configuration: persona, model routing, tools, skills, constraints, triggers, governance, access policies
AgentDefinition AgentPersona AgentModelConfig AgentKnowledgeMode AgentConstraints AgentSkillRef AgentToolPolicy AgentPermissions
Agent Standard
agent-standard.ts (10KB)
Import/export to Linux Foundation agents.md format. Portable agent interop.
AgentsMdFormat parseAgentsMd() toAgentsMd()
Agent Bus
agent-bus.ts (4.1KB)
Agent run lifecycle: request, response, 9 SSE stream event types
AgentRunRequest AgentRunResponse AgentStreamEvent AgentTextDeltaEvent AgentWidgetSpecDeltaEvent
Control Plane
control-plane.ts (12KB)
Work items, dependency DAG, artifacts, policy engine. The Kanban Board core.
WorkItemRecord WorkItemDependencyRecord ArtifactType ArtifactScope WorkAutonomy ToolDecision
Kanban Tools
kanban-tools.ts (7.5KB)
Agent-facing tools for interacting with work items on the board
KanbanListTasksInput KanbanCreateTaskInput KanbanUpdateTaskInput KanbanCollectResultsOutput

Widget & UI Rendering

Widget Contracts
widget-contracts.ts (4KB)
A2UI-style 3-mode rendering: registry, control, generated_preview. 9 catalog components, 25 tool names.
WidgetSpec RenderMode WidgetDefinition WidgetManifest WidgetInstance WidgetToolName AgentMode
AgUI Events
ag-ui.ts (9.5KB)
9 UI event types bridging agent execution to frontend rendering
AgUiEvent AgUiEventType AgUiTextMessageStartEvent AgUiStateDeltaEvent
Document Contracts
document-contracts.ts (1.9KB)
Executive documents with TipTap-compatible JSON, 6 operations, 5 document types
ExecutiveDocument DocumentVersion DocumentOp ExecutiveDocumentType

Memory & Business Context

Memory Tools
memory-tools.ts (11KB)
8 model-agnostic memory operations with scope-based path resolution
MemoryToolName MemoryScope resolveMemoryBasePath() MemorySearchInput MemoryWriteInput
Business Context
business-context.ts (6.3KB)
7 context types per org: writing rules, brand, personas, templates, SOPs, domain knowledge, skill playbooks
BusinessContextRecord WritingRulesContext BrandGuidelinesContext PersonaContext SOPContext

Spaces & Knowledge

Spaces
spaces.ts (8.6KB)
Knowledge workspaces: visibility, tabs, knowledge items (8 kinds), ingest sources, signal backbone (records, channels, role presets)
SpaceVisibility SpaceKnowledgeItemKind SpaceIngestSourceKind SignalRecord SignalChannel SignalRolePreset

Application & Dashboard

Application
application.ts (43KB) — largest contract
Dashboard records, board graph (nodes + edges), source records, feed definitions, chat messages, agent run state, widget runtime state
DashboardRecord BoardGraphNodeRecord SourceRecord FeedDefinition CompanionChatMessage AgentRunState WidgetRuntimeState
Host Bridge
host-bridge.ts (3.2KB)
PostMessage protocol: 9 host→app messages, 9 app→host messages, theme customization
HostToAppMessage AppToHostMessage HOST_BRIDGE_CHANNEL
Channel Gateway
channel-gateway.ts (1KB)
Multi-platform messaging: 5 platforms, conversation types, session records
ChannelPlatform ChannelRunSource ChannelRunRequest ChannelSessionRecord

Integrations & Legacy

Integrations
integrations.ts (1.3KB)
Studio API integration modes (disabled/fixture/live), flow import
IntegrationMode StudioFlowSummary StudioFlowImportPayload
Picasso Domain
picasso-domain.ts (29KB)
Full Picasso editor compatibility layer: flows, nodes, media, tenants, users
NodeT IFlow IMedia Tenant IUserInfo
Legacy Board
legacy-board.ts (2KB)
Dashboard → legacy board adapter for 4 surface types
LegacyBoardDescriptor LegacyBoardSurface LEGACY_BOARD_TEMPLATES
Legacy Principal
legacy-principal.ts (6.4KB)
Migration path from old Blinkin principal model to new AgentDefinition

Security, Governance & Identity

Security
security.ts (5.4KB)
SSRF protection: URL validation, private IP blocking, hostname blocking
validateUrlSafe() PRIVATE_IP_PATTERNS BLOCKED_HOSTNAMES
Actor
actor.ts (769B)
Identity system: 6 roles, 5 org roles, source tracking
ActorRole ActorSource ActorOrgRole ActorIdentity
Sharing
sharing.ts (2.2KB)
Public share locators for agents and platform resources
ShareLocatorScope ShareAccessMode sanitizeShareLocator()

Infrastructure & Utilities

Web Tools
web-tools.ts (6.2KB)
web_scrape + web_search with provider selection and JSON schemas for LLM function calling
WebScrapeInput WebSearchInput WebScrapeResult WebSearchResult
Health
health.ts (2KB)
Health check factory with async dependency checks
HealthCheckResult createHealthCheck()
Rate Limiter
rate-limiter.ts (3.6KB)
Token-bucket algorithm, 4 tier presets
RateLimiter RATE_LIMIT_TIERS
Logger
logger.ts (2.4KB)
JSON structured logging, child loggers, no deps
Logger createLogger()
Graceful Shutdown
graceful-shutdown.ts (3.4KB)
SIGTERM/SIGINT handler with configurable timeout
ShutdownHandler createShutdownHandler()
Validation
validation.ts (8.7KB)
Lightweight input validators, no external deps
ValidationResult<T> ValidatedAgentRunInput validateAgentRunInput()
Constants
constants.ts (5.3KB)
48 typed constants: default IDs, scheduler params, ENV keys, widget catalog names
DEFAULT_ORG_ID SCHEDULER_DAEMON_ID ENV
Catalog Insights
catalog-insights.ts (187B)
Popular and new widget catalog entries
CatalogInsights

Architecture Diagrams

Target Architecture — 7 Layer Model
100%
graph TB
  subgraph INTERFACES["INTERFACES — 44,552 LOC"]
    direction LR
    subgraph Platform["Blinkin Platform"]
      AgentBuilder["Agent Builder"]
      ControlBoard["Control Plane\n(Kanban Board)"]
      ReviewInbox["Review Inbox"]
      ContextEditor["Context Editor"]
      MemoryPanel["Memory Panel"]
    end
    subgraph Apps["Business Applications"]
      RegWatch["RegWatch Monitor\n(Insurance)"]
      SpacesUI["Spaces Workspaces"]
      ExecEditor["Executive Editor"]
      AppLauncher["App Launcher"]
    end
    subgraph Companions["Companions (Houston)"]
      Chat["Chat / Voice"]
      Forms["Forms"]
      A2UIWidgets["A2UI Widgets"]
      PicassoRT["Picasso Runtime"]
    end
  end

  subgraph AGENTS["AGENTS — 4,698 LOC orchestrator"]
    direction LR
    subgraph YourAgents["Your Agents (Custom)"]
      CustomAgent["Custom Agent\n(AgentDefinition)"]
    end
    subgraph BlinkinAgents["Blinkin Agents"]
      ExecSummary["Executive Summary"]
      Research["Research"]
      Writer["Writer"]
      QA["Quality Review"]
      TTS["TTS"]
      FeedCurator["Feed Curator"]
    end
    subgraph PartnerAgents["Partner Agents"]
      A2AAgent["A2A Protocol\n(External)"]
    end
  end

  subgraph ORCHESTRATION["ORCHESTRATION · GOVERNANCE · EVAL"]
    direction LR
    Scheduler["Scheduler Daemon\n(reconcile → lease →\ndispatch → heartbeat)"]
    WorkItems["Work Items\n+ Dependency DAG\n(10 status columns)"]
    Policies["Policy Profiles\n(allow/deny/escalate/\nredact per tool)"]
    ReviewGate["Human Review Gate\n(Review Packages)"]
    RateLimiter["Rate Limiter\n(4 tiers, token-bucket)"]
    CronJobs["Cron Trigger\nEvaluator"]
  end

  subgraph COMPUTER["BLINKIN COMPUTER — 44,520 LOC worker"]
    direction LR
    AgentLoop["Agent Loop\n(Plan → Act → Observe\n→ Emit → Verify)"]
    ToolRouter["Tool Router\n(25+ tools)"]
    MemoryLayer["Memory Layer\n(8 tools + Claude\nnative bridge)"]
    StreamEmitter["SSE Emitter\n(9 event types)"]
    WebTools["Web Tools\n(scrape + search\n+ SSRF protection)"]
    Heartbeat["Heartbeat\nService"]
  end

  subgraph CONTEXT["BUSINESS CONTEXT — 7 types"]
    direction LR
    WritingRules["Writing Rules"]
    BrandGuidelines["Brand"]
    Personas["Personas"]
    Templates["Templates"]
    SOPs["SOPs"]
    DomainKnow["Domain Knowledge"]
    SkillPlaybooks["Skill Playbooks"]
    SignalBB["Signal Backbone"]
  end

  subgraph SOR["SYSTEMS OF RECORD — 62 stores"]
    direction LR
    SQLite["SQLite\n(per-org dev)"]
    Postgres["PostgreSQL\n(production)"]
    BlobStore["Blob Store\n(Local / R2 / S3)"]
    DocStore["Document Store\n(TipTap JSON)"]
    MemFileStore["Memory Files\n(scoped)"]
    SpaceStore["Space Store\n+ Knowledge"]
  end

  subgraph PLATFORM["PLATFORM SERVICES"]
    direction LR
    Auth["Auth\n(Actor Identity)"]
    Sharing["Share System\n(Public Locators)"]
    HostBridge["Host Bridge\n(PostMessage SDK)"]
    ChannelGW["Channel Gateway\n(Teams POC)"]
    SSEClient["SSE Client\n(Auto-Reconnect)"]
    CFInfra["Cloudflare\n(Workers + DO)"]
  end

  INTERFACES --> AGENTS
  AGENTS --> ORCHESTRATION
  ORCHESTRATION --> COMPUTER
  COMPUTER --> CONTEXT
  COMPUTER --> SOR
  SOR --> PLATFORM
  StreamEmitter -.->|SSE| INTERFACES
  HostBridge -.->|PostMessage| Companions

  style INTERFACES fill:#7c3aed,color:#fff
  style AGENTS fill:#6d28d9,color:#fff
  style ORCHESTRATION fill:#4c1d95,color:#fff
  style COMPUTER fill:#1e1e2e,color:#fff
  style CONTEXT fill:#1e293b,color:#fff
  style SOR fill:#0f172a,color:#fff
  style PLATFORM fill:#111827,color:#fff
      
Package Dependency Map — What Connects to What
100%
graph LR
  subgraph Frontend["apps/web (44,552 LOC)"]
    Pages["10 Pages"]
    Components["Chat · Boards · Spaces\nControl Plane · Review\nMemory · Insurance"]
  end

  subgraph Backend["apps/worker (44,520 LOC)"]
    Server["server.ts (7K LOC)"]
    Stores["62 Runtime Stores"]
    Routes["Routes\n(health · spaces · upload)"]
    SpacesPipeline["Spaces Pipeline\n(scrape · audio · process)"]
    Jobs["Jobs\n(audit retention)"]
  end

  subgraph Orch["packages/orchestrator (4,698 LOC)"]
    Loop["Agent Loop"]
    Providers["Provider Router\n(Claude · Gemini · OpenAI)"]
    Tools["Tool Router (25+)"]
    Memory["Memory\n(consolidation · native)"]
    Telemetry["Langfuse Telemetry"]
  end

  subgraph Contracts["packages/contracts (8,211 LOC)"]
    Types["30 Type Modules\n(zero-dep shared language)"]
  end

  subgraph StateStore["packages/state-store (2,173 LOC)"]
    CompState["Companion Store\nBoard Editor Store"]
  end

  subgraph Bridge["packages/* (SDKs)"]
    HB["host-bridge"]
    SSE["sse-client"]
    Adapt["adapters"]
    Embed["react-embed\nembed-widget"]
  end

  subgraph Gateway["apps/chat-gateway (672 LOC)"]
    Teams["Teams POC"]
  end

  Pages --> CompState
  Components --> SSE
  Components --> HB
  Server --> Orch
  Server --> Stores
  Loop --> Providers
  Loop --> Tools
  Loop --> Memory
  Stores --> Types
  CompState --> Types
  Loop --> Types
  Server --> Types
  Pages --> Types
  Gateway --> Server

  style Frontend fill:#7c3aed,color:#fff
  style Backend fill:#1e1e2e,color:#fff
  style Orch fill:#6d28d9,color:#fff
  style Contracts fill:#4f46e5,color:#fff
  style StateStore fill:#4338ca,color:#fff
  style Bridge fill:#3730a3,color:#fff
  style Gateway fill:#312e81,color:#fff
      
Two-Interface Principle — Creator vs End User
100%
graph TB
  subgraph Creator["CREATOR (Platform / Blinkin Studio)"]
    KB["Kanban Board — All Agents · All Tasks\nFull Config · Audit Trail · Review Inbox\nPolicy Profiles · Memory Panel"]
  end

  subgraph EndUser["END USER (Companion / Business App)"]
    CU["Chat + Widgets + Documents\nNo Kanban visible · Only Results\nSignal Stream · Inbox · Briefings"]
  end

  subgraph SharedBackend["SAME BACKEND (44,520 LOC)"]
    Agents["Agents (orchestrator)"]
    Kanban["Kanban Pipeline\nbacklog → ready → leased →\nrunning → verifying →\nawaiting_review → done"]
    Computer["Blinkin Computer\n(62 stores · 25+ tools · memory)"]
  end

  Creator --> SharedBackend
  EndUser --> SharedBackend
  Agents --> Kanban
  Kanban --> Computer

  style Creator fill:#7c3aed,color:#fff
  style EndUser fill:#6d28d9,color:#fff
  style SharedBackend fill:#1e1e2e,color:#fff
      
Protocol Overview — How Things Talk
100%
graph LR
  subgraph Protocols["Blinkin 2.0 Protocols"]
    direction TB
    AgentAgent["Agent ↔ Agent\n**A2A** (Linux Foundation)"]
    AgentUI["Agent → UI\n**A2UI** (declarative)\n**AgUI** (events)\n**Generative** (preview)"]
    AgentTool["Agent → Tool\n**CLI/API first**\n25+ tools registered\nMCP optional"]
    AgentSkill["Agent Skills\n**agentskills.io**\nImport/Export"]
    UIAgent["UI → Agent\n**widget.action**\n**triggerAgent**\n**SSE stream**"]
    AgentLLM["Agent → LLM\n**Direct SDKs**\nClaude · Gemini · OpenAI\nNo LangChain"]
    AgentMemory["Agent ↔ Memory\n**8 tools**\nmodel-agnostic\n+ Claude native"]
    AgentKanban["Agent ↔ Kanban\n**7 board tools**\ncreate · update · comment\ncollect results"]
  end

  style Protocols fill:#1e1e2e,color:#fff
      

Data Flow — How a Request Travels

User Chat InputChatPanel.tsxuse-agent-runner.ts │ ▼ POST /api/agents/runserver.tsvalidateAgentRunInput() │ ▼ Agent Loop (orchestrator/agent-loop.ts) ├── Provider Router → Claude / Gemini / OpenAI (per agent config) ├── Tool Router → 25+ tools dispatched by name │ ├── render_widget → Widget Store → versioning + review queue │ ├── create_document → Document Store → TipTap JSON │ ├── apply_document_op → Document Operations → patch/insert/rewrite │ ├── export_document_pdf → PDF Export → Blob Store (R2/S3/local) │ ├── memory_write → Memory Store → scoped files │ ├── kanban_create_task → Work Item Store → dependency DAG │ ├── web_scrape → SSRF check → HTTP fetch → content │ ├── web_search → Brave / Tavily / DuckDuckGo / Jina │ └── text_to_speech → ElevenLabs → MP3 → Blob Store └── Memory → Claude native bridge + model-agnostic tools │ ▼ SSE Stream (9 event types) ├── text.delta → Chat bubble text ├── widget.spec.delta → Live widget rendering ├── state.patch → Dashboard state update ├── document.op → TipTap editor update ├── tool.result → Tool execution feedback └── run.completed → Final status │ ▼ Artifact Handoff (artifact-store.ts) ├── source_selection → Work Item input artifact ├── document_draft → Supervisor → creates pdf_export child task ├── widget_pack → Supervisor → creates review_package child task └── review_package → Approval Queue → Review Inbox │ ▼ Scheduler Daemon (scheduler.ts) — runs every 1.5s ├── 1. Reconcile → timeout expired leases ├── 2. Lease → claim ready work items (drain limit: 4) ├── 3. Dispatch → send into Agent Loop ├── 4. Track → running → done / failed └── 5. Heartbeat → keep-alive for long runs │ ▼ Persistence ├── SQLite → local dev mirror (per-org isolation) ├── Postgres → production source of truth └── R2/S3 → PDF exports + memory files + audio + images

Insurance Monitor Flow — RegWatch Intelligence Workspace

Signal Sources ├── RSS Feeds → SignalChannel (Wave 2) → parse → normalize └── Scrape Sources → Cloudflare Browser Rendering (Wave 3) → crawl → extract │ ▼ Signal Backbone (contracts/spaces.ts) ├── SignalRecord → jurisdiction, topics, business units, functions ├── SignalChannel → sourceKind, health, topics, jurisdictions └── SignalRolePreset → compliance / legal / management defaults │ ▼ Monitor Surface (Insurance*.tsx — 10 components) ├── Monitor Mode → live signal stream + filtering ├── Inbox Mode → triage, assign, respond └── Briefing Mode → AI-generated executive briefings │ ▼ Outputs ├── Executive Summary (TipTap) → PDF export ├── Regulatory Alert (Widget) → Dashboard / Email └── Research Brief (Document) → Spaces knowledge base

What's Ahead — 51 Design Specs Ready for Implementation

51 design specs written (March 19–22). Organized by priority tier. Tier 1 = production blockers, Tier 2 = platform capabilities + use cases, Tier 3 = strategic enhancements. Plus architecture decisions and analysis documents.

Tier 1 — Production Blockers

Multi-Agent Coordination
Tier 1 — ~4-5 weeks
Work Item comments for inter-agent messaging, cost tracking + budget enforcement with hard-stop, lightweight goal hierarchy (2 levels). Based on ClawTeam + Paperclip analysis.
specs/2026-03-22-multi-agent-coordination-architecture-design.md
R2 Revenue Ready
Tier 1 — Billing + Signup + Protection
Stripe billing integration, signup flow, Houston embedding protection, usage metering. The paywall.
specs/2026-03-19-r2-revenue-ready-design.md
Session Lifecycle
Tier 1 — Auth + State
Full session model: creation, persistence, expiry, multi-device, resumption. Auth0 + cookie management.
specs/2026-03-20-session-lifecycle-design.md
Security Audit Fixes
Tier 1 — Security
Address findings from 6-agent code review: input validation hardening, auth header verification, rate limit enforcement.
specs/2026-03-20-security-audit.md
Approval Contracts
Tier 1 — Governance
Formal approval contract design: who can approve what, escalation chains, time-boxed approvals, delegation.
specs/2026-03-20-approval-contract-design.md
PR Text Studio (Use Case #1)
Tier 1 — First Business App
First agentic business application: multi-agent PR copy production with format/style rules loaded on-demand from knowledge spaces.
specs/2026-03-19-pr-text-studio-design.md
Colleague Decision Ledger
Tier 1 — Alignment
Consolidate scattered COLLEAGUE DECISION markers into a working sheet: Lock Now, Default For Now, and Defer buckets.
specs/2026-03-20-colleague-decision-ledger.md

Tier 2 — Platform Capabilities

Cloudflare Scrape Sources (Wave 3)
Tier 2 — Ingestion
User-configurable scrape sources via Cloudflare Browser Rendering. Org-shared sources, page-based quota governance, signal materialization from rendered pages.
specs/2026-03-22-cloudflare-scrape-sources-wave-3-design.md
Insurance Regulatory Intelligence
Tier 2 — Business Application
Converged insurance workspace: Monitor mode (live signals), Inbox mode (triage), Briefing mode (AI summaries). One kernel, three surfaces.
specs/2026-03-21-insurance-regulatory-intelligence-workspace-design.md
Knowledge Infrastructure
Tier 2 — Spaces
Full knowledge base: vector search (Vectorize), document chunking, retrieval pipeline, ingestion connectors (8 kinds).
specs/2026-03-20-knowledge-infrastructure-design.md
Eval Loop
Tier 2 — Quality
Automated quality scoring: accuracy, style, brand compliance, cost efficiency, user feedback loops.
specs/2026-03-20-eval-loop-design.md
Trigger System
Tier 2 — Automation
Event-driven agent triggers: schedule, webhook, signal, form submit, approval, system event.
specs/2026-03-20-trigger-system-design.md
Sub-Agent Communication
Tier 2 — Multi-Agent
Agent-to-agent delegation: spawn sub-agents, collect results, handoff via work item comments.
specs/2026-03-20-sub-agent-communication-design.md
Business Context Editor
Tier 2 — UX
Visual editor for writing rules, brand guidelines, personas, templates, SOPs — the "secret superpower" UI.
specs/2026-03-20-business-context-editor-design.md
Audio + Voice Ingestion
Tier 2 — Spaces
Voice note capture, Whisper transcription, audio processing daemon integration.
specs/2026-03-20-audio-voice-ingestion-design.md
Agent Workspaces
Tier 2 — Agent Platform
Give every agent a scoped filesystem for skill loading, memory persistence, intermediate results, and future cloud filesystem access.
specs/2026-03-20-agent-workspace-design.md
RSS Signal Ingestion (Wave 2B)
Tier 2 — Ingestion
Replace seeded monitor data with live RSS-driven signals via curated source packs and worker-side RSS fetch/normalization stored as SignalRecords.
specs/2026-03-21-rss-signal-ingestion-wave-2b-design.md
Broad Space Architecture
Tier 2 — Spaces
Target broad-scope Spaces architecture: a space acts as durable OS for knowledge, connectors, collaboration, ingestion channels, and agent-created outputs.
specs/2026-03-20-broad-space-architecture-design.md
Space Domain Foundation
Tier 2 — Spaces
First real Spaces product slice using legacy Blinkin/Picasso UX with a clean Space domain for connectors and knowledge ingestion.
specs/2026-03-19-space-domain-foundation-design.md
Space Knowledge Intake
Tier 2 — Spaces
Stop creating placeholders — start creating real, type-specific knowledge items with legacy-style flows.
specs/2026-03-19-space-knowledge-intake-design.md
Space-Agent Integration Contract
Tier 2 — Spaces + Agents
Define exactly what agents need from the Space system via RAG query and data retrieval APIs.
specs/2026-03-19-space-agent-integration-contract.md
Space Inbox Mode
Tier 2 — Spaces
Inbox review mode for Spaces: triage inbound email, companion submissions, and agent memory drafts without polluting curated knowledge.
specs/2026-03-21-space-inbox-mode-design.md
Space NotebookLM UI
Tier 2 — Spaces UX
Redesign inner space workspace adapting the NotebookLM interaction model while keeping Super App terminology and light visual language.
specs/2026-03-20-space-notebooklm-ui-design.md
Space Multi-Upload + Website Queue
Tier 2 — Spaces
Multiple file uploads and batch URL queueing with immediate processing items in Space Attach and Website flows.
specs/2026-03-20-space-multi-upload-and-website-queue-design.md
Space Upload Tier + Billing
Tier 2 — Spaces + Billing
Map space uploads into billing/tier limits via two model axes (entry point, destination) and three limit levels.
specs/2026-03-20-space-upload-tier-and-billing-design.md
Builder Convergence
Tier 2 — Builder
Converge three isolated builder systems (Picasso, json-render, Stitch) into a single builder experience for interactive agentic apps.
specs/2026-03-19-builder-convergence-design.md
Stitch Provider + Canonical Screen Model
Tier 2 — Builder
How Stitch fits into the Super App as upstream authoring service without replacing the platform's own builder, runtime, and publishing control.
specs/2026-03-21-stitch-provider-canonical-screen-model-design.md
Stitch Import + Renderer Visual Uplift
Tier 2 — Builder
Combine visual uplift of the platform renderer with Stitch as upstream authoring path for visually superior screens without losing runtime control.
specs/2026-03-20-stitch-import-and-renderer-visual-uplift-design.md

Tier 3 — Strategic Enhancements

Audit Event Taxonomy
Tier 3 — Compliance
Comprehensive audit event system: categorized events, retention policies, compliance reporting.
specs/2026-03-20-audit-event-taxonomy-design.md
Standards Adoption
Tier 3 — Interop
Full A2A, Agent Skills, AgUI standard adoption for ecosystem interoperability.
specs/2026-03-20-standards-adoption-design.md
Published App Versioning
Tier 3 — Platform
Version management for published apps: draft → review → publish → rollback cycle.
specs/2026-03-20-published-app-versioning-design.md
Customer Lifecycle
Tier 3 — Growth
Onboarding, activation, retention, expansion — full customer journey design.
specs/2026-03-20-customer-lifecycle.md
Platform Defaults
Tier 3 — UX
Sensible defaults for new orgs: pre-configured agents, templates, policies, starter content.
specs/2026-03-20-platform-defaults.md
Operations Playbook
Tier 3 — Ops
Runbooks for production operations: monitoring, incident response, scaling, backups.
specs/2026-03-20-operations-playbook.md
Bosch Welding Assistant
Tier 3 — Use Case
Industry-specific business application: welding parameter assistant built on the platform.
specs/2026-03-20-bosch-welding-assistant-design.md
Builder Studio Layout
Tier 3 — Builder
Stitch builder: studio layout, block inspector, local interactive preview.
specs/2026-03-20-builder-studio-layout-design.md + builder-block-inspector-design.md + builder-local-interactive-preview-design.md
Stitch Studio Hierarchy
Tier 3 — Builder UX
Refine Stitch builder visual hierarchy: quiet studio workspace with dominant central screen stage, low-contrast left outline, practical right inspector.
specs/2026-03-21-stitch-studio-hierarchy-design.md
Spec Gaps from Zweistein
Tier 3 — Migration
Identify specification gaps by comparing Zweistein's proven features against Blinkin 2.0 contracts.
specs/2026-03-20-spec-gaps-from-zweistein.md
Use Case Catalog
Tier 3 — Strategy
Comprehensive catalog of all validated use cases with acceptance criteria and implementation status.
specs/2026-03-20-use-case-catalog.md

Foundation & Analysis Documents

Architecture Review (6-Agent)
Analysis — completed
Comprehensive 6-agent code review of blinkin-2-platform: architecture strengths, security findings, prioritized fix list.
specs/2026-03-19-architecture-review.md
Blind Spots Gap Analysis
Analysis — completed
Systematic identification of blind spots and gaps in the current architecture and spec coverage.
specs/2026-03-19-blind-spots-gap-analysis.md
Enterprise Agentic Platform Design
Foundation — locked
Core enterprise platform design defining multi-tenancy, isolation, and agent governance patterns.
specs/2026-03-19-enterprise-agentic-platform-design.md + reconciled.md
Builder Convergence Reconciled
Foundation — locked
Reconciled decision on Picasso + json-render + Stitch convergence path.
specs/2026-03-19-builder-convergence-reconciled.md
Handoff Summary
Reference — context handoff
Summary of all decisions, open questions, and next steps from the March 19-20 design sprint.
specs/2026-03-19-handoff-summary.md

Recent Architecture Decisions (March 21–22)

Keep Domain, Rebuild Surfaces
Architecture Decision
CTO review confirmed: keep the 62-store domain layer, rebuild UI surfaces on top. Domain is the investment, surfaces are replaceable.
specs/2026-03-21-cto-review-keep-domain-rebuild-surfaces-design.md
Page-State-First Runtime
Architecture Decision
Runtime renders from page state, not component tree. Enables cross-platform rendering.
specs/2026-03-21-page-state-first-runtime-design.md
Generic Signal Backbone
Architecture Decision
Signals are domain-agnostic. Insurance, automotive, legal all use the same SignalRecord model.
specs/2026-03-21-generic-signal-backbone-design.md
Frontend Principles
Architecture Decision
Three frontends: Studio (builder), Runtime (execution), Stitch (preview). Shared contracts, separate surfaces.
specs/2026-03-21-frontend-principles-studio-runtime-stitch.md