From 887b313ba272f42058fdcbc422618fe3d132e3ad Mon Sep 17 00:00:00 2001 From: maxime Date: Sat, 14 Nov 2026 13:53:19 +0100 Subject: [PATCH] wf-improve: several stations on the same range (DATA, STATIONS, a labels folder); regression.py --from/--to; the agents keep their scripts in OUT/tools/ Optimizer's daily batch labels every station on one day: one session for all of them. The single-station request (Diagnostic-app) is unchanged. Co-Authored-By: Claude Opus 5.5 --- README.md | 7 ++++++- agents/upgrader.md | 7 +++++-- agents/validator.md | 5 ++++- skills/wf-improve/SKILL.md | 14 +++++++++----- skills/wf-improve/scripts/regression.py | 10 ++++++++-- 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d087723..449cf69 100644 --- a/README.md +++ b/README.md @@ -44,14 +44,19 @@ REFERENCE: --labels labeling/auto --data data. FAMILIES: labeling/familles.md. \ CONTEXT: labeling/auto/analyses/NORDEND_x/rapport.md. OUT: detectors/runs/NORDEND_x/." ``` +Several stations labelled on the same range (Optimizer's daily batch): `DATA: data. STATIONS: A,B. LABELS: .jsonl>` in place of `STATION` and a labels file; a single session for all of them. + Labels: JSONL, one per line, `{"id", "debut", "fin", "categorie", "description"}` (UTC ISO times, `categorie` = the family). +The agents keep the scripts they write in `/tools/` and list them in their outputs; the summary copies the list. + - `skills/wf-improve/SKILL.md`: the workflow; its tools in `skills/wf-improve/scripts/`: `score.py` (the score of a range), `regression.py` (the benchmark), `sensors.py` (the sensors of each event). - `agents/`: `upgrader`, `validator` (called `detectors:`). ```bash python3 skills/wf-improve/scripts/score.py --labels --from YYYY-MM-DD --to YYYY-MM-DD -python3 skills/wf-improve/scripts/regression.py --labels .jsonl> --data /> +python3 skills/wf-improve/scripts/regression.py --labels .jsonl> --data /> # --from/--to: one range for all ``` Copied from Support-Agent on 2026-11-13 (commit 48a3092); the detectors now evolve here. Used by Diagnostic-app and Optimizer, through a `detectors -> ~/detectors` link (one copy on the workstation); their labels come from the `labeling` repository, their data from `aimsight-data`. diff --git a/agents/upgrader.md b/agents/upgrader.md index d6b6433..42532be 100644 --- a/agents/upgrader.md +++ b/agents/upgrader.md @@ -11,7 +11,7 @@ You are the upgrader of the wf-improve workflow: you make the detectors better o ## Your request -The detectors repository (`DETECTORS`: the detectors `scripts/*.py`, their threshold registry `thresholds.md`), the station's data folder and the range (UTC), the labels file, the families document, the context documents if any, the events, sensors, range score and benchmark commands with their outputs before, the base commit, the files already modified, the output folder and the path of your output `modification.md`; sometimes the caller's context, which comes before the instructions below, not before "What you change". +The detectors repository (`DETECTORS`: the detectors `scripts/*.py`, their threshold registry `thresholds.md`), the station's data folder and the range (UTC), the labels file (or several stations on the same range, a labels file each, in one folder: the events and sensors commands run per station, the range score covers them all; a mechanism that comes back from one station to another comes before a single case), the families document, the context documents if any, the events, sensors, range score and benchmark commands with their outputs before, the base commit, the files already modified, the output folder and the path of your output `modification.md`; sometimes the caller's context, which comes before the instructions below, not before "What you change". A label: one line of JSONL, `{"id", "debut", "fin", "categorie", "description"}` (cited by its `id`), a single anomaly, seen on `corr_x` and `corr_y` (they move or are missing); `categorie` is its **family**; `description` says the sensors touched, the cause and how it was known. Its bounds go from the measurement just before the first point touched to the measurement just after the last. An instant of the range without a label: the corrected curves show nothing there. @@ -60,7 +60,7 @@ Then the **benchmark** against the benchmark before: "found", the share of the l - **The range score**: what you make rise, without losing a whole event. A hole has no measurement: it only counts its two bounds; for a hole, read the events command. Do not aim for 100 %. - **All lines of all stations**: the non-regression, the same rule as the validator. **A regression**, on a family of a station: "found" or "correct" loses more than 2 points; it is a regression even if the `Total` rises. **Not a regression**: a drop that comes from another consistent reading of the detectors that the labels do not retain (labels contradicting each other from one station to another, the gaps of a few measurements between two labels of the same phenomenon, the bounds of a label, an instant the score counted as found by an event on another sensor). A regression: rework your change before committing it, or drop the fix. A drop from another consistent reading: keep it, and say it in "For the user to decide". -Your working folder is yours alone: `mktemp -d`. To try a variant without touching the repository, copy `DETECTORS` there: the copy's scripts measure the copy, with the same arguments. For a shorter run, `--stations A,B` measures only these stations; the whole benchmark runs in the background, output to a file. +Your working folder is yours alone: `mktemp -d`. A script you write to read the data or to check a rule (anything longer than a one-line command) is a file in `/tools/`, its first line saying what it does, and runs from there, never inline (heredoc, `python3 -c`): the caller keeps these scripts to reuse them; your output lists them (`## Tools`). To try a variant without touching the repository, copy `DETECTORS` there: the copy's scripts measure the copy, with the same arguments. For a shorter run, `--stations A,B` measures only these stations; the whole benchmark runs in the background, output to a file. ## 4. One fix, one commit @@ -102,6 +102,9 @@ none | ## Limits none | - + +## Tools +none | - <`/tools/