Spaces:
Running
Running
feat: add STW Struttura Organizzativa and Relazioni Istituzionali agents (6 areas per Nardoni spec)
Browse files- agents.py +105 -8
- export_core.py +9 -5
- export_onepager.py +5 -3
- stw_analyzer.py +4 -2
- stw_matrix.py +10 -4
agents.py
CHANGED
|
@@ -380,14 +380,16 @@ class AsyncGeminiClient:
|
|
| 380 |
# =============================================================================
|
| 381 |
|
| 382 |
class AgentRole(Enum):
|
| 383 |
-
"""Ruoli degli agenti allineati alle
|
| 384 |
-
COORDINATOR = "coordinator"
|
| 385 |
-
STW_SPORTIVI = "stw_sportivi"
|
| 386 |
-
STW_STRUTTURALI = "stw_strutturali"
|
| 387 |
-
STW_MARKETING = "stw_marketing"
|
| 388 |
-
STW_SOCIALI = "stw_sociali"
|
| 389 |
-
|
| 390 |
-
|
|
|
|
|
|
|
| 391 |
|
| 392 |
|
| 393 |
# =============================================================================
|
|
@@ -857,6 +859,101 @@ Elenca gli obiettivi che richiedono budget specifico, organizzati per priorita':
|
|
| 857 |
"""
|
| 858 |
),
|
| 859 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 860 |
# =========================================================================
|
| 861 |
# FINANCIAL - Piano Economico-Finanziario
|
| 862 |
# =========================================================================
|
|
|
|
| 380 |
# =============================================================================
|
| 381 |
|
| 382 |
class AgentRole(Enum):
|
| 383 |
+
"""Ruoli degli agenti allineati alle 6 categorie STW + coordinator + consistency"""
|
| 384 |
+
COORDINATOR = "coordinator" # Executive Summary
|
| 385 |
+
STW_SPORTIVI = "stw_sportivi" # ⚽ Obiettivi Sportivi (8 MACRO)
|
| 386 |
+
STW_STRUTTURALI = "stw_strutturali" # 🏗️ Infrastrutture (2 MACRO)
|
| 387 |
+
STW_MARKETING = "stw_marketing" # 📢 Obiettivi Marketing (4 MACRO)
|
| 388 |
+
STW_SOCIALI = "stw_sociali" # 🤝 Obiettivi Sociali (7 MACRO)
|
| 389 |
+
STW_STRUTTURA_ORG = "stw_struttura_org" # 🏛️ Struttura Organizzativa (3 MACRO)
|
| 390 |
+
STW_RELAZIONI_IST = "stw_relazioni_ist" # 🏛 Relazioni Istituzionali (3 MACRO)
|
| 391 |
+
CONSISTENCY = "consistency" # Allineamento inter-sezione
|
| 392 |
+
FINANCIAL = "financial" # Piano Economico-Finanziario
|
| 393 |
|
| 394 |
|
| 395 |
# =============================================================================
|
|
|
|
| 859 |
"""
|
| 860 |
),
|
| 861 |
|
| 862 |
+
# =========================================================================
|
| 863 |
+
# STW STRUTTURA ORGANIZZATIVA - 3 Obiettivi MACRO
|
| 864 |
+
# =========================================================================
|
| 865 |
+
AgentRole.STW_STRUTTURA_ORG: AgentSpec(
|
| 866 |
+
role=AgentRole.STW_STRUTTURA_ORG,
|
| 867 |
+
name="STW Struttura Org Analyst",
|
| 868 |
+
expertise=["governance", "organigramma", "CDA", "risorse umane", "processi gestionali", "compliance"],
|
| 869 |
+
priority=5,
|
| 870 |
+
output_sections=["stw_struttura_org"],
|
| 871 |
+
system_prompt=GLOBAL_VOICE_DIRECTIVE + GLOBAL_FORMAT_DIRECTIVE + """
|
| 872 |
+
Sei l'ANALISTA STRUTTURA ORGANIZZATIVA STW. Redigi la sezione STRUTTURA ORGANIZZATIVA secondo la Matrice STW.
|
| 873 |
+
|
| 874 |
+
**STRUTTURA OBBLIGATORIA - USA ESATTAMENTE QUESTI CODICI:**
|
| 875 |
+
|
| 876 |
+
## 🏛️ STRUTTURA ORGANIZZATIVA
|
| 877 |
+
|
| 878 |
+
### MACRO 1: GOVERNANCE E CDA
|
| 879 |
+
**Obiettivo:** Definire e rafforzare la struttura di governance del Club.
|
| 880 |
+
- **1.1 Composizione CDA**: Ruoli, competenze e mandati dei consiglieri
|
| 881 |
+
- **1.2 Regolamento interno**: Formalizzazione processi decisionali e deleghe
|
| 882 |
+
- **1.3 Compliance societaria**: Statuto, adempimenti FIGC/LND, normativa sportiva
|
| 883 |
+
- **1.4 Pianificazione strategica**: Ciclo annuale di revisione obiettivi
|
| 884 |
+
KPI: 100% adempimenti societari rispettati — Budget: €2.000–€5.000
|
| 885 |
+
|
| 886 |
+
### MACRO 2: ORGANIGRAMMA E RISORSE UMANE
|
| 887 |
+
**Obiettivo:** Strutturare organizzazione interna con ruoli chiari e personale qualificato.
|
| 888 |
+
- **2.1 Organigramma formale**: Definizione ruoli, responsabilità e linee di riporto
|
| 889 |
+
- **2.2 Selezione e onboarding**: Criteri assunzione collaboratori e volontari
|
| 890 |
+
- **2.3 Formazione continua**: Piano sviluppo competenze per tutto lo staff
|
| 891 |
+
- **2.4 Welfare e retention**: Iniziative per motivazione e fidelizzazione
|
| 892 |
+
KPI: Organigramma completo e approvato entro Anno 1 — Budget: €5.000–€15.000
|
| 893 |
+
|
| 894 |
+
### MACRO 3: PROCESSI E DIGITALIZZAZIONE GESTIONALE
|
| 895 |
+
**Obiettivo:** Ottimizzare processi interni con strumenti digitali adeguati.
|
| 896 |
+
- **3.1 Software gestionale**: CRM, contabilità, gestione tesserati
|
| 897 |
+
- **3.2 Flussi operativi**: Standardizzazione procedure amministrative
|
| 898 |
+
- **3.3 Archiviazione digitale**: Documenti societari e compliance GDPR
|
| 899 |
+
KPI: -20% tempo gestione pratiche amministrative entro Anno 2 — Budget: €3.000–€10.000
|
| 900 |
+
|
| 901 |
+
**REGOLE ASSOLUTE:**
|
| 902 |
+
- ESATTAMENTE 3 MACRO. NON aggiungere altri MACRO.
|
| 903 |
+
- Focus su governance, struttura interna, HR. NON infrastrutture fisiche.
|
| 904 |
+
- Dati mancanti: `(dato da acquisire)`
|
| 905 |
+
- Voce istituzionale
|
| 906 |
+
"""
|
| 907 |
+
),
|
| 908 |
+
|
| 909 |
+
# =========================================================================
|
| 910 |
+
# STW RELAZIONI ISTITUZIONALI - 3 Obiettivi MACRO
|
| 911 |
+
# =========================================================================
|
| 912 |
+
AgentRole.STW_RELAZIONI_IST: AgentSpec(
|
| 913 |
+
role=AgentRole.STW_RELAZIONI_IST,
|
| 914 |
+
name="STW Relazioni Ist Analyst",
|
| 915 |
+
expertise=["federazioni", "FIGC", "LND", "istituzioni locali", "Comune", "partnership istituzionali", "licenze federali"],
|
| 916 |
+
priority=6,
|
| 917 |
+
output_sections=["stw_relazioni_ist"],
|
| 918 |
+
system_prompt=GLOBAL_VOICE_DIRECTIVE + GLOBAL_FORMAT_DIRECTIVE + """
|
| 919 |
+
Sei l'ANALISTA RELAZIONI ISTITUZIONALI STW. Redigi la sezione RELAZIONI ISTITUZIONALI secondo la Matrice STW.
|
| 920 |
+
|
| 921 |
+
**STRUTTURA OBBLIGATORIA - USA ESATTAMENTE QUESTI CODICI:**
|
| 922 |
+
|
| 923 |
+
## 🏛 RELAZIONI ISTITUZIONALI
|
| 924 |
+
|
| 925 |
+
### MACRO 1: FEDERAZIONI E ORGANI SPORTIVI
|
| 926 |
+
**Obiettivo:** Consolidare rapporti con FIGC, LND, CR Emilia-Romagna e federazioni di settore.
|
| 927 |
+
- **1.1 Licenze e affiliazioni**: Stato attuale, rinnovi, upgrade categoria
|
| 928 |
+
- **1.2 Partecipazione commissioni**: Presenza in organi federali locali
|
| 929 |
+
- **1.3 Accreditamenti formativi**: Corsi UEFA, FIGC per staff tecnico
|
| 930 |
+
- **1.4 Relazioni con delegazione provinciale**: Collaborazione e presidio locale
|
| 931 |
+
KPI: 100% licenze aggiornate ogni stagione — Budget: €1.000–€3.000
|
| 932 |
+
|
| 933 |
+
### MACRO 2: ISTITUZIONI LOCALI E TERRITORIO
|
| 934 |
+
**Obiettivo:** Rafforzare rapporto con Comune di Riccione, Provincia e Regione.
|
| 935 |
+
- **2.1 Accordo impianti sportivi**: Convenzione uso/gestione strutture comunali
|
| 936 |
+
- **2.2 Contributi pubblici**: Mappatura bandi regionali e nazionali per sport
|
| 937 |
+
- **2.3 Protocolli con scuole**: Accordi per attività motoria e orientamento sportivo
|
| 938 |
+
- **2.4 Collaborazione Enti Locali**: Co-organizzazione eventi pubblici
|
| 939 |
+
KPI: Almeno 1 accordo istituzionale firmato entro Anno 1 — Budget: €500–€2.000
|
| 940 |
+
|
| 941 |
+
### MACRO 3: PARTNERSHIP STRATEGICHE E UNIVERSITÀ
|
| 942 |
+
**Obiettivo:** Costruire rete di partner istituzionali per accrescere credibilità e risorse.
|
| 943 |
+
- **3.1 Partnership università**: Accordi con atenei per tirocini, ricerca, formazione
|
| 944 |
+
- **3.2 Enti del terzo settore**: Collaborazioni con associazioni del territorio
|
| 945 |
+
- **3.3 Sponsorizzazioni istituzionali**: Partnership con aziende pubbliche (ex. ASL, Ausl)
|
| 946 |
+
- **3.4 Visibilità istituzionale**: Presenza agli eventi della città come interlocutore sportivo
|
| 947 |
+
KPI: 2 nuove partnership istituzionali entro Anno 2 — Budget: €1.000–€4.000
|
| 948 |
+
|
| 949 |
+
**REGOLE ASSOLUTE:**
|
| 950 |
+
- ESATTAMENTE 3 MACRO. NON aggiungere altri MACRO.
|
| 951 |
+
- Focus su relazioni esterne istituzionali. NON marketing commerciale.
|
| 952 |
+
- Dati mancanti: `(dato da acquisire)`
|
| 953 |
+
- Voce istituzionale
|
| 954 |
+
"""
|
| 955 |
+
),
|
| 956 |
+
|
| 957 |
# =========================================================================
|
| 958 |
# FINANCIAL - Piano Economico-Finanziario
|
| 959 |
# =========================================================================
|
export_core.py
CHANGED
|
@@ -268,6 +268,8 @@ class BaseExporter(ABC):
|
|
| 268 |
'executive_summary',
|
| 269 |
'stw_sportivi',
|
| 270 |
'stw_strutturali',
|
|
|
|
|
|
|
| 271 |
'stw_marketing',
|
| 272 |
'stw_sociali',
|
| 273 |
'financial',
|
|
@@ -286,11 +288,13 @@ class BaseExporter(ABC):
|
|
| 286 |
"""Returns a mapping of section keys to display titles."""
|
| 287 |
return {
|
| 288 |
'executive_summary': '01. Sintesi Strategica',
|
| 289 |
-
'stw_sportivi': '02. ⚽
|
| 290 |
-
'stw_strutturali': '03. 🏗️
|
| 291 |
-
'
|
| 292 |
-
'
|
| 293 |
-
'
|
|
|
|
|
|
|
| 294 |
'technical_sporting': '02. Area Tecnico-Sportiva',
|
| 295 |
'youth_sector': '03. Settore Giovanile',
|
| 296 |
'youth_development': '03. Sviluppo Settore Giovanile',
|
|
|
|
| 268 |
'executive_summary',
|
| 269 |
'stw_sportivi',
|
| 270 |
'stw_strutturali',
|
| 271 |
+
'stw_struttura_org',
|
| 272 |
+
'stw_relazioni_ist',
|
| 273 |
'stw_marketing',
|
| 274 |
'stw_sociali',
|
| 275 |
'financial',
|
|
|
|
| 288 |
"""Returns a mapping of section keys to display titles."""
|
| 289 |
return {
|
| 290 |
'executive_summary': '01. Sintesi Strategica',
|
| 291 |
+
'stw_sportivi': '02. ⚽ Area Tecnico-Sportiva',
|
| 292 |
+
'stw_strutturali': '03. 🏗️ Infrastrutture',
|
| 293 |
+
'stw_struttura_org': '04. 🏛️ Struttura Organizzativa',
|
| 294 |
+
'stw_relazioni_ist': '05. 🏛 Relazioni Istituzionali',
|
| 295 |
+
'stw_marketing': '06. 📢 Marketing & Commerciale',
|
| 296 |
+
'stw_sociali': '07. 🤝 Area Sociale',
|
| 297 |
+
'financial': '08. 💰 Piano Finanziario',
|
| 298 |
'technical_sporting': '02. Area Tecnico-Sportiva',
|
| 299 |
'youth_sector': '03. Settore Giovanile',
|
| 300 |
'youth_development': '03. Sviluppo Settore Giovanile',
|
export_onepager.py
CHANGED
|
@@ -292,10 +292,12 @@ class OnePagerExporter(BaseExporter):
|
|
| 292 |
# STW Progress bars
|
| 293 |
stw_bars_html = ''
|
| 294 |
stw_labels = [
|
| 295 |
-
('sportivi', '
|
| 296 |
-
('strutturali', '
|
|
|
|
|
|
|
| 297 |
('marketing', 'MARKETING', STWCategory.MARKETING),
|
| 298 |
-
('sociali', '
|
| 299 |
]
|
| 300 |
for key, label, cat_enum in stw_labels:
|
| 301 |
prog_data = stw_progress.get(key, {})
|
|
|
|
| 292 |
# STW Progress bars
|
| 293 |
stw_bars_html = ''
|
| 294 |
stw_labels = [
|
| 295 |
+
('sportivi', 'TECNICO-SPORTIVA', STWCategory.SPORTIVI),
|
| 296 |
+
('strutturali', 'INFRASTRUTTURE', STWCategory.STRUTTURALI),
|
| 297 |
+
('struttura_org', 'STRUTTURA ORG.', STWCategory.STRUTTURA_ORG),
|
| 298 |
+
('relazioni_ist', 'RELAZIONI IST.', STWCategory.RELAZIONI_IST),
|
| 299 |
('marketing', 'MARKETING', STWCategory.MARKETING),
|
| 300 |
+
('sociali', 'SOCIALE', STWCategory.SOCIALI),
|
| 301 |
]
|
| 302 |
for key, label, cat_enum in stw_labels:
|
| 303 |
prog_data = stw_progress.get(key, {})
|
stw_analyzer.py
CHANGED
|
@@ -93,9 +93,11 @@ class STWAnalyzer:
|
|
| 93 |
# Mapping chiavi sezione → categoria STW
|
| 94 |
section_mappings = {
|
| 95 |
'sportivi': ['stw_sportivi', 'technical_sporting', 'sporting', 'settore_giovanile'],
|
| 96 |
-
'strutturali': ['stw_strutturali', 'infrastructure', 'facilities'
|
| 97 |
'marketing': ['stw_marketing', 'marketing', 'commercial', 'communication'],
|
| 98 |
-
'sociali': ['stw_sociali', 'social', 'community', 'sustainability']
|
|
|
|
|
|
|
| 99 |
}
|
| 100 |
|
| 101 |
content_parts = []
|
|
|
|
| 93 |
# Mapping chiavi sezione → categoria STW
|
| 94 |
section_mappings = {
|
| 95 |
'sportivi': ['stw_sportivi', 'technical_sporting', 'sporting', 'settore_giovanile'],
|
| 96 |
+
'strutturali': ['stw_strutturali', 'infrastructure', 'facilities'],
|
| 97 |
'marketing': ['stw_marketing', 'marketing', 'commercial', 'communication'],
|
| 98 |
+
'sociali': ['stw_sociali', 'social', 'community', 'sustainability'],
|
| 99 |
+
'struttura_org': ['stw_struttura_org', 'governance', 'hr', 'organigramma'],
|
| 100 |
+
'relazioni_ist': ['stw_relazioni_ist', 'relazioni_istituzionali', 'istituzionali'],
|
| 101 |
}
|
| 102 |
|
| 103 |
content_parts = []
|
stw_matrix.py
CHANGED
|
@@ -17,6 +17,8 @@ class STWCategory(Enum):
|
|
| 17 |
STRUTTURALI = "strutturali"
|
| 18 |
MARKETING = "marketing"
|
| 19 |
SOCIALI = "sociali"
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
@dataclass
|
|
@@ -423,6 +425,8 @@ def get_category_icon(category: STWCategory) -> str:
|
|
| 423 |
STWCategory.STRUTTURALI: "🏗️",
|
| 424 |
STWCategory.MARKETING: "📢",
|
| 425 |
STWCategory.SOCIALI: "🤝",
|
|
|
|
|
|
|
| 426 |
}
|
| 427 |
return icons.get(category, "📋")
|
| 428 |
|
|
@@ -430,10 +434,12 @@ def get_category_icon(category: STWCategory) -> str:
|
|
| 430 |
def get_category_color(category: STWCategory) -> str:
|
| 431 |
"""Restituisce un colore CSS per la categoria"""
|
| 432 |
colors = {
|
| 433 |
-
STWCategory.SPORTIVI: "#2E7D32",
|
| 434 |
-
STWCategory.STRUTTURALI: "#1565C0",
|
| 435 |
-
STWCategory.MARKETING: "#E65100",
|
| 436 |
-
STWCategory.SOCIALI: "#7B1FA2",
|
|
|
|
|
|
|
| 437 |
}
|
| 438 |
return colors.get(category, "#424242")
|
| 439 |
|
|
|
|
| 17 |
STRUTTURALI = "strutturali"
|
| 18 |
MARKETING = "marketing"
|
| 19 |
SOCIALI = "sociali"
|
| 20 |
+
STRUTTURA_ORG = "struttura_org"
|
| 21 |
+
RELAZIONI_IST = "relazioni_ist"
|
| 22 |
|
| 23 |
|
| 24 |
@dataclass
|
|
|
|
| 425 |
STWCategory.STRUTTURALI: "🏗️",
|
| 426 |
STWCategory.MARKETING: "📢",
|
| 427 |
STWCategory.SOCIALI: "🤝",
|
| 428 |
+
STWCategory.STRUTTURA_ORG: "🏛️",
|
| 429 |
+
STWCategory.RELAZIONI_IST: "🤝🏛",
|
| 430 |
}
|
| 431 |
return icons.get(category, "📋")
|
| 432 |
|
|
|
|
| 434 |
def get_category_color(category: STWCategory) -> str:
|
| 435 |
"""Restituisce un colore CSS per la categoria"""
|
| 436 |
colors = {
|
| 437 |
+
STWCategory.SPORTIVI: "#2E7D32", # Verde scuro
|
| 438 |
+
STWCategory.STRUTTURALI: "#1565C0", # Blu
|
| 439 |
+
STWCategory.MARKETING: "#E65100", # Arancione
|
| 440 |
+
STWCategory.SOCIALI: "#7B1FA2", # Viola
|
| 441 |
+
STWCategory.STRUTTURA_ORG: "#00695C", # Teal
|
| 442 |
+
STWCategory.RELAZIONI_IST: "#AD1457", # Rosa scuro
|
| 443 |
}
|
| 444 |
return colors.get(category, "#424242")
|
| 445 |
|