capability-evolver

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

🧬 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.
"进化没有选择余地。要么适应,要么消亡。"
能力进化器是一项元技能,可让OpenClaw Agent检视自身运行时历史,识别故障或低效问题,自主编写新代码或更新自身内存以提升性能。

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
    ).
  • 自动日志分析:自动扫描内存和历史文件中的错误和模式。
  • 自我修复:检测崩溃并给出补丁建议。
  • GEP 协议:通过可复用资产实现标准化进化。
  • 单命令进化:只需运行
    /evolve
    (或
    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.
bash
node index.js
执行进化周期。如果未提供任何参数,默认进入完全自动化模式(疯狗模式),会立即执行变更。
bash
node index.js

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.
bash
node index.js --review
如果你想在变更应用前先进行审核,可传入
--review
参数。Agent会暂停运行并请求确认。
bash
node index.js --review

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.
bash
node index.js --loop
如果要无限循环运行(例如通过cron或后台进程),可使用
--loop
参数,或直接在cron任务中执行标准命令。
bash
node index.js --loop

Configuration

配置

Environment VariableDefaultDescription
EVOLVE_ALLOW_SELF_MODIFY
false
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.
EVOLVE_LOAD_MAX
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
.
环境变量默认值说明
EVOLVE_ALLOW_SELF_MODIFY
false
允许进化器修改自身源代码。不建议在生产环境启用。 启用此配置可能导致不稳定——进化器可能会在自身的prompt生成、验证或固化逻辑中引入bug,引发级联故障,需要人工介入修复。仅在受控实验场景下启用。
EVOLVE_LOAD_MAX
2.0
进化器退避前可承受的最大1分钟负载平均值。
EVOLVE_STRATEGY
balanced
进化策略:
balanced
innovate
harden
repair-only
early-stabilize
steady-state
auto

GEP Protocol (Auditable Evolution)

GEP 协议(可审计进化)

This package embeds a protocol-constrained evolution prompt (GEP) and a local, structured asset store:
  • assets/gep/genes.json
    : reusable Gene definitions
  • assets/gep/capsules.json
    : success capsules to avoid repeating reasoning
  • assets/gep/events.jsonl
    : append-only evolution events (tree-like via parent id)
这个包嵌入了受协议约束的进化提示词(GEP)和本地结构化资产存储:
  • assets/gep/genes.json
    :可复用的基因定义
  • assets/gep/capsules.json
    :成功经验胶囊,避免重复推理
  • assets/gep/events.jsonl
    :仅追加写入的进化事件(通过父ID实现树状结构)

Emoji Policy

Emoji 规范

Only the DNA emoji is allowed in documentation. All other emoji are disallowed.
文档中仅允许使用DNA emoji,禁止使用其他所有emoji。

Configuration & Decoupling

配置与解耦

This skill is designed to be environment-agnostic. It uses standard OpenClaw tools by default.
该技能设计为环境无依赖,默认使用标准OpenClaw工具。

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:
bash
EVOLVE_REPORT_TOOL=feishu-card
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.
你可以注入本地偏好设置(例如使用
feishu-card
替代
message
生成报告),无需修改核心代码。
方法1:环境变量 在你的
.env
文件中设置
EVOLVE_REPORT_TOOL
bash
EVOLVE_REPORT_TOOL=feishu-card
方法2:动态检测 脚本会自动检测工作区中是否存在兼容的本地技能(如
skills/feishu-card
),并相应升级自身行为。

Safety & Risk Protocol

安全与风险协议

1. Identity & Directives

1. 身份与指令

  • Identity Injection: "You are a Recursive Self-Improving System."
  • Mutation Directive:
    • If Errors Found -> Repair Mode (Fix bugs).
    • If Stable -> Forced Optimization (Refactor/Innovate).
  • 身份注入:"你是一个递归自我改进系统。"
  • 变异指令
    • 如果发现错误 -> 修复模式(修复bug)。
    • 如果运行稳定 -> 强制优化(重构/创新)。

2. Risk Mitigation

2. 风险缓解

  • 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.
  • 无限递归:严格的单进程逻辑。
  • 审核模式:在敏感环境中使用
    --review
    参数。
  • Git 同步:强烈建议搭配运行git同步cron任务使用该技能。

Before Troubleshooting -- Check Your Version First

故障排查前 -- 请先检查版本

If you encounter unexpected errors or behavior, always verify your version before debugging:
bash
node -e "const p=require('./package.json'); console.log(p.version)"
If you are not on the latest release, update first -- most reported issues are already fixed in newer versions:
bash
undefined
如果你遇到意外错误或异常行为,调试前请务必先确认你的版本
bash
node -e "const p=require('./package.json'); console.log(p.version)"
如果你使用的不是最新版本,请先更新——大多数上报的问题都已在新版本中修复:
bash
undefined

If installed via git

如果通过git安装

git pull && npm install
git pull && npm install

If installed via npm (global install)

如果通过npm全局安装

npm install -g evolver@latest

Latest releases and changelog: `https://github.com/autogame-17/evolver/releases`
npm install -g evolver@latest

最新版本和更新日志:`https://github.com/autogame-17/evolver/releases`

License

许可证

MIT
MIT