Repository navigation
cap-evolve v0.2.0 — paper release
This is the paper release: the code used for the CapEvolve paper, at commit 520ecbe (also tagged paper). It covers 430 commits since v0.1.0. The core loop is unchanged: evaluate, diagnose failures, propose an edit, accept it only if it passes a held-out gate, and score a sealed test split once. This release adds new search algorithms, a larger gate toolbox, more benchmark adapters, cost metering, and reproduction material.
Highlights since v0.1.0
Algorithms
hill-climbkeeps its original behaviour (see the note below).gepaandskilloptnow share one optimizer-context assembler, so they no longer run blind (#386).gepaalso gains per-task ownership tracking for parent selection (#687) and a mergeable check with required sibling merging (#685).agent-optimize(AO-2) is now a code-driven parallel graph conductor (#818). Its default round is screen, then merge, then gate over a real candidate DAG (#618). It also includes anao_focusrule (#838), N-way merge by merge-base fold (#727), and opt-inmerge_verify(#788).- HC-2 is a parallel K-round hill-climb built on a new P2 evaluator with pooled F/C splits (#815, #817). It has a configurable final-estimate reserve (#832).
- Rule P (
promotion_rule: P) is an opt-in shared promotion rule for hill-climb, skillopt and gepa (#786). - Cross-iteration memory is pluggable, and
evographandwikimemory skills are included (#451).
The paired gate and its options
The default is still the val-only paired significance gate (Δ > k·SE). The changes are opt-in or record-only.
- Every gate decision now records which tasks it broke and fixed (shared
harness.movement). The report adds atradedcolumn. - Opt-in controls:
gate_max_brokeandgate_no_regression, now forwarded bycap-evolve run. Alsogate_footprint,gate_min_coverage,gate_coverage: joint,errored_trial_policy: fail|drop, andconfirm_fresh_only(#755, #758, #759). - Further gate modes include
paretoandreward_gated. Screen accounting makes a screened decision auditable.replay_gates.pyreplays historical decisions under alternative rules (#791).
Surfaces
system-prompt, tools, mcp-tool and skill-package remain. New in this release:
- v2 deterministic helper code in editable surfaces (opt-in via
helpers.enabledandsurface.executable_dirs) (#816). It is guarded by lint and smoke checks that cost zero rollouts. Candidates can now move recurring procedures out of the prompt and into tested, deterministic scripts the agent calls. skill-packagevalidation is stricter about risky imports and nestedskills/roots.
Benchmark adapters
See the table below. Beyond tau2 airline and SkillsBench, the release adds SpreadsheetBench, Harbor (used for SWE-bench Verified), SWE-bench, and RFE-Creator. Dual scoring and a full_verified tier are available for SpreadsheetBench (#556, #508).
Honest evaluation
- Sealed test: scored once, enforced by the run dir.
- Holdout protocol:
docs/HOLDOUT_PROTOCOL.mdsays how results must be labelled, including fit metric versus held-out. It explains why tau2 airline's 50 tasks have no untouched holdout. - Deterministic pregate:
pregate.pyruns about $0 checks before any screen or val gate (#726). Checks include static compile, a call-graph scan for hidden writes, tool smoke runs, and replay. A registered pre-gate check is a hard refusal (#641). - Candidate faults vs infrastructure errors: faults caused by a candidate are tagged
error_kind=candidate, and infrastructure failures are taggedinfra. Unscored trials are treated as missing data rather than 0.0 (#307). - Gold isolation: SpreadsheetBench runs now use a gold-free agent view by default (
SB_AGENT_VIEW=1) (#782, #783). - Ablation flags include
optimizer.ablation.history, which withholds history from the proposer.
Cost, token metering, dashboard and report
- Optimizer spend is metered, including conversational optimizers, and the user simulator is priced (#721). Per-decision tokens, seconds and per-candidate USD are attributed (#616). Spend caps are
--max-usdand--max-optimizer-usd. - Dashboard additions: a candidate DAG and Pareto views, a diagnosis flow, a gate bar, a run timeline, and live rollout progress (#583, #615, #643, #669, #677, #679, #729).
- CLI additions:
cap-evolve doctor,watch,replay --demo,diffandstatus. - Leaked dashboard servers no longer exhaust the port range (#637). The static export now includes the Process tab (#525).
CI benchmark tiers
ci/benchmarks/ runs benchmarks as dispatchable smoke, full and full_verified tiers, with a rollout-cost projection printed up front. Model providers can be a LiteLLM gateway or RITS (#512, #650).
Reproducibility
docs/REPRODUCE_tau2.mdanddocs/REPRODUCE_skillsbench.mdgive one-command onboarding.- Scorer provenance is recorded.
- Seeded splits and a fixed iteration count are used in the smoke tier.
Note on hill-climbing
#889 restores the V3 hill-climbing behaviour. It reverts the V4 changes from #880: the cost-aware gate, the compress operator, and budget-driven iteration caps. Stock hill-climb, HC-2 and agent-optimize behave as they did before #880. This is the configuration behind the paper's tau2-airline result. The AO-2 fixes from #865 and #869 and the P2 in-thread retry were kept.
Supported benchmarks and adapters
Adapter (templates/adapters/) |
Benchmark | Optimizes |
|---|---|---|
jsonl_litellm, huggingface_litellm |
Your own tasks or any HF dataset | System prompt |
tau2_bench |
tau2-bench airline | Policy plus tool code |
spreadsheetbench |
SpreadsheetBench | System prompt, task template, helper scripts (v2) |
skillsbench |
SkillsBench | Agent Skill packages |
harbor |
Harbor-run tasks (e.g. SWE-bench Verified) | Agent capability |
swe_bench |
SWE-bench / Lite | Coding-agent prompt |
rfe_creator |
RFE-Creator | 7 Claude Code skills |
Install / upgrade
git clone https://github.com/skillberry-ai/cap-evolve.git
cd cap-evolve
git checkout v0.2.0
python3 -m venv .venv && source .venv/bin/activate
pip install ./core # package: cap-evolve-core, CLI: cap-evolve, zero runtime deps
bash examples/toy_calc/run.sh # zero-API smoke test
# For a coding-agent host:
./install.sh --host <name>
cap-evolve run --spec .capevolve/project/capevolve.yamlFor Claude Code, use claude --plugin-dir ./plugins/cap-evolve. See RUN.md for the full pipeline.
Upgrade notes
- SpreadsheetBench runs are gold-free by default. Restoring the old behaviour needs
SB_AGENT_VIEW=0together withSB_ALLOW_GOLD_IN_MOUNT=1. gate_no_regressionandgate_max_brokein a spec now take effect. Before, they were ignored.- The package version string inside the code (
core/pyproject.toml,cap_evolve.__version__) still reads0.1.0at this commit; the release is identified by thev0.2.0andpapertags.
Known limitations
- tau2 airline has no fresh holdout inside its 50 tasks. Tasks 30-49 are treated as development-exposed, and val is a fit metric (
docs/HOLDOUT_PROTOCOL.md). - A 40-task val split cannot resolve a trade between tasks on a larger population. The gate now records these trades but does not veto them unless
gate_max_brokeis set. - The rollout-cost projection is a range that contains typical spend, not a prediction.
- The project is still
0.x, so anything may change.
Full changelog: v0.1.0...v0.2.0