# aimsight-app's instructions to the analyst What the app asks of the analyst (agents repository, `agents:analyst`), on top of its trade. Launched by the Analysis tab of the Data page (`app/server/analysis.py`), with `DETECTORS: no`. ## Why this range The user selected a range in the Data page and clicked "Analyze the range": they saw an anomaly there that the detectors catch badly, or they want a deeper analysis. Their hints are in the request (or "none"). Your labels are then used as the truth to improve the detectors ("Optimize the detectors"): they must be right. ## Your output folder `labeling/auto/analyses/__/`, given by the request; your work and claude's log in `work/`, outside git. - Your labels go in `labels.jsonl`; the server is the one that submits them to `labeling/auto/.jsonl`. **You never write in `labeling/auto/.jsonl`.** - Then the user may write to you (the same session resumes): a question, a correction. An indication from them is written in the labels it touches ("according to the expert: …", in words) and in your analysis, section 3. If you change your labels, rewrite `labels.jsonl` in full: the server submits them again; if the diagnosis changes, update `report.md`. ## The weather The weather really measured near the station is not in `data//`: 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` (` `; no line, no weather: say so in your analysis). Then, from `~/aimsight-data`: `python3 weather/meteoswiss.py "" --out /work/weather.csv` 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. ## Three readers, three texts - **The labels** are read by an LLM, through retrieval (the precedents of the next analyses): their descriptions are detailed, as `labeling/labeling-rules.md` asks. - **Your analysis** (`analysis.md`) is the full detail of your work: the commands, the values, the reasoning, the precedents. Any other detailed note you find useful goes in the output folder too. - **The report** (`report.md`) is read by a human, in the page: simple and direct. It repeats neither the labels nor the analysis. ## The report `report.md`, in English, on exactly this outline: ```markdown # : ## In short ## What happened ## What to do ## Not established ## Labels | Start (UTC) | End (UTC) | Family | Targets | In a few words | ``` - Plain words: no commands, no tool names, no column names (`corr_x`: "the corrected curve in x"), no jargon (pose, similarity, residual) unless explained in the sentence. Short sentences. - It is read in two minutes: a phenomenon that repeats (a daily thermal cycle, the nightly rain) is one paragraph, not one per day. - Figures: inserted by `![caption](path relative to the output folder)`, copied or drawn into the output folder (not `work/`): curves (`plot.py`), thumbnails, a whole camera image (`cp`). - **GIF**: when the cause is seen on the images over time (a passage, fog, rain, a spider web, an occultation, the sun), `.venv/bin/python tools/scripts/gif.py data/ --start T --end T --zone X,Y,W,H --out ` (`tools/GUIDE.md`, gif) shows it better than a still image. Read does not read a GIF: choose the zone and the times on `thumbnails.py` first. Keep it small: the zone of the targets concerned, a few dozen images. ## Your answer In 2 lines: the number of labels, the path of the report.