Skip to main content
skill

grade-iterate — Claude Code skill: the bounded grade loop

Phase 3 of building a Claude Managed Agent. Sets a rubric, reads each grader verdict and iterates until a version passes.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install agent-launcher-skills@claude-code-skills
Open on GitHub

What grade-iterate does

This skill covers the grade-then-fix loop for a Claude Managed Agent. outcome_builder.py turns the agent's build sheet into a user.define_outcome payload. A rubric is mandatory, and max_iterations is clamped between 1 and 20 — the loop is never open-ended.

verdict_reader.py then reads the grader result and names the next move: SHIP on satisfied, SHARPEN and re-run on needs_revision, ESCALATE on max_iterations_reached or failed, RESUME on interrupted. With one iteration or less left, it tells you to make the single highest-value fix or escalate right away. Each pass has to flip at least one rubric line from fail to pass, or the run stops at the cap.

After a version passes, eval_scaffold.py builds held-back cases and a parallel run plan, capped at the 25-thread CMA ceiling. Those cases stay unseen during iteration — grading generalization on cases the agent already tuned against tells you nothing. This is a separate phase from the first launch and from putting the agent on a schedule.

What it helps with

  • define a rubric and iteration cap for a CMA agent
  • read a grader verdict and pick the next move
  • tell a prompt fix from a tool fix after a failure
  • run held-back cases in parallel once a version passes
  • record the verdict on the goal before scheduling

Example prompts for the agent

  • Grade my agent against the rubric and tell me what to fix
  • Iterate until it passes the rubric
  • Scaffold held-back cases and a parallel run plan for my agent

How to install grade-iterate

1Plugin marketplace

/plugin marketplace add alirezarezvani/claude-skills
/plugin install agent-launcher-skills@claude-code-skills

This installs the whole agent-launcher-skills plugin with all its skills

2Skills CLI (Vercel)

npx skills add alirezarezvani/claude-skills --skill grade-iterate -a claude-code

3Manually: put the files in place

~/.claude/skills/grade-iterate/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/grade-iterate/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about grade-iterate

How do I install grade-iterate in Claude Code?

From the marketplace: run /plugin marketplace add alirezarezvani/claude-skills, then /plugin install agent-launcher-skills@claude-code-skills.

What does grade-iterate do?

It builds the outcome payload with a required rubric and an iteration cap, reads the grader verdict to recommend the next move, and scaffolds held-back cases for a parallel run after a version passes.

How is grade-iterate different from stage-launch and run-without-you?

It handles the grading and revision loop. stage-launch covers the first launch, and run-without-you moves the agent to a scheduled deployment.

Source text

SKILL.md · MIT
---
name: grade-iterate
description: 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).
license: MIT
metadata:
  version: 2.11.2
  author: Alireza Rezvani
  tags: [cma, outcome, rubric, grader, grade-iterate, loop, max-iterations, eval, held-back]
  compatible_tools: [claude-code, codex-cli, cursor, antigravity, opencode, gemini-cli]
---

# Phase 3 — Grade → Iterate (the bounded loop)

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`](../../references/loops-and-workflows.md)
and the outcome section of
[`../../references/cma-primitives.md`](../../references/cma-primitives.md).

## Workflow

1. **Define the outcome.**
   ```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).
2. **Read every verdict first.**
   ```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".
3. **Loop invariant.** Each iteration must move ≥1 rubric line fail→pass, or the
   run halts at the cap and escalates. Don't burn the budget on cosmetic edits.
4. **Once a version passes, run held-back eval.**
   ```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.
5. **Decide.** SHIP as v0, or promote to a scheduled deployment (Phase 4). Record
   the verdict on the goal: `goal_state.py set --phase run-without-you`.

## Hard rules

- **Bounded, always.** No outcome without a `max_iterations` cap.
- **Read the verdict before acting.** The grader's explanation drives the next move.
- **Held-back cases are held back.** Never grade generalization on cases the agent
  already iterated against.

## Forcing-question library (recommend + cite)

1. "What are the 3–5 rubric lines?" *Recommend:* grounded, checkable criteria.
   *Cite:* cma-primitives.md (rubric required).
2. "How many iterations before you'd rather look yourself?" *Recommend:* 3–5.
   *Cite:* loops-and-workflows.md (bounded loop).
3. "On a fail, sharpen the prompt or the tools?" *Recommend:* whichever rubric line
   failed points to. *Cite:* verdict_reader next-move table.
4. "Which cases did the agent NOT see?" *Recommend:* hold back ≥3 for generalization.
   *Cite:* this SKILL (held-back eval).

## Tools

- `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).

© Alireza Rezvani · MIT · alirezarezvani/claude-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set473

The whole set →
stage-launch Builds API payloads and a resumable launcher for a Claude Managed Agent. Use it when a prepared build sheet is ready for creation. 3installs swedish-mentor This skill mentors Swedish learners: it places you at a CEFR level and picks YouTube clips and podcast episodes for the skill you want to train. Useful when you need a plan, not random videos. 2installs month-end-close This skill plans month- or quarter-end close work, checks reconciliations, and challenges unsupported variance explanations. Use it to trace a slow close. 1installs coding-agent-rollout Audits Claude settings before a team rollout: lints permissions across scopes, inventories MCP servers and plugins, and turns local session data into adoption counts. 1installs ai-decision-authority Sorts decisions into three AI governance zones by stakes and reversibility, so you know where a human signs off and where the agent just acts. ★ 28,786repo stars month-end-close Coordinates financial close calendars, balances reconciliations, and audits variance drivers. Runs Python stdlib scripts locally on CSV and JSON files. ★ 28,786repo stars coding-agent-rollout This plugin audits Claude Code settings, MCP and plugin inventories, and CLAUDE.md layers. It also tracks a team’s rollout stage from local session counts. ★ 28,786repo stars agent-regression-evals Compares agent runs before and after a change and decides whether the merge is safe. Useful when one trial can't separate a regression from noise. ★ 28,786repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor