This is the plugin's loop: CMA's outcome primitive self-grades the agent's
work in an isolated context and feeds failing verdicts back for the next attempt.
It is always bounded by max_iterations (1..20) — never "improve forever".
See ../../references/loops-and-workflows.md
and the outcome section of../../references/cma-primitives.md.
```bash
python3 scripts/outcome_builder.py \
--sheet ./my-agent/build-sheet.json --max-iterations 5 \
--out ./my-agent/payloads/outcome.json
```
The rubric is required; max_iterations is clamped to 1..20. Send the
payload as a user.define_outcome event (append to the running session).
```bash
python3 scripts/verdict_reader.py --result ./my-agent/last-verdict.json
```
Tables the rubric outcome and recommends: SHIP (satisfied), SHARPEN
then re-run (needs_revision), ESCALATE (max_iterations_reached /failed), RESUME (interrupted). With ≤1 iteration left it flips to
"make the single highest-value fix or escalate now".
run halts at the cap and escalates. Don't burn the budget on cosmetic edits.
```bash
python3 scripts/eval_scaffold.py \
--sheet ./my-agent/build-sheet.json --out ./my-agent/eval.json --concurrency 5
```
Held-back cases (never seen during iteration) run in parallel, capped at the
25-thread CMA ceiling, each graded against the same rubric.
the verdict on the goal: goal_state.py set --phase run-without-you.
max_iterations cap.already iterated against.
Cite: cma-primitives.md (rubric required).
Cite: loops-and-workflows.md (bounded loop).
failed points to. Cite: verdict_reader next-move table.
Cite: this SKILL (held-back eval).
scripts/outcome_builder.py — user.define_outcome payload (rubric required, cap 1..20).scripts/verdict_reader.py — grader result → next move.scripts/eval_scaffold.py — held-back cases + parallel run plan (≤25 threads).