The optimisation of the AIMsight detectors and of the reading tools, from one analysis, and nothing else. An analysis (made in the aimsight-app app by the analyst) leaves in its folder the two things needed: its labels, the truth on its range, and its own scripts with what it missed. On that analysis, the `optimize` skill:
1.**the detectors**: measures their score on the range, and the benchmark on every label of `labeling/auto`; has them fixed by the `upgrader`, one fix per commit in `~/aimsight-detectors`; has them judged by the `validator`, which keeps, has some removed, or cancels: no station goes back, no overfitting;
2.**the tools**: has the `upgrader` bring the analyst's useful scripts into the reading harness, one fix per commit in `~/aimsight-tools`; always, whatever the detectors gave;
The `upgrader` and the `validator` come from the `agents` repository, each with its instructions from `instructions/` (`upgrader-detectors.md`, `validator-detectors.md`, `upgrader-tools.md`); the rules of each target are its own `CLAUDE.md`; the benchmark (`bench/`) from the `detectors` repository. Nothing is pushed.
The station and the range come from the analysis's `request.json` (the range's last day included); the labels from `labeling/auto/<STATION>.jsonl`; the context from its `report.md`. `DETECTORS`, `TOOLS`, `DATA`, `LABELS`, `FAMILIES` can be overridden in the request.
`sessions/<analysis>_<time>/`: the measures before and after (`range-*.txt`, `benchmark-*.txt`), `modification.md` (the upgrader), `validation.md` (the validator), `tools.md` (the upgrader on the tools) and its trials (`work/`), `summary.md` (the summary, shown by the app under the analysis report), `tools/` (the scripts the upgrader and validator wrote). The fixes: `improve: S<n>` commits in `~/aimsight-detectors`, the tools `improve: S<n>` commits in `~/aimsight-tools`, each on its current branch.
`archive/`: the former daily batch and its scanner (auto-labeling by the detectors), stopped on 2026-11-16. The architecture of the repositories: `~/aimsight-app/docs/architecture.drawio`.