Run an iterative, measured optimization loop — try an idea, benchmark it, keep what improves the metric, revert what doesn't, repeat — leaving an auditable trail of commits. Use this when the user wants to ITERATIVELY optimize a measurable target and expects to try many attempts: speeding up a test suite or build, shrinking a bundle/binary, cutting latency or memory, tuning hyperparameters to lower a loss, raising a Lighthouse/benchmark score. Strong fit when the metric is NOISY (needs repeated runs to trust), correctness must be preserved while optimizing, or a reviewable record of what was tried and kept matters. Trigger for "run autoresearch", "optimize X in a loop", "set up experiments to make X faster", "keep trying changes until the benchmark improves", "tune this until the loss is low", or "measure it properly, don't guess". Less suited to one-shot fixes you already know — see the "When NOT to use this" note before reaching for it on trivial changes.
2026-06-06