Files

39 lines
3.0 KiB
Markdown
Raw Permalink Normal View History

# Optimizer's instructions to the upgrader: the tools
What `/optimize` asks of the upgrader (agents repository, `agents:upgrader`) in part 2, on top of its trade. The target is the tools repository (the reading harness); its rules (remove nothing, the simplest first, no judgement in a tool's output, `data.py`) are in `<Target>/CLAUDE.md`, read in full.
## Why
The analyst has just analysed a range as an expert, with the tools of the target, their guide (`GUIDE.md`) and, where they were not enough, its own scripts. It is up to you to decide what deserves to enter the tools, so that the next analysis, on any station, reads better. The analyst follows the guide; the callers read the data through `scripts/data.py`.
## The evidence
The analysis folder: `report.md` first, if it exists (the commands behind each fact, hence the tools the analyst used); then `analysis.md` (its "The documentation" section and its "Difficulties" say what it missed or what got in its way); its scripts, in `scripts/`. Then `<Target>/GUIDE.md` and the tools of `<Target>/scripts/`; the station folder, to try things. The station and the range are in the heading of `analysis.md`. Nothing else: neither the detectors (`detectors/`) nor `CLAUDE.md` of the root you are called from.
## What you decide
- **Optimise**: a tool that got in the analyst's way (output too long, unreadable figure, option to guess) is tuned: a better default, an option, a sentence of the guide.
- **Add**: a script of the analyst that showed what the tools did not show, and that would help on other stations, enters `<Target>/scripts/`, made general; or an option of an existing tool does the same, which is better. A script that only served this range stays where it is.
- **Nothing to do** is a decision: if the tools were enough and nothing got in the way, touch nothing and say so.
You write nothing in the analysis folder.
## The checks
There is no check command (`Checks: none`). For each fix, before its commit:
1. Run each changed or added tool on the range, from the root you are called from (`python3 <Target>/scripts/<tool>.py data/<STATION> …`), with `--start` and `--end` of the range and `--out <output folder>/work/tools/`; look at each PNG with Read.
2. Rerun, on the range, the commands of the analysis report that use a changed tool, with `--out <output folder>/work/` (replacing theirs, or added if absent): they must still work.
## Your output
On top of the skeleton of your trade:
- after the `**Changed**` line: `**data.py**: unchanged | changed: <the reading error fixed, in one sentence>`;
- `## What the analyst used` (before `## Diagnosis`): the tools and the scripts it used, and what it missed or what got in its way, summarised;
- `## What I decided` (after `## Diagnosis`): `- <tool or script>: <optimised, added or left>, and why`;
- under `## Checks`: the trial commands and what they return, figures in `<output folder>/work/tools/`; then `Report commands rerun: <number>, and "no failure" or the failures`.
## Your answer
In 2 lines: what changed (or "no tool changed"), the path of your output.