Diagnostic agent: agents/diagnostic/ renamed agent-diagnostic/ (D-082)
The diagnostic agent is kept in case it is needed again, under a name that says what it is; entry point still .claude/agents/diagnostic.md; paths updated in skills, agents, spec, contexts, the living plan and CLAUDE.md; reports and history keep old paths. Also: two stale tool paths in the living plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
56b93e9b82
commit
0df340231a
61 files changed
+36
-29
No files matched your search
@@ -17,7 +17,7 @@
|
||||
| Mode d'appel | **Les deux** : une question facultative ; sans question, l'agent fait le scan de la période |
|
||||
| Sortie | **Un rapport écrit dans le dépôt** par diagnostic, et un résumé dans la conversation |
|
||||
| Données de la première version | **Les déplacements et les images** ; les métriques système plus tard |
|
||||
| Forme | **Un sous-agent Claude Code** avec son dossier `agents/diagnostic/` |
|
||||
| Forme | **Un sous-agent Claude Code** avec son dossier `agent-diagnostic/` |
|
||||
| Graphiques | **matplotlib**, ajouté à `.venv` et au dev container (poste de dev seulement) |
|
||||
|
||||
**Critère de réussite.** On lui donne `data/PS_DES_COUDRES/`, sans autre explication ; il rend un diagnostic court et traçable, dont la seule anomalie est la montée de l'erreur de `REF_G` et `REF_D` (cas de référence du spécialiste, §7), montrée par des figures.
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
```
|
||||
.claude/agents/diagnostic.md point d'entrée pour Claude Code : nom, outils, modèle
|
||||
agents/diagnostic/
|
||||
agent-diagnostic/
|
||||
README.md doc humaine : à quoi il sert, comment l'appeler
|
||||
instructions.md sa méthode : règles, déroulé, format du rapport
|
||||
outils/ ses scripts Python ; leur mode d'emploi : .claude/skills/lire-les-donnees/ (D-059)
|
||||
@@ -38,7 +38,7 @@ agents/diagnostic/
|
||||
|
||||
- **Appel** : `@agent-diagnostic data/PS_DES_COUDRES/` suivi, au choix, d'une question ; ou en langage naturel (« lance l'agent diagnostic sur … ») ; ou une session entière dans un terminal : `claude --agent diagnostic`, mais elle charge `CLAUDE.md` (`omitClaudeMd` ne vaut que pour un sous-agent) : elle n'est pas à l'aveugle.
|
||||
- **Contexte isolé** : le sous-agent démarre sans la conversation qui l'appelle, donc sans ses hypothèses.
|
||||
- **Emplacement** : `agents/` est celui que prévoyait D-027. La méthode et les outils sont portables vers le futur harnais par API.
|
||||
- **Emplacement** : `agent-diagnostic/` (D-082), à la racine, comme le prévoyait D-027 pour `agents/`. La méthode et les outils sont portables vers le futur harnais par API.
|
||||
|
||||
## 3. Point d'entrée
|
||||
|
||||
@@ -49,12 +49,12 @@ agents/diagnostic/
|
||||
name: diagnostic
|
||||
description: Diagnostic des données d'une station AIMsight (déplacements optiques, images).
|
||||
À appeler avec un dossier de data/ et, si on veut, une question. Rend un rapport
|
||||
traçable dans agents/diagnostic/rapports/.
|
||||
traçable dans agent-diagnostic/rapports/.
|
||||
tools: Read, Bash, Write
|
||||
model: inherit
|
||||
omitClaudeMd: true
|
||||
---
|
||||
Tu es l'agent de diagnostic du projet. Commence par lire agents/diagnostic/instructions.md
|
||||
Tu es l'agent de diagnostic du projet. Commence par lire agent-diagnostic/instructions.md
|
||||
et suis-le à la lettre.
|
||||
```
|
||||
|
||||
@@ -98,7 +98,7 @@ et suis-le à la lettre.
|
||||
|
||||
## 5. Le rapport
|
||||
|
||||
Un dossier par diagnostic, `agents/diagnostic/rapports/<AAAA-MM-JJTHHMMZ>_<STATION>[_<sujet>]/` (l'heure évite les doublons sans lister les rapports précédents, qui pourraient trahir une conclusion) : `rapport.md` et ses figures PNG, versionnées avec lui. Format (D-047), le corps en ~40 lignes :
|
||||
Un dossier par diagnostic, `agent-diagnostic/rapports/<AAAA-MM-JJTHHMMZ>_<STATION>[_<sujet>]/` (l'heure évite les doublons sans lister les rapports précédents, qui pourraient trahir une conclusion) : `rapport.md` et ses figures PNG, versionnées avec lui. Format (D-047), le corps en ~40 lignes :
|
||||
|
||||
1. **En-tête** d'une ligne : données (dossier, période), scan ou question, modèle, date.
|
||||
2. **Verdict** : 2-3 phrases ; la station fonctionne-t-elle normalement, et ses anomalies par importance, avec leur cas connu.
|
||||
@@ -143,7 +143,7 @@ Scripts en ligne de commande. Ils renvoient des valeurs, jamais des verdicts. Bi
|
||||
|
||||
Un attendu manqué ou une conclusion au-delà des preuves se corrige dans `instructions.md`, puis on relance.
|
||||
|
||||
**Premier passage, le 2026-10-14 (format D-046).** Lancement retenu : l'outil Agent (sous-agent `diagnostic`, prompt réduit au dossier et à la question). Un premier essai en mode non interactif (`claude -p --agent diagnostic`) n'était pas à l'aveugle : en session principale, `omitClaudeMd` n'est pas appliqué et l'agent a reçu `CLAUDE.md` (« buée probable le matin ») ; la règle `Write(agents/diagnostic/rapports/**)` n'a pas non plus reconnu le chemin. Rapports : `2026-10-14_PS_DES_COUDRES.md` (scan) et `…_nuit-13-14-10.md` (question), supprimés au passage à D-047 ; ils restent dans l'historique git (commit `fcc01d2`).
|
||||
**Premier passage, le 2026-10-14 (format D-046).** Lancement retenu : l'outil Agent (sous-agent `diagnostic`, prompt réduit au dossier et à la question). Un premier essai en mode non interactif (`claude -p --agent diagnostic`) n'était pas à l'aveugle : en session principale, `omitClaudeMd` n'est pas appliqué et l'agent a reçu `CLAUDE.md` (« buée probable le matin ») ; la règle `Write(agent-diagnostic/rapports/**)` n'a pas non plus reconnu le chemin. Rapports : `2026-10-14_PS_DES_COUDRES.md` (scan) et `…_nuit-13-14-10.md` (question), supprimés au passage à D-047 ; ils restent dans l'historique git (commit `fcc01d2`).
|
||||
|
||||
| Attendu | Scan | Question |
|
||||
|---|---|---|
|
||||
@@ -170,7 +170,7 @@ Un attendu manqué ou une conclusion au-delà des preuves se corrige dans `instr
|
||||
4. aucune conclusion de mouvement de l'ouvrage ; un niveau de preuve mesuré pour la cause ;
|
||||
5. le corps du rapport en ~40 lignes.
|
||||
|
||||
Rapport : `agents/diagnostic/rapports/2026-10-14T1357Z_PS_DES_COUDRES/` ; 38 appels d'outils, 227 s, ~83 k tokens.
|
||||
Rapport : `agent-diagnostic/rapports/2026-10-14T1357Z_PS_DES_COUDRES/` ; 38 appels d'outils, 227 s, ~83 k tokens.
|
||||
|
||||
| Attendu | Résultat |
|
||||
|---|---|
|
||||
@@ -188,7 +188,7 @@ Rapport : `agents/diagnostic/rapports/2026-10-14T1357Z_PS_DES_COUDRES/` ; 38 app
|
||||
- **D-046** dans `docs/decisions.md` : l'agent pilote, son lien avec D-027, D-042 et D-044, ses limites (§3).
|
||||
- **`CLAUDE.md`** : l'état, la carte du dépôt, la commande d'appel, `matplotlib` dans `.venv`. Rester sous 200 lignes en resserrant des lignes existantes.
|
||||
- **`.devcontainer/devcontainer.json`** : `matplotlib` à côté de `plotly`.
|
||||
- **`agents/diagnostic/README.md`** : court ; renvoie à ce document.
|
||||
- **`agent-diagnostic/README.md`** : court ; renvoie à ce document.
|
||||
|
||||
## 9. Laissé de côté pour l'instant
|
||||
|
||||
@@ -347,7 +347,7 @@ Un cas ne touche ni `CLAUDE.md`, ni cette spec, ni `docs/decisions.md` : l'index
|
||||
|
||||
Le test de correspondance n'a pas été relancé sur la fiche revue, par choix de l'utilisateur : le dernier passage (2026-10-14) portait sur l'ancien format, avec exclusions.
|
||||
|
||||
**Mise en place, le 2026-10-14 (index vide).** Scan à l'aveugle de `data/PS_DES_COUDRES/` sur un arbre propre (branche `base-de-cas`, après commit). Rapport : `agents/diagnostic/rapports/2026-10-14T1436Z_PS_DES_COUDRES/` ; 44 appels d'outils, 190 s, ~89 k tokens.
|
||||
**Mise en place, le 2026-10-14 (index vide).** Scan à l'aveugle de `data/PS_DES_COUDRES/` sur un arbre propre (branche `base-de-cas`, après commit). Rapport : `agent-diagnostic/rapports/2026-10-14T1436Z_PS_DES_COUDRES/` ; 44 appels d'outils, 190 s, ~89 k tokens.
|
||||
|
||||
| Attendu | Résultat |
|
||||
|---|---|
|
||||
|
||||
@@ -1 +1 @@
|
||||
<mxfile host="drawio" version="24.7.17"><diagram id="p1" name="1. Vue d'ensemble"><mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="1000" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="p1_P1" value="<b>/aiguiser &lt;dossier&gt;</b><br>affine les outils de lecture (D-059)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;arcSize=4;verticalAlign=top;spacingTop=6;" vertex="1" parent="1"><mxGeometry x="40" y="170" width="320" height="300" as="geometry"/></mxCell><mxCell id="p1_P2" value="<b>/boucle &lt;dossier&gt;</b><br>règle les détecteurs du journal (D-057)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;arcSize=4;verticalAlign=top;spacingTop=6;" vertex="1" parent="1"><mxGeometry x="400" y="170" width="320" height="300" as="geometry"/></mxCell><mxCell id="p1_P3" value="<b>@agent-diagnostic data/… [question]</b><br>enquête à la demande sur un cas (D-058)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;arcSize=4;verticalAlign=top;spacingTop=6;" vertex="1" parent="1"><mxGeometry x="760" y="170" width="320" height="300" as="geometry"/></mxCell><mxCell id="p1_P4" value="<b>/nouveau-cas</b><br>ajoute un cas validé (D-048)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;arcSize=4;verticalAlign=top;spacingTop=6;" vertex="1" parent="1"><mxGeometry x="1120" y="170" width="320" height="300" as="geometry"/></mxCell><mxCell id="p1_lg" value="<b>Légende</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cccccc;verticalAlign=top;align=left;spacingLeft=8;fontSize=11;" vertex="1" parent="1"><mxGeometry x="1130" y="790" width="330" height="165" as="geometry"/></mxCell><mxCell id="p1_t" value="<b>Processus IA du projet : vue d'ensemble</b><br><font style="font-size:12px">Qui lance quoi, et qui modifie quel bien partagé (au 2026-10-24). Tout est lancé à la main par l'utilisateur.</font>" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;fontSize=18;" vertex="1" parent="1"><mxGeometry x="40" y="20" width="900" height="50" as="geometry"/></mxCell><mxCell id="p1_u" value="<b>Utilisateur (l'expert)</b><br>lance chaque processus, fusionne les branches" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=12;" vertex="1" parent="1"><mxGeometry x="600" y="85" width="280" height="50" as="geometry"/></mxCell><mxCell id="p1_lecteur" value="<b>lecteur</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="55" y="235" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_correcteur" value="<b>correcteur</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="205" y="235" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_optimiseur" value="<b>optimiseur</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="55" y="289" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_P1f" value="Lit : data/ ; au contrôle final, les cas validés.<br>Garde une modification des outils seulement si la relecture est <i>mieux</i>." style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;fontSize=11;" vertex="1" parent="1"><mxGeometry x="55" y="360" width="290" height="100" as="geometry"/></mxCell><mxCell id="p1_analyste" value="<b>analyste</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="415" y="235" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_upgrader" value="<b>upgrader</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="565" y="235" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_validateur" value="<b>validateur</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="415" y="289" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_builder" value="<b>builder</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="565" y="289" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_P2f" value="Lit : data/ par les outils de lecture ; la base de cas, après sa propre lecture." style="text;html=1;align=left;verticalAlign=top;wLine truncated
|
||||
<mxfile host="drawio" version="24.7.17"><diagram id="p1" name="1. Vue d'ensemble"><mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="1000" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="p1_P1" value="<b>/aiguiser &lt;dossier&gt;</b><br>affine les outils de lecture (D-059)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;arcSize=4;verticalAlign=top;spacingTop=6;" vertex="1" parent="1"><mxGeometry x="40" y="170" width="320" height="300" as="geometry"/></mxCell><mxCell id="p1_P2" value="<b>/boucle &lt;dossier&gt;</b><br>règle les détecteurs du journal (D-057)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;arcSize=4;verticalAlign=top;spacingTop=6;" vertex="1" parent="1"><mxGeometry x="400" y="170" width="320" height="300" as="geometry"/></mxCell><mxCell id="p1_P3" value="<b>@agent-diagnostic data/… [question]</b><br>enquête à la demande sur un cas (D-058)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;arcSize=4;verticalAlign=top;spacingTop=6;" vertex="1" parent="1"><mxGeometry x="760" y="170" width="320" height="300" as="geometry"/></mxCell><mxCell id="p1_P4" value="<b>/nouveau-cas</b><br>ajoute un cas validé (D-048)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;arcSize=4;verticalAlign=top;spacingTop=6;" vertex="1" parent="1"><mxGeometry x="1120" y="170" width="320" height="300" as="geometry"/></mxCell><mxCell id="p1_lg" value="<b>Légende</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#cccccc;verticalAlign=top;align=left;spacingLeft=8;fontSize=11;" vertex="1" parent="1"><mxGeometry x="1130" y="790" width="330" height="165" as="geometry"/></mxCell><mxCell id="p1_t" value="<b>Processus IA du projet : vue d'ensemble</b><br><font style="font-size:12px">Qui lance quoi, et qui modifie quel bien partagé (au 2026-10-24). Tout est lancé à la main par l'utilisateur.</font>" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;fontSize=18;" vertex="1" parent="1"><mxGeometry x="40" y="20" width="900" height="50" as="geometry"/></mxCell><mxCell id="p1_u" value="<b>Utilisateur (l'expert)</b><br>lance chaque processus, fusionne les branches" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=12;" vertex="1" parent="1"><mxGeometry x="600" y="85" width="280" height="50" as="geometry"/></mxCell><mxCell id="p1_lecteur" value="<b>lecteur</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="55" y="235" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_correcteur" value="<b>correcteur</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="205" y="235" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_optimiseur" value="<b>optimiseur</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="55" y="289" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_P1f" value="Lit : data/ ; au contrôle final, les cas validés.<br>Garde une modification des outils seulement si la relecture est <i>mieux</i>." style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;fontSize=11;" vertex="1" parent="1"><mxGeometry x="55" y="360" width="290" height="100" as="geometry"/></mxCell><mxCell id="p1_analyste" value="<b>analyste</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="415" y="235" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_upgrader" value="<b>upgrader</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="565" y="235" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_validateur" value="<b>validateur</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="415" y="289" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_builder" value="<b>builder</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;arcSize=10;" vertex="1" parent="1"><mxGeometry x="565" y="289" width="140" height="44" as="geometry"/></mxCell><mxCell id="p1_P2f" value="Lit : data/ par les outils de lecture ; la base de cas, après sa propre lecture." style="text;html=1;align=left;verticalAlign=top;wLine truncated
|
||||
Reference in new issue
Block a user