---
name: optimizer
description: /optimizer <scope> — dispatch the optimizer agent on a service or one hot path; its one optimization today is the workload-driven schema and cache review. User-invoked only; the model never loads this on its own.
disable-model-invocation: true
---

# /optimizer — the user's door to the workload review

The optimizer tunes a system against the traffic it actually serves. Its one optimization today is the **schema and cache review**; another optimization joins as its own reference set beside the three below. The review is the **`optimizer` agent** (`.claude/agents/optimizer.md` in a consumer repo, `agents/optimizer.md` in etna), and it runs only when the user asks. This command is that ask: `/optimizer broker`, `/optimizer the token refresh path`.

1. **Dispatch the `optimizer` agent** with the argument as its scope, word for word. No argument ⇒ ask for one and dispatch nothing.
2. **Stop 1 — the workload.** Relay the agent's workload report as it came: the traffic it found or the synthetic table it built, its assumptions, its question about where real traffic lives, and the price of the fan-out. The user confirms, corrects or points at data; never answer for them.
3. **Carry the answer back** as a further dispatch to the same agent, the user's words verbatim. The fan-out starts only on a confirmed workload.
4. **Stop 2 — the verdict.** Relay the verdict in full: what is adopted, rejected and deferred with each reason, the cost after, and every open question. A plan is written from it only on the user's word, through the normal plan pass.

This folder also carries what the agent reads, so it ships wherever the agent does:

| Path | Read by |
| --- | --- |
| `references/workload.md` | the agent — finding real traffic, the synthetic workload, the three temperatures, the cost trace, stop 1 |
| `references/indexes.md` | the agent — the read and write ledgers, synthetic before production and measured after, and the index decision |
| `references/techniques.md` | the agent and every optimizer it briefs — the allowed techniques, what is out of bounds, the correctness limits |
| `references/judging.md` | the agent — the briefs, the frame review, the judgment, the tracers, the verdict, stop 2 |
