3.7 KiB
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 (add, change or remove, a tool only for a good reason; 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
- Change: 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 (changed or removed).
- 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. - Remove: a tool (or an option, an output) superseded, by what you add or by another tool, or wrong, for a good reason of
<Target>/CLAUDE.md; its commit also removes it fromGUIDE.md. A tool the analyst did not use on this range is not a reason. What<Target>/CLAUDE.mdkeeps from removal (data.py,common.py, a tool named outside the target): left, the removal proposed in "What I decided". - 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:
- Run each changed or added tool on the range, from the root you are called from (
python3 <Target>/scripts/<tool>.py data/<STATION> …), with--startand--endof the range and--out <output folder>/work/tools/; look at each PNG with Read. - Rerun, on the range, the commands of the analysis report that use a changed or removed tool (a removed one: its replacement instead), with
--out <output folder>/work/(replacing theirs, or added if absent): they must still work. - A removal:
grep -rn <its name> <Target>/scripts <Target>/GUIDE.mdshows nothing that still refers to it.
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>: <changed, added, removed or left>, and why(a removal: its good reason and the command that replaces it);- under
## Checks: the trial commands and what they return, figures in<output folder>/work/tools/; thenReport 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.