# 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/.jsonl`, `labeling/auto/analyses/_*/`, 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/__/` (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 # : ## In short ## How it was established ## What to do ## Not established ## For the client ``` - 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.