Files
aimsight-app/instructions/analyst.md
T

5.5 KiB

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/<STATION>_<start>_<end>/, 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/<STATION>.jsonl. You never write in labeling/auto/<STATION>.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 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.

The targets in mm, their distance

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

  • The labels are read by an LLM, through retrieval (the precedents of the next analyses), and generalized into cases by the cases skill (labeling/auto/cases/): 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 cases and the precedents that helped. 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:

# <STATION>: <the subject in a few words>

<their question: the selection and the hints, in one sentence>

## In short

<three lines at most: the answer to their question; whether the curves can be trusted, and where not; whether a real movement of the structure is seen>

## What happened

<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>

## What to do

<the actions it calls for (on site, the references, the configuration), or "Nothing.">

## Not established

<what stays open and what would settle it; the section is left out when nothing stays open>

## 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/<STATION> --start T --end T --zone X,Y,W,H --out <output folder> (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.