Optimize Agentic Workload
Use this worker when the workload is an agentic loop: an LLM that plans over
multiple turns and calls tools (web search, retrieval, REST/SDK calls, code
execution) before finishing. Freeze every non-target variable within each
experiment; model/route comparisons hold the tools fixed, while a named
implementation arm may isolate one deployable tool, app, or harness change. The
goal is to pick the route and implementation you would ship on a
multi-objective basis — quality and latency and cost (and, for workflows
that write, side-effect safety). The route is backend-agnostic: use the existing
harness, provider-native evaluation or training, the public CLI, or a small
versioned app/harness change when the measured failure calls for it.
The one discriminator that changes the playbook is whether the loop
mutates state:
- Read-only search loops — web/agentic search, retrieval, lookup tools.
Success depends on how the agent searches and the final answer; determinism
comes from snapshotting live tool outputs. Harness specifics:
references/read-only-search.md.
- State-mutating API workflows — the agent discovers or selects endpoints,
follows policy docs, performs writes across business systems, and is judged
by final state plus policy compliance. Determinism comes from seeded,
resettable state; safety (no forbidden writes) is a first-class objective.
Harness specifics:
references/state-mutating-workflows.md.
Everything else — the artifact contract, measured baseline, workload-specific
decision contract, evidence-driven intervention choice, and stronger RL gates —
is shared.
This is not the RL handoff skill. Reach for
../prepare-verifier-handoff/SKILL.md
only when the evidence shows the residual requires reinforcement learning of
stateful behavior and its reward and renderer gates pass. Supervised
fine-tuning or distillation is a separate intervention and can be selected
earlier when correction labels or deterministic verifier targets support it.
Safety Gates
Default to the path with the highest expected progress toward the multi-objective
decision under hard constraints, not the cheapest rung. State the expected
quality, latency, safety, time, and spend tradeoffs; follow
../understudy/reference.md → Outcome-first spend
posture. Launching a named bounded run plan authorizes its declared provider
calls, uploads, hosted jobs, tool calls, evaluation, receipts, and cleanup. Do
not pause for phase-by-phase confirmation. Ask again only before expanding its
displayed data, destination, spend, retention, credentials, or production-write
scope.
Use seeded fixtures and resettable sandboxes when the decision requires
repeatability. Treat production writes as a separate envelope from model and
training writes. Follow the repo public boundary in
../../docs/privacy-and-data-boundaries.md
for prompts, completions, tool outputs, traces, datasets, repo paths, and
secrets. Do not print or commit sk_* values; let
../use-understudy-gateway/SKILL.md
inject them into the child process only.
Resolve CLI When Using An Understudy Route
Prefer the installed understudy binary. If it is unavailable inside a
checkout:
npm run build
node dist/bin.js status --json
When To Use
Use this skill when all of these hold:
- the workload runs a tool-calling loop, not a single prompt-in/answer-out call;
- success depends on how the agent acts (turn count, which tools, in what
order, what it writes), not just the final string;
- the tool contract can be frozen for model comparisons, and any implementation
change can be isolated as its own named arm;
- the developer wants to compare candidate policy models, or shrink a frontier
model down to a cheaper one without losing quality.
If the workload emits one output with no tool loop, route to
../capture-evidence/SKILL.md then
../optimize-workload/SKILL.md instead —
single-output optimization does not need a tool environment.
Flow
Confirm it is agentic and pick the lens. Inspect the workload for a
multi-turn loop and tool calls. State the fixed tool set and policy model for
route comparisons, plus any separately isolated implementation variable.
Then classify: do any tools mutate state? Read-only →
references/read-only-search.md;
state-mutating →
references/state-mutating-workflows.md.
If it is single-output, hand back to capture-evidence.
Adopt a runnable harness. Read-only loops use a verifiers environment
(vf.Environment + Rubric; the vf-eval command is one supported
harness) or another replayable provider-native/application runner.
State-mutating workflows use an existing benchmark/sandbox runner with a
deterministic reset (seeded state, fixed API schemas, fixed policy docs,
final-state validator). A small deployable app or harness change is allowed
when it directly addresses a measured failure; version it and evaluate it as
a distinct arm instead of silently changing the comparison. Either way,
capture the runnable contract into the
.understudy/capture-evidence/ artifact contract — each reference documents
the env → artifact bridge for its shape.
Before using model scores, pass the shared evaluation evidence gates in
../capture-evidence/references/evaluation-evidence-gates.md.
In particular, run a synthetic read-then-write trajectory through the exact
driver for every model family. The driver must append the read result,
continue the loop, execute the terminal write, and score final state; an
intermediate tool call is never a no-op verdict.
If Desktop produced understudy.environment_proposal.v1 from a JSONL drop,
treat status: executable as meaningful only after
understudy training validate-environment-proposal --proposal <path> passes.
An Understudy draft with status: needs_verifier is a proposal, not a
harness or score; author the missing parser/environment/oracle/sentinels and
rerun deterministic validation before any model comparison.
Define multi-objective success. Quality is a per-criterion LLM-judge or
final-state rubric that returns natural-language why/what-to-change
feedback, not a bare score. Latency and cost come from the rollout records
(turn counts, tool/API call counts, timing, token usage) — read those
instead of inventing a meter. State-mutating workflows add a
side-effect-safety axis (forbidden writes, invalid requests, retries).
Record the axes, workload-specific acceptable-regression/non-inferiority
bands, and any hard constraints in metric.json. Contract requirements and
safety requirements marked hard by the developer remain zero-tolerance;
statistical or multi-objective tradeoffs cannot waive them.
Freeze determinism. Read-only: live tool calls are non-deterministic, so
freeze the query set and snapshot/cache the tool outputs so the harness
replays reproducibly and the holdout stays clean. State-mutating: record a
deterministic reset — seeded state, schemas, policy docs, task rows, allowed
endpoints, clock, seed, network boundary — so each run starts from a known
state and emits a request log.
Run the incumbent baseline before optimizing. Execute the frozen harness
on the sanctioned train/dev set, write per-task results, and bind
harness_sha256, metric_sha256, and splits_sha256 into baseline.json.
Confirm coverage across completed-execution strata, including rare or
high-consequence tool paths, and inspect the actual trajectories behind at
least one pass, each reported failure class, each surprising delta, and a
counterexample to the proposed headline. Do not optimize until the baseline
is measured and those checks pass. A smaller pilot may validate plumbing, but
it is not the baseline evidence. Expand the cohort whenever estimates remain
unstable, important strata are underfilled, or review discovers new failure
classes.
Attribute the multi-turn gap before intervening. Read the rollouts, not
just the final score, and tag where reward is lost: wrong tool/endpoint,
wrong argument value, result-propagation (mis-copying a value a prior
tool returned into a later call), failure to recover from a tool error,
forbidden or missing writes, or non-termination. Single-turn /
next-tool-call imitation scores are a leading indicator only — they cannot
see result-propagation, recovery, or termination, which exist only inside
the running environment. Let the attribution pick the highest-leverage rung
likely to close the gap: output-contract repair (prefill / format / parser /
schema), tool-access or endpoint-catalog repair, model A/B, prompt / GEPA
(automatic prompt evolution), supervised fine-tuning/distillation, or RL.
Rank the eligible rungs by expected objective gain, confidence, time, spend,
and reversibility; start with the highest expected value rather than a fixed
sequence. Use a cheaper rung first only when evidence says it can solve the
attributed failure.
Candidate intervention — compare models and routes. When attribution
points to model capability or provider/runtime behavior, compare deployable
candidates through any backend that can honor the frozen contract. The
Understudy CLI is one route:
understudy models list --json
understudy workloads route <workload-id> --project-id <project-id> \
--model-id glm-5.1 --traffic-pct 100
understudy run -- <harness command>
List public model options, route the project workload to a chosen model,
then run the frozen harness through the gateway with understudy run; a
provider-native or existing application runner is equally valid when it
preserves the same rows, prompt, tools, metric, seed/reset, and data
boundary.
Compare quality vs latency vs cost (vs side-effect safety) across candidates
under the decision contract and pick the route you would ship. For keyless
accounts, prefer a managed-catalog sweep on a cleared/no-route workload
before traffic-split A/B. Prerequisite for a traffic split: the non-routed
passthrough share needs a configured managed provider credential or BYO key
so untouched traffic still completes. Clear a route with --clear. Routing
detail lives in
../use-understudy-gateway/SKILL.md.
For state-mutating workflows, A/B is often simpler: run the same harness
rows twice with only the model changed (see the reference).
Candidate intervention — repair prompt, tools, contract, or harness. When
the attributed gap is instructional or structural, test the smallest
deployable correction: prompt/GEPA, output parser or schema, tool
descriptions/retrieval, retry policy, or a versioned app/harness change.
If a cheaper model wins on latency and cost but trails on quality, a
train/dev-only GEPA pass against the feedback-rich rubric may close the gap
while keeping the latency/cost win. When the workload already lives in a
promoted benchmark dir with frozen splits, run the automatic loop directly:
# terminal 1 — the only thing that executes models
understudy runs execute --benchmark <benchmark-dir> --watch
# terminal 2 — proposes, queues override arms, waits, scores
understudy benchmarks evolve <benchmark-dir> --model <candidate-id> --budget-runs 6
evolve is GEPA-style prompt evolution over prompt_overrides run arms:
an authoring model proposes system-prompt suffixes from the failure
evidence (per-class tool-call rejection counts and unmet contract
obligations read from the run journals), each proposal runs as a labeled
override arm, and every generation is recorded in evolution.jsonl
(suffix + sha256 + scores). See
../../docs/prompt-evolution.md for the
loop and budget guidance. Claim rules mirror
../optimize-workload/SKILL.md: it evolves
on train, selects the champion on dev, touches the sealed holdout exactly
once for the final champion-vs-bare run, and reports quality improvement only
when that holdout run's paired 95% CI clears the prespecified superiority
threshold. A route may still be selected after demonstrated quality
non-inferiority or by a prespecified multi-objective rule, but a no_win/
unverified/inconclusive superiority verdict must never be presented as an
improvement. For single-output workloads, hand off to
../optimize-workload/SKILL.md instead;
never tune on holdout.
Prompt experiments as run arms (prompt_overrides). When the workload
lives in a trace-compiled benchmark directory, test a prompt candidate
without touching the app: queue a run whose request carries
prompt_overrides — each {arm_label, model, system_prompt_suffix} arm
appends the suffix file's text to every task's system prompt at rollout
time (understudy runs queue --prompt-override <arm_label>=<model>=<suffix-file>). The canonical use is the SOP-suffix
experiment: distill the workload's standard operating procedure (order of
operations, argument conventions, termination rules) into a short suffix
and run it as its own arm beside the bare model on the same frozen tasks —
one run, same scorer, per-arm rows. Operating detail in
../operate-benchmark-lab/SKILL.md.
Candidate intervention — supervised fine-tuning or distillation. Select
this early when the failure evidence supplies learnable correction pairs,
teacher trajectories, or deterministic verifier labels and a trained
candidate can be evaluated in the same end-to-end harness. Do not require
model A/B or prompt optimization to fail first. Freeze the dataset lineage,
keep holdout sealed, declare provider/data/retention/spend bounds, and compare
the trained route against the incumbent under the same hard safety and
contract constraints. Treat next-action imitation as diagnostic unless the
end-to-end rollout also validates result propagation, recovery, termination,
and final state.
Escalate to RL only as a true handoff, behind three gates. When the
residual is genuinely stateful multi-step behavior, route to
../prepare-verifier-handoff/SKILL.md.
First confirm: (a) the attribution in step 6 shows cross-turn reasoning
is the residual, not format/argument-value (which supervised or deterministic
repairs can address); (b)
the reward is dense, not strict — a binary/strict reward can be constant
within a group, giving zero advantage and no gradient (paid-for, wasted
steps); and (c) the model has a first-class multi-turn GRPO trainer and
renderer (e.g. NVIDIA Nemotron-3 does; Google Gemma-4 does not yet), or
the RL run is wasted before it starts. This repo never runs that training.
Capture evidence before you optimize, exactly as the rest of the MVP loop
requires (see ../understudy/SKILL.md). The decision
must rest on a measured baseline, and any savings statement needs the
claim.json packet that optimize-workload enforces.
Output Standard
End with:
- whether the workload was confirmed agentic, which lens applied (read-only vs
state-mutating), and the fixed tool set plus any isolated implementation
variable named;
- the harness id/command used (verifiers env or workflow runner);
- the objective axes (quality / latency / cost / side-effect safety where
applicable), hard constraints, acceptable-regression/non-inferiority bands,
and the baseline numbers;
- whether determinism was frozen (tool snapshot or seeded reset) and the
holdout stayed clean;
- the interventions considered, the evidence-driven first choice, its result,
and the route you would ship;
- result type: evidence-capture, evaluation, optimization-lead, heldout, or
handoff;
- one recommended next command or local action.
References
references/read-only-search.md — replayable
agent harnesses, tool-output snapshotting, the env → artifact bridge, and
backend-agnostic model/route comparison for read-only loops.
references/state-mutating-workflows.md
— resettable sandbox harness, final-state/policy rubric, tool-access
reporting, failure-mode table, and the GEPA bridge for multi-step rollouts.
1---2name: optimize-agentic-workload3description: Use when a developer's agent — a multi-turn tool-calling loop — should get cheaper, faster, or better. "My agent is too slow", "this workflow costs too much", "test a cheaper model in my tool-calling loop", "A/B the policy model". Covers read-only search loops and state-mutating API workflows alike.4---56# Optimize Agentic Workload78Use this worker when the workload is an **agentic loop**: an LLM that plans over9multiple turns and calls tools (web search, retrieval, REST/SDK calls, code10execution) before finishing. Freeze every non-target variable within each11experiment; model/route comparisons hold the tools fixed, while a named12implementation arm may isolate one deployable tool, app, or harness change. The13goal is to pick the route and implementation you would ship on a14**multi-objective** basis — quality and latency and cost (and, for workflows15that write, side-effect safety). The route is backend-agnostic: use the existing16harness, provider-native evaluation or training, the public CLI, or a small17versioned app/harness change when the measured failure calls for it.1819**The one discriminator that changes the playbook** is whether the loop20*mutates state*:2122- **Read-only search loops** — web/agentic search, retrieval, lookup tools.23 Success depends on how the agent searches and the final answer; determinism24 comes from snapshotting live tool outputs. Harness specifics:25 [`references/read-only-search.md`](references/read-only-search.md).26- **State-mutating API workflows** — the agent discovers or selects endpoints,27 follows policy docs, performs writes across business systems, and is judged28 by final state plus policy compliance. Determinism comes from seeded,29 resettable state; safety (no forbidden writes) is a first-class objective.30 Harness specifics:31 [`references/state-mutating-workflows.md`](references/state-mutating-workflows.md).3233Everything else — the artifact contract, measured baseline, workload-specific34decision contract, evidence-driven intervention choice, and stronger RL gates —35is shared.3637This is not the RL handoff skill. Reach for38[`../prepare-verifier-handoff/SKILL.md`](../prepare-verifier-handoff/SKILL.md)39only when the evidence shows the residual requires reinforcement learning of40stateful behavior and its reward and renderer gates pass. Supervised41fine-tuning or distillation is a separate intervention and can be selected42earlier when correction labels or deterministic verifier targets support it.4344## Safety Gates4546Default to the path with the highest expected progress toward the multi-objective47decision under hard constraints, not the cheapest rung. State the expected48quality, latency, safety, time, and spend tradeoffs; follow49[`../understudy/reference.md`](../understudy/reference.md) → Outcome-first spend50posture. Launching a named bounded run plan authorizes its declared provider51calls, uploads, hosted jobs, tool calls, evaluation, receipts, and cleanup. Do52not pause for phase-by-phase confirmation. Ask again only before expanding its53displayed data, destination, spend, retention, credentials, or production-write54scope.5556Use seeded fixtures and resettable sandboxes when the decision requires57repeatability. Treat production writes as a separate envelope from model and58training writes. Follow the repo public boundary in59[`../../docs/privacy-and-data-boundaries.md`](../../docs/privacy-and-data-boundaries.md)60for prompts, completions, tool outputs, traces, datasets, repo paths, and61secrets. Do not print or commit `sk_*` values; let62[`../use-understudy-gateway/SKILL.md`](../use-understudy-gateway/SKILL.md)63inject them into the child process only.6465## Resolve CLI When Using An Understudy Route6667Prefer the installed `understudy` binary. If it is unavailable inside a68checkout:6970```sh71npm run build72node dist/bin.js status --json73```7475## When To Use7677Use this skill when **all** of these hold:7879- the workload runs a tool-calling loop, not a single prompt-in/answer-out call;80- success depends on *how the agent acts* (turn count, which tools, in what81 order, what it writes), not just the final string;82- the tool contract can be frozen for model comparisons, and any implementation83 change can be isolated as its own named arm;84- the developer wants to compare candidate policy models, or shrink a frontier85 model down to a cheaper one without losing quality.8687If the workload emits one output with no tool loop, route to88[`../capture-evidence/SKILL.md`](../capture-evidence/SKILL.md) then89[`../optimize-workload/SKILL.md`](../optimize-workload/SKILL.md) instead —90single-output optimization does not need a tool environment.9192## Flow93941. **Confirm it is agentic and pick the lens.** Inspect the workload for a95 multi-turn loop and tool calls. State the fixed tool set and policy model for96 route comparisons, plus any separately isolated implementation variable.97 Then classify: do any tools **mutate state**? Read-only →98 [`references/read-only-search.md`](references/read-only-search.md);99 state-mutating →100 [`references/state-mutating-workflows.md`](references/state-mutating-workflows.md).101 If it is single-output, hand back to `capture-evidence`.1021032. **Adopt a runnable harness.** Read-only loops use a verifiers environment104 (`vf.Environment` + `Rubric`; the `vf-eval` command is one supported105 harness) or another replayable provider-native/application runner.106 State-mutating workflows use an existing benchmark/sandbox runner with a107 deterministic reset (seeded state, fixed API schemas, fixed policy docs,108 final-state validator). A small deployable app or harness change is allowed109 when it directly addresses a measured failure; version it and evaluate it as110 a distinct arm instead of silently changing the comparison. Either way,111 capture the runnable contract into the112 `.understudy/capture-evidence/` artifact contract — each reference documents113 the env → artifact bridge for its shape.114115 Before using model scores, pass the shared evaluation evidence gates in116 [`../capture-evidence/references/evaluation-evidence-gates.md`](../capture-evidence/references/evaluation-evidence-gates.md).117 In particular, run a synthetic read-then-write trajectory through the exact118 driver for every model family. The driver must append the read result,119 continue the loop, execute the terminal write, and score final state; an120 intermediate tool call is never a no-op verdict.121122 If Desktop produced `understudy.environment_proposal.v1` from a JSONL drop,123 treat `status: executable` as meaningful only after124 `understudy training validate-environment-proposal --proposal <path>` passes.125 An Understudy draft with `status: needs_verifier` is a proposal, not a126 harness or score; author the missing parser/environment/oracle/sentinels and127 rerun deterministic validation before any model comparison.1281293. **Define multi-objective success.** Quality is a per-criterion LLM-judge or130 final-state rubric that returns natural-language *why/what-to-change*131 feedback, not a bare score. Latency and cost come from the rollout records132 (turn counts, tool/API call counts, timing, token usage) — read those133 instead of inventing a meter. State-mutating workflows add a134 **side-effect-safety** axis (forbidden writes, invalid requests, retries).135 Record the axes, workload-specific acceptable-regression/non-inferiority136 bands, and any hard constraints in `metric.json`. Contract requirements and137 safety requirements marked hard by the developer remain zero-tolerance;138 statistical or multi-objective tradeoffs cannot waive them.1391404. **Freeze determinism.** Read-only: live tool calls are non-deterministic, so141 freeze the query set and **snapshot/cache the tool outputs** so the harness142 replays reproducibly and the holdout stays clean. State-mutating: record a143 deterministic reset — seeded state, schemas, policy docs, task rows, allowed144 endpoints, clock, seed, network boundary — so each run starts from a known145 state and emits a request log.1461475. **Run the incumbent baseline before optimizing.** Execute the frozen harness148 on the sanctioned train/dev set, write per-task results, and bind149 `harness_sha256`, `metric_sha256`, and `splits_sha256` into `baseline.json`.150 Confirm coverage across completed-execution strata, including rare or151 high-consequence tool paths, and inspect the actual trajectories behind at152 least one pass, each reported failure class, each surprising delta, and a153 counterexample to the proposed headline. Do not optimize until the baseline154 is measured and those checks pass. A smaller pilot may validate plumbing, but155 it is not the baseline evidence. Expand the cohort whenever estimates remain156 unstable, important strata are underfilled, or review discovers new failure157 classes.1581596. **Attribute the multi-turn gap before intervening.** Read the rollouts, not160 just the final score, and tag where reward is lost: wrong tool/endpoint,161 wrong argument value, **result-propagation** (mis-copying a value a prior162 tool returned into a later call), failure to recover from a tool error,163 forbidden or missing writes, or non-termination. Single-turn /164 next-tool-call imitation scores are a *leading indicator only* — they cannot165 see result-propagation, recovery, or termination, which exist only inside166 the running environment. Let the attribution pick the **highest-leverage rung167 likely to close the gap**: output-contract repair (prefill / format / parser /168 schema), tool-access or endpoint-catalog repair, model A/B, prompt / GEPA169 (automatic prompt evolution), supervised fine-tuning/distillation, or RL.170 Rank the eligible rungs by expected objective gain, confidence, time, spend,171 and reversibility; start with the highest expected value rather than a fixed172 sequence. Use a cheaper rung first only when evidence says it can solve the173 attributed failure.1741757. **Candidate intervention — compare models and routes.** When attribution176 points to model capability or provider/runtime behavior, compare deployable177 candidates through any backend that can honor the frozen contract. The178 Understudy CLI is one route:179180 ```sh181 understudy models list --json182 understudy workloads route <workload-id> --project-id <project-id> \183 --model-id glm-5.1 --traffic-pct 100184 understudy run -- <harness command>185 ```186187 List public model options, route the project workload to a chosen model,188 then run the frozen harness through the gateway with `understudy run`; a189 provider-native or existing application runner is equally valid when it190 preserves the same rows, prompt, tools, metric, seed/reset, and data191 boundary.192 Compare quality vs latency vs cost (vs side-effect safety) across candidates193 under the decision contract and pick the route you would ship. For keyless194 accounts, prefer a managed-catalog sweep on a cleared/no-route workload195 before traffic-split A/B. Prerequisite for a traffic split: the non-routed196 passthrough share needs a configured managed provider credential or BYO key197 so untouched traffic still completes. Clear a route with `--clear`. Routing198 detail lives in199 [`../use-understudy-gateway/SKILL.md`](../use-understudy-gateway/SKILL.md).200 For state-mutating workflows, A/B is often simpler: run the same harness201 rows twice with only the model changed (see the reference).2022038. **Candidate intervention — repair prompt, tools, contract, or harness.** When204 the attributed gap is instructional or structural, test the smallest205 deployable correction: prompt/GEPA, output parser or schema, tool206 descriptions/retrieval, retry policy, or a versioned app/harness change.207 If a cheaper model wins on latency and cost but trails on quality, a208 train/dev-only GEPA pass against the feedback-rich rubric may close the gap209 while keeping the latency/cost win. When the workload already lives in a210 promoted benchmark dir with frozen splits, run the automatic loop directly:211212 ```sh213 # terminal 1 — the only thing that executes models214 understudy runs execute --benchmark <benchmark-dir> --watch215 # terminal 2 — proposes, queues override arms, waits, scores216 understudy benchmarks evolve <benchmark-dir> --model <candidate-id> --budget-runs 6217 ```218219 `evolve` is GEPA-style prompt evolution over `prompt_overrides` run arms:220 an authoring model proposes system-prompt suffixes from the failure221 evidence (per-class tool-call rejection counts and unmet contract222 obligations read from the run journals), each proposal runs as a labeled223 override arm, and every generation is recorded in `evolution.jsonl`224 (suffix + sha256 + scores). See225 [`../../docs/prompt-evolution.md`](../../docs/prompt-evolution.md) for the226 loop and budget guidance. **Claim rules** mirror227 [`../optimize-workload/SKILL.md`](../optimize-workload/SKILL.md): it evolves228 on train, selects the champion on dev, touches the sealed holdout exactly229 once for the final champion-vs-bare run, and reports quality improvement only230 when that holdout run's paired 95% CI clears the prespecified superiority231 threshold. A route may still be selected after demonstrated quality232 non-inferiority or by a prespecified multi-objective rule, but a `no_win`/233 `unverified`/`inconclusive` superiority verdict must never be presented as an234 improvement. For single-output workloads, hand off to235 [`../optimize-workload/SKILL.md`](../optimize-workload/SKILL.md) instead;236 never tune on holdout.237238 **Prompt experiments as run arms (`prompt_overrides`).** When the workload239 lives in a trace-compiled benchmark directory, test a prompt candidate240 without touching the app: queue a run whose request carries241 `prompt_overrides` — each `{arm_label, model, system_prompt_suffix}` arm242 appends the suffix file's text to every task's system prompt at rollout243 time (`understudy runs queue --prompt-override244 <arm_label>=<model>=<suffix-file>`). The canonical use is the SOP-suffix245 experiment: distill the workload's standard operating procedure (order of246 operations, argument conventions, termination rules) into a short suffix247 and run it as its own arm beside the bare model on the same frozen tasks —248 one run, same scorer, per-arm rows. Operating detail in249 [`../operate-benchmark-lab/SKILL.md`](../operate-benchmark-lab/SKILL.md).2502519. **Candidate intervention — supervised fine-tuning or distillation.** Select252 this early when the failure evidence supplies learnable correction pairs,253 teacher trajectories, or deterministic verifier labels and a trained254 candidate can be evaluated in the same end-to-end harness. Do not require255 model A/B or prompt optimization to fail first. Freeze the dataset lineage,256 keep holdout sealed, declare provider/data/retention/spend bounds, and compare257 the trained route against the incumbent under the same hard safety and258 contract constraints. Treat next-action imitation as diagnostic unless the259 end-to-end rollout also validates result propagation, recovery, termination,260 and final state.26126210. **Escalate to RL only as a true handoff, behind three gates.** When the263 residual is genuinely *stateful* multi-step behavior, route to264 [`../prepare-verifier-handoff/SKILL.md`](../prepare-verifier-handoff/SKILL.md).265 First confirm: (a) the attribution in step 6 shows **cross-turn reasoning**266 is the residual, not format/argument-value (which supervised or deterministic267 repairs can address); (b)268 the reward is **dense, not strict** — a binary/strict reward can be constant269 within a group, giving zero advantage and no gradient (paid-for, wasted270 steps); and (c) the model has a first-class multi-turn GRPO **trainer and271 renderer** (e.g. NVIDIA Nemotron-3 does; Google Gemma-4 does not yet), or272 the RL run is wasted before it starts. This repo never runs that training.273274Capture evidence before you optimize, exactly as the rest of the MVP loop275requires (see [`../understudy/SKILL.md`](../understudy/SKILL.md)). The decision276must rest on a measured baseline, and any savings statement needs the277`claim.json` packet that `optimize-workload` enforces.278279## Output Standard280281End with:282283- whether the workload was confirmed agentic, which lens applied (read-only vs284 state-mutating), and the fixed tool set plus any isolated implementation285 variable named;286- the harness id/command used (verifiers env or workflow runner);287- the objective axes (quality / latency / cost / side-effect safety where288 applicable), hard constraints, acceptable-regression/non-inferiority bands,289 and the baseline numbers;290- whether determinism was frozen (tool snapshot or seeded reset) and the291 holdout stayed clean;292- the interventions considered, the evidence-driven first choice, its result,293 and the route you would ship;294- result type: evidence-capture, evaluation, optimization-lead, heldout, or295 handoff;296- one recommended next command or local action.297298## References299300- [`references/read-only-search.md`](references/read-only-search.md) — replayable301 agent harnesses, tool-output snapshotting, the env → artifact bridge, and302 backend-agnostic model/route comparison for read-only loops.303- [`references/state-mutating-workflows.md`](references/state-mutating-workflows.md)304 — resettable sandbox harness, final-state/policy rubric, tool-access305 reporting, failure-mode table, and the GEPA bridge for multi-step rollouts.