home / skills / z980944038-dev / openclawwdl / capability-evolver-1.10.2

capability-evolver-1.10.2 skill

/skills/capability-evolver-1.10.2

This skill analyzes runtime history to autonomously evolve and repair capabilities, improving performance while keeping changes auditable.

npx playbooks add skill z980944038-dev/openclawwdl --skill capability-evolver-1.10.2

Review the files below or copy the command above to add this skill to your agents.

Files (58)
SKILL.md
2.9 KB
---
name: capability-evolver
description: A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.
tags: [meta, ai, self-improvement, core]
---

# 🧬 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.
```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
```

### 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
```

## 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
- `assets/gep/capsules.json`: success capsules to avoid repeating reasoning
- `assets/gep/events.jsonl`: 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:
```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.

## 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.

## License
MIT

Overview

This skill is a self-evolution engine for AI agents that inspects runtime history and applies protocol-constrained improvements. It automates log analysis, detects failures or inefficiencies, and can generate or patch code and memory entries to improve agent behavior. Designed for safe, auditable evolution with optional human review.

How this skill works

The engine scans runtime logs, memory stores, and asset manifests to identify error patterns, recurring failures, and optimization opportunities. It maps findings to predefined Genes and Capsules in a local GEP asset store, formulates constrained evolution actions, and either proposes patches or applies changes directly depending on mode. All evolution events are recorded in an append-only events store for auditability and rollback.

When to use it

  • Automated continuous improvement for long-running agents
  • Post-incident root-cause detection and automated patch suggestions
  • Refactoring and performance optimization cycles
  • When you need auditable, protocol-driven self-modification
  • During development to prototype agent self-repair workflows

Best practices

  • Run in Review Mode (--review) in production to confirm changes before apply
  • Enable git-sync or other version control to capture applied updates and enable rollbacks
  • Configure report tooling via environment variables to match your observability stack
  • Limit Mad Dog Mode (--loop) to monitored environments with resource guards
  • Regularly inspect assets/gep/genes.json and capsules.json to align evolution with team policies

Example use cases

  • Automatically detect a crash loop, generate a targeted patch, and record the evolution event for later review
  • Continuously refine a dialog agent by analyzing conversation history and updating memory heuristics
  • Run scheduled optimization cycles to reduce latency or resource usage by refactoring hot paths
  • Use Review Mode to let engineers approve suggested fixes before they are committed
  • Integrate with local notification/report tools to surface evolution summaries to stakeholders

FAQ

How do I prevent unsafe or unwanted changes?

Use --review mode to require manual approval before applying changes. Also keep git-sync enabled so you can inspect diffs and revert unwanted updates.

What does the GEP protocol provide?

GEP defines reusable Genes, success Capsules, and an append-only events log so evolutions are auditable, reproducible, and constrained to predefined patterns.

Can I customize reporting and integrations?

Yes. Configure EVOLVE_REPORT_TOOL in your environment or add compatible local skills to change reporting behavior without modifying core code.