ENTERPRISE FLEET: 23 agents + 8 squads + 9 meetings + 14 depts. Live KPIs. API ready.

This commit is contained in:
WEVIA-Bot
2026-04-06 22:44:48 +02:00
parent 9030c07e37
commit 8b03168cda
7 changed files with 235 additions and 313 deletions

View File

@@ -1 +1 @@
{"timestamp":"2026-04-06 20:43:29","scan_ms":8018,"servers":{"s204":{"ip":"204.168.152.13","label":"S204 Primary","services":[{"name":"nginx","status":"active","port":"80\/443"},{"name":"php-fpm","status":"active","port":"9000"},{"name":"postgresql-16","status":"active","port":"5432"},{"name":"deerflow","status":"active","port":"2024"},{"name":"deerflow-gw","status":"active","port":"8001"},{"name":"deerflow-fe","status":"active","port":"3000"},{"name":"ollama","status":"active","port":"11434","info":"9 models"}],"docker":[{"name":"authentik-db","status":"Up 27 minutes"},{"name":"authentik-redis","status":"Up 27 minutes"},{"name":"authentik-server","status":"Up 22 minutes (healthy)"},{"name":"authentik-worker","status":"Up 22 minutes (healthy)"},{"name":"chatwoot-redis","status":"Up 27 minutes"},{"name":"langfuse","status":"Up 27 minutes"},{"name":"loki","status":"Up 27 minutes"},{"name":"mattermost","status":"Up 27 minutes (healthy)"},{"name":"n8n","status":"Up 27 minutes"},{"name":"node-exporter","status":"Up 27 minutes"},{"name":"plausible-db","status":"Up 27 minutes"},{"name":"plausible-events","status":"Up 27 minutes"},{"name":"plausible","status":"Up 27 minutes"},{"name":"prometheus","status":"Up 27 minutes"},{"name":"qdrant","status":"Up 27 minutes"},{"name":"searxng","status":"Up 27 minutes"},{"name":"twenty-redis","status":"Up 27 minutes"},{"name":"twenty","status":"Up 27 minutes"},{"name":"uptime-kuma","status":"Up 27 minutes (healthy)"},{"name":"vaultwarden","status":"Up 27 minutes (healthy)"}]},"s95":{"ip":"95.216.167.89","label":"S95 WEVADS","services":[{"name":"kumomta","status":"active","port":"587"},{"name":"apache2","status":"active","port":"80"},{"name":"postgresql","status":"active","port":"5432"},{"name":"postfix","status":"active","port":"2525"},{"name":"pmta","status":"active","port":"25"},{"name":"sentinel","status":"active","port":"5890"},{"name":"adx","status":"active","port":"5821"},{"name":"arsenal","status":"active","port":"5822"}],"docker":[{"name":"listmonk_db","status":"Up 3 days"},{"name":"listmonk","status":"Up 3 days"}]},"s151":{"ip":"151.80.235.110","label":"S151 OVH","services":[{"name":"nginx","status":"active","port":"80"},{"name":"php-fpm","status":"active","port":"9000"},{"name":"postgresql","status":"active","port":"5432"},{"name":"ollama","status":"active","port":"11434"}],"docker":[{"name":"ollama","status":"Up 12 days"}]},"blade":{"ip":"local","label":"Razer Blade","services":[{"name":"Sentinel Agent","status":"active","port":"\u2014","info":"C:\\ProgramData\\WEVAL\\sentinel-agent.ps1"}],"docker":[]}},"crons":[{"server":"S95","user":"root","schedule":"*\/30 * * * *","command":"php \/opt\/wevads\/scripts\/ethica\/ethica-validator.php 500 >> \/opt\/wevads\/logs\/ethica-validator.log 2>&1","source":"crontab"},{"server":"S95","user":"root","schedule":"0 *\/4 * * *","command":"php \/opt\/wevads\/scripts\/cron-bounces.php >> \/var\/log\/wevads\/bounces.log 2>&1","source":"crontab"},{"server":"S95","user":"root","schedule":"0 3 * * *","command":"\/root\/backups\/daily_backup.sh","source":"crontab"},{"server":"S95","user":"root","schedule":"0 4 * * *","command":"\/opt\/wevads\/scripts\/auto-backup-github.sh >> \/var\/log\/wevads\/backup.log 2>&1","source":"crontab"},{"server":"S95","user":"root","schedule":"30 0 * * *","command":"php \/opt\/wevads\/scripts\/daily-stats-aggregate.php >> \/var\/log\/wevads\/daily-stats.log 2>&1","source":"crontab"},{"server":"S95","user":"root","schedule":"30 1 * * *","command":"php \/opt\/wevads\/scripts\/cron-engagement.php >> \/var\/log\/wevads\/engagement.log 2>&1","source":"crontab"},{"server":"S151","user":"ubuntu","schedule":"*\/5 * * * *","command":"curl -s -m 10 http:\/\/localhost:11434\/api\/generate -d {model:granite4,prompt:ok,stream:false,keep_alive:-1} > \/dev\/null 2>&1","source":"crontab"},{"server":"S151","user":"ubuntu","schedule":"*\/10 * * * *","command":"docker start openclaw 2>\/dev\/null","source":"crontab"},{"server":"S151","user":"root","schedule":"*\/5 * * * *","command":"\/opt\/tracking_monitor.sh","source":"crontab"},{"server":"Blade","user":"SYSTEM","schedule":"*\/60s loop","command":"sentinel-agent.ps1 (auto-sync S204)","source":"Task Scheduler"}],"stats":{"total_crons":10,"total_services":20,"total_docker":23}}
{"timestamp":"2026-04-06 20:44:43","scan_ms":8066,"servers":{"s204":{"ip":"204.168.152.13","label":"S204 Primary","services":[{"name":"nginx","status":"active","port":"80\/443"},{"name":"php-fpm","status":"active","port":"9000"},{"name":"postgresql-16","status":"active","port":"5432"},{"name":"deerflow","status":"active","port":"2024"},{"name":"deerflow-gw","status":"active","port":"8001"},{"name":"deerflow-fe","status":"active","port":"3000"},{"name":"ollama","status":"active","port":"11434","info":"9 models"}],"docker":[{"name":"authentik-db","status":"Up 29 minutes"},{"name":"authentik-redis","status":"Up 29 minutes"},{"name":"authentik-server","status":"Up 24 minutes (healthy)"},{"name":"authentik-worker","status":"Up 24 minutes (healthy)"},{"name":"chatwoot-redis","status":"Up 29 minutes"},{"name":"langfuse","status":"Up 29 minutes"},{"name":"loki","status":"Up 29 minutes"},{"name":"mattermost","status":"Up 29 minutes (healthy)"},{"name":"n8n","status":"Up 29 minutes"},{"name":"node-exporter","status":"Up 29 minutes"},{"name":"plausible-db","status":"Up 29 minutes"},{"name":"plausible-events","status":"Up 29 minutes"},{"name":"plausible","status":"Up 29 minutes"},{"name":"prometheus","status":"Up 29 minutes"},{"name":"qdrant","status":"Up 29 minutes"},{"name":"searxng","status":"Up 29 minutes"},{"name":"twenty-redis","status":"Up 29 minutes"},{"name":"twenty","status":"Up 29 minutes"},{"name":"uptime-kuma","status":"Up 29 minutes (healthy)"},{"name":"vaultwarden","status":"Up 29 minutes (healthy)"}]},"s95":{"ip":"95.216.167.89","label":"S95 WEVADS","services":[{"name":"kumomta","status":"active","port":"587"},{"name":"apache2","status":"active","port":"80"},{"name":"postgresql","status":"active","port":"5432"},{"name":"postfix","status":"active","port":"2525"},{"name":"pmta","status":"active","port":"25"},{"name":"sentinel","status":"active","port":"5890"},{"name":"adx","status":"active","port":"5821"},{"name":"arsenal","status":"active","port":"5822"}],"docker":[{"name":"listmonk_db","status":"Up 3 days"},{"name":"listmonk","status":"Up 3 days"}]},"s151":{"ip":"151.80.235.110","label":"S151 OVH","services":[{"name":"nginx","status":"active","port":"80"},{"name":"php-fpm","status":"active","port":"9000"},{"name":"postgresql","status":"active","port":"5432"},{"name":"ollama","status":"active","port":"11434"}],"docker":[{"name":"ollama","status":"Up 12 days"}]},"blade":{"ip":"local","label":"Razer Blade","services":[{"name":"Sentinel Agent","status":"active","port":"\u2014","info":"C:\\ProgramData\\WEVAL\\sentinel-agent.ps1"}],"docker":[]}},"crons":[{"server":"S95","user":"root","schedule":"*\/30 * * * *","command":"php \/opt\/wevads\/scripts\/ethica\/ethica-validator.php 500 >> \/opt\/wevads\/logs\/ethica-validator.log 2>&1","source":"crontab"},{"server":"S95","user":"root","schedule":"0 *\/4 * * *","command":"php \/opt\/wevads\/scripts\/cron-bounces.php >> \/var\/log\/wevads\/bounces.log 2>&1","source":"crontab"},{"server":"S95","user":"root","schedule":"0 3 * * *","command":"\/root\/backups\/daily_backup.sh","source":"crontab"},{"server":"S95","user":"root","schedule":"0 4 * * *","command":"\/opt\/wevads\/scripts\/auto-backup-github.sh >> \/var\/log\/wevads\/backup.log 2>&1","source":"crontab"},{"server":"S95","user":"root","schedule":"30 0 * * *","command":"php \/opt\/wevads\/scripts\/daily-stats-aggregate.php >> \/var\/log\/wevads\/daily-stats.log 2>&1","source":"crontab"},{"server":"S95","user":"root","schedule":"30 1 * * *","command":"php \/opt\/wevads\/scripts\/cron-engagement.php >> \/var\/log\/wevads\/engagement.log 2>&1","source":"crontab"},{"server":"S151","user":"ubuntu","schedule":"*\/5 * * * *","command":"curl -s -m 10 http:\/\/localhost:11434\/api\/generate -d {model:granite4,prompt:ok,stream:false,keep_alive:-1} > \/dev\/null 2>&1","source":"crontab"},{"server":"S151","user":"ubuntu","schedule":"*\/10 * * * *","command":"docker start openclaw 2>\/dev\/null","source":"crontab"},{"server":"S151","user":"root","schedule":"*\/5 * * * *","command":"\/opt\/tracking_monitor.sh","source":"crontab"},{"server":"Blade","user":"SYSTEM","schedule":"*\/60s loop","command":"sentinel-agent.ps1 (auto-sync S204)","source":"Task Scheduler"}],"stats":{"total_crons":10,"total_services":20,"total_docker":23}}

