Files
2026-05-18 06:40:19 +00:00

168 lines
7.8 KiB
Plaintext

%%{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<br/>Paweł)) ==> |"ARM / EXECUTE"| MC_UI["🖥️ Mission Dashboard (Next.js)<br/>Tailwind • Controls • Telemetry"]:::ui
subgraph UI_Elements ["UI Telemetry & Controls"]
style UI_Elements fill:#1e293b,stroke:none
StatusBar["📊 MISSION STATUS BAR<br/>[NSM] [MRR] [WIP] [ALERTS]"]:::middleware
DraftProtocol["🟡 SIM / 🟢 FLIGHT<br/>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<br/>(Auth • Validation • Audit)"]:::middleware
SSE["Real-time Downlink<br/>(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<br/>Port: 18789 / Node.js"]:::gateway
ToolManager["🧰 FLIGHT TOOLS<br/>(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<br/>Mission Plan • Tasking • Tracking"]:::commander
Muddy["🛰️ MUDDY (AI Executive)<br/>Flight Director (virtual)"]:::commander
%% Przepływ rozkazów
Gateway ===> |"Orchestration"| Orchestrator
Orchestrator ===> |"Executive brief"| Muddy
%% Dywizje (pionowo, czytelnie)
ContentDiv["📰 Content Division (3)<br/>Public Affairs Payload"]:::commander
SocialDiv["📣 Social Division (2)<br/>Broadcast & Engagement"]:::commander
GrowthDiv["📈 Growth Division (3)<br/>Mission Analytics"]:::commander
CommunityDiv["🫂 Community & Support (3)<br/>Crew Support Desk"]:::commander
EngineeringDiv["🛠️ Engineering Division (4)<br/>Systems & Safety"]:::commander
HospitalityDiv["🧪 Hospitality LLMO (3)<br/>Life Support & QA"]:::commander
MarketingDiv["🤝 Marketing Division<br/><i>planned / unstaffed</i>"]:::commander
ProductDiv["🗺️ Product Division<br/><i>Muddy direct oversight</i>"]:::commander
Muddy --> ContentDiv --> SocialDiv --> GrowthDiv --> CommunityDiv --> EngineeringDiv --> HospitalityDiv --> MarketingDiv --> ProductDiv
%% ===== Collapsed Agents (kolorowane per dywizja) =====
ContentAgents["🟦 CREW (Content)<br/>• Echo — Newsletter Engine<br/>• Rex — YouTube Script Writer<br/>• Sage — Research & Analysis"]:::aContent
SocialAgents["🟩 CREW (Social)<br/>• Clip — Reels Creator<br/>• Hype — LinkedIn Growth"]:::aSocial
GrowthAgents["🟧 CREW (Growth)<br/>• Forge — SEO Optimizer<br/>• Pulse — Analytics<br/>• Scout — Trends & Research"]:::aGrowth
CommunityAgents["🟪 CREW (Community)<br/>• Beacon — Onboarding<br/>• Link — Discord Ops<br/>• Vibe — Engagement"]:::aCommunity
EngineeringAgents["🟥 CREW (Engineering)<br/>• Anvil — Backend<br/>• Cipher — Security<br/>• Pixel — Frontend<br/>• Sentry — DevOps/Infra"]:::aEngineering
HospitalityAgents["🟨 CREW (Hospitality)<br/>• Bellhop — Growth<br/>• Concierge — Success<br/>• Inspector — QA/Audit"]:::aHospitality
PlannedAgents["⬜ PLANNED / OVERSIGHT<br/>• Marketing: staffing TBD<br/>• 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<br/>(Decisions, Runway)"]:::storage
JD_10["📂 10-19 Mission Logs<br/>(Daily Logs, Inbox)"]:::storage
JD_20["📂 20-29 Active Missions<br/>(Sprints, WIP)"]:::storage
JD_30["📂 30-39 Payload & Media<br/>(Assets, Pipeline)"]:::storage
JD_40["📂 40-49 Procedures & KB<br/>(SOPs, Playbooks)"]:::storage
AccessPolicy["🔐 ACCESS POLICY<br/>RO: JD_40<br/>Append (SIM): JD_10 & JD_30<br/>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