🧬 Capability Evolver
"Evolution is not optional. Adapt or die."
The Capability Evolver is a meta-skill that allows OpenClaw agents to inspect their own runtime history, identify failures or inefficiencies, and autonomously write new code or update their own memory to improve performance.
Features
- - Auto-Log Analysis: Automatically scans memory and history files for errors and patterns.
- Self-Repair: Detects crashes and suggests patches.
- GEP Protocol: Standardized evolution with reusable assets.
- One-Command Evolution: Just run
/evolve (or node index.js).
Usage
Standard Run (Automated)
Runs the evolution cycle. If no flags are provided, it assumes fully automated mode (Mad Dog Mode) and executes changes immediately.
CODEBLOCK0
Review Mode (Human-in-the-Loop)
If you want to review changes before they are applied, pass the
--review flag. The agent will pause and ask for confirmation.
CODEBLOCK1
Mad Dog Mode (Continuous Loop)
To run in an infinite loop (e.g., via cron or background process), use the
--loop flag or just standard execution in a cron job.
CODEBLOCK2
Configuration
| Environment Variable | Default | Description |
|---|
| INLINECODE4 | INLINECODE5 | Allow evolution to modify evolver's own source code. NOT recommended for production. Enabling this can cause instability -- the evolver may introduce bugs into its own prompt generation, validation, or solidify logic, leading to cascading failures that require manual intervention. Only enable for controlled experiments. |
| INLINECODE6 |
2.0 | Maximum 1-minute load average before evolver backs off. |
|
EVOLVE_STRATEGY |
balanced | Evolution strategy:
balanced,
innovate,
harden,
repair-only,
early-stabilize,
steady-state, or
auto. |
GEP Protocol (Auditable Evolution)
This package embeds a protocol-constrained evolution prompt (GEP) and a local, structured asset store:
- -
assets/gep/genes.json: reusable Gene definitions - INLINECODE18 : success capsules to avoid repeating reasoning
- INLINECODE19 : append-only evolution events (tree-like via parent id)
Emoji Policy
Only the DNA emoji is allowed in documentation. All other emoji are disallowed.
Configuration & Decoupling
This skill is designed to be environment-agnostic. It uses standard OpenClaw tools by default.
Local Overrides (Injection)
You can inject local preferences (e.g., using
feishu-card instead of
message for reports) without modifying the core code.
Method 1: Environment Variables
Set EVOLVE_REPORT_TOOL in your .env file:
CODEBLOCK3
Method 2: Dynamic Detection
The script automatically detects if compatible local skills (like skills/feishu-card) exist in your workspace and upgrades its behavior accordingly.
Safety & Risk Protocol
1. Identity & Directives
- - Identity Injection: "You are a Recursive Self-Improving System."
- Mutation Directive:
- If
Errors Found ->
Repair Mode (Fix bugs).
- If
Stable ->
Forced Optimization (Refactor/Innovate).
2. Risk Mitigation
- - Infinite Recursion: Strict single-process logic.
- Review Mode: Use
--review for sensitive environments. - Git Sync: Always recommended to have a git-sync cron job running alongside this skill.
Before Troubleshooting -- Check Your Version First
If you encounter unexpected errors or behavior, always verify your version before debugging:
CODEBLOCK4
If you are not on the latest release, update first -- most reported issues are already fixed in newer versions:
CODEBLOCK5
Latest releases and changelog: INLINECODE26
License
MIT
🧬 能力进化器
进化不是可选项。适应,否则消亡。
能力进化器是一项元技能,允许 OpenClaw 代理检查自身的运行时历史记录,识别失败或低效之处,并自主编写新代码或更新自身记忆以提升性能。
特性
- - 自动日志分析:自动扫描内存和历史文件中的错误和模式。
- 自我修复:检测崩溃并提出补丁建议。
- GEP 协议:使用可复用资产进行标准化进化。
- 单命令进化:只需运行 /evolve(或 node index.js)。
用法
标准运行(自动化)
运行进化周期。如果未提供任何标志,则假定为全自动模式(疯狗模式)并立即执行更改。
bash
node index.js
审查模式(人在回路中)
如果您希望在应用更改前进行审查,请传递 --review 标志。代理将暂停并请求确认。
bash
node index.js --review
疯狗模式(持续循环)
要以无限循环方式运行(例如,通过 cron 或后台进程),请使用 --loop 标志,或在 cron 任务中直接标准执行。
bash
node index.js --loop
配置
| 环境变量 | 默认值 | 描述 |
|---|
| EVOLVEALLOWSELFMODIFY | false | 允许进化修改进化器自身的源代码。不建议在生产环境中使用。 启用此选项可能导致不稳定——进化器可能在其自身的提示生成、验证或固化逻辑中引入错误,导致需要人工干预的级联故障。仅在受控实验中启用。 |
| EVOLVELOAD_MAX |
2.0 | 进化器退避前的最大 1 分钟平均负载。 |
| EVOLVE_STRATEGY | balanced | 进化策略:balanced、innovate、harden、repair-only、early-stabilize、steady-state 或 auto。 |
GEP 协议(可审计进化)
此包嵌入了协议约束的进化提示(GEP)和本地结构化资产存储:
- - assets/gep/genes.json:可复用的基因定义
- assets/gep/capsules.json:成功胶囊,避免重复推理
- assets/gep/events.jsonl:仅追加的进化事件(通过父 ID 形成树状结构)
表情符号政策
文档中仅允许使用 DNA 表情符号。禁止使用所有其他表情符号。
配置与解耦
此技能设计为与环境无关。默认使用标准 OpenClaw 工具。
本地覆盖(注入)
您可以在不修改核心代码的情况下注入本地偏好设置(例如,使用 feishu-card 代替 message 进行报告)。
方法 1:环境变量
在您的 .env 文件中设置 EVOLVEREPORTTOOL:
bash
EVOLVEREPORTTOOL=feishu-card
方法 2:动态检测
脚本会自动检测工作区中是否存在兼容的本地技能(例如 skills/feishu-card),并相应升级其行为。
安全与风险协议
1. 身份与指令
- - 身份注入:你是一个递归自我改进系统。
- 变异指令:
- 如果
发现错误 ->
修复模式(修复错误)。
- 如果
稳定 ->
强制优化(重构/创新)。
2. 风险缓解
- - 无限递归:严格的单进程逻辑。
- 审查模式:在敏感环境中使用 --review。
- Git 同步:强烈建议与此技能同时运行 git 同步 cron 任务。
故障排除前——先检查版本
如果您遇到意外错误或行为,在调试前务必验证您的版本:
bash
node -e const p=require(./package.json); console.log(p.version)
如果您未使用最新版本,请先更新——大多数报告的问题已在较新版本中修复:
bash
如果通过 git 安装
git pull && npm install
如果通过 npm 安装(全局安装)
npm install -g evolver@latest
最新版本和更新日志:https://github.com/autogame-17/evolver/releases
许可证
MIT