/agent-workflow-amplifiers:polishfrom agent-workflow-amplifiers
Iteratively refines any artifact (code, prose, prompts, API designs, specs) using a decoupled evaluator-generator loop. Locks criteria upfront, prevents sycophancy, and reports remaining gaps when iteration cap is reached.
Ships in agent-workflow-amplifiers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
/contract
polish is a three-wave evaluator-optimizer loop that applies to any artifact at any workflow stage. Wave 1 locks concrete, testable criteria. Waves 2 and 3 alternate (evaluator → generator) until all criteria pass or the iteration cap is reached. The evaluator is always spawned stateless — it never sees prior generation history — eliminating the sycophancy failure mode that plagues shared-context review loops.
The orchestrator coordinates but never edits the artifact directly. All revisions are produced by the Wave 3 generator, which receives only the blocking_gaps list from the evaluator (not its full reasoning). This constraint prevents scope-creep revisions and keeps each iteration focused on the delta between current state and the locked criteria.
On cap exhaust the orchestrator emits the best-scoring version plus a structured remaining_gaps report so the caller can decide whether to extend the cap, escalate to a human, or ship with known gaps documented.
| Field | Required | Description |
|---|---|---|
artifact | yes | The text, spec, prompt, design doc, or code snippet to refine |
goal | yes | Natural-language quality intent ("make this safe for external stakeholders") |
criteria | no | Pre-supplied testable criteria — skips Wave 1 extraction if provided |
threshold | no | pass_all (default) or pass_N where N is an integer |
cap | no | Max refinement iterations (default: 4, max: 8) |
Trigger: Always, unless criteria were supplied by the caller.
Agent: Single subagent. Reads artifact + goal. Produces:
{
"criteria": [
{ "id": "C1", "text": "<concrete, binary-testable criterion>" },
...
],
"threshold": "pass_all | pass_N",
"cap": 4
}
Rules:
Exit: Emit criteria.json. Proceed to Wave 2.
Agent: Single subagent, spawned fresh with no generation history. Receives:
criteria.jsonProduces:
{
"scores": [
{ "criterion_id": "C1", "pass": true, "gap": "" },
{ "criterion_id": "C2", "pass": false, "gap": "<specific, actionable description of what is missing or wrong>" }
],
"overall": "pass | fail",
"blocking_gaps": ["C2: <gap text>", ...]
}
Rules:
overall: pass (threshold met) → skip Wave 3, emit final artifact, terminate loop.remaining_gaps, terminate loop.Agent: Single subagent. Receives:
blocking_gaps list (text only — NOT the evaluator's full scores object)goal (for orientation only, not as new criteria)Produces: Revised artifact (full text, not a diff).
Rules:
blocking_gaps. Do not make unrequested changes.iteration = 0
artifact = <input>
Wave 1 → criteria.json
loop:
iteration += 1
result = Wave 2(artifact, criteria.json)
if result.overall == "pass":
emit artifact, result.scores, iteration_count
DONE
if iteration == cap:
emit artifact, result.remaining_gaps, "CAP_REACHED"
DONE
artifact = Wave 3(artifact, result.blocking_gaps)
| State | Emitted |
|---|---|
| Converged | Final artifact + {status: "CONVERGED", iterations: N, scores: [...]} |
| Cap reached | Best artifact + {status: "CAP_REACHED", iterations: cap, remaining_gaps: [...]} |
CAP_REACHED is not a failure — it is an explicit signal for the caller to extend, escalate, or ship with documented gaps. The orchestrator never silently discards gap information.
polish is designed to run after a generative skill and before ship:
spec → forge → polish → ship
research → mint → polish → ship
<any draft> → polish → ship
It may also be called standalone on an existing artifact with explicit criteria supplied.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub griffinwork40/agent-framework --plugin agent-workflow-amplifiers25 skills in this plugin
/agentifyBootstraps a dispatchable Claude sub-agent skill for every coding agent CLI installed on this machine (codex, aider, cursor, etc.). Use when the user wants to delegate tasks to locally-installed agent CLIs or expand the plugin's agent fleet./appmapMap a web UI and generate a Claude automation skill via parallel reconnaissance, synthesis, and iterative validation./automateSet up a scheduled headless Claude run that sends summaries to Telegram. Use when the user wants to automate a recurring task via launchd (macOS) with push-notified results./contractReference convention for sub-agent I/O schemas. Loaded by orchestrator skills via /contract and into agents via the `skills:` field./devils-advocateAdversarially critique a proposal by generating alternatives. Dispatches 3 parallel critics (pragmatist, paranoid, architect lenses) — each invents one alternative approach — then a synthesis step ranks all 4 options and recommends the top choice. When the proposal was authored by someone other than the agent (inherited plan, someone else's PR, external review), a 4th steelman critic runs in the same parallel wave and strengthens the original first, so it is judged at its strongest rather than its weakest. Use when a plan, fix, scoping, decomposition, or named recommendation will drive decisions and you want structured alternative-generation before committing. Complements /shadow-verify — that skill re-derives factual claims; this one critiques whether the chosen approach itself is best./diagnoseParallel root-cause analysis for bugs and failing tests. Use when a test fails, a bug is reported, or behavior is unexplained — dispatches sub-agents to form and validate hypotheses in isolated worktrees.Other plugins' skills for the same job