Support tab (agents:support on a range with a question, instructions/support.md, its answer in labeling/auto/support/); the weather read from data/<STATION>/weather/ (pumped), no call to MeteoSwiss from the app; plots in mm (corr_x_mm, corr_y_mm); analyst instructions: the weather pumped, the targets in mm and their distance

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-18 07:17:51 +01:00
1 parent 60d10a282c
commit 161fb0212f
12 files changed
+414 -104

No files matched your search

+6 -4
View File
@@ -15,11 +15,13 @@ The user selected a range in the Data page and clicked "Analyze the range": they
## The weather
The weather really measured near the station is not in `data/<STATION>/`: fetch it at the start, for every analysis, and read it with the other causes (rain, fog, wind, sun, frost, cold air). The place of the station is its line in `~/aimsight-data/extraction/stations.txt` (`<STATION> <place>`; no line, no weather: say so in your analysis). Then, from `~/aimsight-data`:
The weather really measured near the station is in `data/<STATION>/weather/`, one CSV per day (`tools/DATA.md`, "The weather"): read it at the start, for every analysis, with the other causes (rain, fog, wind, sun, frost, cold air). Hourly, UTC; the MeteoSwiss station and its distance are in the columns `station_name`, `distance_km`: give them in your analysis. No folder, or no day of your range: no weather (station without a Swiss position): say so in your analysis. It is the weather a few km away, not at the camera: what the images show prevails.
`python3 weather/meteoswiss.py "<place>" <start> <end> --out <output folder>/work/weather.csv`
## The targets in mm, their distance
hourly, UTC, `end` excluded; the MeteoSwiss station chosen and its distance are written on stderr: give them in your analysis. It is the weather a few km away, not at the camera: what the images show prevails.
`inventory.py` gives each target's distance from the camera, and `corr_x_mm`, `corr_y_mm` are `corr_x`, `corr_y` in mm (`tools/DATA.md`, "The targets"). The same curves: what is labelled is what stands out from the noise, in px or in mm, and a target's deviation in its own noises is the same in both units, so the threshold does not change. One event seen in px and in mm is one label.
The scale changes with the distance: a far target moves few px for many mm, a near one the reverse. So never compare targets with each other in px alone ("it moves more than the others", "they all move alike"): in mm, or in px with their distance. The distance also tells the camera from the structure: a camera that turns shifts every target by about the same px, so the mm grow with the distance; a movement of the structure of the same mm gives px that shrink with the distance; a parallax shows between targets at different distances. Use the mm if they help, px and distance otherwise; give the magnitudes in mm in the report. A target without a sure factor has no mm (`?` in `inventory.py`): say it in px.
## Three readers, three texts
@@ -42,7 +44,7 @@ hourly, UTC, `end` excluded; the MeteoSwiss station chosen and its distance are
## What happened
<one short paragraph per phenomenon, not per label: when (UTC), which targets, how far the curves are wrong, the cause and how sure you are (confirmed / likely / possible / unknown)>
<one short paragraph per phenomenon, not per label: when (UTC), which targets, how far the curves are wrong (in mm where the targets have them), the cause and how sure you are (confirmed / likely / possible / unknown)>
<one figure or GIF per phenomenon at most, the one that proves it, followed by one line saying what to look at>
+63
View File
@@ -0,0 +1,63 @@
# aimsight-app's instructions to the support
What the app asks of the support (agents repository, `agents:support`), on top of its trade. Launched by the Support tab of the Data page (`app/server/support.py`).
## Why this request
The user, the expert at the control station, selected a range of a station in the Data page and asked you a question about it (`Question` in the request). It can be about anything: what happened on the curves, whether a client can be told something, why the detectors fired or stayed silent, a fact about the station or the product, a draft reply to a client. The range is where they were looking: the context of the question, not its limit.
## How you go about it: your judgment
- **Yourself**, when it is simple: a fact to look up, what the labels and the analyses already say of the range (`labeling/auto/<STATION>.jsonl`, `labeling/auto/analyses/<STATION>_*/`, the earlier support folders), a short reading of the data, one figure. A label with `review` was validated by the expert: take it as established.
- **Through the analyst**, when the answer needs a reading of the range like the expert's: on the range given, or a wider one (the night before, the whole week to see whether it repeats) or a narrower one. You choose, and say which and why in your answer. One analyst per question: a follow-up resumes its session.
- Only what the answer needs: a question that the existing labels already answer needs no analyst.
## In this process
- You run under `claude -p`, launched by the server: nobody can answer you during your turn. A question that cannot be answered without a precision: ask it in your last message and stop; the user answers in the page, and the same session resumes.
- Launch the analyst **in the foreground**, not with `run_in_background`: under `claude -p`, a run left in the background can be cut when your turn ends. The server lets a command last up to 3 hours: no timeout to give.
- Your folder is the `Output folder` of the request: `labeling/auto/support/<STATION>_<start>_<end>/` (the same as `~/aimsight-labeling/auto/support/`). The server writes `request.json` there, and `log.jsonl` and `session` in `work/`: leave them. The rest as your trade says.
- Your analyst's labels stay in `analyst/`, submitted nowhere: made with the detectors' events as hints, they are not the truth the detectors are improved on. When they should become reference labels, say so in your answer: the user runs an Analysis of the range (the Analysis tab).
## The answer
`answer.md` is shown in the page, under the question: read by the expert, in two minutes. In English; a text meant for a client is in the client's language, in its own section, written as your trade says (an answer to a client).
```markdown
# <STATION>: <the subject in a few words>
<their question, in one sentence>
## In short
<three lines at most: the answer (yes, no, or it cannot be said) and why>
## How it was established
<the facts that found it, one short paragraph each: when (UTC), which targets, what the curves and the images show, how sure (confirmed / likely / possible / unknown); what you read for it (the labels, an analysis and its path, the knowledge base); whether you called the analyst, on which range and why>
<one figure or GIF per fact at most, the one that proves it, followed by one line saying what to look at>
## What to do
<the actions it calls for (on site, the references, the configuration, the labels); left out when there is none>
## Not established
<what stays open and what would settle it; left out when nothing stays open>
## For the client
<the text for the client, ready to copy; only when the question asks for one>
```
- Plain words, short sentences: no commands, no column names (`corr_x`: "the corrected curve in x"), no jargon unless explained in the sentence. The internal names (a detector, an event code, a tool) only when the question is about them, and never in the client's text.
- Figures: `![caption](path relative to your folder)`, in your folder, not in `work/`: the page serves your folder and nothing else (the analyst's figures in `analyst/` included). When the cause is seen on the images over time, a GIF (`tools/scripts/gif.py`, `tools/GUIDE.md`) shows it better than a still image; keep it small.
## The messages
Then the user may write to you (the same session resumes): a precision, a correction, another question on the same range. Rewrite `answer.md` in full: the page shows it again. An indication from them goes in it, in words ("according to the expert: …").
## Your answer
In 2 lines: the path of `answer.md`, and whether you called the analyst (on which range). The page shows `answer.md`: do not repeat it.