%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#1e293b', 'edgeLabelBackground':'#0f172a', 'tertiaryColor': '#0f172a' }}}%% graph TD %% ========================================================= %% STYLIZACJA NASA/SCI-FI (Twoja baza + rozszerzenia) %% ========================================================= classDef ui fill:#172554,stroke:#3b82f6,stroke-width:3px,color:#e0f2fe,rx:10,ry:10,font-weight:bold; classDef middleware fill:#312e81,stroke:#818cf8,stroke-width:2px,color:#e0eaff,rx:8,ry:8; classDef gateway fill:#064e3b,stroke:#10b981,stroke-width:4px,color:#d1fae5,rx:15,ry:15,stroke-dasharray: 5 5; classDef commander fill:#4c1d95,stroke:#d8b4fe,stroke-width:3px,color:#f3e8ff,rx:12,ry:12,font-weight:bold; classDef specialist fill:#1f2937,stroke:#6b7280,stroke-width:2px,color:#d1d5db,rx:10,ry:10; classDef storage fill:#000000,stroke:#f59e0b,stroke-width:3px,color:#fef3c7,rx:6,ry:6; classDef protocol fill:#7f1d1d,stroke:#ef4444,stroke-width:2px,color:#fee2e2,stroke-dasharray: 2 2; %% --- Kolory agentΓ³w (per dywizja, NASA palette-friendly) --- classDef aContent fill:#0b2a4a,stroke:#38bdf8,stroke-width:2px,color:#e0f2fe,rx:10,ry:10; classDef aSocial fill:#052e2b,stroke:#5eead4,stroke-width:2px,color:#d1fae5,rx:10,ry:10; classDef aGrowth fill:#3b1f0a,stroke:#fdba74,stroke-width:2px,color:#ffedd5,rx:10,ry:10; classDef aCommunity fill:#2e1065,stroke:#e9d5ff,stroke-width:2px,color:#f5f3ff,rx:10,ry:10; classDef aEngineering fill:#2a0f14,stroke:#fb7185,stroke-width:2px,color:#ffe4e6,rx:10,ry:10; classDef aHospitality fill:#1f2937,stroke:#fbbf24,stroke-width:2px,color:#fffbeb,rx:10,ry:10; classDef aPlanned fill:#0f172a,stroke:#94a3b8,stroke-width:2px,color:#e5e7eb,rx:10,ry:10,stroke-dasharray: 4 3; %% ========================================================= %% WARSTWA 1: FLIGHT DECK (Frontend) %% ========================================================= subgraph FLIGHT_DECK ["πŸ›°οΈ FLIGHT DECK (Mission Control UI)"] style FLIGHT_DECK fill:#0f172a,stroke:#3b82f6,color:#fff Operator((πŸ‘¨β€βœˆοΈ Flight Operator
PaweΕ‚)) ==> |"ARM / EXECUTE"| MC_UI["πŸ–₯️ Mission Dashboard (Next.js)
Tailwind β€’ Controls β€’ Telemetry"]:::ui subgraph UI_Elements ["UI Telemetry & Controls"] style UI_Elements fill:#1e293b,stroke:none StatusBar["πŸ“Š MISSION STATUS BAR
[NSM] [MRR] [WIP] [ALERTS]"]:::middleware DraftProtocol["🟑 SIM / 🟒 FLIGHT
Approval Switch"]:::protocol end MC_UI -.- StatusBar MC_UI -.- DraftProtocol end %% ========================================================= %% WARSTWA 2: COMMS ARRAY (API & Auth + Realtime) %% ========================================================= subgraph COMMS ["πŸ“‘ COMMS ARRAY (API & Auth)"] style COMMS fill:#1e1b4b,stroke:#818cf8,color:#fff NextAPI["API Routes / Server Actions
(Auth β€’ Validation β€’ Audit)"]:::middleware SSE["Real-time Downlink
(Server-Sent Events)"]:::middleware MC_UI <==> |"REST / Commands"| NextAPI NextAPI -.-> |"Telemetry bus"| SSE SSE -.-> |"Live updates"| MC_UI end %% ========================================================= %% WARSTWA 3: ENGINE ROOM (Gateway + Tooling) %% ========================================================= subgraph ENGINE ["βš™οΈ ENGINE ROOM (Mission Gateway)"] style ENGINE fill:#022c22,stroke:#10b981,color:#fff Gateway["OPENCLAW GATEWAY
Port: 18789 / Node.js"]:::gateway ToolManager["🧰 FLIGHT TOOLS
(Safe file ops β€’ Policy enforcement)"]:::middleware NextAPI ==> |"Signed request / token"| Gateway Gateway ==> |"Tool invocation"| ToolManager end %% ========================================================= %% WARSTWA 4: THE FLEET (Muddy + Divisions + Collapsed Agents) %% ========================================================= subgraph FLEET ["πŸš€ THE FLEET (Mission Ops Command Structure)"] style FLEET fill:#2e1065,stroke:#d8b4fe,color:#fff %% DowΓ³dztwo (NASA-ish) Orchestrator["🧭 ORCHESTRATOR
Mission Plan β€’ Tasking β€’ Tracking"]:::commander Muddy["πŸ›°οΈ MUDDY (AI Executive)
Flight Director (virtual)"]:::commander %% PrzepΕ‚yw rozkazΓ³w Gateway ===> |"Orchestration"| Orchestrator Orchestrator ===> |"Executive brief"| Muddy %% Dywizje (pionowo, czytelnie) ContentDiv["πŸ“° Content Division (3)
Public Affairs Payload"]:::commander SocialDiv["πŸ“£ Social Division (2)
Broadcast & Engagement"]:::commander GrowthDiv["πŸ“ˆ Growth Division (3)
Mission Analytics"]:::commander CommunityDiv["πŸ«‚ Community & Support (3)
Crew Support Desk"]:::commander EngineeringDiv["πŸ› οΈ Engineering Division (4)
Systems & Safety"]:::commander HospitalityDiv["πŸ§ͺ Hospitality LLMO (3)
Life Support & QA"]:::commander MarketingDiv["🀝 Marketing Division
planned / unstaffed"]:::commander ProductDiv["πŸ—ΊοΈ Product Division
Muddy direct oversight"]:::commander Muddy --> ContentDiv --> SocialDiv --> GrowthDiv --> CommunityDiv --> EngineeringDiv --> HospitalityDiv --> MarketingDiv --> ProductDiv %% ===== Collapsed Agents (kolorowane per dywizja) ===== ContentAgents["🟦 CREW (Content)
β€’ Echo β€” Newsletter Engine
β€’ Rex β€” YouTube Script Writer
β€’ Sage β€” Research & Analysis"]:::aContent SocialAgents["🟩 CREW (Social)
β€’ Clip β€” Reels Creator
β€’ Hype β€” LinkedIn Growth"]:::aSocial GrowthAgents["🟧 CREW (Growth)
β€’ Forge β€” SEO Optimizer
β€’ Pulse β€” Analytics
β€’ Scout β€” Trends & Research"]:::aGrowth CommunityAgents["πŸŸͺ CREW (Community)
β€’ Beacon β€” Onboarding
β€’ Link β€” Discord Ops
β€’ Vibe β€” Engagement"]:::aCommunity EngineeringAgents["πŸŸ₯ CREW (Engineering)
β€’ Anvil β€” Backend
β€’ Cipher β€” Security
β€’ Pixel β€” Frontend
β€’ Sentry β€” DevOps/Infra"]:::aEngineering HospitalityAgents["🟨 CREW (Hospitality)
β€’ Bellhop β€” Growth
β€’ Concierge β€” Success
β€’ Inspector β€” QA/Audit"]:::aHospitality PlannedAgents["⬜ PLANNED / OVERSIGHT
β€’ Marketing: staffing TBD
β€’ Product: Muddy direct"]:::aPlanned ContentDiv --> ContentAgents SocialDiv --> SocialAgents GrowthDiv --> GrowthAgents CommunityDiv --> CommunityAgents EngineeringDiv --> EngineeringAgents HospitalityDiv --> HospitalityAgents MarketingDiv --> PlannedAgents ProductDiv --> PlannedAgents %% Telemetry to COMMS Orchestrator -.-> |"Progress β€’ metrics"| SSE end %% ========================================================= %% WARSTWA 5: THE SURFACE (Johnny Decimal Data Layer) %% ========================================================= subgraph SURFACE ["πŸͺ THE SURFACE (Local File System .org)"] style SURFACE fill:#1c1917,stroke:#f59e0b,color:#fff JD_00["πŸ“‚ 00-09 Mission Admin
(Decisions, Runway)"]:::storage JD_10["πŸ“‚ 10-19 Mission Logs
(Daily Logs, Inbox)"]:::storage JD_20["πŸ“‚ 20-29 Active Missions
(Sprints, WIP)"]:::storage JD_30["πŸ“‚ 30-39 Payload & Media
(Assets, Pipeline)"]:::storage JD_40["πŸ“‚ 40-49 Procedures & KB
(SOPs, Playbooks)"]:::storage AccessPolicy["πŸ” ACCESS POLICY
RO: JD_40
Append (SIM): JD_10 & JD_30
RW (FLIGHT): JD_00 & JD_20"]:::protocol end %% Policy enforcement ToolManager ===> |"Enforce policy"| AccessPolicy AccessPolicy ===> JD_40 AccessPolicy ===> JD_10 AccessPolicy ===> JD_30 AccessPolicy ===> JD_20 AccessPolicy ===> JD_00 %% Who touches what (dotted = non-blocking context) EngineeringDiv -.-> |"Build & ops state"| JD_20 EngineeringDiv -.-> |"Security & SOPs"| JD_40 ContentDiv -.-> |"Drafts & assets"| JD_30 SocialDiv -.-> |"Short-form assets"| JD_30 GrowthDiv -.-> |"Experiments/logs"| JD_10 GrowthDiv -.-> |"Optimized assets"| JD_30 CommunityDiv -.-> |"Support logs"| JD_10 HospitalityDiv -.-> |"QA/Audit notes"| JD_10 ProductDiv -.-> |"Decisions/roadmap"| JD_00 MarketingDiv -.-> |"Outreach pipeline"| JD_30