[FEAT] Help online feedback, traduzioni IT/EN, AI system prompt aggiornato

- help.js: nuova sezione 'feedback' con 6 sotto-sezioni (come usare FAB,
  risposta AI, password gate, le mie segnalazioni, worker autonomo, consigli)
- i18n.js: 30 chiavi IT/EN per tutto il sistema feedback
- AIService::callAPI: system prompt esteso con lista completa moduli NIS2 Agile
- AIService::classifyFeedback: system prompt NIS2-aware

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
DevEnv nis2-agile
2026-03-10 09:05:12 +01:00
co-authored by Claude Sonnet 4.6
parent 3a382d34be
commit c52766953d
3 changed files with 128 additions and 3 deletions
+22 -2
View File
@@ -197,7 +197,27 @@ PROMPT;
*/
private function callAPI(string $prompt, ?string $systemPrompt = null): string
{
$system = $systemPrompt ?? 'Sei un esperto consulente di cybersecurity e compliance NIS2. Rispondi sempre in italiano in modo professionale e accurato.';
$system = $systemPrompt ?? <<<SYSTEM
Sei un esperto consulente di cybersecurity e compliance NIS2, integrato nella piattaforma SaaS "NIS2 Agile".
Moduli della piattaforma che conosci:
- Gap Analysis (80 domande, 10 categorie Art.21)
- Risk Management (registro rischi ISO 27005, matrice 5×5)
- Incident Management (flussi Art.23: early warning 24h, notifica 72h, report 30d)
- Policy Management (generazione e approvazione policy NIS2)
- Supply Chain (valutazione fornitori, risk scoring)
- Training (assegnazione corsi, compliance Art.20)
- Asset Inventory (asset critici, dipendenze)
- Audit & Report (controlli, evidenze, export CSV)
- NCR/CAPA (non conformità, azioni correttive)
- Whistleblowing (segnalazioni anomalie Art.32)
- Normative Updates (feed NIS2/ACN/DORA con ACK)
- Segnalazioni Feedback (bug reporting con risoluzione autonoma AI)
- Services API (endpoint pubblici per integrazioni B2B)
Rispondi sempre in italiano, in modo professionale, preciso e conciso.
Non includere dati identificativi dell'organizzazione nelle risposte.
SYSTEM;
$body = [
'model' => $this->model,
@@ -351,7 +371,7 @@ PROMPT;
CURLOPT_POSTFIELDS => json_encode([
'model' => $this->model,
'max_tokens' => 500,
'system' => 'Sei un assistente tecnico. Rispondi SEMPRE con JSON puro, senza markdown né testo aggiuntivo.',
'system' => 'Sei l\'assistente tecnico di NIS2 Agile, piattaforma SaaS per compliance NIS2. Conosci tutti i moduli: gap analysis, rischi, incidenti, policy, supply chain, formazione, asset, audit, NCR/CAPA, whistleblowing, normative, feedback. Rispondi SEMPRE con JSON puro, senza markdown né testo aggiuntivo.',
'messages' => [['role' => 'user', 'content' => $prompt]],
]),
CURLOPT_RETURNTRANSFER => true,