evolve:apply

A human-approved command for applying a pending self-improvement proposal to the source files of a specific project harness. It first confirms that the files belong to the correct source checkout.

In plain words
What is it for?
Use it to inspect pending proposals, review their exact patches, approve one explicitly, and apply only its declared changes.
Why use it?
It prevents an unreviewed proposal from changing the harness or accidentally modifying an installed copy instead of the canonical source.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/shenchangmin/cairnkit/evolve-apply
Clone the repo
git clone --depth 1 https://github.com/shenchangmin/cairnkit
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 420 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.00420
Opus 5 $0.00012 $0.00210
Sonnet 5 $0.00005 $0.00084
Haiku 4.5 $0.00002 $0.00042

Measured yesterday against content hash 74e29d285603, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

evolve:apply scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/evolve-apply.md · 31 lines

What it actually says

/evolve:apply

Apply a pending self-improvement with both a source-checkout guard and a human gate. The cairn CLI records proposal state but never edits the harness itself.

Steps

  1. List pending proposals with cairn --root . evolve list --state pending and show the selected docs/workflows/evolve-log/pending/<id>.md in full.
  2. Before requesting approval, confirm the host is a validated cairnkit source checkout: it must contain both .agents/plugins/marketplace.json and plugins/cairnkit/.codex-plugin/plugin.json, plus the proposal's declared canonical targets under agents/ or rules/. Do not edit an installed plugin cache or an ordinary consumer project. If the guard fails, stop without recording the proposal as applied; tell the user to bring the proposal into a cairnkit source checkout and invoke this entrypoint there.
  3. Show the exact files and patch that would change, then wait for the user's explicit approval in this interaction. Earlier, inferred, or proposal-authored approval is invalid.
  4. After approval, edit only the proposal's declared canonical targets. If an agents/*.md mandate changes, mirror it to plugins/cairnkit/resources/agents/ and run the plugin contract tests. Then record the decision with cairn --root . evolve apply --id <id>.
  5. Do not commit or push unless the user separately and explicitly requests a commit or push. Rejection uses cairn --root . evolve reject --id <id>; postponement uses cairn --root . evolve defer --id <id>.

Never edit or record an apply before steps 2 and 3 pass. Proposal id: $ARGUMENTS

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 31 lines · 24 tokens per session scan A 74e29d285603

Subscribe to this mod's changes

evolve:apply is a command published in the GitHub repository shenchangmin/cairnkit (1 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 420 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.