Repository navigation
feat(measure): answer or vet a number with its spread and limiter - #72
Conversation
A number such as a speedup, a size, or an eval score means little without its run count, spread, and what limits it, and a reported speedup often turns out to be noise or skipped work. The measure skill answers a question about a number, or vets one someone else reported: - Write the claim sentence and the decision it feeds before running. - Script the comparison: both sides alternating, each run's output checked so skipped or cached work shows up, raw values plus median and range. A deterministic number needs two identical runs. - Check the machine's load, run each side at least 5 times, and record the baseline's spread as the noise floor. - Answer seven questions with evidence: limiter, production tuning, physical limits, errors, reproduction, end-to-end effect, and whether the work ran. - Lead with the verdict (faster, slower, no difference, inconclusive); a number about the agent's own change gets its verdict from a fresh subagent. One number in the reply, run details in a linked file. - Eval scores follow the same steps, with trials as runs. Chef routes a number to measure, compare, or vet to the new skill. Its explain-the-number principle keeps the rule and its Test; the performance and eval checklists moved into the skill, so the two don't hold the same checklist twice.
- vet-speedup-inside-noise: a PR claims 14% from one run per side; the change can't move the number, so repeated runs show no difference. - vet-faster-side-skipped-work: a streaming export claims 13x, but it stops at the first malformed row and writes 5% of the rows. - measure-dedupe-gap: a real quadratic-to-linear speedup, where the whole-run time of the new side is mostly process startup.
Eval runs on a speedup inside the noise stopped at 15 to 20 runs per side, and one reported two rounds with no combined answer; runs without the skill did 30 to 60 runs and won the blind ranking. Runs now keep adding alternating runs while the gap is close to the spread and pool every round into one median and range per side. The fresh-subagent verdict now applies to a change the agent wrote in this session; one run applied it to the user's own change and printed a stray note about it. The claim and report examples no longer use an export, which an eval fixture also uses.
There was a problem hiding this comment.
ℹ️ No blocking issues — two non-blocking findings below.
Approach: sound — a dedicated skill with an explicit verdict, a script, and a spread and limiter check fills a gap chef only stated as a principle, and the change is additive.
Reviewed changes
Reviewed all 34 files across the 3 commits.
skills/measure/SKILL.md— six-step flow (claim, script, run, question the number, verdict, report) plus an eval-score section; the performance and eval checklists moved here from chef.- Registration —
.claude-plugin/plugin.jsonentry (satisfies theskills-listedcheck), README Building row, andagents/openai.yaml. chefrouting — one new routing line inskills/chef/SKILL.md;explain-the-number.mdkeeps its rule, bullets, and Test.- Eval cases —
vet-speedup-inside-noise,vet-faster-side-skipped-work, andmeasure-dedupe-gap, each with a Node fixture built bybuild.sh,lib.sh,place-files.sh, and graders.
Non-blocking
- Chef's principle and
measuredisagree on what to do near the noise.skills/chef/references/explain-the-number.mdline 5 still says "Stop when the run-to-run spread is larger than the effect", whileskills/measure/SKILL.mdstep 3 says to keep adding alternating runs when the gap is close to the spread. An agent that loads only chef gets the opposite instruction, and round 1 of the PR's own evals lost the noise case over this stopping behaviour. Consider rewording the chef bullet to defer tomeasure(for example "…the effect is inside the spread: add runs, see measure"). - The "gap smaller than the spread is no difference" rule has no run cap and drifts toward "no difference". In
skills/measure/SKILL.mdsteps 3 and 5, the pooled range can only widen as runs are added. A real but small effect therefore never separates from the range, and "keep adding runs until the verdict stops moving" has no stopping point. A run cap, or an interval or quantile-based spread, would make the rule terminate and keep it from always settling on "no difference".
claude-sonnet-5-5 | 𝕏
… half A pooled min-to-max range only widens as runs are added, so a small real effect could never clear it and the run had no stopping point. Near the noise, runs now stop at 30 per side and the gap is judged against the middle half of each side's runs. Chef's explain-the-number principle no longer says to stop when the spread is larger than the effect, which contradicted the measure skill; the procedure lives in the skill.
|
Thanks, both findings checked against the code and fixed in fe5419f:
|
There was a problem hiding this comment.
ℹ️ No blocking issues — one non-blocking finding below.
Reviewed changes
Reviewed the one commit added since the prior pullfrog review (fe5419f), which addresses both earlier non-blocking notes.
- Capped the near-noise run loop —
skills/measure/SKILL.mdstep 3 now adds alternating runs up to 30 per side instead of "until the verdict stops moving". - Judged the gap by the middle half of runs — step 3 compares the medians' gap against the middle half of each side's runs, since the full range only widens as runs are added.
- Aligned chef's principle with
measure—skills/chef/references/explain-the-number.mddrops "Stop when the run-to-run spread is larger than the effect", so chef no longer contradictsmeasure.
Non-blocking
- "Spread" is defined three ways, and the cap has no stated outcome. Step 3 judges the gap against the middle half, but step 2's script prints the "range", step 5 says "a gap smaller than the run-to-run spread is no difference", and step 6's example reports ranges, so an agent can still apply the full range the new text warns against. Step 3 also doesn't say what the verdict is when 30 runs per side leave the gap near the spread (presumably inconclusive). Naming the middle half in steps 2 and 5, and the cap outcome in step 3, would close both.
claude-sonnet-5-5 | 𝕏
The verdict rule said "spread" while the run step judged near the noise by the middle half, so an agent could still compare against the full range. The script now prints each side's middle half, and the verdict step judges the gap against it, including after the 30-run cap.
|
Fixed in 36aa22a: the script in step 2 now prints each side's middle half (25th to 75th percentile) next to the median and range. Step 3 adds runs while the gap is close to the middle half, and step 5 states the verdict rule once: a gap inside the middle half is no difference, including after 30 runs per side. The report still shows the range, as the plan asks. |
There was a problem hiding this comment.
ℹ️ No blocking issues — one non-blocking finding below.
Reviewed changes
Reviewed the one commit added since the prior pullfrog review (fe5419f), which addresses both points from that review.
- Named the middle half in the script step —
skills/measure/SKILL.mdstep 2 now has the script print median, middle half (25th to 75th percentile) and range, and step 3's "done" condition lists the middle half. - Judged the verdict by the middle half — step 5 compares the gap between medians against each side's middle half, replacing "run-to-run spread".
- Stated the cap outcome — a gap inside the middle half is "no difference, also after 30 runs per side", so the run cap now ends in a verdict.
Non-blocking
- The report still shows ranges while the verdict is judged on the middle half. Step 6's example reports "ranges 798–830 ms and 560–592 ms" and step 3's noise floor says "run-to-run spread", so a reader can't check the verdict from the number in the reply. Reporting the middle half next to the median (or saying which statistic the quoted range is) would let the report back the verdict. Related: the middle half doesn't shrink as runs are added, so an effect smaller than it always lands on "no difference"; that looks like an intended trade-off, but worth being deliberate about.
claude-sonnet-5-5 | 𝕏
|
Leaving this one as is, on purpose:
|

