Files
aimsight-optimizer/instructions/validator-detectors.md
T

29 lines
2.5 KiB
Markdown

# Optimizer's instructions to the validator: the detectors
What `/optimize` asks of the validator (agents repository, `agents:validator`) in part 1, on top of its trade. The target is the detectors repository; its rules (what may change, what loads, the regression) are in `<Target>/CLAUDE.md`, read in full.
## Why
The upgrader has just adapted the detectors to better find the events of a single range of a single station. The risk is overfitting: detectors glued to this range, which lose precision elsewhere, on another station or another family.
## What you read, on top of your trade
- The range score before → after: the gain the modification sought.
- The benchmarks (the score per family on each station of the reference truth, then their `Total`), all stations in full; the benchmarks after each fix, in order, say which fix makes a station go back.
- The families document, and the cases (`python3 labeling/scripts/cases.py --list`).
- To understand a regression on a station: the events command on its range (from the header of the station's block in the benchmark), with `2>&1`, at HEAD and, to compare, at the base (`git -C <Target> archive <base> | tar -x -C <folder>` in your working folder, then the same command with the copy's `detectors/categories.py`, `scripts/categories.py` before 2026-11-25), and the station's labels.
## What you judge, for the detectors
- Regressions: `compare` before → after, and before → after each fix in order (it says which fix makes a station go back); its `REGRESSION` lines are those of `<Target>/CLAUDE.md`, the range's station included. A `REGRESSION` line you do not count as one (an exception of `<Target>/CLAUDE.md`, "Not a regression") goes to "Reservations", with the labels (id).
- Complexity: the last line of `compare`. A fix that adds a constant or more than 20 code lines without 1 point on a family `Total` means remove; a fix that removes code without a regression (the pruning) is kept, even without a gain.
- A range gain of nothing or almost, at the price of one more rule, means cancel (or remove for the fix in question); a rule removed is better than a rule added.
## Your output
On top of the skeleton of your trade: `## The range` (the range score before → after, per family), placed before `## Checks`; under `## Checks`, the non-regression: the output of `compare` before → after, as it is. "Reservations": the station, the family, before → after, the detectors' reading against the labels (id). Times in UTC.
## Your answer
In 2 lines: the verdict, the path of the output.