From 2cb0c88a2b8d947a8c7b831871418e6a46a67ce2 Mon Sep 17 00:00:00 2001 From: maxime Date: Mon, 16 Nov 2026 10:59:07 +0100 Subject: [PATCH] =?UTF-8?q?Optimizer=20:=20l'optimisation=20des=20d=C3=A9t?= =?UTF-8?q?ecteurs=20depuis=20une=20analyse=20(skill=20improve,=20ex=20wf-?= =?UTF-8?q?improve,=20agents=20du=20d=C3=A9p=C3=B4t=20agents,=20benchmark?= =?UTF-8?q?=20detectors/bench)=20;=20le=20batch=20et=20le=20scanner=20arch?= =?UTF-8?q?iv=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- .claude/skills/improve/SKILL.md | 89 +++++++++++++++++++ .gitignore | 9 +- CLAUDE.md | 19 ++-- README.md | 46 +++++----- archive/README.md | 7 ++ batch.py => archive/batch.py | 0 .../batches}/2026-11-05/detecteurs.md | 0 .../2026-11-05/detecteurs/BREITHORN.jsonl | 0 .../2026-11-05/detecteurs/CLARIDEN.jsonl | 0 .../2026-11-05/detecteurs/FLORIDA.jsonl | 0 .../2026-11-05/detecteurs/JUNGFRAU.jsonl | 0 .../2026-11-05/detecteurs/LENZSPITZE.jsonl | 0 .../2026-11-05/detecteurs/MICHIGAN.jsonl | 0 .../2026-11-05/detecteurs/NADELHORN.jsonl | 0 .../2026-11-05/detecteurs/NEBRASKA.jsonl | 0 .../2026-11-05/detecteurs/NIEDERHORN.jsonl | 0 .../2026-11-05/detecteurs/NORDEND.jsonl | 0 .../2026-11-05/detecteurs/SNCF01.jsonl | 0 .../2026-11-05/detecteurs/SUSTENHORN.jsonl | 0 .../2026-11-05/improve/benchmark-S1.txt | 0 .../2026-11-05/improve/benchmark-S2.txt | 0 .../2026-11-05/improve/benchmark-after.txt | 0 .../2026-11-05/improve/benchmark-before.txt | 0 .../2026-11-05/improve/events-after.txt | 0 .../2026-11-05/improve/modification.md | 0 .../batches}/2026-11-05/improve/range-S1.txt | 0 .../2026-11-05/improve/range-after.txt | 0 .../2026-11-05/improve/range-before.txt | 0 .../batches}/2026-11-05/improve/summary.md | 0 .../2026-11-05/improve/tools/instants.py | 0 .../batches}/2026-11-05/improve/validation.md | 0 .../batches}/2026-11-05/rapport.md | 0 .../2026-11-05/verite/BREITHORN.jsonl | 0 .../batches}/2026-11-05/verite/CLARIDEN.jsonl | 0 .../batches}/2026-11-05/verite/FLORIDA.jsonl | 0 .../batches}/2026-11-05/verite/JUNGFRAU.jsonl | 0 .../2026-11-05/verite/LENZSPITZE.jsonl | 0 .../batches}/2026-11-05/verite/MICHIGAN.jsonl | 0 .../2026-11-05/verite/NADELHORN.jsonl | 0 .../batches}/2026-11-05/verite/NEBRASKA.jsonl | 0 .../2026-11-05/verite/NIEDERHORN.jsonl | 0 .../batches}/2026-11-05/verite/NORDEND.jsonl | 0 .../batches}/2026-11-05/verite/SNCF01.jsonl | 0 .../2026-11-05/verite/SUSTENHORN.jsonl | 0 .../batches}/2026-11-06/detecteurs.md | 0 .../2026-11-06/detecteurs/BREITHORN.jsonl | 0 .../2026-11-06/detecteurs/CLARIDEN.jsonl | 0 .../2026-11-06/detecteurs/FLORIDA.jsonl | 0 .../2026-11-06/detecteurs/JUNGFRAU.jsonl | 0 .../2026-11-06/detecteurs/LENZSPITZE.jsonl | 0 .../2026-11-06/detecteurs/MICHIGAN.jsonl | 0 .../2026-11-06/detecteurs/NADELHORN.jsonl | 0 .../2026-11-06/detecteurs/NEBRASKA.jsonl | 0 .../2026-11-06/detecteurs/NIEDERHORN.jsonl | 0 .../2026-11-06/detecteurs/NORDEND.jsonl | 0 .../2026-11-06/detecteurs/SNCF01.jsonl | 0 .../2026-11-06/detecteurs/SUSTENHORN.jsonl | 0 .../improve/benchmark-S1-dropped.txt | 0 .../2026-11-06/improve/benchmark-before.txt | 0 .../2026-11-06/improve/range-before.txt | 0 .../2026-11-06/improve/tools/brief_debug.py | 0 .../2026-11-06/improve/tools/diff_events.py | 0 .../2026-11-06/improve/tools/window.py | 0 .../batches}/2026-11-06/rapport.md | 0 .../2026-11-06/verite/BREITHORN.jsonl | 0 .../batches}/2026-11-06/verite/CLARIDEN.jsonl | 0 .../batches}/2026-11-06/verite/FLORIDA.jsonl | 0 .../batches}/2026-11-06/verite/JUNGFRAU.jsonl | 0 .../2026-11-06/verite/LENZSPITZE.jsonl | 0 .../batches}/2026-11-06/verite/MICHIGAN.jsonl | 0 .../2026-11-06/verite/NADELHORN.jsonl | 0 .../batches}/2026-11-06/verite/NEBRASKA.jsonl | 0 .../2026-11-06/verite/NIEDERHORN.jsonl | 0 .../batches}/2026-11-06/verite/NORDEND.jsonl | 0 .../batches}/2026-11-06/verite/SNCF01.jsonl | 0 .../2026-11-06/verite/SUSTENHORN.jsonl | 0 .../batches}/2026-11-12/detecteurs.md | 0 .../2026-11-12/detecteurs/BREITHORN.jsonl | 0 .../2026-11-12/detecteurs/CLARIDEN.jsonl | 0 .../2026-11-12/detecteurs/FLORIDA.jsonl | 0 .../2026-11-12/detecteurs/JUNGFRAU.jsonl | 0 .../2026-11-12/detecteurs/LENZSPITZE.jsonl | 0 .../2026-11-12/detecteurs/MICHIGAN.jsonl | 0 .../2026-11-12/detecteurs/NADELHORN.jsonl | 0 .../2026-11-12/detecteurs/NEBRASKA.jsonl | 0 .../2026-11-12/detecteurs/NORDEND.jsonl | 0 .../2026-11-12/detecteurs/SNCF01.jsonl | 0 .../2026-11-12/detecteurs/SUSTENHORN.jsonl | 0 .../batches}/2026-11-12/rapport.md | 0 .../2026-11-12/verite/BREITHORN.jsonl | 0 .../batches}/2026-11-12/verite/CLARIDEN.jsonl | 0 .../batches}/2026-11-12/verite/FLORIDA.jsonl | 0 .../batches}/2026-11-12/verite/JUNGFRAU.jsonl | 0 .../2026-11-12/verite/LENZSPITZE.jsonl | 0 .../batches}/2026-11-12/verite/MICHIGAN.jsonl | 0 .../2026-11-12/verite/NADELHORN.jsonl | 0 .../batches}/2026-11-12/verite/NEBRASKA.jsonl | 0 .../batches}/2026-11-12/verite/NORDEND.jsonl | 0 .../batches}/2026-11-12/verite/SNCF01.jsonl | 0 .../2026-11-12/verite/SUSTENHORN.jsonl | 0 .../docs}/essais/2026-11-05-audit-scan.md | 0 {docs => archive/docs}/essais/2026-11-05.md | 0 .../docs}/essais/2026-11-06-audit-scan.md | 0 .../specs/2026-11-13-optimizer-design.md | 0 {outils => archive/outils}/agitation.py | 0 {outils => archive/outils}/capteurs.py | 0 {outils => archive/outils}/episodes_bruts.py | 0 {outils => archive/outils}/etape1.py | 0 {outils => archive/outils}/ev_fenetres.py | 0 {outils => archive/outils}/horaire_jours.py | 0 {outils => archive/outils}/instants.py | 0 {outils => archive/outils}/non_couverts.py | 0 {outils => archive/outils}/outils.py | 0 {outils => archive/outils}/rejets_instants.py | 0 {outils => archive/outils}/rejets_jour.py | 0 {outils => archive/outils}/suivre.py | 0 {.claude/agents => archive}/scanner.md | 0 117 files changed, 132 insertions(+), 38 deletions(-) create mode 100644 .claude/skills/improve/SKILL.md create mode 100644 archive/README.md rename batch.py => archive/batch.py (100%) rename {batches => archive/batches}/2026-11-05/detecteurs.md (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/BREITHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/CLARIDEN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/FLORIDA.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/JUNGFRAU.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/LENZSPITZE.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/MICHIGAN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/NADELHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/NEBRASKA.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/NIEDERHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/NORDEND.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/SNCF01.jsonl (100%) rename {batches => archive/batches}/2026-11-05/detecteurs/SUSTENHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/improve/benchmark-S1.txt (100%) rename {batches => archive/batches}/2026-11-05/improve/benchmark-S2.txt (100%) rename {batches => archive/batches}/2026-11-05/improve/benchmark-after.txt (100%) rename {batches => archive/batches}/2026-11-05/improve/benchmark-before.txt (100%) rename {batches => archive/batches}/2026-11-05/improve/events-after.txt (100%) rename {batches => archive/batches}/2026-11-05/improve/modification.md (100%) rename {batches => archive/batches}/2026-11-05/improve/range-S1.txt (100%) rename {batches => archive/batches}/2026-11-05/improve/range-after.txt (100%) rename {batches => archive/batches}/2026-11-05/improve/range-before.txt (100%) rename {batches => archive/batches}/2026-11-05/improve/summary.md (100%) rename {batches => archive/batches}/2026-11-05/improve/tools/instants.py (100%) rename {batches => archive/batches}/2026-11-05/improve/validation.md (100%) rename {batches => archive/batches}/2026-11-05/rapport.md (100%) rename {batches => archive/batches}/2026-11-05/verite/BREITHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/CLARIDEN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/FLORIDA.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/JUNGFRAU.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/LENZSPITZE.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/MICHIGAN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/NADELHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/NEBRASKA.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/NIEDERHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/NORDEND.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/SNCF01.jsonl (100%) rename {batches => archive/batches}/2026-11-05/verite/SUSTENHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs.md (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/BREITHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/CLARIDEN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/FLORIDA.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/JUNGFRAU.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/LENZSPITZE.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/MICHIGAN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/NADELHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/NEBRASKA.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/NIEDERHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/NORDEND.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/SNCF01.jsonl (100%) rename {batches => archive/batches}/2026-11-06/detecteurs/SUSTENHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/improve/benchmark-S1-dropped.txt (100%) rename {batches => archive/batches}/2026-11-06/improve/benchmark-before.txt (100%) rename {batches => archive/batches}/2026-11-06/improve/range-before.txt (100%) rename {batches => archive/batches}/2026-11-06/improve/tools/brief_debug.py (100%) rename {batches => archive/batches}/2026-11-06/improve/tools/diff_events.py (100%) rename {batches => archive/batches}/2026-11-06/improve/tools/window.py (100%) rename {batches => archive/batches}/2026-11-06/rapport.md (100%) rename {batches => archive/batches}/2026-11-06/verite/BREITHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/CLARIDEN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/FLORIDA.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/JUNGFRAU.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/LENZSPITZE.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/MICHIGAN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/NADELHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/NEBRASKA.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/NIEDERHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/NORDEND.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/SNCF01.jsonl (100%) rename {batches => archive/batches}/2026-11-06/verite/SUSTENHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs.md (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/BREITHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/CLARIDEN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/FLORIDA.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/JUNGFRAU.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/LENZSPITZE.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/MICHIGAN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/NADELHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/NEBRASKA.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/NORDEND.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/SNCF01.jsonl (100%) rename {batches => archive/batches}/2026-11-12/detecteurs/SUSTENHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/rapport.md (100%) rename {batches => archive/batches}/2026-11-12/verite/BREITHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/CLARIDEN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/FLORIDA.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/JUNGFRAU.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/LENZSPITZE.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/MICHIGAN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/NADELHORN.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/NEBRASKA.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/NORDEND.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/SNCF01.jsonl (100%) rename {batches => archive/batches}/2026-11-12/verite/SUSTENHORN.jsonl (100%) rename {docs => archive/docs}/essais/2026-11-05-audit-scan.md (100%) rename {docs => archive/docs}/essais/2026-11-05.md (100%) rename {docs => archive/docs}/essais/2026-11-06-audit-scan.md (100%) rename {docs => archive/docs}/superpowers/specs/2026-11-13-optimizer-design.md (100%) rename {outils => archive/outils}/agitation.py (100%) rename {outils => archive/outils}/capteurs.py (100%) rename {outils => archive/outils}/episodes_bruts.py (100%) rename {outils => archive/outils}/etape1.py (100%) rename {outils => archive/outils}/ev_fenetres.py (100%) rename {outils => archive/outils}/horaire_jours.py (100%) rename {outils => archive/outils}/instants.py (100%) rename {outils => archive/outils}/non_couverts.py (100%) rename {outils => archive/outils}/outils.py (100%) rename {outils => archive/outils}/rejets_instants.py (100%) rename {outils => archive/outils}/rejets_jour.py (100%) rename {outils => archive/outils}/suivre.py (100%) rename {.claude/agents => archive}/scanner.md (100%) diff --git a/.claude/skills/improve/SKILL.md b/.claude/skills/improve/SKILL.md new file mode 100644 index 0000000..63e2388 --- /dev/null +++ b/.claude/skills/improve/SKILL.md @@ -0,0 +1,89 @@ +--- +name: improve +description: Workflow that improves the detectors on a range of data where they perform poorly, given labels as the truth on that range — the upgrader fixes, the validator judges; the result, detectors a little better on the range without going back elsewhere (benchmark on a reference truth), or unchanged. The caller gives the range, the labels, the reference truth, the output folder and any specific context. Run from Optimizer's root with the agents plugin (--plugin-dir ). /improve . +argument-hint: "" +--- + +# improve: improve the detectors on a range + +You are the orchestrator. The detectors (the detectors repository, `DETECTORS`: `scripts/`, `thresholds.md`) perform poorly on a range of data of a station, or of several stations on the same range; labels give the truth on this range. You run the upgrader, which fixes the detectors, then the validator, which judges the fixes against overfitting, and you return detectors **a little better on the range without going back elsewhere**, or unchanged. **You judge nothing yourself**: you only read the verdict lines. **You ask no question**: the workflow runs alone to the end. + +## Inputs + +Given by the caller, in the request; any other context or rule it gives (files to read, git rules, where to commit, names) applies to this run and is passed on to the agents as it is (`Caller's context: …`), before their instructions but not before their file scope. + +- `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. +- `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). + +A required input missing, or `DETECTORS` not a git repository: say so and stop, changing nothing. + +## Commands + +- events: `python3 /scripts/categories.py --from --to ` +- sensors: `python3 /bench/sensors.py --from --to ` +- range score (the goal): `python3 /bench/score.py --labels --from --to `; it exits with an error if no label touches the range: note it in the summary and stop without touching the detectors. +- with `STATIONS`: the events and sensors commands once per station, `/` for each `S` of `STATIONS`; the range score, all of them at once: `python3 /bench/regression.py --labels --data --stations --from --to `. +- benchmark (the non-regression, about 3 min): `python3 /bench/regression.py ` + +The measures of a step: ` > /range-.txt 2>&1` and ` > /benchmark-.txt 2>&1`. + +## Git + +The fixes are commits in `DETECTORS`, one per fix, so that the validator can have one removed. Note the **base**: `git -C rev-parse HEAD`. Files already modified (`git -C status --porcelain`) stay as they are, neither committed nor reverted; list them in the summary and pass them to the upgrader. Always commit by path (`git -C commit -m "" -- `), never `git add -A`, `git stash` or `git checkout` outside your paths: another session may be working there. Each message ends with an empty line then `Co-Authored-By: Claude Opus 5.5 `. Nothing is pushed. The rest (branch, committing `OUT`, another repository) is the caller's. + +## Steps + +Each agent is called with the Agent tool, its `subagent_type` (`agents:upgrader`, `agents:validator`, from the agents plugin loaded with `--plugin-dir`; not available: say so and stop, changing nothing) and the request below, plus the caller's context. A verdict is read by `grep '^\*\*Verdict\*\*:' `. + +1. **Measures before**: step `before`. +2. **Upgrader**, a single pass: `Detectors: . Station: / for each S of STATIONS>, range → (UTC). Labels: . Families: . Context: . Events command: <…>. Sensors command: <…>. Range score command: <…> (before: /range-before.txt). Benchmark command: <…> (before: /benchmark-before.txt). Base: . Files already modified: . Output folder: . Write /modification.md.` + It commits each fix it keeps, message `improve: S`, with its benchmark `/benchmark-S.txt`. + Verdict `nothing to change`, or no fix commit (`git -C log --format=%h --grep ': S[0-9]*$' ..HEAD` empty): go to the summary. +3. **Measures after**: step `after`. +4. **Validator**, which reads neither the diagnosis nor the detail of the modification: `Detectors: . Families: . Modification: /modification.md. Range score: /range-before.txt → /range-after.txt. Benchmark: /benchmark-before.txt → /benchmark-after.txt, after each fix: /benchmark-S*.txt; command: <…>. Events command for any station: python3 /scripts/categories.py --from --to . Base: . Write /validation.md.` + - `keep`: go to the summary. + - `remove`: for each fix of the `**Remove**:` line, its commits (`git -C log --format=%h --grep ': S$' ..HEAD`), from the most recent: `git -C revert --no-edit `, then `git -C commit --amend -m "improve: S removed" -m "Co-Authored-By: Claude Opus 5.5 "`. A conflict: `git -C revert --abort`, and do as for `cancel`. + - `cancel`, or anything else: `git -C revert --no-commit ..HEAD && git -C commit -m "improve: modification cancelled" -m "Co-Authored-By: Claude Opus 5.5 "` (only what the fix commits changed; files already modified stay as they are). + +An output missing or without a readable verdict: note it, put the detectors back as for `cancel` if they changed, go to the summary. Do not rerun an agent. + +## Summary + +Measures, step `end`, only after a `remove`; otherwise `end` is `after` (`keep`) or `before` (`cancel`, nothing changed). Then `/summary.md`: + +```markdown +# improve: , → + +**Result**: modification kept | kept without S… | cancelled | none | error + +## The range +the range score, before → end, one line per family (found, correct) + +## Elsewhere +the `Total` line of each family, before → end; then the other changed lines (station, family), before → end + +## What changed +; the upgrader's verdict, the validator's + +## For the user to decide + + +## Not fixed +<"Not fixed" of the modification; none> + +## Tools +/tools/`); none> + +## Errors + log --oneline ..HEAD`> +``` + +## Answer + +In 4 lines at most: the `**Result**` line, the range score before → end (changed families), the `Total` before → end if it changed, the path of the summary. diff --git a/.gitignore b/.gitignore index f92c47c..26eec4a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,10 @@ data labeling detectors +agents .venv/ __pycache__/ -batches/*.tmp/ -batches/*/figures/ -batches/*/scan.jsonl -batches/*/improve.jsonl +archive/batches/*.tmp/ +archive/batches/*/figures/ +archive/batches/*/scan.jsonl +archive/batches/*/improve.jsonl diff --git a/CLAUDE.md b/CLAUDE.md index 9666589..27de9ee 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,18 +1,17 @@ # CLAUDE.md -Optimizer fait converger les détecteurs AIMsight (le dépôt `~/detectors`, par un lien `detectors`) en continu et à faible coût : un batch par jour UTC, toutes les stations ; les détecteurs posent leurs étiquettes, le `scanner` les regarde de loin face aux courbes et note les irrégularités. Il fait cela et rien d'autre. Conception : `docs/superpowers/specs/2026-11-13-optimizer-design.md` ; installer et lancer : `README.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/`. -- **Le batch** : `python3 batch.py [--jour AAAA-MM-JJ] [--stations A,B] [--sans-scan]` → `batches//` : `detecteurs/.jsonl` (les étiquettes des détecteurs), `verite/.jsonl` (les mêmes, corrigées par le scanner), `detecteurs.md` (le résumé pour le scanner), `rapport.md` (le sien), `improve/` (la séance de `wf-improve` sur les stations corrigées : bilan `summary.md`, scripts de ses agents `tools/`), `figures/`, `scan.jsonl` et `improve.jsonl` (les flux) hors de git. -- **Les agents** : `.claude/agents/scanner.md`, sur Sonnet (`claude -p --agent scanner`) ; puis `/detectors:wf-improve` (`claude -p --plugin-dir detectors`, ses agents `detectors:upgrader` et `detectors:validator`), une séance sur les stations que le scanner a corrigées. Lancés par `batch.py` sans les réglages du poste (`--setting-sources project,local --strict-mcp-config`). -- **Les liens**, hors de git, en lecture seule : `data/` → `~/aimsight-data/data` (rempli par le pompage du dépôt aimsight-data) ; `labeling/` → `~/labeling` (le dépôt des étiquettes, partagé avec Diagnostic-App) (`familles.md` ; `auto/`, la vérité de référence du benchmark). -- **Les détecteurs** : leur contrat est dans `detectors/CLAUDE.md` ; Optimizer lit `categories.events`, `categories.CATEGORIES` et `scripts/data.py`. Diagnostic-App y pointe par le même lien (une seule copie : un commit de l'un se voit aussitôt chez l'autre) ; son mode ciblé (une analyse approfondie) et ce mode large seront deux appelants du même `/detectors:wf-improve`. -- **Les essais** : `docs/essais/.md`, un journal par essai de bout en bout ; `outils/`, les scripts de lecture qui en sont restés. -- **Vérifier un changement** : `.venv/bin/python outils/etape1.py / ` sur un jour réel (ou `python3 batch.py --jour --sans-scan` sur un jour sans batch), puis regarder les figures ; à vérité intacte, `regression.py --labels /detecteurs --data data --from --to ` doit être à 100 %. +- **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. Règles : -- **Les agents tournent sur l'abonnement Claude, jamais sur une clé d'API** : `batch.py` lance `claude -p` sans `ANTHROPIC_API_KEY` ni `ANTHROPIC_AUTH_TOKEN`, et l'arrête si son message d'ouverture dit une autre source que l'abonnement (`apiKeySource` ≠ `none`). Le montant en $ du flux n'est qu'un équivalent API, non facturé. +- **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*`). +- 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 dépôt `detectors` reste en anglais. +- Langue : français ; le skill `improve`, comme le dépôt detectors et ses agents, reste en anglais. diff --git a/README.md b/README.md index 7a38d06..3dcc60f 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,41 @@ # Optimizer -Faire converger les détecteurs AIMsight en continu, à faible coût. Chaque jour pompé devient un batch de 24 h : +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` : -1. les détecteurs (le dépôt `~/detectors`, par un lien) passent sur toutes les stations ; leurs événements deviennent des étiquettes, et une figure par station les montre face aux courbes ; -2. le `scanner`, un agent léger (Sonnet), regarde chaque figure, note chaque irrégularité (raté, trop, bornes, famille) dans un rapport et la corrige dans une copie des étiquettes, la vérité du batch ; -3. s'il a corrigé une station, `/detectors:wf-improve` (le plugin du dépôt `detectors`) améliore les détecteurs sur cette vérité, une seule séance pour toutes les stations corrigées, sous le garde-fou du benchmark sur les étiquettes revues ; ses correctifs sont des commits dans `~/detectors`, rien n'est poussé. +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. -Le mode ciblé de Diagnostic-App (une analyse approfondie, puis « Optimiser les détecteurs ») reste tel quel ; Optimizer en est la version large et légère. Conception : `docs/superpowers/specs/2026-11-13-optimizer-design.md`. +L'`upgrader` et le `validator` viennent du dépôt `agents` ; le benchmark (`bench/`), du dépôt `detectors`. Rien n'est poussé. ## Installer ```bash -ln -s ~/detectors detectors # le dépôt des détecteurs, partagé avec Diagnostic-App -ln -s ~/aimsight-data/data data # les données pompées (dépôt aimsight-data), hors de git -ln -s ~/labeling labeling # le dépôt des étiquettes : familles.md et la vérité de référence -python3 -m venv .venv && .venv/bin/pip install matplotlib +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) ``` -`claude` (Claude Code) doit être sur le `PATH` pour le scan, connecté à l'abonnement Claude (`/login`) : le scan ne tourne jamais sur une clé d'API, `batch.py` l'arrête sinon. +`claude` (Claude Code) doit être sur le `PATH`, connecté à l'abonnement Claude (`/login`), jamais à une clé d'API. ## Lancer +Par le bouton « Optimiser les détecteurs » de Diagnostic-App, sur une analyse finie ; ou à la main, depuis la racine d'Optimizer : + ```bash -python3 batch.py # hier (UTC), toutes les stations de data/ -python3 batch.py --jour 2026-11-12 # un autre jour -python3 batch.py --sans-scan # les détecteurs et les figures seulement +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/_/." \ + --plugin-dir agents --add-dir ~/detectors --add-dir ~/labeling --add-dir ~/aimsight-data/data \ + --allowedTools Read,Write,Edit,Bash,Agent --permission-mode acceptEdits ``` -Une étape faite ne se refait pas : relancer après `--sans-scan` fait le reste ; supprimer `batches//` pour tout refaire. Les agents (`claude -p`) ne voient que le projet : ni les hooks, ni les plugins, ni les serveurs MCP du poste. `batch.py` passe seul sur `.venv` pour les figures. +`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. -## Ce qu'un batch laisse +## Ce qu'une séance laisse -`batches//` : -- `detecteurs/.jsonl` : les étiquettes des détecteurs, coupées au jour (`id`, `debut`, `fin`, `categorie` = la famille, `description`) ; -- `verite/.jsonl` : les mêmes, corrigées par le scanner ; -- `detecteurs.md` : le résumé que lit le scanner ; -- `figures/.png` : ce qu'il regarde (hors de git) ; -- `rapport.md` : ses irrégularités, ses doutes, ce qui lui a manqué ; -- `scan.jsonl` : son flux, avec son coût (hors de git) ; -- `improve/` : la séance d'amélioration, ses mesures avant et après, `modification.md` (l'upgrader), `validation.md` (le validator), `summary.md` (le bilan), `tools/` (les scripts que ses agents ont écrits, à réutiliser) ; `improve.jsonl`, son flux (hors de git). +`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. -`outils/` : de quoi suivre et contrôler un batch à la main. `suivre.py ` suit un agent pendant qu'il tourne ; `etape1.py` refait l'étape 1 dans un dossier de travail (vérifier un changement sans toucher à `batches/`) ; les autres lisent les données brutes (`JOUR=AAAA-MM-JJ python3 outils/instants.py NORDEND 00:45 01:30`), venus de l'audit du premier essai. `docs/essais/` : les journaux des essais. +`archive/` : l'ancien batch quotidien et son scanner (l'auto-étiquetage par les détecteurs), arrêtés le 2026-11-16. L'architecture des dépôts : `~/Diagnostic-App/docs/architecture.drawio`. diff --git a/archive/README.md b/archive/README.md new file mode 100644 index 0000000..079e215 --- /dev/null +++ b/archive/README.md @@ -0,0 +1,7 @@ +# Archive : l'auto-étiquetage par les détecteurs (arrêté) + +Ce qu'Optimizer faisait du 2026-11-13 au 2026-11-16 : un batch par jour UTC (`batch.py`), toutes les stations ; les détecteurs posaient leurs étiquettes, le `scanner` (`scanner.md`, Sonnet) les corrigeait de loin face aux courbes, et `wf-improve` apprenait les détecteurs sur ces corrections. Les batches, les outils de l'audit et les journaux d'essai sont ici tels qu'ils étaient (`batches/`, `outils/`, `docs/`). + +Arrêté le 2026-11-16 par l'utilisateur : beaucoup d'étiquettes sans la qualité, et un effet circulaire, les détecteurs appris sur leurs propres étiquettes à peine corrigées. Les détecteurs s'améliorent désormais depuis les analyses approfondies de l'app (le skill `improve`, à la racine du dépôt). + +Gardé pour trace, non maintenu : les chemins qu'il cite (le plugin `/detectors:wf-improve`, `skills/wf-improve/scripts/`) n'existent plus. diff --git a/batch.py b/archive/batch.py similarity index 100% rename from batch.py rename to archive/batch.py diff --git a/batches/2026-11-05/detecteurs.md b/archive/batches/2026-11-05/detecteurs.md similarity index 100% rename from batches/2026-11-05/detecteurs.md rename to archive/batches/2026-11-05/detecteurs.md diff --git a/batches/2026-11-05/detecteurs/BREITHORN.jsonl b/archive/batches/2026-11-05/detecteurs/BREITHORN.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/BREITHORN.jsonl rename to archive/batches/2026-11-05/detecteurs/BREITHORN.jsonl diff --git a/batches/2026-11-05/detecteurs/CLARIDEN.jsonl b/archive/batches/2026-11-05/detecteurs/CLARIDEN.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/CLARIDEN.jsonl rename to archive/batches/2026-11-05/detecteurs/CLARIDEN.jsonl diff --git a/batches/2026-11-05/detecteurs/FLORIDA.jsonl b/archive/batches/2026-11-05/detecteurs/FLORIDA.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/FLORIDA.jsonl rename to archive/batches/2026-11-05/detecteurs/FLORIDA.jsonl diff --git a/batches/2026-11-05/detecteurs/JUNGFRAU.jsonl b/archive/batches/2026-11-05/detecteurs/JUNGFRAU.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/JUNGFRAU.jsonl rename to archive/batches/2026-11-05/detecteurs/JUNGFRAU.jsonl diff --git a/batches/2026-11-05/detecteurs/LENZSPITZE.jsonl b/archive/batches/2026-11-05/detecteurs/LENZSPITZE.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/LENZSPITZE.jsonl rename to archive/batches/2026-11-05/detecteurs/LENZSPITZE.jsonl diff --git a/batches/2026-11-05/detecteurs/MICHIGAN.jsonl b/archive/batches/2026-11-05/detecteurs/MICHIGAN.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/MICHIGAN.jsonl rename to archive/batches/2026-11-05/detecteurs/MICHIGAN.jsonl diff --git a/batches/2026-11-05/detecteurs/NADELHORN.jsonl b/archive/batches/2026-11-05/detecteurs/NADELHORN.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/NADELHORN.jsonl rename to archive/batches/2026-11-05/detecteurs/NADELHORN.jsonl diff --git a/batches/2026-11-05/detecteurs/NEBRASKA.jsonl b/archive/batches/2026-11-05/detecteurs/NEBRASKA.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/NEBRASKA.jsonl rename to archive/batches/2026-11-05/detecteurs/NEBRASKA.jsonl diff --git a/batches/2026-11-05/detecteurs/NIEDERHORN.jsonl b/archive/batches/2026-11-05/detecteurs/NIEDERHORN.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/NIEDERHORN.jsonl rename to archive/batches/2026-11-05/detecteurs/NIEDERHORN.jsonl diff --git a/batches/2026-11-05/detecteurs/NORDEND.jsonl b/archive/batches/2026-11-05/detecteurs/NORDEND.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/NORDEND.jsonl rename to archive/batches/2026-11-05/detecteurs/NORDEND.jsonl diff --git a/batches/2026-11-05/detecteurs/SNCF01.jsonl b/archive/batches/2026-11-05/detecteurs/SNCF01.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/SNCF01.jsonl rename to archive/batches/2026-11-05/detecteurs/SNCF01.jsonl diff --git a/batches/2026-11-05/detecteurs/SUSTENHORN.jsonl b/archive/batches/2026-11-05/detecteurs/SUSTENHORN.jsonl similarity index 100% rename from batches/2026-11-05/detecteurs/SUSTENHORN.jsonl rename to archive/batches/2026-11-05/detecteurs/SUSTENHORN.jsonl diff --git a/batches/2026-11-05/improve/benchmark-S1.txt b/archive/batches/2026-11-05/improve/benchmark-S1.txt similarity index 100% rename from batches/2026-11-05/improve/benchmark-S1.txt rename to archive/batches/2026-11-05/improve/benchmark-S1.txt diff --git a/batches/2026-11-05/improve/benchmark-S2.txt b/archive/batches/2026-11-05/improve/benchmark-S2.txt similarity index 100% rename from batches/2026-11-05/improve/benchmark-S2.txt rename to archive/batches/2026-11-05/improve/benchmark-S2.txt diff --git a/batches/2026-11-05/improve/benchmark-after.txt b/archive/batches/2026-11-05/improve/benchmark-after.txt similarity index 100% rename from batches/2026-11-05/improve/benchmark-after.txt rename to archive/batches/2026-11-05/improve/benchmark-after.txt diff --git a/batches/2026-11-05/improve/benchmark-before.txt b/archive/batches/2026-11-05/improve/benchmark-before.txt similarity index 100% rename from batches/2026-11-05/improve/benchmark-before.txt rename to archive/batches/2026-11-05/improve/benchmark-before.txt diff --git a/batches/2026-11-05/improve/events-after.txt b/archive/batches/2026-11-05/improve/events-after.txt similarity index 100% rename from batches/2026-11-05/improve/events-after.txt rename to archive/batches/2026-11-05/improve/events-after.txt diff --git a/batches/2026-11-05/improve/modification.md b/archive/batches/2026-11-05/improve/modification.md similarity index 100% rename from batches/2026-11-05/improve/modification.md rename to archive/batches/2026-11-05/improve/modification.md diff --git a/batches/2026-11-05/improve/range-S1.txt b/archive/batches/2026-11-05/improve/range-S1.txt similarity index 100% rename from batches/2026-11-05/improve/range-S1.txt rename to archive/batches/2026-11-05/improve/range-S1.txt diff --git a/batches/2026-11-05/improve/range-after.txt b/archive/batches/2026-11-05/improve/range-after.txt similarity index 100% rename from batches/2026-11-05/improve/range-after.txt rename to archive/batches/2026-11-05/improve/range-after.txt diff --git a/batches/2026-11-05/improve/range-before.txt b/archive/batches/2026-11-05/improve/range-before.txt similarity index 100% rename from batches/2026-11-05/improve/range-before.txt rename to archive/batches/2026-11-05/improve/range-before.txt diff --git a/batches/2026-11-05/improve/summary.md b/archive/batches/2026-11-05/improve/summary.md similarity index 100% rename from batches/2026-11-05/improve/summary.md rename to archive/batches/2026-11-05/improve/summary.md diff --git a/batches/2026-11-05/improve/tools/instants.py b/archive/batches/2026-11-05/improve/tools/instants.py similarity index 100% rename from batches/2026-11-05/improve/tools/instants.py rename to archive/batches/2026-11-05/improve/tools/instants.py diff --git a/batches/2026-11-05/improve/validation.md b/archive/batches/2026-11-05/improve/validation.md similarity index 100% rename from batches/2026-11-05/improve/validation.md rename to archive/batches/2026-11-05/improve/validation.md diff --git a/batches/2026-11-05/rapport.md b/archive/batches/2026-11-05/rapport.md similarity index 100% rename from batches/2026-11-05/rapport.md rename to archive/batches/2026-11-05/rapport.md diff --git a/batches/2026-11-05/verite/BREITHORN.jsonl b/archive/batches/2026-11-05/verite/BREITHORN.jsonl similarity index 100% rename from batches/2026-11-05/verite/BREITHORN.jsonl rename to archive/batches/2026-11-05/verite/BREITHORN.jsonl diff --git a/batches/2026-11-05/verite/CLARIDEN.jsonl b/archive/batches/2026-11-05/verite/CLARIDEN.jsonl similarity index 100% rename from batches/2026-11-05/verite/CLARIDEN.jsonl rename to archive/batches/2026-11-05/verite/CLARIDEN.jsonl diff --git a/batches/2026-11-05/verite/FLORIDA.jsonl b/archive/batches/2026-11-05/verite/FLORIDA.jsonl similarity index 100% rename from batches/2026-11-05/verite/FLORIDA.jsonl rename to archive/batches/2026-11-05/verite/FLORIDA.jsonl diff --git a/batches/2026-11-05/verite/JUNGFRAU.jsonl b/archive/batches/2026-11-05/verite/JUNGFRAU.jsonl similarity index 100% rename from batches/2026-11-05/verite/JUNGFRAU.jsonl rename to archive/batches/2026-11-05/verite/JUNGFRAU.jsonl diff --git a/batches/2026-11-05/verite/LENZSPITZE.jsonl b/archive/batches/2026-11-05/verite/LENZSPITZE.jsonl similarity index 100% rename from batches/2026-11-05/verite/LENZSPITZE.jsonl rename to archive/batches/2026-11-05/verite/LENZSPITZE.jsonl diff --git a/batches/2026-11-05/verite/MICHIGAN.jsonl b/archive/batches/2026-11-05/verite/MICHIGAN.jsonl similarity index 100% rename from batches/2026-11-05/verite/MICHIGAN.jsonl rename to archive/batches/2026-11-05/verite/MICHIGAN.jsonl diff --git a/batches/2026-11-05/verite/NADELHORN.jsonl b/archive/batches/2026-11-05/verite/NADELHORN.jsonl similarity index 100% rename from batches/2026-11-05/verite/NADELHORN.jsonl rename to archive/batches/2026-11-05/verite/NADELHORN.jsonl diff --git a/batches/2026-11-05/verite/NEBRASKA.jsonl b/archive/batches/2026-11-05/verite/NEBRASKA.jsonl similarity index 100% rename from batches/2026-11-05/verite/NEBRASKA.jsonl rename to archive/batches/2026-11-05/verite/NEBRASKA.jsonl diff --git a/batches/2026-11-05/verite/NIEDERHORN.jsonl b/archive/batches/2026-11-05/verite/NIEDERHORN.jsonl similarity index 100% rename from batches/2026-11-05/verite/NIEDERHORN.jsonl rename to archive/batches/2026-11-05/verite/NIEDERHORN.jsonl diff --git a/batches/2026-11-05/verite/NORDEND.jsonl b/archive/batches/2026-11-05/verite/NORDEND.jsonl similarity index 100% rename from batches/2026-11-05/verite/NORDEND.jsonl rename to archive/batches/2026-11-05/verite/NORDEND.jsonl diff --git a/batches/2026-11-05/verite/SNCF01.jsonl b/archive/batches/2026-11-05/verite/SNCF01.jsonl similarity index 100% rename from batches/2026-11-05/verite/SNCF01.jsonl rename to archive/batches/2026-11-05/verite/SNCF01.jsonl diff --git a/batches/2026-11-05/verite/SUSTENHORN.jsonl b/archive/batches/2026-11-05/verite/SUSTENHORN.jsonl similarity index 100% rename from batches/2026-11-05/verite/SUSTENHORN.jsonl rename to archive/batches/2026-11-05/verite/SUSTENHORN.jsonl diff --git a/batches/2026-11-06/detecteurs.md b/archive/batches/2026-11-06/detecteurs.md similarity index 100% rename from batches/2026-11-06/detecteurs.md rename to archive/batches/2026-11-06/detecteurs.md diff --git a/batches/2026-11-06/detecteurs/BREITHORN.jsonl b/archive/batches/2026-11-06/detecteurs/BREITHORN.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/BREITHORN.jsonl rename to archive/batches/2026-11-06/detecteurs/BREITHORN.jsonl diff --git a/batches/2026-11-06/detecteurs/CLARIDEN.jsonl b/archive/batches/2026-11-06/detecteurs/CLARIDEN.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/CLARIDEN.jsonl rename to archive/batches/2026-11-06/detecteurs/CLARIDEN.jsonl diff --git a/batches/2026-11-06/detecteurs/FLORIDA.jsonl b/archive/batches/2026-11-06/detecteurs/FLORIDA.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/FLORIDA.jsonl rename to archive/batches/2026-11-06/detecteurs/FLORIDA.jsonl diff --git a/batches/2026-11-06/detecteurs/JUNGFRAU.jsonl b/archive/batches/2026-11-06/detecteurs/JUNGFRAU.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/JUNGFRAU.jsonl rename to archive/batches/2026-11-06/detecteurs/JUNGFRAU.jsonl diff --git a/batches/2026-11-06/detecteurs/LENZSPITZE.jsonl b/archive/batches/2026-11-06/detecteurs/LENZSPITZE.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/LENZSPITZE.jsonl rename to archive/batches/2026-11-06/detecteurs/LENZSPITZE.jsonl diff --git a/batches/2026-11-06/detecteurs/MICHIGAN.jsonl b/archive/batches/2026-11-06/detecteurs/MICHIGAN.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/MICHIGAN.jsonl rename to archive/batches/2026-11-06/detecteurs/MICHIGAN.jsonl diff --git a/batches/2026-11-06/detecteurs/NADELHORN.jsonl b/archive/batches/2026-11-06/detecteurs/NADELHORN.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/NADELHORN.jsonl rename to archive/batches/2026-11-06/detecteurs/NADELHORN.jsonl diff --git a/batches/2026-11-06/detecteurs/NEBRASKA.jsonl b/archive/batches/2026-11-06/detecteurs/NEBRASKA.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/NEBRASKA.jsonl rename to archive/batches/2026-11-06/detecteurs/NEBRASKA.jsonl diff --git a/batches/2026-11-06/detecteurs/NIEDERHORN.jsonl b/archive/batches/2026-11-06/detecteurs/NIEDERHORN.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/NIEDERHORN.jsonl rename to archive/batches/2026-11-06/detecteurs/NIEDERHORN.jsonl diff --git a/batches/2026-11-06/detecteurs/NORDEND.jsonl b/archive/batches/2026-11-06/detecteurs/NORDEND.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/NORDEND.jsonl rename to archive/batches/2026-11-06/detecteurs/NORDEND.jsonl diff --git a/batches/2026-11-06/detecteurs/SNCF01.jsonl b/archive/batches/2026-11-06/detecteurs/SNCF01.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/SNCF01.jsonl rename to archive/batches/2026-11-06/detecteurs/SNCF01.jsonl diff --git a/batches/2026-11-06/detecteurs/SUSTENHORN.jsonl b/archive/batches/2026-11-06/detecteurs/SUSTENHORN.jsonl similarity index 100% rename from batches/2026-11-06/detecteurs/SUSTENHORN.jsonl rename to archive/batches/2026-11-06/detecteurs/SUSTENHORN.jsonl diff --git a/batches/2026-11-06/improve/benchmark-S1-dropped.txt b/archive/batches/2026-11-06/improve/benchmark-S1-dropped.txt similarity index 100% rename from batches/2026-11-06/improve/benchmark-S1-dropped.txt rename to archive/batches/2026-11-06/improve/benchmark-S1-dropped.txt diff --git a/batches/2026-11-06/improve/benchmark-before.txt b/archive/batches/2026-11-06/improve/benchmark-before.txt similarity index 100% rename from batches/2026-11-06/improve/benchmark-before.txt rename to archive/batches/2026-11-06/improve/benchmark-before.txt diff --git a/batches/2026-11-06/improve/range-before.txt b/archive/batches/2026-11-06/improve/range-before.txt similarity index 100% rename from batches/2026-11-06/improve/range-before.txt rename to archive/batches/2026-11-06/improve/range-before.txt diff --git a/batches/2026-11-06/improve/tools/brief_debug.py b/archive/batches/2026-11-06/improve/tools/brief_debug.py similarity index 100% rename from batches/2026-11-06/improve/tools/brief_debug.py rename to archive/batches/2026-11-06/improve/tools/brief_debug.py diff --git a/batches/2026-11-06/improve/tools/diff_events.py b/archive/batches/2026-11-06/improve/tools/diff_events.py similarity index 100% rename from batches/2026-11-06/improve/tools/diff_events.py rename to archive/batches/2026-11-06/improve/tools/diff_events.py diff --git a/batches/2026-11-06/improve/tools/window.py b/archive/batches/2026-11-06/improve/tools/window.py similarity index 100% rename from batches/2026-11-06/improve/tools/window.py rename to archive/batches/2026-11-06/improve/tools/window.py diff --git a/batches/2026-11-06/rapport.md b/archive/batches/2026-11-06/rapport.md similarity index 100% rename from batches/2026-11-06/rapport.md rename to archive/batches/2026-11-06/rapport.md diff --git a/batches/2026-11-06/verite/BREITHORN.jsonl b/archive/batches/2026-11-06/verite/BREITHORN.jsonl similarity index 100% rename from batches/2026-11-06/verite/BREITHORN.jsonl rename to archive/batches/2026-11-06/verite/BREITHORN.jsonl diff --git a/batches/2026-11-06/verite/CLARIDEN.jsonl b/archive/batches/2026-11-06/verite/CLARIDEN.jsonl similarity index 100% rename from batches/2026-11-06/verite/CLARIDEN.jsonl rename to archive/batches/2026-11-06/verite/CLARIDEN.jsonl diff --git a/batches/2026-11-06/verite/FLORIDA.jsonl b/archive/batches/2026-11-06/verite/FLORIDA.jsonl similarity index 100% rename from batches/2026-11-06/verite/FLORIDA.jsonl rename to archive/batches/2026-11-06/verite/FLORIDA.jsonl diff --git a/batches/2026-11-06/verite/JUNGFRAU.jsonl b/archive/batches/2026-11-06/verite/JUNGFRAU.jsonl similarity index 100% rename from batches/2026-11-06/verite/JUNGFRAU.jsonl rename to archive/batches/2026-11-06/verite/JUNGFRAU.jsonl diff --git a/batches/2026-11-06/verite/LENZSPITZE.jsonl b/archive/batches/2026-11-06/verite/LENZSPITZE.jsonl similarity index 100% rename from batches/2026-11-06/verite/LENZSPITZE.jsonl rename to archive/batches/2026-11-06/verite/LENZSPITZE.jsonl diff --git a/batches/2026-11-06/verite/MICHIGAN.jsonl b/archive/batches/2026-11-06/verite/MICHIGAN.jsonl similarity index 100% rename from batches/2026-11-06/verite/MICHIGAN.jsonl rename to archive/batches/2026-11-06/verite/MICHIGAN.jsonl diff --git a/batches/2026-11-06/verite/NADELHORN.jsonl b/archive/batches/2026-11-06/verite/NADELHORN.jsonl similarity index 100% rename from batches/2026-11-06/verite/NADELHORN.jsonl rename to archive/batches/2026-11-06/verite/NADELHORN.jsonl diff --git a/batches/2026-11-06/verite/NEBRASKA.jsonl b/archive/batches/2026-11-06/verite/NEBRASKA.jsonl similarity index 100% rename from batches/2026-11-06/verite/NEBRASKA.jsonl rename to archive/batches/2026-11-06/verite/NEBRASKA.jsonl diff --git a/batches/2026-11-06/verite/NIEDERHORN.jsonl b/archive/batches/2026-11-06/verite/NIEDERHORN.jsonl similarity index 100% rename from batches/2026-11-06/verite/NIEDERHORN.jsonl rename to archive/batches/2026-11-06/verite/NIEDERHORN.jsonl diff --git a/batches/2026-11-06/verite/NORDEND.jsonl b/archive/batches/2026-11-06/verite/NORDEND.jsonl similarity index 100% rename from batches/2026-11-06/verite/NORDEND.jsonl rename to archive/batches/2026-11-06/verite/NORDEND.jsonl diff --git a/batches/2026-11-06/verite/SNCF01.jsonl b/archive/batches/2026-11-06/verite/SNCF01.jsonl similarity index 100% rename from batches/2026-11-06/verite/SNCF01.jsonl rename to archive/batches/2026-11-06/verite/SNCF01.jsonl diff --git a/batches/2026-11-06/verite/SUSTENHORN.jsonl b/archive/batches/2026-11-06/verite/SUSTENHORN.jsonl similarity index 100% rename from batches/2026-11-06/verite/SUSTENHORN.jsonl rename to archive/batches/2026-11-06/verite/SUSTENHORN.jsonl diff --git a/batches/2026-11-12/detecteurs.md b/archive/batches/2026-11-12/detecteurs.md similarity index 100% rename from batches/2026-11-12/detecteurs.md rename to archive/batches/2026-11-12/detecteurs.md diff --git a/batches/2026-11-12/detecteurs/BREITHORN.jsonl b/archive/batches/2026-11-12/detecteurs/BREITHORN.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/BREITHORN.jsonl rename to archive/batches/2026-11-12/detecteurs/BREITHORN.jsonl diff --git a/batches/2026-11-12/detecteurs/CLARIDEN.jsonl b/archive/batches/2026-11-12/detecteurs/CLARIDEN.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/CLARIDEN.jsonl rename to archive/batches/2026-11-12/detecteurs/CLARIDEN.jsonl diff --git a/batches/2026-11-12/detecteurs/FLORIDA.jsonl b/archive/batches/2026-11-12/detecteurs/FLORIDA.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/FLORIDA.jsonl rename to archive/batches/2026-11-12/detecteurs/FLORIDA.jsonl diff --git a/batches/2026-11-12/detecteurs/JUNGFRAU.jsonl b/archive/batches/2026-11-12/detecteurs/JUNGFRAU.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/JUNGFRAU.jsonl rename to archive/batches/2026-11-12/detecteurs/JUNGFRAU.jsonl diff --git a/batches/2026-11-12/detecteurs/LENZSPITZE.jsonl b/archive/batches/2026-11-12/detecteurs/LENZSPITZE.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/LENZSPITZE.jsonl rename to archive/batches/2026-11-12/detecteurs/LENZSPITZE.jsonl diff --git a/batches/2026-11-12/detecteurs/MICHIGAN.jsonl b/archive/batches/2026-11-12/detecteurs/MICHIGAN.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/MICHIGAN.jsonl rename to archive/batches/2026-11-12/detecteurs/MICHIGAN.jsonl diff --git a/batches/2026-11-12/detecteurs/NADELHORN.jsonl b/archive/batches/2026-11-12/detecteurs/NADELHORN.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/NADELHORN.jsonl rename to archive/batches/2026-11-12/detecteurs/NADELHORN.jsonl diff --git a/batches/2026-11-12/detecteurs/NEBRASKA.jsonl b/archive/batches/2026-11-12/detecteurs/NEBRASKA.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/NEBRASKA.jsonl rename to archive/batches/2026-11-12/detecteurs/NEBRASKA.jsonl diff --git a/batches/2026-11-12/detecteurs/NORDEND.jsonl b/archive/batches/2026-11-12/detecteurs/NORDEND.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/NORDEND.jsonl rename to archive/batches/2026-11-12/detecteurs/NORDEND.jsonl diff --git a/batches/2026-11-12/detecteurs/SNCF01.jsonl b/archive/batches/2026-11-12/detecteurs/SNCF01.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/SNCF01.jsonl rename to archive/batches/2026-11-12/detecteurs/SNCF01.jsonl diff --git a/batches/2026-11-12/detecteurs/SUSTENHORN.jsonl b/archive/batches/2026-11-12/detecteurs/SUSTENHORN.jsonl similarity index 100% rename from batches/2026-11-12/detecteurs/SUSTENHORN.jsonl rename to archive/batches/2026-11-12/detecteurs/SUSTENHORN.jsonl diff --git a/batches/2026-11-12/rapport.md b/archive/batches/2026-11-12/rapport.md similarity index 100% rename from batches/2026-11-12/rapport.md rename to archive/batches/2026-11-12/rapport.md diff --git a/batches/2026-11-12/verite/BREITHORN.jsonl b/archive/batches/2026-11-12/verite/BREITHORN.jsonl similarity index 100% rename from batches/2026-11-12/verite/BREITHORN.jsonl rename to archive/batches/2026-11-12/verite/BREITHORN.jsonl diff --git a/batches/2026-11-12/verite/CLARIDEN.jsonl b/archive/batches/2026-11-12/verite/CLARIDEN.jsonl similarity index 100% rename from batches/2026-11-12/verite/CLARIDEN.jsonl rename to archive/batches/2026-11-12/verite/CLARIDEN.jsonl diff --git a/batches/2026-11-12/verite/FLORIDA.jsonl b/archive/batches/2026-11-12/verite/FLORIDA.jsonl similarity index 100% rename from batches/2026-11-12/verite/FLORIDA.jsonl rename to archive/batches/2026-11-12/verite/FLORIDA.jsonl diff --git a/batches/2026-11-12/verite/JUNGFRAU.jsonl b/archive/batches/2026-11-12/verite/JUNGFRAU.jsonl similarity index 100% rename from batches/2026-11-12/verite/JUNGFRAU.jsonl rename to archive/batches/2026-11-12/verite/JUNGFRAU.jsonl diff --git a/batches/2026-11-12/verite/LENZSPITZE.jsonl b/archive/batches/2026-11-12/verite/LENZSPITZE.jsonl similarity index 100% rename from batches/2026-11-12/verite/LENZSPITZE.jsonl rename to archive/batches/2026-11-12/verite/LENZSPITZE.jsonl diff --git a/batches/2026-11-12/verite/MICHIGAN.jsonl b/archive/batches/2026-11-12/verite/MICHIGAN.jsonl similarity index 100% rename from batches/2026-11-12/verite/MICHIGAN.jsonl rename to archive/batches/2026-11-12/verite/MICHIGAN.jsonl diff --git a/batches/2026-11-12/verite/NADELHORN.jsonl b/archive/batches/2026-11-12/verite/NADELHORN.jsonl similarity index 100% rename from batches/2026-11-12/verite/NADELHORN.jsonl rename to archive/batches/2026-11-12/verite/NADELHORN.jsonl diff --git a/batches/2026-11-12/verite/NEBRASKA.jsonl b/archive/batches/2026-11-12/verite/NEBRASKA.jsonl similarity index 100% rename from batches/2026-11-12/verite/NEBRASKA.jsonl rename to archive/batches/2026-11-12/verite/NEBRASKA.jsonl diff --git a/batches/2026-11-12/verite/NORDEND.jsonl b/archive/batches/2026-11-12/verite/NORDEND.jsonl similarity index 100% rename from batches/2026-11-12/verite/NORDEND.jsonl rename to archive/batches/2026-11-12/verite/NORDEND.jsonl diff --git a/batches/2026-11-12/verite/SNCF01.jsonl b/archive/batches/2026-11-12/verite/SNCF01.jsonl similarity index 100% rename from batches/2026-11-12/verite/SNCF01.jsonl rename to archive/batches/2026-11-12/verite/SNCF01.jsonl diff --git a/batches/2026-11-12/verite/SUSTENHORN.jsonl b/archive/batches/2026-11-12/verite/SUSTENHORN.jsonl similarity index 100% rename from batches/2026-11-12/verite/SUSTENHORN.jsonl rename to archive/batches/2026-11-12/verite/SUSTENHORN.jsonl diff --git a/docs/essais/2026-11-05-audit-scan.md b/archive/docs/essais/2026-11-05-audit-scan.md similarity index 100% rename from docs/essais/2026-11-05-audit-scan.md rename to archive/docs/essais/2026-11-05-audit-scan.md diff --git a/docs/essais/2026-11-05.md b/archive/docs/essais/2026-11-05.md similarity index 100% rename from docs/essais/2026-11-05.md rename to archive/docs/essais/2026-11-05.md diff --git a/docs/essais/2026-11-06-audit-scan.md b/archive/docs/essais/2026-11-06-audit-scan.md similarity index 100% rename from docs/essais/2026-11-06-audit-scan.md rename to archive/docs/essais/2026-11-06-audit-scan.md diff --git a/docs/superpowers/specs/2026-11-13-optimizer-design.md b/archive/docs/superpowers/specs/2026-11-13-optimizer-design.md similarity index 100% rename from docs/superpowers/specs/2026-11-13-optimizer-design.md rename to archive/docs/superpowers/specs/2026-11-13-optimizer-design.md diff --git a/outils/agitation.py b/archive/outils/agitation.py similarity index 100% rename from outils/agitation.py rename to archive/outils/agitation.py diff --git a/outils/capteurs.py b/archive/outils/capteurs.py similarity index 100% rename from outils/capteurs.py rename to archive/outils/capteurs.py diff --git a/outils/episodes_bruts.py b/archive/outils/episodes_bruts.py similarity index 100% rename from outils/episodes_bruts.py rename to archive/outils/episodes_bruts.py diff --git a/outils/etape1.py b/archive/outils/etape1.py similarity index 100% rename from outils/etape1.py rename to archive/outils/etape1.py diff --git a/outils/ev_fenetres.py b/archive/outils/ev_fenetres.py similarity index 100% rename from outils/ev_fenetres.py rename to archive/outils/ev_fenetres.py diff --git a/outils/horaire_jours.py b/archive/outils/horaire_jours.py similarity index 100% rename from outils/horaire_jours.py rename to archive/outils/horaire_jours.py diff --git a/outils/instants.py b/archive/outils/instants.py similarity index 100% rename from outils/instants.py rename to archive/outils/instants.py diff --git a/outils/non_couverts.py b/archive/outils/non_couverts.py similarity index 100% rename from outils/non_couverts.py rename to archive/outils/non_couverts.py diff --git a/outils/outils.py b/archive/outils/outils.py similarity index 100% rename from outils/outils.py rename to archive/outils/outils.py diff --git a/outils/rejets_instants.py b/archive/outils/rejets_instants.py similarity index 100% rename from outils/rejets_instants.py rename to archive/outils/rejets_instants.py diff --git a/outils/rejets_jour.py b/archive/outils/rejets_jour.py similarity index 100% rename from outils/rejets_jour.py rename to archive/outils/rejets_jour.py diff --git a/outils/suivre.py b/archive/outils/suivre.py similarity index 100% rename from outils/suivre.py rename to archive/outils/suivre.py diff --git a/.claude/agents/scanner.md b/archive/scanner.md similarity index 100% rename from .claude/agents/scanner.md rename to archive/scanner.md