diff --git a/.claude/skills/improve/SKILL.md b/.claude/skills/improve/SKILL.md index 63e2388..9988168 100644 --- a/.claude/skills/improve/SKILL.md +++ b/.claude/skills/improve/SKILL.md @@ -15,11 +15,11 @@ Given by the caller, in the request; any other context or rule it gives (files t - `DETECTORS`: the path of the detectors repository (default: `detectors/`, a link in Optimizer). - `STATION`: the station's data folder (read by `DETECTORS/scripts/data.py`); or, several stations on the same range: `DATA`, the folder of the station folders, and `STATIONS`, `A,B`, the stations to improve. - `FROM`, `TO`: the range, UTC days (YYYY-MM-DD, `TO` excluded). -- `LABELS`: the station's labels file (JSONL: `id`, `debut`, `fin`, `categorie` = the family, `description`), the truth on the range; with `STATIONS`, a folder of `.jsonl`, one per station. +- `LABELS`: the station's labels file (JSONL: `id`, `start`, `end`, `family`, `description`), the truth on the range; with `STATIONS`, a folder of `.jsonl`, one per station. - `REFERENCE`: the reference truth for the non-regression, `--labels .jsonl> --data />`. - `FAMILIES`: the document defining the families and their boundaries (one detector per family). - `CONTEXT` (optional): documents explaining the range's labels (an analyst's report, for example). -- `OUT`: the output folder of this run (default: `seances/_/` in Optimizer). +- `OUT`: the output folder of this run (default: `sessions/_/` in Optimizer). A required input missing, or `DETECTORS` not a git repository: say so and stop, changing nothing. diff --git a/CLAUDE.md b/CLAUDE.md index 27de9ee..e7ec06c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,17 +1,18 @@ # CLAUDE.md -Optimizer : l'optimisation des détecteurs AIMsight sur les étiquettes de `labeling/auto`, et rien d'autre (`README.md`). Le workflow : `.claude/skills/improve/SKILL.md` (`/improve`), lancé depuis la racine d'Optimizer avec le plugin des agents (`--plugin-dir agents`) ; ses agents `agents:upgrader` et `agents:validator` ; le benchmark `detectors/bench/`. +Optimizer: the optimisation of the AIMsight detectors on the labels of `labeling/auto`, and nothing else (`README.md`). The workflow: `.claude/skills/improve/SKILL.md` (`/improve`), launched from the root of Optimizer with the agents plugin (`--plugin-dir agents`); its agents `agents:upgrader` and `agents:validator`; the benchmark `detectors/bench/`. -- **Les liens**, hors de git : `detectors/` → `~/detectors` (la séance y commite) ; `data/` → `~/aimsight-data/data` et `labeling/` → `~/labeling` (lecture seule) ; `agents/` → `~/agents` (le plugin, chargé en lecture). -- **Les séances** : `seances/_/`, non commitées par la séance ; Diagnostic-App y lit le bilan (`summary.md`). -- **Le workflow reste générique** : le skill ne décrit que le workflow (plage + étiquettes → upgrader → validator → bilan) ; ce qui est propre à un appelant (ses chemins, ses règles git, `Caller's context`) arrive dans la requête. -- **Vérifier un changement du skill** : `env -u ANTHROPIC_API_KEY claude -p "/improve" --plugin-dir agents --model haiku` doit dire qu'il manque les entrées et s'arrêter sans toucher à `detectors/` ; puis une séance réelle par le bouton de l'app. -- `archive/` : l'ancien batch et son scanner, arrêtés ; ne pas les relancer. +- **The links**, out of git: `detectors/` → `~/detectors` (the session commits there); `data/` → `~/aimsight-data/data` and `labeling/` → `~/labeling` (read-only); `agents/` → `~/agents` (the plugin, loaded read-only). +- **The sessions**: `sessions/_/`; Diagnostic-App reads their summary (`summary.md`). +- **The workflow stays generic**: the skill describes only the workflow (range + labels → upgrader → validator → summary); what is specific to a caller (its paths, its git rules, `Caller's context`) arrives in the request. +- **Check a change of the skill**: `env -u ANTHROPIC_API_KEY claude -p "/improve" --plugin-dir agents --model haiku` must say the inputs are missing and stop without touching `detectors/`; then a real session through the app's button. +- `archive/`: the former batch and its scanner, stopped; do not run them again. -Règles : -- **Les agents tournent sur l'abonnement Claude, jamais sur une clé d'API** (`ANTHROPIC_API_KEY` retiré du lancement). -- Toute heure est en UTC. -- Lecture seule sur `data/` et `labeling/` ; ne jamais recopier les identifiants des métriques (`SIM_CCID`, `ip*`) ; ne jamais lire `.env`. -- Pas de règle propre à une station, une cible ou une date. -- Commits par chemin, jamais `git add -A`. -- Langue : français ; le skill `improve`, comme le dépôt detectors et ses agents, reste en anglais. +Rules: +- **The agents run on the Claude subscription, never on an API key** (`ANTHROPIC_API_KEY` removed from the launch). +- Every time is UTC. +- Read-only on `data/` and `labeling/`; never copy the metric identifiers (`SIM_CCID`, `ip*`); never read `.env`. +- The project uses the labels of `labeling/auto` only; `labeling/manual` is the user's alone. +- No rule specific to a station, a target or a date. +- Commit by path, never `git add -A`. +- Language: English. diff --git a/README.md b/README.md index 3dcc60f..4a1d7f4 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,42 @@ # Optimizer -L'optimisation des détecteurs AIMsight, sur les étiquettes de `labeling/auto`, et rien d'autre. Sur la plage d'une analyse approfondie (faite dans l'app Diagnostic-App), ses étiquettes pour vérité, le skill `improve` : +The optimisation of the AIMsight detectors, on the labels of `labeling/auto`, and nothing else. On the range of an in-depth analysis (made in the Diagnostic-App app), its labels as the truth, the `improve` skill: -1. mesure le score des détecteurs sur la plage, et le benchmark sur toutes les étiquettes de `labeling/auto` ; -2. fait corriger les détecteurs par l'`upgrader`, une correction par commit dans `~/detectors` ; -3. les fait juger par le `validator`, qui garde, fait retirer ou annule : aucune station ne recule, pas de sur-apprentissage ; -4. écrit le bilan de la séance. +1. measures the detectors' score on the range, and the benchmark on every label of `labeling/auto`; +2. has the detectors fixed by the `upgrader`, one fix per commit in `~/detectors`; +3. has them judged by the `validator`, which keeps, has some removed, or cancels: no station goes back, no overfitting; +4. writes the summary of the session. -L'`upgrader` et le `validator` viennent du dépôt `agents` ; le benchmark (`bench/`), du dépôt `detectors`. Rien n'est poussé. +The `upgrader` and the `validator` come from the `agents` repository; the benchmark (`bench/`) from the `detectors` repository. Nothing is pushed. -## Installer +## Install ```bash -ln -s ~/detectors detectors # les détecteurs, partagés avec Diagnostic-App -ln -s ~/aimsight-data/data data # les données pompées, hors de git -ln -s ~/labeling labeling # les étiquettes : la vérité et les familles -ln -s ~/agents agents # les agents génériques (plugin Claude Code) +ln -s ~/detectors detectors # the detectors, shared with Diagnostic-App +ln -s ~/aimsight-data/data data # the pumped data, out of git +ln -s ~/labeling labeling # the labels: the truth and the families +ln -s ~/agents agents # the generic agents (Claude Code plugin) ``` -`claude` (Claude Code) doit être sur le `PATH`, connecté à l'abonnement Claude (`/login`), jamais à une clé d'API. +`claude` (Claude Code) must be on the `PATH`, logged in to the Claude subscription (`/login`), never to an API key. -## Lancer +## Run -Par le bouton « Optimiser les détecteurs » de Diagnostic-App, sur une analyse finie ; ou à la main, depuis la racine d'Optimizer : +From the "Optimize the detectors" button of Diagnostic-App, on a finished analysis; or by hand, from the root of Optimizer: ```bash env -u ANTHROPIC_API_KEY claude -p "/improve DETECTORS: detectors/. STATION: data/NORDEND. FROM: 2026-11-04. TO: 2026-11-08. \ -LABELS: labeling/auto/NORDEND.jsonl. REFERENCE: --labels labeling/auto --data data. FAMILIES: labeling/familles.md. \ -CONTEXT: labeling/auto/analyses//rapport.md. OUT: seances/_/." \ +LABELS: labeling/auto/NORDEND.jsonl. REFERENCE: --labels labeling/auto --data data. FAMILIES: labeling/families.md. \ +CONTEXT: labeling/auto/analyses//report.md. OUT: sessions/_/." \ --plugin-dir agents --add-dir ~/detectors --add-dir ~/labeling --add-dir ~/aimsight-data/data \ + --setting-sources project,local --strict-mcp-config \ --allowedTools Read,Write,Edit,Bash,Agent --permission-mode acceptEdits ``` -`TO` est exclu. Plusieurs stations sur la même plage : `DATA: data. STATIONS: A,B. LABELS: .jsonl>` à la place de `STATION` et d'un fichier d'étiquettes. +`TO` is excluded. Several stations on the same range: `DATA: data. STATIONS: A,B. LABELS: .jsonl>` instead of `STATION` and a labels file. -## Ce qu'une séance laisse +## What a session leaves -`seances/_/` (non commité par la séance) : les mesures avant et après (`range-*.txt`, `benchmark-*.txt`), `modification.md` (l'upgrader), `validation.md` (le validator), `summary.md` (le bilan, que l'app affiche sous le rapport de l'analyse), `tools/` (les scripts que les agents ont écrits). Les corrections : des commits `improve: S` dans `~/detectors`, sur sa branche courante. +`sessions/_