evolve

A controlled process for evaluating or improving the tools, commands, agents, and workflows that make up a coding-agent system.

In plain words
What is it for?
It helps audit or evolve agent behavior, commands, skills, workflows, and shared instructions using repository checks, tests, and recorded iteration results.
Why use it?
It provides evidence, checks, and a record of changes before modifying the harness—the system that coordinates coding-agent work. This makes failures and rollback limits visible.

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/jcarlosrodicio/opencode-agent-orchestration-kit/evolve
Clone the repo
git clone --depth 1 https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,501 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.00019 $0.01501
Opus 5 $0.00010 $0.00750
Sonnet 5 $0.00004 $0.00300
Haiku 4.5 $0.00002 $0.00150

Measured 2d ago against content hash a6860ebcb33b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

evolve 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 2d ago.

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.

opencode/commands/evolve.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Evolve the OpenCode harness:

$ARGUMENTS

Run the AHE flow that matches the requested scope. The full flow remains mandatory for real harness changes; audit-only branches have explicit stop conditions. This is for agents, commands, skills, tools, workflows, or harness memory, not app features.

Preconditions

  1. Check whether the harness is in git with git status.
  2. If git is unavailable, do not promise automatic rollback.
  3. Identify or create the target iteration path under docs/ai/evolution/runs/iteration-XXX/.

Init/context policy

Before evaluating or proposing harness changes, record:

  • cwd: must be the OpenCode harness repo.
  • AGENTS.md: local rules and evolution boundaries.
  • git state: branch, pending changes, and real rollback ability.
  • validation commands: node scripts/check-harness.mjs, node --test scripts/check-harness.test.mjs, and needed replays.
  • validation expectations:
    • node scripts/check-harness.mjs is the cheap local smoke check;
    • node --test scripts/check-harness.test.mjs is the long checker suite and should run with an explicit time budget above the default harness timeout, record observed runtime, and not be classified as a functional failure only because cancellation happened near the time ceiling.
  • repo docs: docs/ai/harness/, docs/ai/evolution/, mechanisms.jsonl, rejected_mechanisms.jsonl, session-sources.md, and benchmarks.

Session Sources

/evolve is OpenCode-first. Its local default source is:

  • ~/.local/share/opencode/opencode.db

The primary evidence unit is an execution tree, not a flat standalone session:

  • one root session with parent_id = null
  • all child sessions and descendants linked through parent_id

session_sources may add optional raw exports from:

  • RAW_SESSIONS_DIR
  • /raw-sessions

Before invoking evaluator, stage normalized evidence with:

  • node scripts/collect-session-evidence.mjs --iteration iteration-XXX

The collector should emit:

Read the full file on GitHub · 168 lines

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. 2d ago First seen · 168 lines · 19 tokens per session scan A a6860ebcb33b

Subscribe to this mod's changes

evolve is a command published in the GitHub repository jcarlosrodicio/opencode-agent-orchestration-kit (105 stars, last pushed 4d ago), licensed Apache-2.0. It adds 19 tokens to every session and 1,501 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-30.