From 2b5c1c6d072dc70a70733e2d7336fb9c6fc5c46b Mon Sep 17 00:00:00 2001 From: louispaulb Date: Sun, 19 Jul 2026 20:57:16 -0400 Subject: [PATCH] =?UTF-8?q?fix(skill-resolver):=20diagnostic/panne=20?= =?UTF-8?q?=E2=86=92=20r=C3=A9paration=20(plus=20=C2=AB=20fibre=20=C2=BB?= =?UTF-8?q?=20forc=C3=A9=20en=20installation)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suite au diagnostic « voir signal fibre » → installation (faux). deptToSkill traitait « fibre » comme une intention d'installation et ne reconnaissait pas « panne ». Corrigé (SOURCE UNIQUE → impacte diagnostic agent, AvailabilityByReason, couleur des tags) : - Nouvelle règle réparation AVANT installation : panne, signal, lent, coupé, hors service, ne fonctionne pas, sans internet, déconnecté, intermittent, vérifier, diagnostic, dépannage, problème, bris, défectueux. - Installation = intention de POSER : install, raccordement, activation, nouveau, mise en service, branchement (« fibre » seul = techno, plus un déclencheur d'installation). - Bonus : « tv » en texte libre (\btv\b) → tv. Vérifié : voir signal fibre/panne/internet lent/coupé/ne fonctionne pas/vérifier le signal → réparation ; installation fibre/raccordement/activation → installation ; ajout tv → tv. Déployé, hub sain. Co-Authored-By: Claude Fable 5 --- services/targo-hub/lib/skill-resolver.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/targo-hub/lib/skill-resolver.js b/services/targo-hub/lib/skill-resolver.js index 44a2ba9..7aaf0ad 100644 --- a/services/targo-hub/lib/skill-resolver.js +++ b/services/targo-hub/lib/skill-resolver.js @@ -46,12 +46,14 @@ function deptToSkill (txt) { const d = stripAccents(txt).toLowerCase() if (!d) return '' if (/teleph/.test(d)) return 'telephone' - if (/tele|televis/.test(d)) return 'tv' + if (/\btv\b|tele|televis/.test(d)) return 'tv' if (/fusion|episs/.test(d)) return 'épissure' if (/monteur|aerien/.test(d)) return 'monteur' if (/netadmin|net admin/.test(d)) return 'netadmin' - if (/repar|desinstall/.test(d)) return 'réparation' - if (/install|fibre/.test(d)) return 'installation' + // Diagnostic / panne / dépannage → réparation, AVANT l'installation : « voir signal fibre », « panne », « internet lent », + // « coupé », « ne fonctionne pas » = une RÉPARATION, pas une pose. (« fibre » seul = une techno, PAS une intention d'installer.) + if (/repar|desinstall|panne|signal|lent|coupe|coupure|hors.?service|ne fonctionne|fonctionne pas|marche pas|sans internet|pas d.?internet|no internet|deconnect|intermitten|verifi|diagnostic|depann|probleme|trouble|\bbris\b|defect/.test(d)) return 'réparation' + if (/install|raccord|activ|nouveau|nouvelle|mise en service|branchement/.test(d)) return 'installation' return '' }