Phase 3 — Grade → Iterate (the bounded loop)
SkillDocs & knowledgeYour AI can grade its own work against a rubric you define and keep refining it until it passes. Each attempt is scored by a separate grader, and the agent reads the verdict to decide whether to sharpen the work, try again, or promote it. Retries are capped, and once a version passes, held-back test cases run as a final check.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
After adding it, write a markdown rubric that describes what a passing result looks like, then give your agent a task to complete against it.
Then ask your AI: use the Phase 3 skill
What your AI can do with it
- Grade its own work against a markdown rubric you define
- Read each grading verdict before choosing the next move
- Sharpen the work and re-run it when it falls short
- Promote a passing version to run on a schedule
- Run held-back test cases in parallel once a version passes
- Stop after a hard cap on retries so it never loops forever
What this skill tells your AI
The instructions your AI receives, as published by alirezarezvani/claude-skills in .gemini/skills/grade-iterate/SKILL.md and read by ahel’s review.
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.
Workflow
- Define the outcome.
The rubric is required;python3 scripts/outcome_builder.py \ --sheet ./my-agent/build-sheet.json --max-iterations 5 \ --out ./my-agent/payloads/outcome.jsonmax_iterationsis clamped to 1..20. Send the payload as auser.define_outcomeevent (append to the running session). - Read every verdict first.
Tables the rubric outcome and recommends: SHIP (python3 scripts/verdict_reader.py --result ./my-agent/last-verdict.jsonsatisfied), 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". - 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.
- Once a version passes, run held-back eval.
Held-back cases (never seen during iteration) run in parallel, capped at the 25-thread CMA ceiling, each graded against the same rubric.python3 scripts/eval_scaffold.py \ --sheet ./my-agent/build-sheet.json --out ./my-agent/eval.json --concurrency 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_iterationscap. - 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)
- "What are the 3–5 rubric lines?" Recommend: grounded, checkable criteria. Cite: cma-primitives.md (rubric required).
- "How many iterations before you'd rather look yourself?" Recommend: 3–5. Cite: loops-and-workflows.md (bounded loop).
- "On a fail, sharpen the prompt or the tools?" Recommend: whichever rubric line failed points to. Cite: verdict_reader next-move table.
- "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).
Signals
- GitHub stars
- 27k
- Forks
- 4k
- Last commit
- Aug 2026
Advanced
- Item type
- skill
- Key
grade-iterate- Source
- github.com/alirezarezvani/claude-skills
github.com/alirezarezvani/claude-skills
More in Docs & knowledge
Skill · mattpocock
More in Docs & knowledgecanvas-design
Skill · anthropics
More in Docs & knowledgedoc-coauthoring
Skill · anthropics
More in Docs & knowledgewriting-for-agents
Skill · mattpocock
More in Docs & knowledgespec-driven-development
Skill · addyosmani
More in Docs & knowledgedefuddle
Skill · kepano
More in Docs & knowledge