labeling: the AIMsight displacement labels and the knowledge to place them, in a single copy on the workstation (`README.md`). aimsight-app reads and writes there, Optimizer only reads, both through a link `labeling -> ~/aimsight-labeling`; the support agent writes its folders in `auto/support/`; commits are made here.
- **The labels**: `manual/<STATION>.jsonl` (the expert, for him alone), `auto/<STATION>.jsonl` (the agents; `review` = the date the user validated the label in aimsight-app, nothing else writes it), one per line, `{"id", "start", "end", "family", "description", ...}`. The aimsight-app analyses: `auto/analyses/<STATION>_<start>_<end>/`. The support agent's folders: `auto/support/<YYYY-MM-DD>_<subject>/`. The cases: `auto/cases/<id>.json`, built by the `cases` skill (`/cases`) from the labels; `review` there is written by the user in the JSON.
- **The knowledge**, one source per kind (`README.md`), maintained by hand: `families.md` (the families, their boundaries), `labeling-rules.md` (bounds, a single event, description, stated cause), `reading-rules.md` (what the data mean), `stations.md` (the installations); the phenomena, false friends and lessons are the cases, `auto/cases/`, through `cases.py`; the labels themselves through `precedents.py`; what the data are: `tools/DATA.md`. A piece of knowledge lives in one of them only.
- **The tools**, standard library: `python3 scripts/validate.py [STATION | file.jsonl | cases]` (the rules), `python3 scripts/ids.py [STATION]` (the stable id of new labels), `python3 scripts/client.py` (what the client is told of a detectors' event, from `families.md`; its check), `python3 scripts/cases.py "<text>" [--family F] [--k N]` (the RAG of the cases; it starts the Ollama container `ollama-bge-m3` by itself if it does not answer; `--list` and `--check` without it), `python3 scripts/precedents.py "<text>" [--exclude STATION START END] [--family F] [--k N]` (the RAG of the labels; `--check` without Ollama).
- **For aimsight-app**, which calls them and holds no rule of its own: `validate.check(label, proposed)` (the rules of one label, before it is written in `auto/`), `ids.assign`, `client.message` and `client.action` (the "For the client" columns of `families.md`, per family and per variety). A rename here needs the change there.
- **`manual/` is the expert's, for him alone**: no agent and no process reads or writes there; the whole project (analyst, cases, precedents, benchmark, optimization) uses only `auto/`.