--- name: hillclimb description: "Sustained, scientific improvement of one metric against a target. Use for 'hillclimb on X', 'make startup 50% faster', 'systematically drive down a metric', or 'keep trying until the metric improves by N%'. Skip for a one-off fix." --- # Hillclimb Standalone skill. Do not require `/poteto-mode` first. Read `../pstack-harness/SKILL.md` before using delegation, model configuration, or long-running work. **You own the metric and the experiment's integrity. Supervise and review; delegate the attempts.** For sustained, iterative improvement of one measurable thing against a target ("hillclimb on X", "make startup 50% faster", "systematically drive down ", "keep trying until improves by N%"). A one-off fix is not this skill; this is the loop. Core discipline: one change, one measurement, keep or revert. Never stack untested changes, and never claim a win from code inspection. The data decides (the **principle-prove-it-works** skill). 1. Ground the workload and architecture before choosing the ruler. Run the **how** skill over the target, name the realistic workload dimensions that can move the result (data size, history, state, concurrency), and select a case that reproduces the user's complaint. If no case reproduces it, fix the repro instead of hillclimbing. Then fix one metric, the direction that counts as better, and a checkable stop predicate that pairs a target with a floor on attempts so a lucky early win can't end the run (the example "at least 50% better than baseline and at least 10 iterations" is this shape). Use the user's numbers when given, otherwise agree them. 2. Build the measurement harness, prove its sensitivity, then freeze it: a measurement you trust is the lever the whole run pulls on. Run contrasting realistic workloads and confirm the target case reproduces the symptom while easier cases separate as expected. If the ruler cannot distinguish them, revise the workload or metric. Once frozen, one repeatable command emits the metric, sampled enough to clear the noise (median of N, not a single run); changing it invalidates every earlier number. Record the baseline metric and a green run of the regression gate (the tests that must keep passing) before any change. 3. Open the decision log via the **show-me-your-work** skill. A `decision.tsv`, one row per attempt: id, hypothesis, change, before, after, delta, tests, verdict (kept or reverted), note. This is the run's memory. Read it before each attempt so the search accumulates instead of circling. Keep it out of the tree (gitignored) so it survives reverts. 4. Ground each hypothesis in the architecture model from step 1, so it names a specific mechanism ("defer X off the boot path because it blocks first paint"), not "try memoizing something". 5. Loop, one hypothesis per iteration: - Hand the change to a subagent using the configured hillclimb model, or inherit the parent model, with a tight scope; supervise and review the diff rather than typing it (the **principle-guard-the-context-window** skill). When delegation is unavailable, implement in the parent and disclose the fallback. When several independent hypotheses are live, fan them to parallel subagents, each in its own worktree so they can't collide. - Measure before and after with the frozen harness, and run the regression gate. - Accept only when the metric moves past noise and the gate stays green. Otherwise revert the change in full; a tweak that "might help" does not ride along. - One commit per accepted fix, staging only the files you changed (`git add `, never `-A`). Log the row either way, kept or reverted. Each iteration ends in a check before the next begins. If the run is unattended, use the long-running work capability in `../pstack-harness/SKILL.md` (recurring goal, loop, scheduler, or a bounded poll with an explicit interval, deadline, and exit predicate). This skill's stop criteria below govern, so a plateau means pivot, not stop. 6. Push past the first plateau. On a stall, several rejects in a row, pivot category, combine near-misses, re-read the source, or try something more radical before concluding the hill is climbed. Correctness and simplicity outrank the number. Revert a win that breaks behavior, and keep a simplification that holds the number. 7. Stop when the predicate is met, or when the remaining ideas are genuinely marginal and not worth their cost. Don't relax the predicate to declare victory, and don't quit while cheap untried hypotheses remain. If you are stuck, surface it instead of spinning. 8. Open a PR with the accepted commits stacked in the order they landed, so the metric's climb reads top to bottom. **Reply:** the metric and target, baseline to final with the percent delta, iterations run (kept vs reverted), each accepted fix on one line, the `decision.tsv` path, and the best idea you would try next if pushed further.