English: the app (server/, analysis.py, routes and JSON fields), instructions/analyst.md, docs; the table of shared renames

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-16 12:40:03 +01:00
1 parent 1d80a77cb1
commit a3e6ade845
24 files changed
+1959 -1835

No files matched your search

+16 -16
View File
@@ -1,20 +1,20 @@
# CLAUDE.md
Diagnostic-app : le poste de pilotage du diagnostic AIMsight (`README.md`) : la web app, et le lancement de processus dont le code vit ailleurs. Une caméra suit des cibles sur un ouvrage ; les détecteurs lisent les séries de déplacement des stations et signalent les moments où il ne faut pas se fier aux courbes (pluie, buée, toile d'araignée, turbulence…) ou un vrai mouvement. L'architecture des dépôts : `docs/architecture.drawio`.
Diagnostic-app: the control station of the AIMsight diagnostic (`README.md`): the web app, and the launching of processes whose code lives elsewhere. A camera follows targets on a structure; the detectors read the displacement series of the stations and flag the moments when the curves must not be trusted (rain, fog, spider web, turbulence…) or a real movement. The architecture of the repositories: `docs/architecture.drawio`.
- **Les processus** : l'onglet Analysis lance `agents:analyste` (plugin `agents/`) sur une plage, avec `consignes/analyste.md` et `DETECTEURS : non` (étiquettes et rapport dans `labeling/auto/analyses/<STATION>_<début>_<fin>/`, versées dans `labeling/auto/<STATION>.jsonl`) ; « Optimiser les détecteurs » lance `/improve` dans `optimizer/` (sa requête dans `app/serveur/analyse.py`, son bilan dans `optimizer/seances/<analyse>_<heure>/summary.md`), qui commite dans `detectors/`, puis `agents:tool-builder`, qui commite dans `tools/`.
- **Les liens** (ignorés par git, un exemplaire de chaque dépôt sur le poste) : `data/`, `labeling/`, `detectors/`, `tools/`, `agents/`, `optimizer/` ; on commite chaque chose dans son dépôt, jamais ici. Ce dépôt ne porte ni agent, ni outil de lecture, ni workflow.
- **La vérité** : les étiquettes de `labeling/auto/` ; le savoir du labeling est dans `labeling/`.
- **Les contrats** : avec les détecteurs, `detectors/CLAUDE.md` (`categories.events`, `bench/score.py`) ; avec les agents, `agents/README.md` (les requêtes de l'analyste et du tool-builder) ; avec Optimizer, `optimizer/README.md` (la requête de `/improve`). Un renommage là-bas demande le changement ici. La page Data passe aux détecteurs les mesures lues par `tools/scripts/donnees.py`, quand le benchmark et Optimizer lisent par `detectors/scripts/data.py` : une correction de lecture dans l'un se reporte dans l'autre.
- **Le benchmark** : `python3 detectors/bench/regression.py --labels labeling/auto --data data` (~3 min) ; le score d'une plage : `python3 detectors/bench/score.py data/<STATION> --labels labeling/auto/<STATION>.jsonl --from AAAA-MM-JJ --to AAAA-MM-JJ` (`--to` exclu).
- **Le pompage** : dans `~/aimsight-data` (`extraction/pomper.sh`, tâches VS Code **pomper**, **pomper une plage**), en lecture seule sur la plateforme ; mode d'emploi `~/aimsight-data/extraction/README.md`. Claude peut le lancer sur de petites plages ; une longue plage ou un historique, hors des heures chargées.
- **Vérifier un changement de l'app** : `.venv/bin/python app/serveur/check.py`, puis `cd app/web && npm run build` et lancer le serveur. Les étiquettes : `python3 labeling/controle.py`.
- **The processes**: the Analysis tab launches `agents:analyst` (plugin `agents/`) on a range, with `instructions/analyst.md` and `DETECTORS: no` (labels and report in `labeling/auto/analyses/<STATION>_<start>_<end>/`, submitted to `labeling/auto/<STATION>.jsonl`); "Optimize the detectors" launches `/improve` in `optimizer/` (its request in `app/server/analysis.py`, its summary in `optimizer/sessions/<analysis>_<time>/summary.md`), which commits in `detectors/`, then `agents:tool-builder`, which commits in `tools/`.
- **The links** (ignored by git, one copy of each repository on the workstation): `data/`, `labeling/`, `detectors/`, `tools/`, `agents/`, `optimizer/`; each thing is committed in its own repository, never here. This repository carries no agent, no reading tool, no workflow.
- **The truth**: the labels of `labeling/auto/`; the labeling knowledge is in `labeling/`.
- **The contracts**: with the detectors, `detectors/CLAUDE.md` (`categories.events`, `bench/score.py`); with the agents, `agents/README.md` (the requests of the analyst and of the tool-builder); with Optimizer, `optimizer/README.md` (the request of `/improve`). A renaming over there requires the change here. The Data page passes to the detectors the measurements read by `tools/scripts/data.py`, whereas the benchmark and Optimizer read through `detectors/scripts/data.py`: a reading fix in one is carried over to the other.
- **The benchmark**: `python3 detectors/bench/regression.py --labels labeling/auto --data data` (~3 min); the score of a range: `python3 detectors/bench/score.py data/<STATION> --labels labeling/auto/<STATION>.jsonl --from YYYY-MM-DD --to YYYY-MM-DD` (`--to` excluded).
- **The pumping**: in `~/aimsight-data` (`extraction/pump.sh`, VS Code tasks **pump**, **pump a range**), read-only on the platform; user guide `~/aimsight-data/extraction/README.md`. Claude may launch it on small ranges; a long range or a history, outside busy hours.
- **Check a change of the app**: `.venv/bin/python app/server/check.py`, then `cd app/web && npm run build` and launch the server. The labels: `python3 labeling/validate.py`.
Règles :
- Toute heure est en UTC.
- Pas de règle propre à une station, une cible ou une date.
- Lecture seule sur `data/`, sauf le pompage ; ne jamais recopier les identifiants des métriques (`SIM_CCID`, `ip*`).
- Ne jamais lire `.env` (les identifiants de la plateforme).
- Les agents tournent sur l'abonnement Claude, jamais sur une clé d'API.
- Commits par chemin, jamais `git add -A` : une autre session peut travailler dans ce dépôt.
- Langue : documents et échanges en français ; ce qui va au client en anglais.
Rules:
- Every time is in UTC.
- No rule specific to a station, a target or a date.
- Read-only on `data/`, except the pumping; never copy the identifiers of the metrics (`SIM_CCID`, `ip*`).
- Never read `.env` (the credentials of the platform).
- The agents run on the Claude subscription, never on an API key.
- Commits by path, never `git add -A`: another session may be working in this repository.
- Language: the repository (documents, code, UI) in English; conversations with the user in French.