Skip to content

Commit 1f53642

Browse files
sourcehawkclaude
andcommitted
fix(skills/bounding-heavy-commands): change a row when the suggested budget moves, not only the peak
Under the hard cap the suggested budget follows the held memory, so it can change while the full peak stays the same. The record rule changed a row only when the peak moved, so an agent kept a budget that the wrapper no longer suggested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8fa8e02 commit 1f53642

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Then, before each heavy command, use the first case that applies:
107107
4. **Your harness has no project memory, or it is off.** You cannot save a record, so do not try. Run the discovery in this session, keep the result in your context, and use the wrapper's default budget for anything you could not measure.
108108
5. **Project memory is on, and the record does not exist.** Run the discovery for every heavy command of the project, not only for the command that you are about to run, and measure them all with one command line that the user runs (§Measure the whole project). While you wait for the answer of the user and for the line, run a heavy command that you need through the wrapper, as its bounded command line at `--cpus` of half the machine's processors, with no `--memory` option.
109109

110-
A budget is a measurement, not a preference. Change a row only when the wrapper's output at the `--cpus` of that row shows that the peak moved, and write the new peak and date in it.
110+
A budget is a measurement, not a preference. Change a row only when the wrapper's output at the `--cpus` of that row shows that the suggested budget moved, and write the new budget, peak, and date in it. Under the hard cap the budget follows `held`, so it can move while `peak` stays the same.
111111

112112
To make a run start sooner, use a row at a smaller `--cpus`. That command runs fewer things at once, so its peak and its budget are smaller. It gets a slot sooner only when its budget needs fewer slots of the queue than the budget of the default row. It is a different measured command, not a lower budget for the same command. This works only for a command whose `self-bound` reads `BOUNDED_RUN_CPUS`. For any other command, a smaller `--cpus` does not make the command run fewer things at once: keep the run in the queue, and measure no smaller row. When the entry has no row at a smaller `--cpus`, the current run cannot start sooner: keep it in the queue. Then measure the command with `--measure`, with `--cpus` at half the smallest `--cpus` of the table, rounded down, and with `--memory` at the budget of the smallest row, in place of the two values of the command line, and add the row, so that the next run can use it. A command that runs fewer things at once seldom needs more than that budget, and with `--memory` the measurement does not take the whole queue. When the hard cap stops it, measure it again with two times that budget, as step 5 of §Discovery says. At `--cpus 1` no smaller command exists. Keep the default row as it is, unless the user wants the smaller `--cpus` for each run.
113113

0 commit comments

Comments
 (0)