Phase 3 of building a Claude Managed Agent — the bounded grade→iterate loop. Define a CMA outcome (a required markdown rubric graded by an isolated grader), read each verdict, decide the next move (sharpen / re-run / promote to schedule), and once a version passes, run held-back eval cases in parallel. Use when the user says "grade my agent", "make it pass the rubric", "iterate until it's good", "is it good enough", or when the orchestrator routes phase=grade-iterate. outcome_builder.py builds the user.define_outcome payload (rubric required, max_iterations clamped 1..20 — never unbounded); verdict_reader.py reads the grader result and recommends the next move; eval_scaffold.py generates held-back cases + a parallel run plan (capped at the 25-thread CMA ceiling). Distinct from stage-launch (first launch) and run-without-you (scheduling).
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.
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).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".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.goal_state.py set --phase run-without-you.max_iterations cap.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).Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/grade-iterate · pinned to the source commit
# Run from your project root
git clone https://github.com/alirezarezvani/claude-skills.git .skillboard-tmp
git -C .skillboard-tmp checkout 19392f7a08264ed00486a251f5b2098321771f94
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/.gemini/skills/grade-iterate" ".claude/skills/"
rm -rf .skillboard-tmpReview the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
sudo apt update && sudo apt install -y gitnpm install -g @anthropic-ai/claude-code# Run from your project root
git clone https://github.com/alirezarezvani/claude-skills.git .skillboard-tmp
git -C .skillboard-tmp checkout 19392f7a08264ed00486a251f5b2098321771f94
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/.gemini/skills/grade-iterate" ".claude/skills/"
rm -rf .skillboard-tmpDestination: .claude/skills/grade-iterate
Scanner static-checks@0.1.0 · commit 19392f7a0826. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
Uses encoding/eval patterns that can hide executable content.
Evidence: [redacted]· fingerprint 1bbd174404efbce9
References parent-directory traversal, which can escape a target directory.
Evidence: ../· fingerprint fa08499e14d0113b