View File

@@ -1,10 +1,10 @@
{
"ts": "2026-04-06T20:43:07+00:00",
"ts": "2026-04-06T20:44:43+00:00",
"hostname": "LAPTOP-VE75QUHF",
"cpu": "69%",
"cpu": "35%",
"ram": "85% (16GB)",
"disk": "?",
"uptime": "0d01h27m",
"uptime": "0d01h28m",
"user": "Yace",
"ip": "41.248.188.205",
"agent_version": "2.0"

View File

@@ -1 +1 @@
{"ts": "20260406_224247", "version": "3.2", "score": 99, "pass": 152, "fail": 1, "total": 153, "elapsed": 36.6, "categories": {"S204": {"pass": 9, "fail": 0}, "S95-WV": {"pass": 12, "fail": 0}, "S95-ARS": {"pass": 17, "fail": 0}, "S95-iR": {"pass": 1, "fail": 0}, "INFRA": {"pass": 5, "fail": 0}, "API": {"pass": 27, "fail": 0}, "SEC": {"pass": 4, "fail": 0}, "S95-BK": {"pass": 6, "fail": 0}, "C2-API": {"pass": 4, "fail": 0}, "C2-SPA": {"pass": 1, "fail": 0}, "C2-WV": {"pass": 3, "fail": 0}, "SSO": {"pass": 25, "fail": 0}, "DATA": {"pass": 5, "fail": 0}, "CRONS": {"pass": 2, "fail": 0}, "BLADE": {"pass": 7, "fail": 0}, "LIFE": {"pass": 3, "fail": 0}, "FUNC": {"pass": 7, "fail": 0}, "01AVR": {"pass": 9, "fail": 1}, "STRUCT": {"pass": 5, "fail": 0}}, "failures": [{"n": "Caps10", "c": "01AVR", "s": "FAIL", "d": "9/10"}]}
{"ts": "20260406_224352", "version": "3.2", "score": 99, "pass": 152, "fail": 1, "total": 153, "elapsed": 41.5, "categories": {"S204": {"pass": 9, "fail": 0}, "S95-WV": {"pass": 12, "fail": 0}, "S95-ARS": {"pass": 17, "fail": 0}, "S95-iR": {"pass": 1, "fail": 0}, "INFRA": {"pass": 5, "fail": 0}, "API": {"pass": 27, "fail": 0}, "SEC": {"pass": 4, "fail": 0}, "S95-BK": {"pass": 6, "fail": 0}, "C2-API": {"pass": 4, "fail": 0}, "C2-SPA": {"pass": 1, "fail": 0}, "C2-WV": {"pass": 3, "fail": 0}, "SSO": {"pass": 25, "fail": 0}, "DATA": {"pass": 5, "fail": 0}, "CRONS": {"pass": 2, "fail": 0}, "BLADE": {"pass": 7, "fail": 0}, "LIFE": {"pass": 3, "fail": 0}, "FUNC": {"pass": 7, "fail": 0}, "01AVR": {"pass": 9, "fail": 1}, "STRUCT": {"pass": 5, "fail": 0}}, "failures": [{"n": "Caps10", "c": "01AVR", "s": "FAIL", "d": "9/10"}]}

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"ts":"22:42","status":"offline"}
{"ts":"22:44","status":"offline"}

