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), rea
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-grade-iterate-c7abf0ad9eff ,按照其中的说明把「grade-iterate」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
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).