CodeVetter

Local optimization laboratory

Profile a flow. Prove the change.

CodeVetter gives a coding agent a bounded loop for finding a local bottleneck, proposing one small experiment, and retaining it only when correctness and repeated before/after evidence agree. The compact current path targets repository-owned JavaScript, Node.js, and Go tests and benchmarks; it does not treat a plausible edit as an optimization.

One bounded loop

The machine receipt is authoritative. Every stage records source identity, tested boundary, decision, and limitations so another agent can continue without guessing.

  1. 01DiscoverSelect one executable local test or benchmark flow.
  2. 02MeasureCapture repeatable timing, CPU, allocation, and memory evidence supported by that flow.
  3. 03DiagnoseRank source-backed bottlenecks while separating observation from inference.
  4. 04ExperimentGive the coding agent one bounded candidate and reject disproportionate patches.
  5. 05VerifyRun exact correctness and repeated before/after measurements before retaining anything.

JavaScript and Node.js

Exact Node, Vitest, and Jest selections with repeated console metrics, CPU source attribution, sampled allocation evidence, and process-tree memory where observable.

Go

Repository-owned tests and benchmarks with ns/op, bytes/op, allocs/op, bounded profile sources, paired measurements, and explicit evidence gaps.

Shipping guardrails

A faster patch still has to earn its size.