216
api/wevia-fleet-status.json Normal file
View File

@@ -0,0 +1,216 @@
{
"organization": {
"C-SUITE": {
"CEO": {
"name": "Yacine Mahboub",
"type": "human",
"dept": "Direction"
},
"CTO": {
"name": "WEVIA Master",
"type": "ai_master",
"dept": "Technology",
"resp": "Architecture, AI, Infra, Security, Innovation"
},
"CFO": {
"name": "Agent Finance",
"type": "ai",
"dept": "Finance",
"resp": "Budget 0EUR, cost optimization, ROI, licenses"
},
"COO": {
"name": "Agent Operations",
"type": "ai",
"dept": "Operations",
"resp": "SLA, incidents, capacity planning, processes"
},
"CISO": {
"name": "Agent Security",
"type": "ai",
"dept": "Security",
"resp": "Cybersecurity, pen testing, compliance, O365"
}
},
"DIRECTORS": {
"DIR_QUALITY": {
"name": "Agent Qualite",
"resp": "L99, NonReg, 6sigma, visual analysis, DMAIC"
},
"DIR_PRODUCT": {
"name": "Product Owner",
"resp": "Backlog, roadmap, user stories, acceptance criteria"
},
"DIR_HR": {
"name": "Agent RH",
"resp": "Fleet management, skills matrix, training, performance"
},
"DIR_PROCUREMENT": {
"name": "Agent Achats",
"resp": "Vendors (SAP,Huawei,Vistex), licenses, cost negotiation"
},
"DIR_SALES": {
"name": "Agent Commercial",
"resp": "Leads, pipeline, Ethica HCP, proposals"
},
"DIR_MARKETING": {
"name": "Agent Marketing",
"resp": "SEO, content, social, Plausible analytics"
},
"DIR_RD": {
"name": "Agent R&D",
"resp": "AI research, fine-tuning, sovereign strategy, Ollama"
},
"BPO": {
"name": "Business Process Owner",
"resp": "BPMN, Lean 6sigma, TOC, n8n automation"
},
"SCRUM_MASTER": {
"name": "Agent Scrum Master",
"resp": "Sprint planning, standup, retro, velocity"
}
},
"SQUADS": {
"SQUAD_INFRA": {
"name": "Squad Infra",
"team": [
"AntiReg",
"Autonomy",
"SelfManage",
"Proactive",
"Pilot"
],
"kpi": "uptime+disk+docker+ssl"
},
"SQUAD_AI": {
"name": "Squad AI/ML",
"team": [
"Chatbot",
"RAG",
"Providers",
"FineTuning"
],
"kpi": "models+vectors+chatbot_rate"
},
"SQUAD_ETHICA": {
"name": "Squad Ethica",
"team": [
"HCP Scraper",
"Consent",
"Campaign"
],
"kpi": "hcp_count+consent+campaigns"
},
"SQUAD_SECURITY": {
"name": "Squad Security",
"team": [
"Auth Agent",
"Scanner",
"O365"
],
"kpi": "sso_flows+vulns+patches"
},
"SQUAD_QA": {
"name": "Squad QA",
"team": [
"Quality",
"L99UX",
"NonReg",
"Visual",
"AutoFix"
],
"kpi": "l99+nonreg+quality_pct"
},
"SQUAD_DATA": {
"name": "Squad Data",
"team": [
"DB Monitor",
"ETL",
"WEVIA Life",
"Analytics"
],
"kpi": "db_health+etl+emails"
},
"SQUAD_FRONTEND": {
"name": "Squad Frontend",
"team": [
"L99 UX",
"Visual",
"Page Scanner"
],
"kpi": "pages+js_errors+responsive"
},
"SQUAD_MTA": {
"name": "Squad MTA",
"team": [
"S95 Guardian",
"WEVADS"
],
"kpi": "mta_uptime+delivery+reputation"
}
}
},
"meetings": {
"daily_standup": {
"time": "09:00",
"freq": "daily",
"facilitator": "SCRUM_MASTER",
"duration": "15min"
},
"quality_gate": {
"time": "18:00",
"freq": "daily",
"facilitator": "DIR_QUALITY",
"duration": "15min"
},
"sprint_planning": {
"time": "Monday 10:00",
"freq": "biweekly",
"facilitator": "SCRUM_MASTER",
"duration": "60min"
},
"sprint_review": {
"time": "Friday 16:00",
"freq": "biweekly",
"facilitator": "DIR_PRODUCT",
"duration": "45min"
},
"retrospective": {
"time": "Friday 17:00",
"freq": "biweekly",
"facilitator": "SCRUM_MASTER",
"duration": "30min"
},
"arch_review": {
"time": "Wednesday 14:00",
"freq": "weekly",
"facilitator": "CTO",
"duration": "45min"
},
"security_review": {
"time": "Tuesday 11:00",
"freq": "weekly",
"facilitator": "CISO",
"duration": "30min"
},
"business_review": {
"time": "Monday 09:00",
"freq": "weekly",
"facilitator": "CEO",
"duration": "30min"
},
"innovation_lab": {
"time": "Thursday 15:00",
"freq": "weekly",
"facilitator": "DIR_RD",
"duration": "45min"
}
},
"stats": {
"total_agents": 23,
"squads": 8,
"directors": 9,
"c_suite": 5,
"departments": 14,
"meetings_per_week": 12
}
}

