Skip to content

Commit c0c5270

Browse files
sourcehawkclaude
andcommitted
fix(skills/bounding-heavy-commands): give each command of the line its own label, and ask for output from a terminal
Step 5 puts each row line into the entry of its label, so two commands with one label made their rows ambiguous. And when the user runs the line in a terminal, the agent cannot see its output, so it now asks the user for the row lines and the end of the output of each command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 5fcc183 commit c0c5270

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎skills/bounding-heavy-commands/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ The measured run is a real run of the command. Its result counts, also when the
125125
When the record does not exist (§The record, case 5), do steps 1 to 3 for every heavy command of the project. Then measure them all in one run, in place of steps 4 and 5. Do not measure only the command that you need now. A command that gets its entry later gets its first measurement in the middle of someone's work, and that measurement holds the whole queue while other sessions wait.
126126

127127
1. Choose the rows. Measure each command at three `--cpus`: all the machine's processors, half of them, and a quarter of them. Round each one down, use at least 1, and drop a value that is the same as another. A command with `self-bound: none` gets the row at half only: nothing in it reads its `--cpus`, so each row would measure the same command.
128-
2. Write one command line. For each command, write one call of the wrapper with `--measure-rows` and the rows that step 1 chose for it, a `--label` that names the command, the `--exclusive` options of the command, and its bounded command line. Join the calls with `;`, so that a measurement that fails does not stop the others. Write the path of the wrapper in full, so that the line runs in any shell. Run it from the root of the project:
128+
2. Write one command line. For each command, write one call of the wrapper with `--measure-rows` and the rows that step 1 chose for it, a `--label` that names the command and no other command of the line, the `--exclusive` options of the command, and its bounded command line. Join the calls with `;`, so that a measurement that fails does not stop the others. Write the path of the wrapper in full, so that the line runs in any shell. Run it from the root of the project:
129129

130130
```
131131
python3 "<path of the wrapper>" --measure-rows 16,8,4 --label unit-tests -- <bounded command> ; python3 "<path of the wrapper>" --measure-rows 16,8,4 --label lint -- <bounded command>
132132
```
133133

134134
3. Ask the user to run the line when the machine is quiet. Do not run it yourself unless the user asks you to. Your message names the commands and the rows that the line measures. It says that the line can take a long time, and that the first row of each command holds the whole queue, so that the heavy commands of the other sessions wait while it runs. It says how to run the line: type `! <the line>` in this session, or run it in a terminal at the root of the project, or tell you to run it.
135135
4. Act on the answer:
136-
- **The user ran the line.** Read its output into the record (step 5 of this list).
136+
- **The user ran the line.** Read its output into the record (step 5 of this list). When the user ran it in a terminal, you cannot see the output: ask the user for each line that starts with `bounded-run: row`, and for the end of the output of each command, which shows whether the run did its full work.
137137
- **The user tells you to run it.** Run it in the background, with no short timeout around it. Continue with work that runs no heavy command. A heavy command that you need before the line ends runs through the wrapper with no `--memory` option. When the line ends, read its output into the record (step 5 of this list).
138138
- **The user declines.** Run steps 4 to 6 of the list above for the command that you are about to run, and save the record. Each other command gets its entry when an agent first needs it (§The record, case 3).
139139
5. Read the row lines of the output. Each row line of a run that did its full work gives the row at its `cpus`, in the entry of its `label`: its `budget`, its `peak`, and the date. A run did its full work when it exits 0, or when it ran all of its work and reported failures, such as a suite that ran each test and reported the failures. Step 5 of the list above names the runs that stopped early. A row line of such a run gives no row: write nothing for it. The row at half the processors is the default row. When it has no row, the default row is the row with the `--cpus` nearest to half. An entry that has no row is incomplete (§The record), and an agent measures it when it first needs it. Save the record.

0 commit comments

Comments
 (0)