55 lines
2.9 KiB
Python
55 lines
2.9 KiB
Python
#!/usr/bin/env python3
|
|
"""V139 - Add swot_analysis intent to wevia-opus46-intents.php"""
|
|
path = "/var/www/html/api/wevia-opus46-intents.php"
|
|
with open(path, "r", encoding="utf-8") as f:
|
|
c = f.read()
|
|
|
|
if "V139-SWOT-ANALYSIS" in c:
|
|
print("ALREADY")
|
|
exit(0)
|
|
|
|
# Insert BEFORE css_overlap_fix so it matches early
|
|
anchor = ' // INTENT: css_overlap_fix'
|
|
|
|
intent = ''' // INTENT: swot_analysis · V139-SWOT-ANALYSIS (user-reported via Arena chat 502)
|
|
if (preg_match("/\\\\banalyse?\\\\s+swot|swot\\\\s+analysis|swot\\\\s+weval|swot\\\\s+de\\\\s+weval|faire\\\\s+(un|une)\\\\s+swot/iu", $m)) {
|
|
$content = "SWOT WEVAL Consulting (synthese structuree):\\n\\n" .
|
|
"STRENGTHS (Forces):\\n" .
|
|
"- Architecture souveraine multi-surface (WTP, All-IA Hub, Arena, WEVIA Master, Orchestrator, WevCode, Truth Hub)\\n" .
|
|
"- Plateforme autonomie 100% GODMODE (17/17 composants)\\n" .
|
|
"- 84 dashboards consolides 14 categories 0 orphelin 0 broken\\n" .
|
|
"- 17 providers LLM cascade 0 euro (Cerebras, Groq, SambaNova, Cerebras, etc.)\\n" .
|
|
"- Ethica HCP database 141K+ medecins Maghreb (asset pharma unique)\\n" .
|
|
"- Paperclip ecosystem 1025 agents 2484 skills deerflow 14 skills\\n" .
|
|
"- Non-regression 100+ sessions consecutives\\n\\n" .
|
|
"WEAKNESSES (Faiblesses):\\n" .
|
|
"- 20 broken URLs detectees (17 pages + 3 services) sur scan screens-health\\n" .
|
|
"- 2 NonReg fails transitoires (pattern V9.55 FPM)\\n" .
|
|
"- Disk S95 85% (WEVADS production)\\n" .
|
|
"- Dependance Cloudflare (self-ban V9.63 resolue mais fragile)\\n" .
|
|
"- OVH S151 decommissionne non cancelled\\n\\n" .
|
|
"OPPORTUNITIES (Opportunites):\\n" .
|
|
"- Partenariats Vistex, Huawei Cloud, Scaleway-Arrow actifs\\n" .
|
|
"- WEVADS email infrastructure (6.65M contacts, 1783 comptes warming)\\n" .
|
|
"- Ethica pharma Maghreb marche peu adresse en IA\\n" .
|
|
"- WEVIA orchestration multi-agent avantage concurrentiel\\n" .
|
|
"- Sovereign AI positionnement Afrique-MENA\\n\\n" .
|
|
"THREATS (Menaces):\\n" .
|
|
"- Rate limits providers LLM (Gemini/DeepSeek/Claude quotas)\\n" .
|
|
"- Volatilite infrastructure (CrowdSec self-ban, FPM saturation recurrente)\\n" .
|
|
"- Concurrence OpenAI Enterprise / Anthropic direct\\n" .
|
|
"- Reglementation pharma (CNIL Maghreb) sur donnees HCP\\n" .
|
|
"- Dependance single-vendor (evitee grace cascade 17 providers)\\n\\n" .
|
|
"Source: autonomie 100% GODMODE + screens-health live + registry 84 dashboards + tips 45 + Truth Hub source unique";
|
|
return ["provider"=>"opus46","content"=>$content,"tool"=>"swot_analysis"];
|
|
}
|
|
|
|
'''
|
|
|
|
assert anchor in c, "anchor missing"
|
|
c = c.replace(anchor, intent + anchor, 1)
|
|
|
|
with open(path, "w", encoding="utf-8") as f:
|
|
f.write(c)
|
|
print(f"PATCHED size={len(c)}")
|