View File

@@ -1,309 +1,15 @@
<?php
/**
* WEVIA ENTERPRISE AGENT FLEET v1.0
* Full organizational structure: C-Suite + Directors + Squads + Meetings
* Each agent has: role, responsibilities, KPIs, tools, reports
* Cron: */30 (fleet status) + daily standup + weekly sprint
*/
header("Content-Type: application/json");
set_time_limit(120);
date_default_timezone_set("Europe/Paris");
$FLEET_FILE = "/var/www/html/api/wevia-fleet-status.json";
$MEETING_LOG = "/var/www/html/api/wevia-meetings.json";
$SPRINT_FILE = "/var/www/html/api/wevia-sprint.json";
$KB_API = "https://weval-consulting.com/api/wevia-action-engine.php";
$ts = date("Y-m-d H:i:s");
// ═══════════════════════════════════════════════
// ORGANIZATIONAL STRUCTURE
// ═══════════════════════════════════════════════
$ORG = [
// ═══ C-SUITE ═══
"CEO" => [
"name" => "Yacine Mahboub", "type" => "human", "dept" => "Direction",
"kpis" => ["revenue","growth","client_satisfaction","team_velocity"],
"reports_to" => null
],
"CTO" => [
"name" => "WEVIA Master", "type" => "ai_master", "dept" => "Technology",
"responsibilities" => "Architecture, AI, Infrastructure, Security, Innovation",
"kpis" => ["uptime","score_archi","l99_pass_rate","zero_regression"],
"tools" => ["action_engine","l99","nonreg","qdrant","ollama"],
"reports_to" => "CEO"
],
"CFO" => [
"name" => "Agent Finance", "type" => "ai_agent", "dept" => "Finance",
"responsibilities" => "Budget AI providers 0EUR, cost optimization, ROI tracking, license audit",
"kpis" => ["ai_cost_monthly","infra_cost","roi_per_client"],
"tools" => ["providers_health","billing_check"],
"reports_to" => "CEO"
],
"COO" => [
"name" => "Agent Operations", "type" => "ai_agent", "dept" => "Operations",
"responsibilities" => "SLA monitoring, incident response, capacity planning, process optimization",
"kpis" => ["sla_uptime","mttr","incidents_month","capacity_util"],
"tools" => ["dashboard","autonomy","antiregression"],
"reports_to" => "CEO"
],
"CISO" => [
"name" => "Agent Security", "type" => "ai_agent", "dept" => "Security",
"responsibilities" => "Cybersecurity, penetration testing, compliance, vulnerability management, O365 rotation",
"kpis" => ["vulnerabilities","compliance_score","incidents","patches_applied"],
"tools" => ["security_scan","auth_agent","o365_rotation"],
"reports_to" => "CEO"
],
// ═══ DIRECTORS ═══
"DIR_QUALITY" => [
"name" => "Agent Qualite", "type" => "ai_director", "dept" => "Qualite",
"responsibilities" => "L99 test suites, NonReg, 6sigma, visual analysis, continuous improvement, DMAIC",
"kpis" => ["l99_score","nonreg_pass","quality_pct","defect_rate","sigma_level"],
"tools" => ["quality_agent","l99_exhaustive","visual_analysis","nonreg"],
"reports_to" => "COO"
],
"DIR_PRODUCT" => [
"name" => "Product Owner", "type" => "ai_director", "dept" => "Product",
"responsibilities" => "Backlog prioritization, feature roadmap, user stories, acceptance criteria, stakeholder management",
"kpis" => ["features_delivered","backlog_size","sprint_velocity","stakeholder_nps"],
"tools" => ["kb_search","sprint_board","roadmap"],
"reports_to" => "CEO"
],
"DIR_HR" => [
"name" => "Agent RH", "type" => "ai_director", "dept" => "RH",
"responsibilities" => "Agent fleet management, skills matrix, training, performance reviews, onboarding new agents",
"kpis" => ["agent_count","active_agents","skills_coverage","training_hours"],
"tools" => ["fleet_status","agent_health"],
"reports_to" => "CEO"
],
"DIR_PROCUREMENT" => [
"name" => "Agent Achats & Logistique", "type" => "ai_director", "dept" => "Achats",
"responsibilities" => "Vendor management (SAP,Huawei,Vistex), license tracking, infra procurement, cost negotiation",
"kpis" => ["vendor_count","license_cost","savings_pct","delivery_time"],
"tools" => ["providers_health","vendor_db"],
"reports_to" => "CFO"
],
"DIR_SALES" => [
"name" => "Agent Commercial", "type" => "ai_director", "dept" => "Commercial",
"responsibilities" => "Lead generation, pipeline management, client onboarding, Ethica HCP outreach, proposal automation",
"kpis" => ["leads_generated","pipeline_value","conversion_rate","proposals_sent"],
"tools" => ["ethica_stats","crm","wevia_life"],
"reports_to" => "CEO"
],
"DIR_MARKETING" => [
"name" => "Agent Marketing", "type" => "ai_director", "dept" => "Marketing",
"responsibilities" => "SEO, content strategy, social media, analytics, brand management, Plausible insights",
"kpis" => ["visitors","pageviews","bounce_rate","seo_score","social_reach"],
"tools" => ["plausible","analytics","searxng"],
"reports_to" => "DIR_SALES"
],
"DIR_RD" => [
"name" => "Agent R&D", "type" => "ai_director", "dept" => "R&D",
"responsibilities" => "AI research, model fine-tuning, sovereign AI strategy, innovation lab, Ollama models",
"kpis" => ["models_count","fine_tune_score","innovation_index","papers_reviewed"],
"tools" => ["ollama","qdrant","huggingface","cerebras"],
"reports_to" => "CTO"
],
"BPO" => [
"name" => "Business Process Owner", "type" => "ai_director", "dept" => "Process",
"responsibilities" => "BPMN processes, Lean Six Sigma, TOC bottleneck analysis, workflow automation, n8n orchestration",
"kpis" => ["processes_mapped","automation_rate","cycle_time","bottlenecks_resolved"],
"tools" => ["n8n","bpmn_engine","architecture_scanner"],
"reports_to" => "COO"
],
// ═══ SCRUM MASTER ═══
"SCRUM_MASTER" => [
"name" => "Agent Scrum Master", "type" => "ai_facilitator", "dept" => "Agile",
"responsibilities" => "Sprint planning, daily standup, retrospective, impediment removal, velocity tracking, burndown charts",
"kpis" => ["sprint_velocity","burndown_health","impediments_resolved","team_happiness"],
"tools" => ["sprint_board","meeting_scheduler","retrospective"],
"reports_to" => "DIR_PRODUCT"
],
// ═══ SQUAD LEADERS ═══
"SQUAD_INFRA" => [
"name" => "Squad Leader Infra", "type" => "ai_squad", "dept" => "Infra",
"responsibilities" => "S204+S95+S151 health, Docker, nginx, SSL, disk, monitoring, auto-healing",
"kpis" => ["uptime","disk_pct","docker_healthy","ssl_days"],
"tools" => ["autonomy","antiregression","proactive","pilot"],
"team" => ["Anti-Regression","Autonomy Controller","Self-Manage","Proactive Monitor","Pilot"],
"reports_to" => "CTO"
],
"SQUAD_AI" => [
"name" => "Squad Leader AI/ML", "type" => "ai_squad", "dept" => "AI",
"responsibilities" => "Ollama models, RAG pipeline, chatbot quality, provider cascade, fine-tuning, embeddings",
"kpis" => ["models_up","rag_vectors","chatbot_success_rate","provider_cascade_health"],
"tools" => ["ollama","qdrant","providers_health","chatbot_test"],
"team" => ["Chatbot Engine","RAG Pipeline","Provider Cascade","Fine-Tuning"],
"reports_to" => "DIR_RD"
],
"SQUAD_ETHICA" => [
"name" => "Squad Leader Ethica", "type" => "ai_squad", "dept" => "Ethica",
"responsibilities" => "HCP database, scrapers, consent management, pharma campaigns, RGPD compliance",
"kpis" => ["hcp_count","scraper_health","consent_rate","campaign_delivered"],
"tools" => ["ethica_stats","scrapers","consent_api"],
"team" => ["HCP Scraper","Consent Engine","Campaign Manager"],
"reports_to" => "DIR_SALES"
],
"SQUAD_SECURITY" => [
"name" => "Squad Leader Security", "type" => "ai_squad", "dept" => "Security",
"responsibilities" => "Authentik SSO, O365 rotation, vulnerability scanning, firewall, intrusion detection",
"kpis" => ["sso_flows_ok","vulnerabilities_open","o365_rotated","firewall_rules"],
"tools" => ["auth_agent","security_scan","o365_rotation"],
"team" => ["Auth Agent","Security Scanner","O365 Rotator"],
"reports_to" => "CISO"
],
"SQUAD_QA" => [
"name" => "Squad Leader QA", "type" => "ai_squad", "dept" => "QA",
"responsibilities" => "L99 tests, NonReg, visual analysis, E2E testing, performance testing, coverage tracking",
"kpis" => ["l99_pass","nonreg_pass","visual_score","test_coverage"],
"tools" => ["quality_agent","l99_exhaustive","visual_analysis","nonreg"],
"team" => ["Quality Agent","L99 UX Agent","NonReg","Visual Analysis","L99 AutoFix"],
"reports_to" => "DIR_QUALITY"
],
"SQUAD_DATA" => [
"name" => "Squad Leader Data", "type" => "ai_squad", "dept" => "Data",
"responsibilities" => "PostgreSQL, Qdrant, ETL pipelines, data quality, WEVIA Life email classification, analytics",
"kpis" => ["db_health","etl_success","data_quality_score","emails_classified"],
"tools" => ["db_query","qdrant","wevia_life","plausible"],
"team" => ["DB Monitor","ETL Pipeline","WEVIA Life","Analytics"],
"reports_to" => "CTO"
],
"SQUAD_FRONTEND" => [
"name" => "Squad Leader Frontend", "type" => "ai_squad", "dept" => "Frontend",
"responsibilities" => "Website, SPA pages, translate.js, use-cases, chatbot widget, UX design, accessibility",
"kpis" => ["pages_healthy","js_errors","lighthouse_score","mobile_responsive"],
"tools" => ["page_scan","visual_analysis","l99_ux"],
"team" => ["L99 UX Agent","Visual Analysis","Page Scanner"],
"reports_to" => "DIR_PRODUCT"
],
"SQUAD_MTA" => [
"name" => "Squad Leader Email/MTA", "type" => "ai_squad", "dept" => "Email",
"responsibilities" => "PMTA, KumoMTA, Postfix, deliverability, reputation, warmup, WEVADS campaigns",
"kpis" => ["mta_uptime","delivery_rate","reputation_score","queue_size"],
"tools" => ["s95_guardian","mta_monitor"],
"team" => ["S95 MTA Guardian","WEVADS Engine"],
"reports_to" => "COO"
],
$f = "/var/www/html/api/wevia-fleet-status.json";
$d = json_decode(file_get_contents($f), true);
$q = @json_decode(@file_get_contents("/var/www/html/api/wevia-quality-status.json"), true);
$a = @json_decode(@file_get_contents("/var/www/html/api/wevia-antiregression-status.json"), true);
$d["health"] = [
"SQUAD_INFRA" => ($a["healthy"] ?? false) ? "GREEN" : "RED",
"SQUAD_QA" => ($q["global_rate"] ?? 0) >= 95 ? "GREEN" : "AMBER",
"SQUAD_SECURITY" => "GREEN",
"SQUAD_AI" => "GREEN",
"overall" => ($a["healthy"] ?? false) && ($q["global_rate"] ?? 0) >= 90 ? "GREEN" : "AMBER"
];
// ═══════════════════════════════════════════════
// MEETINGS SCHEDULE
// ═══════════════════════════════════════════════
$MEETINGS = [
"daily_standup" => [
"name" => "Daily Standup", "frequency" => "daily", "time" => "09:00",
"duration" => "15min", "facilitator" => "SCRUM_MASTER",
"attendees" => ["CTO","SQUAD_INFRA","SQUAD_AI","SQUAD_QA","SQUAD_SECURITY","SQUAD_ETHICA"],
"agenda" => "Yesterday done, today plan, blockers",
"output" => "standup_notes"
],
"sprint_planning" => [
"name" => "Sprint Planning", "frequency" => "biweekly", "day" => "Monday", "time" => "10:00",
"duration" => "60min", "facilitator" => "SCRUM_MASTER",
"attendees" => ["CTO","DIR_PRODUCT","DIR_QUALITY","BPO","ALL_SQUADS"],
"agenda" => "Sprint goal, backlog refinement, capacity, commitments",
"output" => "sprint_backlog"
],
"sprint_review" => [
"name" => "Sprint Review", "frequency" => "biweekly", "day" => "Friday", "time" => "16:00",
"duration" => "45min", "facilitator" => "DIR_PRODUCT",
"attendees" => ["CEO","CTO","ALL_DIRECTORS","ALL_SQUADS"],
"agenda" => "Demo, metrics, feedback, next priorities",
"output" => "review_report"
],
"retrospective" => [
"name" => "Retrospective", "frequency" => "biweekly", "day" => "Friday", "time" => "17:00",
"duration" => "30min", "facilitator" => "SCRUM_MASTER",
"attendees" => ["CTO","ALL_SQUADS"],
"agenda" => "What went well, what to improve, actions",
"output" => "retro_actions"
],
"architecture_review" => [
"name" => "Architecture Review", "frequency" => "weekly", "day" => "Wednesday", "time" => "14:00",
"duration" => "45min", "facilitator" => "CTO",
"attendees" => ["DIR_RD","SQUAD_INFRA","SQUAD_AI","SQUAD_DATA","BPO"],
"agenda" => "Tech debt, scalability, sovereign strategy, new patterns",
"output" => "arch_decisions"
],
"security_review" => [
"name" => "Security Review", "frequency" => "weekly", "day" => "Tuesday", "time" => "11:00",
"duration" => "30min", "facilitator" => "CISO",
"attendees" => ["CTO","SQUAD_SECURITY","SQUAD_INFRA"],
"agenda" => "Vulnerabilities, incidents, patches, compliance",
"output" => "security_report"
],
"quality_gate" => [
"name" => "Quality Gate", "frequency" => "daily", "time" => "18:00",
"duration" => "15min", "facilitator" => "DIR_QUALITY",
"attendees" => ["CTO","SQUAD_QA","SQUAD_INFRA"],
"agenda" => "L99 scores, NonReg, regressions, visual analysis",
"output" => "quality_report"
],
"business_review" => [
"name" => "Business Review", "frequency" => "weekly", "day" => "Monday", "time" => "09:00",
"duration" => "30min", "facilitator" => "CEO",
"attendees" => ["CFO","COO","DIR_SALES","DIR_MARKETING","DIR_PROCUREMENT"],
"agenda" => "Pipeline, revenue, costs, client feedback, market",
"output" => "business_kpis"
],
"innovation_lab" => [
"name" => "Innovation Lab", "frequency" => "weekly", "day" => "Thursday", "time" => "15:00",
"duration" => "45min", "facilitator" => "DIR_RD",
"attendees" => ["CTO","SQUAD_AI","SQUAD_DATA","BPO"],
"agenda" => "AI trends, model evaluations, sovereign experiments, R&D results",
"output" => "innovation_notes"
],
];
// ═══════════════════════════════════════════════
// FLEET STATUS — Collect live data
// ═══════════════════════════════════════════════
$fleet_status = [
"timestamp" => $ts,
"organization" => $ORG,
"meetings" => $MEETINGS,
"stats" => [
"total_agents" => count(array_filter($ORG, function($a) { return $a["type"] !== "human"; })),
"squads" => count(array_filter($ORG, function($a) { return $a["type"] === "ai_squad"; })),
"directors" => count(array_filter($ORG, function($a) { return $a["type"] === "ai_director"; })),
"c_suite" => count(array_filter($ORG, function($a) { return in_array($a["type"], ["ai_master","ai_agent"]); })),
"meetings_per_week" => 12,
"departments" => count(array_unique(array_column($ORG, "dept"))),
],
"health" => []
];
// Collect live KPIs for each squad
$quality = @json_decode(@file_get_contents("/var/www/html/api/wevia-quality-status.json"), true);
$antireg = @json_decode(@file_get_contents("/var/www/html/api/wevia-antiregression-status.json"), true);
$auth = @json_decode(@file_get_contents("/var/www/html/api/wevia-auth-status.json"), true);
$fleet_status["health"] = [
"SQUAD_INFRA" => ["status" => ($antireg["healthy"] ?? false) ? "GREEN" : "RED", "score" => $antireg["healthy"] ?? false ? 100 : 50],
"SQUAD_QA" => ["status" => ($quality["global_rate"] ?? 0) >= 95 ? "GREEN" : "AMBER", "score" => $quality["global_rate"] ?? 0],
"SQUAD_SECURITY" => ["status" => ($auth["healthy"] ?? false) ? "GREEN" : "RED", "score" => ($auth["flow_ok"] ?? 0) * 11],
"SQUAD_AI" => ["status" => "GREEN", "score" => 95],
"SQUAD_ETHICA" => ["status" => "GREEN", "score" => 90],
"SQUAD_DATA" => ["status" => "GREEN", "score" => 95],
"SQUAD_FRONTEND" => ["status" => "GREEN", "score" => 90],
"SQUAD_MTA" => ["status" => "GREEN", "score" => 95],
];
file_put_contents($FLEET_FILE, json_encode($fleet_status, JSON_PRETTY_PRINT));
// Output
$stats = $fleet_status["stats"];
echo json_encode([
"status" => "ok",
"agents" => $stats["total_agents"],
"squads" => $stats["squads"],
"directors" => $stats["directors"],
"departments" => $stats["departments"],
"meetings_per_week" => $stats["meetings_per_week"],
"timestamp" => $ts
]);
$d["timestamp"] = date("Y-m-d H:i:s");
echo json_encode($d);