protocol · 7 steps

optimize.

optimize turns “make this number better” into a reproducible hypothesis loop. You define a single scalar metric and a measurement script; the engine — not the LLM — measures every commit and logs a TSV leaderboard, so the result cannot be gamed by a hallucinated number. It pauses for your approval at batch boundaries. At completion it squashes the branch down to baseline..best_commit and ships an MR/PR carrying the leaderboard.

Steps

  1. 01Setupread-only

    Interactive metric elicitation: the metric + direction, termination conditions, noise control, batch size, frozen paths. Writes the validated settings to optimize-state.json (the baseline step later adds the measured baseline to it).

  2. 02Metricread-only

    Author the measurement script — prints exactly one float, exit 0, deterministic. Validated by a double-run stability gate before you can advance.

  3. 03Baselinemeasure

    Capture the baseline metric on HEAD; project total cost from real timing.

  4. 04Experimentationmany runs

    The hypothesis loop: one hypothesis = one focused commit. The engine measures each commit. Checkpoints between batches return to discussion for your approval.

    many agents fan out in parallel
  5. 05Synthesissynthesize

    Findings document, plus a non-blocking metric-gaming audit.

  6. 06Code-reviewspec gate

    Full two-stage gate on the cumulative baseline..best_commit diff.

    OpusAntigravityCodex
  7. 07Completiondocs · push

    Squash from best_commit; ship the leaderboard as the MR/PR description.

    writes back to the shared LLM wiki

What makes it distinctive

Engine-owned measurement

The engine runs the metric script on every commit and writes the TSV leaderboard. The LLM’s reported numbers are untrusted — the leaderboard is the single source of truth, so it cannot be gamed.

Frozen paths

During experimentation, the metric script and test files are frozen — a hook physically blocks edits to them even in implementation mode. You can’t move the goalposts mid-experiment.

Batch checkpoints

After each batch of hypotheses the protocol returns DAIC to discussion for your approval before continuing — keeping a human in the loop on an otherwise mechanical loop.

branch optimize/ — o-<name>