<mxCell id="app" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b style="font-size:14px">aimsight-app</b><br><i>le poste de pilotage : voir, analyser, lancer</i><br>• app/ : serveur FastAPI, page Data (courbes, images, étiquettes, événements des détecteurs), onglet Analysis<br>• boutons « Analyser la plage », « Optimiser les détecteurs » : ils lancent des processus dont le code vit ailleurs<br><font color="#2e7d32"><b>+</b></font> consignes/analyste.md : ce que l'app demande à l'analyste (dossier de sortie, rapport, dialogue)<br><font color="#c62828"><b>→</b></font> agent-tools/ et le skill lire-les-donnees (vers tools) ; analyste et tool-builder (vers agents)" vertex="1">
<mxCell id="agents" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b style="font-size:14px">aimsight-agents</b><br><i>les agents génériques, un seul exemplaire de chacun</i><br><font color="#2e7d32"><b>+</b></font> analyste : DETECTEURS oui/non, CONSIGNES (le fichier de l'appelant)<br><font color="#2e7d32"><b>+</b></font> tool-builder (de aimsight-app)<br><font color="#2e7d32"><b>+</b></font> upgrader, validator (de detectors)<br>• un plugin Claude Code, chargé en lecture ; l'appelant passe ses paramètres dans la requête<br>• Claude n'écrit pas dans un plugin chargé : ce qui s'écrit (outils, détecteurs, séances) vit ailleurs" vertex="1">
<mxCell id="opt" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b style="font-size:14px">aimsight-optimizer</b><br><i>l'optimisation des détecteurs, sur les étiquettes de labeling/auto</i><br><font color="#2e7d32"><b>+</b></font> .claude/skills/improve/ : l'orchestrateur (ex wf-improve de detectors)<br><font color="#2e7d32"><b>+</b></font> seances/&lt;analyse&gt;_&lt;heure&gt;/ : mesures, modification, validation, bilan<br>• lancé par l'app ou à la main<br><font color="#c62828"><b>→</b></font> archive/ : batch.py, scanner, batches/, outils/, essais et leur spec : l'auto-étiquetage par les détecteurs, arrêté" vertex="1">
<mxCell id="data" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b style="font-size:14px">aimsight-data</b><br><i>les données : les pomper</i><br>• data/&lt;STATION&gt;/ : les mesures et les images (hors de git)<br>• extraction/ : le pompage, chaque nuit" vertex="1">
<mxCell id="tools" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#b0e3e6;strokeColor=#0e8088;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b style="font-size:14px">aimsight-tools</b> (nouveau)<br><i>le harnais de lecture : les méthodes données à l'agent pour appréhender les données</i><br><font color="#2e7d32"><b>+</b></font> les outils (de aimsight-app agent-tools/) : inventaire, resume, plages, jours, ensemble, metriques, qualite, stations, graphique, vignettes, gif<br><font color="#2e7d32"><b>+</b></font> donnees.py, la lecture commune (aussi pour l'app) ; le guide, quel outil pour quelle question (ex skill lire-les-donnees)<br>• seul le tool-builder y écrit : il optimise ou ajoute, ne retire rien" vertex="1">
<mxCell id="lab" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b style="font-size:14px">aimsight-labeling</b> — inchangé<br><i>la vérité : les étiquettes et le savoir pour les poser</i><br>• manual/ : l'expert ; auto/ : les agents, la vérité de l'entraînement des détecteurs<br>• auto/analyses/ : les analyses de l'app (rapport, étiquettes, scripts)<br>• familles, règles d'étiquetage, carte des étiquettes, connaissances<br>• controle.py, ids.py, precedents.py (le RAG, par Ollama)" vertex="1">
<mxCell id="det" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b style="font-size:14px">aimsight-detectors</b><br><i>les détecteurs et leur benchmark</i><br>• scripts/ : un détecteur par famille, categories.py, data.py<br>• thresholds.md ; contrat lu par l'app et l'Optimizer : categories.events, data.py<br>• bench/ : score.py, regression.py, sensors.py (ex skills/wf-improve/scripts/)<br><font color="#c62828"><b>→</b></font> le plugin wf-improve : le skill vers Optimizer, les agents vers agents ; plus de plugin ici" vertex="1">
<mxCell id="dep-e11" edge="1" parent="1" source="agents" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;endArrow=none;endFill=0;fontSize=11;labelBackgroundColor=#ffffff;" target="tools" value="lisent les données par les outils ;<br>le tool-builder y commite">
<mxCell id="titre" parent="1" style="text;html=1;whiteSpace=wrap;align=left;verticalAlign=top;fontSize=14;" value="<b style="font-size:20px">Les processus</b> — chaque case a la couleur du dépôt qui la porte" vertex="1">
<mxCell id="s1a" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="Planificateur de Windows, chaque nuit ; ou à la main (tâches VS Code « pomper »)" vertex="1">
<mxCell id="s1b" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="extraction/pomper.sh → pomper.py, en lecture seule sur la plateforme" vertex="1">
<mxCell id="s2a" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="L'expert choisit une plage dans la page Data, avec ses indices : « Analyser la plage »" vertex="1">
<mxCell id="s3a" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="« Optimiser les détecteurs » sur une analyse finie ; ou à la main depuis Optimizer" vertex="1">
<mxCell id="s3b" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b>improve</b>, l'orchestrateur : la plage et les étiquettes de l'analyse" vertex="1">
<mxCell id="s3c" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="mesures avant : bench/score.py sur la plage, bench/regression.py sur tout labeling/auto" vertex="1">
<mxCell id="s3d" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b>upgrader</b> : corrige les détecteurs, un commit par correction" vertex="1">
<mxCell id="s3e" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b>validator</b> : garde, fait retirer ou annule ; aucune station ne recule" vertex="1">
<mxCell id="s3f" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="seances/&lt;analyse&gt;_&lt;heure&gt;/ : mesures, modification, validation, bilan ; le bilan s'affiche dans l'app" vertex="1">
<mxCell id="s3g" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="auto/ : la vérité, sur la plage et sur toutes les stations" vertex="1">
<mxCell id="s4a" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="à la fin de l'optimisation (même bouton)" vertex="1">
<mxCell id="s4b" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="<b>tool-builder</b><br>la requête de l'app : l'analyse et ses scripts" vertex="1">
<mxCell id="s4d" parent="1" style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#b0e3e6;strokeColor=#0e8088;fontSize=12;align=left;verticalAlign=top;spacingLeft=8;spacingRight=8;spacingTop=4;" value="tools : les outils et leur guide ; optimise ou ajoute, ne retire rien ; commite" vertex="1">