/evolve:evolvefrom evolve
Iterative review-fix loop that critiques code, fans out fixes, verifies, gates, and commits per round. Requires the sharp-review plugin.
Ships in evolve. 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.
Read when SKILL.md points to them.
Drive a codebase toward a clean state over repeated rounds. This loop is Claude-driven
(run from the main loop, not a background Workflow) because human gates (AskUserQuestion)
and interactive git commit cannot happen inside a background workflow.
Runs in any git project, but hard-depends on the cc-market plugin sharp-review (round
critique engine). Its loop state lives in the checkout's git dir (<git dir>/evolve/state.json,
derived by git rev-parse --git-path); no other plugin shares it. Setup aborts if
sharp-review is missing; there is no built-in fallback. See README.md for the overview.
/evolve [--until=clean|resolved|ask] [--path=<dir>] [--min-severity=LOW|MEDIUM|HIGH] [--dry-run] [--seed] [--commit=round|group]
--until=ask (default) — after each round, ask the user whether to start the next round.--until=clean — auto-loop until ≥2 consecutive rounds produce no new OPEN findings.--until=resolved — auto-loop until all OPEN findings are resolved (fixed or accepted won't-fix).--path=<dir> — scope the critique to a subtree instead of the whole repo.--min-severity=LOW|MEDIUM|HIGH — drop findings below this severity.--dry-run — produce findings + fix plan + grouping and report them, but make NO edits or commits (trust-building preview).--seed — pull existing OPEN findings from a sharp-review backlog to seed round 0.--commit=round|group — commit once per round (default) or once per finding group.git rev-parse --git-dir succeeds (abort if not a git
repo). Run git status --short: if the working tree has unrelated uncommitted changes,
ask the user to commit/stash first, or to confirm proceeding — evolve commits with explicit
per-file git add scope, but a dirty tree still risks confusion. Note the current branch.
Verify the required plugin is installed — check that sharp-review is registered
(e.g. in ~/.claude/plugins/installed_plugins.json). If it is missing, abort with a clear
message naming what to install — evolve has no fallback for it.git config windows.appendAtomically false once so git commit doesn't fail with
"cannot update the ref".node "$env:CLAUDE_PLUGIN_ROOT/scripts/evolve.mjs" init [flags] (or import initState from
$env:CLAUDE_PLUGIN_ROOT/scripts/evolve.mjs) to create or load the state. Do not
hand-write the JSON. The helper centralizes state load/save (atomic into the git dir,
in-memory on a failed rename), finding grouping, prioritization, and termination checks, so
the loop never hand-edits JSON.When running headless (scheduled/autonomous ticks with no human to answer AskUserQuestion):
the human gate cannot block — default policy is to DEFER any gated item (leave it OPEN, log
it) and never hang on AskUserQuestion. Surface all deferred/gated items in the final summary.
maxAgents).AskUserQuestion for architectural changes, won't-fix calls, or
unpassable tests.git add scope), apply termination.--dry-run is a first-class mode: run step 1 (critique) and produce the fix plan +
grouping (steps 2–3 planning only), report it, and STOP — no edits, no test gate, no
commit.
Context budget: to avoid unbounded context growth over many rounds, findings are persisted to state/file (via the helper) rather than kept only in conversation, and each round's heavy critique/fix work is delegated to subagents — the main loop holds only the structured results and short summaries.
Before executing a round, read reference/round-protocol.md (the full ordered protocol +
failure handling). Stop conditions and safety caps → reference/termination.md; the
loop-state JSON schema (debugging only — use scripts/evolve.mjs, never hand-edit) →
reference/state-schema.md.
round 1 / 2 / 3
noise. Use a non-interactive soft reset (never rebase -i — it opens an editor):
# N = number of evolve commits this run (rounds + any baseline this run made).
# Confirm none are already pushed/shared first; skip the squash if any are.
git reset --soft HEAD~N
git commit -m "$(cat <<'EOF'
feat: <combined summary of the whole evolve run>
EOF
)"
Squash only commits this evolve run authored — never fold in pre-existing commits from
before the run, and never squash across a push (if a round was already pushed, leave history
as-is and note it). For cc-market/ changes run the reset/commit with git -C cc-market.
With --commit=group the user opted into per-group commits — honor that and skip squashing.
If anything is uncertain (which commits are ours, already-pushed, protected branch), leave the
per-round commits and say so in the summary.writeRoundLog(projectRoot, {...}) — it writes a
frontmatter entry under .claude/memory/YYYY/MM/DD/.defer ≠ drop).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub dawnever/cc-market --plugin evolve