Why
A number such as a speedup, a size, a memory figure or an eval score means little on its own. It needs to come with how many runs produced it, how much it moves between runs, and what limits it. A reported speedup often turns out to be noise, or the "faster" side skipped part of the work. No fstack skill handled this until now. Chef's explain-the-number principle stated the rule, but only chef loads it, and it gives no steps to follow. This PR adds
measure. It answers a question about a number, or checks a number someone else reported, and puts the verdict first: faster, slower, no difference or inconclusive. Later flows, such as finding a root cause or improving performance, can use it, and users can call it directly.What
skills/measure/(SKILL.md, 40 lines, plusagents/openai.yaml). The agent can start it on its own when a question needs a number measured, or when someone else's number needs checking. Its steps:chef: one new routing line, "A number to measure, compare, or vet → measure". Chef'sexplain-the-number.mdprinciple keeps its rule, its four bullets and its Test. Its performance and eval checklists moved into the skill, so they now live in one place..claude-plugin/plugin.jsonand the README skills table.vet-speedup-inside-noise: a PR claims a 14% speedup from one run per side. The change can't affect the benchmark, so repeated runs show no difference.vet-faster-side-skipped-work: a streaming export claims to be 13x faster. It actually stops at the first bad row and writes 5% of the rows, while printing the same warning as main.measure-dedupe-gap: a real quadratic-to-linear speedup. On the new side, most of the whole-command time is Node starting up.Choices made:
measureis the plan's name for this flow and the word users say.Merge danger
Reversible: yes. The PR only adds skill text and eval fixtures.
Blast radius: small. Questions about speed, size, memory or eval scores, and requests to check a reported number, will now load
measure. The only existing files that change are chef's routing line and its explain-the-number principle.How to test
Automated:
markdownlint-cli2finds 0 issues across 97 files. Theskills-listedmanifest check passes.Evals: round 1 had 3 runs per case per configuration, 18 runs in total. Each case had one blind grader that saw shuffled labels and action logs with every read of the skill removed. "Without skill" means the same skill folder with
measureremoved.Round 1 lost the noise case. Runs without the skill did 30 to 60 alternating runs and gave one pooled answer. Runs with the skill stopped at 15 to 20 runs, and one reported two rounds with no combined result. The fix in the last commit makes runs keep adding alternating runs near the noise and pool them. Round 2 reran the noise case on the final wording, 3 runs per configuration in one wave. Assertions were 12/12 in both configurations. Mean blind rank was 3.7 with the skill and 3.3 without, compared with 5.0 and 2.0 in round 1. At 3 runs, that remaining gap is within noise. Wall time was a median of 139 s with the skill and 87 s without.
Round 1 also had one run that applied the fresh-agent rule to the user's own change and printed a stray note about it. The rule now applies only to a change the agent wrote in this session, and 0 of 2 reruns printed the note.
The skill was loaded from its description in all 14 runs that had it. A grep of every transcript found no Skill tool calls and no reads of the graders.
Cost: with the skill, runs take about 20% more wall time and write about twice the output tokens, mostly for the script and the details file.
Not covered by the evals: size, memory and eval-score questions. Every case measures speed.