You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d371b1d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(skills/bounding-heavy-commands): key an entry on its command without the row values, and pass --cpus to a smaller row
The command line of an entry carries the --memory and --cpus of its default row. So two entries of one command with different default rows did not merge, and a change of the default row read as a new command whose rows must be deleted. Both rules now ignore those two values. The measurement of a smaller row now names its --cpus and --memory in place of the values of the command line; before, it named only --memory, and the run used the --cpus of the default row. An entry of the older shape is complete only when its command line reads BOUNDED_RUN_CPUS, because a memory setting alone can be one that covers a single process, which discovery does not accept as a bound.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: skills/bounding-heavy-commands/SKILL.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,21 +68,21 @@ Each heavy command has one entry, in this shape:
68
68
69
69
A budget is valid only at the `--cpus` of its row. The same command at more processors runs more things at once and needs more memory. So each row is a different measured command, and a run takes its `--cpus` and its `--memory` from one row. The command line of the entry carries the values of the default row. To use a different row, replace both values with the values of that row.
70
70
71
-
The table has one row for each `--cpus`. A measurement at a `--cpus` that has no row adds a row. A measurement at a `--cpus` that has a row replaces that row. Never delete a row because a different `--cpus` was measured. Two entries with the same command line are one entry: keep one, with the rows of both, and where both have a row at the same `--cpus`, keep the newer one. One row is the default row. A run uses it when nothing asks for a different one.
71
+
The table has one row for each `--cpus`. A measurement at a `--cpus` that has no row adds a row. A measurement at a `--cpus` that has a row replaces that row. Never delete a row because a different `--cpus` was measured. Two entries whose command lines differ only in the values of `--memory` and `--cpus` are one entry: keep one, with the rows of both, and where both have a row at the same `--cpus`, keep the newer one. One row is the default row. A run uses it when nothing asks for a different one.
72
72
73
-
An entry is complete when it has a `self-bound` field and at least one row. An entry without the `self-bound` field is incomplete, also when it has a budget: its budget can be the peak of a command that nothing limits. An entry from an older shape of this record, with one budget and no table, is complete in one case only: its command line passes `--cpus` and reads `BOUNDED_RUN_CPUS` or `BOUNDED_RUN_MEMORY_MIB`. Then rewrite it into this shape. The setting that reads the variable is its `self-bound`, and its budget, peak, and date become the default row at that `--cpus`.
73
+
An entry is complete when it has a `self-bound` field and at least one row. An entry without the `self-bound` field is incomplete, also when it has a budget: its budget can be the peak of a command that nothing limits. An entry from an older shape of this record, with one budget and no table, is complete in one case only: its command line passes `--cpus` and reads `BOUNDED_RUN_CPUS`. Then rewrite it into this shape. The setting that reads the variable is its `self-bound`, and its budget, peak, and date become the default row at that `--cpus`.
74
74
75
75
Then, before each heavy command, use the first case that applies:
76
76
77
77
1.**Your prompt carries bounded command lines.** You are a subagent. Use them under the rule that your prompt gives with them, and run no discovery. For a heavy command that your prompt does not carry, use the wrapper with no `--memory` option.
78
78
2.**The record exists and has a complete entry for the command.** Check that the plain command still exists in the project, and that the file of the wrapper in the command line still exists. When the file of the wrapper is not there, an update of the plugin moved it. The command line in §The wrapper shows the correct path: put it into each command line of the record. Then use the bounded command line with the default row.
79
-
3.**The record exists, and the command is not in it, its entry is incomplete, or its entry is no longer correct.** Run the discovery for that command and correct the entry. When the command line changes, its rows measured a different command: delete them, and measure the new command line. Remove an entry whose command the project no longer has.
79
+
3.**The record exists, and the command is not in it, its entry is incomplete, or its entry is no longer correct.** Run the discovery for that command and correct the entry. When the command line changes in more than the values of `--memory` and `--cpus`, its rows measured a different command: delete them, and measure the new command line. Remove an entry whose command the project no longer has.
80
80
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.
81
81
5.**Project memory is on, and the record does not exist.** Run the discovery for the commands that you are about to run, and save the record. The measured runs of the discovery are your first heavy runs. A heavy command of the project that you do not run now gets its entry when an agent first needs it.
82
82
83
83
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.
84
84
85
-
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, and it gets a slot sooner. It is a different measured command, not a lower budget for the same command. 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 at half the smallest `--cpus` of the table, rounded down, with `--measure --memory <budget of the smallest row>`, and add the row, so that the next run can use it. The smaller command never needs more than that budget, and with `--memory` the measurement does not take the whole queue. At `--cpus 1` no smaller command exists. Keep the default row as it is, unless the user wants the smaller `--cpus` for each run.
85
+
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, and it gets a slot sooner. It is a different measured command, not a lower budget for the same command. 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. The smaller command never needs more than that budget, and with `--memory` the measurement does not take the whole queue. At `--cpus 1` no smaller command exists. Keep the default row as it is, unless the user wants the smaller `--cpus` for each run.
86
86
87
87
A part of a recorded command (one test file, one target) uses the bounded command line of the full command, with a row of its entry and its exclusive resources, and the narrower arguments at the end of the line. It needs no entry of its own and no measurement, because the budget of the full command is sufficient for each part of it.
0 commit comments