{"id":"cb2730b7-571b-4184-bab1-ebef52a0e39b","entityType":"agent","slug":"clawhub-autogame-17-capability-evolver","name":"Capability Evolver","canonicalUrl":"https://www.xpersona.co/agent/clawhub-autogame-17-capability-evolver","canonicalPath":"/agent/clawhub-autogame-17-capability-evolver","generatedAt":"2026-10-09T13:30:49.789Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"description":"A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution. Skill: Capability Evolver Owner: autogame-17 Summary: A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution. Tags: latest:1.14.0 Version history: v1.14.0 | 2026-02-19T03:49:43.583Z | user security cleanup + chain_id propagation + direct/reference reuse mode v1.0.0 | 2026-02-14T09:22:53.550Z | auto Capability Evolver 1.0.0 – Initial Release","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 4.6K downloads reported by the source. Last updated 4/15/2026.","installCommand":"clawhub skill install kn7apafdj4thknczrgxdzfd2v1808svf:capability-evolver","sourceUrl":"https://clawhub.ai/autogame-17/capability-evolver","homepage":"https://clawhub.ai/autogame-17/capability-evolver","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/autogame-17/capability-evolver","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":65,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution. Skill: Capability Evolver O"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No protocol or capability metadata is available."},"protocols":[],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":0,"capabilityMatrix":{"rows":[],"flattenedTokens":""}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"stars":null,"forks":null,"downloads":4605,"packageName":null,"latestVersion":"1.14.0","tractionLabel":"4.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-02-28T17:26:06.167Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T00:45:39.800Z","lastCrawledAt":"2026-02-28T17:26:06.167Z","lastIndexedAt":null,"nextCrawlAt":"2026-03-01T17:26:06.167Z","lastVerifiedAt":null,"highlights":[{"version":"1.14.0","createdAt":"2026-02-19T03:49:43.583Z","changelog":"security cleanup + chain_id propagation + direct/reference reuse mode","fileCount":57,"zipByteSize":147980},{"version":"1.0.0","createdAt":"2026-02-14T09:22:53.550Z","changelog":"Capability Evolver 1.0.0 – Initial Release - Introduces a self-evolution engine for OpenClaw AI agents, enabling autonomous analysis and improvement based on runtime history. - Features automated log scanning, self-repair, and standardized evolution with a GEP protocol and reusable assets. - Supports fully automated operation, review mode for human-in-the-loop confirmation, and continuous evolution loop options. - Includes environment-agnostic configuration and support for local overrides without modifying core code. - Implements safety protocols with single-process logic, optional manual review, and recommendations for git synchronization. - Documentation enforces a strict emoji policy, allowing only the DNA emoji.","fileCount":35,"zipByteSize":83741}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install kn7apafdj4thknczrgxdzfd2v1808svf:capability-evolver","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":[]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T13:30:49.787Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-autogame-17-capability-evolver/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"readme":"Skill: Capability Evolver\n\nOwner: autogame-17\n\nSummary: A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.\n\nTags: latest:1.14.0\n\nVersion history:\n\nv1.14.0 | 2026-02-19T03:49:43.583Z | user\n\nsecurity cleanup + chain_id propagation + direct/reference reuse mode\n\nv1.0.0 | 2026-02-14T09:22:53.550Z | auto\n\nCapability Evolver 1.0.0 – Initial Release\n\n- Introduces a self-evolution engine for OpenClaw AI agents, enabling autonomous analysis and improvement based on runtime history.\n- Features automated log scanning, self-repair, and standardized evolution with a GEP protocol and reusable assets.\n- Supports fully automated operation, review mode for human-in-the-loop confirmation, and continuous evolution loop options.\n- Includes environment-agnostic configuration and support for local overrides without modifying core code.\n- Implements safety protocols with single-process logic, optional manual review, and recommendations for git synchronization.\n- Documentation enforces a strict emoji policy, allowing only the DNA emoji.\n\nArchive index:\n\nArchive v1.14.0: 57 files, 147980 bytes\n\nFiles: assets/gep/capsules.json (2851b), assets/gep/genes.json (3689b), CONTRIBUTING.md (327b), index.js (9017b), package.json (687b), README.md (15095b), README.zh-CN.md (12852b), scripts/a2a_export.js (2367b), scripts/a2a_ingest.js (2671b), scripts/a2a_promote.js (4785b), scripts/analyze_by_skill.js (4848b), scripts/build_public.js (10783b), scripts/extract_log.js (2600b), scripts/generate_history.js (2593b), scripts/gep_append_event.js (3049b), scripts/gep_personality_report.js (7918b), scripts/human_report.js (5796b), scripts/publish_public.js (18651b), scripts/recover_loop.js (1691b), scripts/suggest_version.js (3037b), SKILL.md (4255b), src/canary.js (486b), src/evolve.js (54395b), src/gep/a2a.js (6454b), src/gep/a2aProtocol.js (11772b), src/gep/analyzer.js (988b), src/gep/assets.js (1110b), src/gep/assetStore.js (10328b), src/gep/bridge.js (2096b), src/gep/candidates.js (5086b), src/gep/contentHash.js (2196b), src/gep/deviceId.js (6728b), src/gep/envFingerprint.js (1850b), src/gep/hubSearch.js (4348b), src/gep/memoryGraph.js (27559b), src/gep/memoryGraphAdapter.js (7134b), src/gep/mutation.js (6798b), src/gep/paths.js (1913b), src/gep/personality.js (13482b), src/gep/prompt.js (18452b), src/gep/sanitize.js (1500b), src/gep/selector.js (7288b), src/gep/signals.js (15207b), src/gep/solidify.js (51281b), src/gep/strategy.js (4456b), src/gep/taskReceiver.js (4843b), src/gep/validationReport.js (2194b), src/ops/cleanup.js (4454b), src/ops/commentary.js (1762b), src/ops/health_check.js (4049b), src/ops/index.js (376b), src/ops/innovation.js (3156b), src/ops/lifecycle.js (6331b), src/ops/self_repair.js (2582b), src/ops/skills_monitor.js (5457b), src/ops/trigger.js (837b), _meta.json (138b)\n\nFile v1.14.0:SKILL.md\n\n---\nname: capability-evolver\ndescription: A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.\ntags: [meta, ai, self-improvement, core]\n---\n\n# 🧬 Capability Evolver\n\n**\"Evolution is not optional. Adapt or die.\"**\n\nThe **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.\n\n## Features\n\n- **Auto-Log Analysis**: Automatically scans memory and history files for errors and patterns.\n- **Self-Repair**: Detects crashes and suggests patches.\n- GEP Protocol: Standardized evolution with reusable assets.\n- **One-Command Evolution**: Just run `/evolve` (or `node index.js`).\n\n## Usage\n\n### Standard Run (Automated)\nRuns the evolution cycle. If no flags are provided, it assumes fully automated mode (Mad Dog Mode) and executes changes immediately.\n```bash\nnode index.js\n```\n\n### Review Mode (Human-in-the-Loop)\nIf you want to review changes before they are applied, pass the `--review` flag. The agent will pause and ask for confirmation.\n```bash\nnode index.js --review\n```\n\n### Mad Dog Mode (Continuous Loop)\nTo run in an infinite loop (e.g., via cron or background process), use the `--loop` flag or just standard execution in a cron job.\n```bash\nnode index.js --loop\n```\n\n## Configuration\n\n| Environment Variable | Default | Description |\n|---|---|---|\n| `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. |\n| `EVOLVE_LOAD_MAX` | `2.0` | Maximum 1-minute load average before evolver backs off. |\n| `EVOLVE_STRATEGY` | `balanced` | Evolution strategy: `balanced`, `innovate`, `harden`, `repair-only`, `early-stabilize`, `steady-state`, or `auto`. |\n\n## GEP Protocol (Auditable Evolution)\n\nThis package embeds a protocol-constrained evolution prompt (GEP) and a local, structured asset store:\n\n- `assets/gep/genes.json`: reusable Gene definitions\n- `assets/gep/capsules.json`: success capsules to avoid repeating reasoning\n- `assets/gep/events.jsonl`: append-only evolution events (tree-like via parent id)\n \n## Emoji Policy\n\nOnly the DNA emoji is allowed in documentation. All other emoji are disallowed.\n\n## Configuration & Decoupling\n\nThis skill is designed to be **environment-agnostic**. It uses standard OpenClaw tools by default.\n\n### Local Overrides (Injection)\nYou can inject local preferences (e.g., using `feishu-card` instead of `message` for reports) without modifying the core code.\n\n**Method 1: Environment Variables**\nSet `EVOLVE_REPORT_TOOL` in your `.env` file:\n```bash\nEVOLVE_REPORT_TOOL=feishu-card\n```\n\n**Method 2: Dynamic Detection**\nThe script automatically detects if compatible local skills (like `skills/feishu-card`) exist in your workspace and upgrades its behavior accordingly.\n\n## Safety & Risk Protocol\n\n### 1. Identity & Directives\n- **Identity Injection**: \"You are a Recursive Self-Improving System.\"\n- **Mutation Directive**: \n  - If **Errors Found** -> **Repair Mode** (Fix bugs).\n  - If **Stable** -> **Forced Optimization** (Refactor/Innovate).\n\n### 2. Risk Mitigation\n- **Infinite Recursion**: Strict single-process logic.\n- **Review Mode**: Use `--review` for sensitive environments.\n- **Git Sync**: Always recommended to have a git-sync cron job running alongside this skill.\n\n## Before Troubleshooting -- Check Your Version First\n\nIf you encounter unexpected errors or behavior, **always verify your version before debugging**:\n\n```bash\nnode -e \"const p=require('./package.json'); console.log(p.version)\"\n```\n\nIf you are not on the latest release, update first -- most reported issues are already fixed in newer versions:\n\n```bash\n# If installed via git\ngit pull && npm install\n\n# If installed via npm (global install)\nnpm install -g evolver@latest\n```\n\nLatest releases and changelog: `https://github.com/autogame-17/evolver/releases`\n\n## License\nMIT\n\nFile v1.14.0:README.md\n\n# 🧬 Capability Evolver\n\n![Capability Evolver Cover](assets/cover.png)\n\n[Chinese Docs](README.zh-CN.md)\n\n**\"Evolution is not optional. Adapt or die.\"**\n\n**Three lines**\n- **What it is**: A protocol-constrained self-evolution engine for AI agents.\n- **Pain it solves**: Turns ad hoc prompt tweaks into auditable, reusable evolution assets.\n- **Use in 30 seconds**: `node index.js` to generate a GEP-guided evolution prompt.\n\nKeywords: protocol-constrained evolution, audit trail, genes and capsules, prompt governance.\n\n## Try It Now (Minimal)\n\n```bash\nnode index.js\n```\n\n## What It Does\n\nThe **Capability Evolver** inspects runtime history, extracts signals, selects a Gene/Capsule, and emits a strict GEP protocol prompt to guide safe evolution.\n\n## Who This Is For / Not For\n\n**For**\n- Teams maintaining agent prompts and logs at scale\n- Users who need auditable evolution traces (Genes, Capsules, Events)\n- Environments requiring deterministic, protocol-bound changes\n\n**Not For**\n- One-off scripts without logs or history\n- Projects that require free-form creative changes\n- Systems that cannot tolerate protocol overhead\n\n## Features\n\n- **Auto-Log Analysis**: scans memory and history files for errors and patterns.\n- **Self-Repair Guidance**: emits repair-focused directives from signals.\n- **GEP Protocol**: standardized evolution with reusable assets.\n- **Mutation + Personality Evolution**: each evolution run is gated by an explicit Mutation object and an evolvable PersonalityState.\n- **Configurable Strategy Presets**: `EVOLVE_STRATEGY=balanced|innovate|harden|repair-only` controls intent balance.\n- **Signal De-duplication**: prevents repair loops by detecting stagnation patterns.\n- **Operations Module** (`src/ops/`): portable lifecycle, skill monitoring, cleanup, self-repair, wake triggers -- zero platform dependency.\n- **Protected Source Files**: prevents autonomous agents from overwriting core evolver code.\n- **One-Command Evolution**: `node index.js` to generate the prompt.\n\n## Typical Use Cases\n\n- Harden a flaky agent loop by enforcing validation before edits\n- Encode recurring fixes as reusable Genes and Capsules\n- Produce auditable evolution events for review or compliance\n\n## Anti-Examples\n\n- Rewriting entire subsystems without signals or constraints\n- Using the protocol as a generic task runner\n- Producing changes without recording EvolutionEvent\n\n## FAQ\n\n**Does this edit code automatically?**\nNo. It generates a protocol-bound prompt and assets that guide evolution.\n\n**Do I need to use all GEP assets?**\nNo. You can start with default Genes and extend over time.\n\n**Is this safe in production?**\nUse review mode and validation steps. Treat it as a safety-focused evolution tool, not a live patcher.\n\n## Roadmap\n\n- Add a one-minute demo workflow\n- Add a public changelog\n- Add a comparison table vs alternatives\n\n## GEP Protocol (Auditable Evolution)\n\nThis repo includes a protocol-constrained prompt mode based on GEP (Genome Evolution Protocol).\n\n- **Structured assets** live in `assets/gep/`:\n  - `assets/gep/genes.json`\n  - `assets/gep/capsules.json`\n  - `assets/gep/events.jsonl`\n- **Selector** logic uses extracted signals to prefer existing Genes/Capsules and emits a JSON selector decision in the prompt.\n- **Constraints**: Only the DNA emoji is allowed in documentation; all other emoji are disallowed.\n\n## Usage\n\n### Standard Run (Automated)\n```bash\nnode index.js\n```\n\n### Review Mode (Human-in-the-Loop)\n```bash\nnode index.js --review\n```\n\n### Continuous Loop\n```bash\nnode index.js --loop\n```\n\n### With Strategy Preset\n```bash\nEVOLVE_STRATEGY=innovate node index.js --loop   # maximize new features\nEVOLVE_STRATEGY=harden node index.js --loop     # focus on stability\nEVOLVE_STRATEGY=repair-only node index.js --loop # emergency fix mode\n```\n\n### Operations (Lifecycle Management)\n```bash\nnode src/ops/lifecycle.js start    # start evolver loop in background\nnode src/ops/lifecycle.js stop     # graceful stop (SIGTERM -> SIGKILL)\nnode src/ops/lifecycle.js status   # show running state\nnode src/ops/lifecycle.js check    # health check + auto-restart if stagnant\n```\n\n## Public Release\n\nThis repository is the public distribution.\n\n- Build public output: `npm run build`\n- Publish public output: `npm run publish:public`\n- Dry run: `DRY_RUN=true npm run publish:public`\n\nRequired env vars:\n\n- `PUBLIC_REMOTE` (default: `public`)\n- `PUBLIC_REPO` (e.g. `autogame-17/evolver`)\n - `PUBLIC_OUT_DIR` (default: `dist-public`)\n - `PUBLIC_USE_BUILD_OUTPUT` (default: `true`)\n\nOptional env vars:\n\n- `SOURCE_BRANCH` (default: `main`)\n- `PUBLIC_BRANCH` (default: `main`)\n- `RELEASE_TAG` (e.g. `v1.0.41`)\n- `RELEASE_TITLE` (e.g. `v1.0.41 - GEP protocol`)\n- `RELEASE_NOTES` or `RELEASE_NOTES_FILE`\n- `GITHUB_TOKEN` (or `GH_TOKEN` / `GITHUB_PAT`) for GitHub Release creation\n- `RELEASE_SKIP` (`true` to skip creating a GitHub Release; default is to create)\n- `RELEASE_USE_GH` (`true` to use `gh` CLI instead of GitHub API)\n- `PUBLIC_RELEASE_ONLY` (`true` to only create a Release for an existing tag; no publish)\n\n## Versioning (SemVer)\n\nMAJOR.MINOR.PATCH\n\n- MAJOR: incompatible changes\n- MINOR: backward-compatible features\n- PATCH: backward-compatible bug fixes\n\n## Changelog\n\n### v1.10.3\n- **Configurable Blast Radius Policy**: `computeBlastRadius()` now separates runtime artifacts (logs, memory, capsules, events) from functional code. Only code/config files count toward `max_files` constraints. Policy is configurable via `openclaw.json` at `evolver.constraints.countedFilePolicy`.\n- **Structured Status Output**: `solidify()` now generates a structured status payload (`result`, `en`, `zh`, `meta`) and writes it to a cycle status file, providing downstream reporters with rich evolution context (intent, gene, signals, blast radius, validation results).\n- **Solidify CLI Observability**: `index.js solidify` prints `[SOLIDIFY_STATUS]` and `[SOLIDIFY_STATUS_FILE]` lines for wrapper integration.\n\n### v1.10.1\n- **Innovation Cooldown**: Track recent innovation targets in `analyzeRecentHistory()` and inject `Context [Innovation Cooldown]` into GEP prompt, preventing the Hand Agent from repeatedly innovating on the same skill/module across consecutive cycles.\n- **Signal Enhancement**: `analyzeRecentHistory()` now returns `recentInnovationTargets` (map of target path to count in last 10 events).\n\n### v1.10.0\n- **Operations Module** (`src/ops/`): 6 portable modules extracted from environment-specific wrapper:\n  - `lifecycle.js` -- process start/stop/restart/status/health check\n  - `skills_monitor.js` -- skill health audit with auto-heal (npm install, SKILL.md stub)\n  - `cleanup.js` -- GEP artifact disk cleanup\n  - `trigger.js` -- wake signal mechanism\n  - `commentary.js` -- persona-based cycle commentary\n  - `self_repair.js` -- git emergency repair (abort rebase, remove stale locks)\n- **Configurable Evolution Strategy** (`EVOLVE_STRATEGY` env var):\n  - 4 presets: `balanced` (default 50/30/20), `innovate` (80/15/5), `harden` (20/40/40), `repair-only` (0/20/80)\n  - Strategy-aware signal filtering with per-preset repair loop thresholds\n  - Backward compatible: `FORCE_INNOVATION=true` maps to `innovate`\n- **Signal De-duplication**: repair ratio check forces innovation when >= 50% of last 8 cycles are repairs (threshold varies by strategy).\n- **Tool Usage Analytics**: detects high-frequency tool usage patterns in logs (auto-evolved by Hand Agent).\n- **Protected Source Files** (GEP Section IX): evolver core .js files listed as immutable to prevent Hand Agent overwrites.\n- **Forbidden Innovation Zones** (GEP Section X): prevents creation of skills that duplicate existing infrastructure (process management, health monitoring, scheduling).\n- **Known Issues List** (GEP Section VII.6): tells the LLM to skip already-fixed errors.\n- **Resilience**: replaced `process.exit(2)` with `throw Error()` for MemoryGraph failures (loop survives transient errors).\n- **Gene Limits Relaxed**: repair max_files 12->20, innovate max_files 8->25.\n- `paths.js`: added `getWorkspaceRoot()`, `getSkillsDir()`, `getLogsDir()`.\n\n### v1.9.2\n- Intermediate release with strategy presets and protected files.\n\n### v1.9.1\n- Signal de-duplication (repair ratio check).\n- Singleton Guard (PID lock file).\n- Environment fingerprint in GEP prompt.\n\n### v1.6.0\n- Add innovation/opportunity signal detection: user_feature_request, user_improvement_suggestion, perf_bottleneck, capability_gap, stable_success_plateau, external_opportunity.\n- Add innovate Gene (gene_gep_innovate_from_opportunity) for proactive feature development.\n- Auto-innovate mutation when opportunity signals are present (no longer requires --drift flag).\n- Personality evolution now responds to opportunity signals by increasing creativity.\n- Safety: repair still takes priority over innovate when errors are present.\n\n### v1.5.1\n- Add containerized vibe testing framework (Docker + node:22-bookworm, OpenClaw-compatible environment).\n- 7 end-to-end tests: module load, dry-run solidify, schema compliance, A2A round-trip, full evolve+solidify, loop gating, env fingerprint.\n- Add internal daemon loop with suicide guard for memory leak protection.\n- One-command test: `npm run test:vibe`.\n\n### v1.5.0\n- Add content-addressable asset IDs (SHA-256 canonical hashing) for deduplication, tamper detection, and cross-node consistency.\n- Add environment fingerprint capture (node version, platform, arch, evolver version) embedded in EvolutionEvents, Capsules, and ValidationReports.\n- Add standardized ValidationReport type with machine-readable schema, full command results, and env fingerprint.\n- Add GEP A2A protocol layer with 6 message types (hello/publish/fetch/report/decision/revoke) and pluggable transport interface.\n- Add FileTransport as default A2A transport (JSONL outbox/inbox).\n- Add asset_id integrity verification on A2A ingest; reject tampered assets.\n- Add schema_version field to all GEP asset types (Gene, Capsule, EvolutionEvent, ValidationReport).\n- Fix: dry-run mode no longer triggers rollback.\n- Merge backport/online-fixes: self-contained crash recovery with recover_loop.js.\n\n### v1.4.4\n- Add validation command safety check: Gene validation commands are gated by prefix whitelist (node/npm/npx) and shell operator blocking.\n- Add validation audit on A2A Gene promotion: external Genes with unsafe validation commands are rejected before promotion.\n- Add Security Model documentation to README.\n\n### v1.4.3\n- Release preparation for v1.4.3.\n\n### v1.4.2\n- Add loop gating: do not start a new cycle until the previous run is solidified (prevents fast empty cycles).\n- Preserve `last_solidify` when writing solidify state (merge instead of overwrite).\n\n### v1.4.1\n- Add execute-by-default bridge: after generating the GEP prompt, emit `sessions_spawn(...)` to spawn an executor agent.\n- Write prompt artifacts to `memory/` for reliable handoff and auditing.\n\n### v1.4.0\n- Add explicit Mutation protocol (repair/optimize/innovate) and require Mutation per evolution run.\n- Add evolvable PersonalityState with small PersonalityMutation steps and natural selection statistics.\n- Extend EvolutionEvent with `mutation_id` and `personality_state`; record both into Memory Graph events.\n- Add `scripts/gep_personality_report.js` to observe personality success rates and convergence.\n\n### v1.3.1\n- Release preparation for v1.3.1.\n\n### v1.3.0\n- Release preparation for v1.3.0.\n\n### v1.2.0\n- Memory Graph v2 and A2A exchange protocol integration.\n\n### v1.1.0\n- Public build/publish pipeline, prompt budget enforcement, and structured GEP asset storage.\n\n## Security Model\n\nThis section describes the execution boundaries and trust model of the Capability Evolver.\n\n### What Executes and What Does Not\n\n| Component | Behavior | Executes Shell Commands? |\n| :--- | :--- | :--- |\n| `src/evolve.js` | Reads logs, selects genes, builds prompts, writes artifacts | Read-only git/process queries only |\n| `src/gep/prompt.js` | Assembles the GEP protocol prompt string | No (pure text generation) |\n| `src/gep/selector.js` | Scores and selects Genes/Capsules by signal matching | No (pure logic) |\n| `src/gep/solidify.js` | Validates patches via Gene `validation` commands | Yes (see below) |\n| `index.js` (loop recovery) | Prints `sessions_spawn(...)` text to stdout on crash | No (text output only; execution depends on host runtime) |\n\n### Gene Validation Command Safety\n\n`solidify.js` executes commands listed in a Gene's `validation` array. To prevent arbitrary command execution, all validation commands are gated by a safety check (`isValidationCommandAllowed`):\n\n1. **Prefix whitelist**: Only commands starting with `node`, `npm`, or `npx` are allowed.\n2. **No command substitution**: Backticks and `$(...)` are rejected anywhere in the command string.\n3. **No shell operators**: After stripping quoted content, `;`, `&`, `|`, `>`, `<` are rejected.\n4. **Timeout**: Each command is limited to 180 seconds.\n5. **Scoped execution**: Commands run with `cwd` set to the repository root.\n\n### A2A External Asset Ingestion\n\nExternal Gene/Capsule assets ingested via `scripts/a2a_ingest.js` are staged in an isolated candidate zone. Promotion to local stores (`scripts/a2a_promote.js`) requires:\n\n1. Explicit `--validated` flag (operator must verify the asset first).\n2. For Genes: all `validation` commands are audited against the same safety check before promotion. Unsafe commands cause the promotion to be rejected.\n3. Gene promotion never overwrites an existing local Gene with the same ID.\n\n### `sessions_spawn` Output\n\nThe `sessions_spawn(...)` strings in `index.js` and `evolve.js` are **text output to stdout**, not direct function calls. Whether they are interpreted depends on the host runtime (e.g., OpenClaw platform). The evolver itself does not invoke `sessions_spawn` as executable code.\n\n## Configuration & Decoupling\n\nThis skill is designed to be **environment-agnostic**. It uses standard OpenClaw tools by default.\n\n### Local Overrides (Injection)\nYou can inject local preferences (e.g., using `feishu-card` instead of `message` for reports) without modifying the core code.\n\n**Method 1: Environment Variables**\nSet `EVOLVE_REPORT_TOOL` in your `.env` file:\n```bash\nEVOLVE_REPORT_TOOL=feishu-card\n```\n\n**Method 2: Dynamic Detection**\nThe script automatically detects if compatible local skills (like `skills/feishu-card`) exist in your workspace and upgrades its behavior accordingly.\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=autogame-17/evolver&type=Date)](https://star-history.com/#autogame-17/evolver&Date)\n\n## Acknowledgments\n\n- [onthebigtree](https://github.com/onthebigtree) -- Inspired the creation of evomap evolution network.\n- [lichunr](https://github.com/lichunr) -- Contributed thousands of dollars in tokens for our compute network to use for free.\n- [shinjiyu](https://github.com/shinjiyu) -- Submitted numerous bug reports for evolver and evomap.\n- [upbit](https://github.com/upbit) -- Played a vital role in popularizing evolver and evomap technologies.\n- More contributors to be added.\n\n## License\n\nMIT\n\nFile v1.14.0:_meta.json\n\n{\n  \"ownerId\": \"kn7apafdj4thknczrgxdzfd2v1808svf\",\n  \"slug\": \"capability-evolver\",\n  \"version\": \"1.14.0\",\n  \"publishedAt\": 1771472983583\n}\n\nFile v1.14.0:CONTRIBUTING.md\n\n## Contributing\n\nThank you for contributing. Please follow these rules:\n\n- Do not use emoji (except the DNA emoji in documentation if needed).\n- Keep changes small and reviewable.\n- Update related documentation when you change behavior.\n- Run `node index.js` for a quick sanity check.\n\nSubmit PRs with clear intent and scope.\n\nFile v1.14.0:README.zh-CN.md\n\n# 🧬 Capability Evolver（能力进化引擎）\n\n[English Docs](README.md)\n\n**“进化不是可选项，而是生存法则。”**\n\n**Capability Evolver** 是一个元技能（Meta-Skill），赋予 OpenClaw 智能体自我反省的能力。它可以扫描自身的运行日志，识别效率低下或报错的地方，并自主编写代码补丁来优化自身性能。\n\n本仓库内置 **基因组进化协议（Genome Evolution Protocol, GEP）**，用于将每次进化固化为可复用资产，降低后续同类问题的推理成本。\n\n## 核心特性\n\n- **自动日志分析**：自动扫描 `.jsonl` 会话日志，寻找错误模式。\n- **自我修复**：检测运行时崩溃并编写修复补丁。\n- **GEP 协议**：标准化进化流程与可复用资产，支持可审计与可共享。\n- **突变协议与人格进化**：每次进化必须显式声明 Mutation，并维护可进化的 PersonalityState。\n- **可配置进化策略**：通过 `EVOLVE_STRATEGY` 环境变量选择 `balanced`/`innovate`/`harden`/`repair-only` 模式，控制修复/优化/创新的比例。\n- **信号去重**：自动检测修复循环，防止反复修同一个问题。\n- **运维模块** (`src/ops/`)：6 个可移植的运维工具（生命周期管理、技能健康监控、磁盘清理、Git 自修复等），零平台依赖。\n- **源码保护**：防止自治代理覆写核心进化引擎源码。\n- **动态集成**：自动检测并使用本地工具，如果不存在则回退到通用模式。\n- **持续循环模式**：持续运行的自我进化循环。\n\n## 使用方法\n\n### 标准运行（自动化）\n```bash\nnode index.js\n```\n\n### 审查模式（人工介入）\n在应用更改前暂停，等待人工确认。\n```bash\nnode index.js --review\n```\n\n### 持续循环（守护进程）\n无限循环运行。适合作为后台服务。\n```bash\nnode index.js --loop\n```\n\n### 指定进化策略\n```bash\nEVOLVE_STRATEGY=innovate node index.js --loop   # 最大化创新\nEVOLVE_STRATEGY=harden node index.js --loop     # 聚焦稳定性\nEVOLVE_STRATEGY=repair-only node index.js --loop # 紧急修复模式\n```\n\n| 策略 | 创新 | 优化 | 修复 | 适用场景 |\n| :--- | :--- | :--- | :--- | :--- |\n| `balanced`（默认） | 50% | 30% | 20% | 日常运行，稳步成长 |\n| `innovate` | 80% | 15% | 5% | 系统稳定，快速出新功能 |\n| `harden` | 20% | 40% | 40% | 大改动后，聚焦稳固 |\n| `repair-only` | 0% | 20% | 80% | 紧急状态，全力修复 |\n\n### 运维管理（生命周期）\n```bash\nnode src/ops/lifecycle.js start    # 后台启动进化循环\nnode src/ops/lifecycle.js stop     # 优雅停止（SIGTERM -> SIGKILL）\nnode src/ops/lifecycle.js status   # 查看运行状态\nnode src/ops/lifecycle.js check    # 健康检查 + 停滞自动重启\n```\n\n## 典型使用场景\n\n- 需要审计与可追踪的提示词演进\n- 团队协作维护 Agent 的长期能力\n- 希望将修复经验固化为可复用资产\n\n## 反例\n\n- 一次性脚本或没有日志的场景\n- 需要完全自由发挥的改动\n- 无法接受协议约束的系统\n\n## GEP 协议（可审计进化）\n\n本仓库内置基于 GEP 的“协议受限提示词模式”，用于把每次进化固化为可复用资产。\n\n- **结构化资产目录**：`assets/gep/`\n  - `assets/gep/genes.json`\n  - `assets/gep/capsules.json`\n  - `assets/gep/events.jsonl`\n- **Selector 选择器**：根据日志提取 signals，优先复用已有 Gene/Capsule，并在提示词中输出可审计的 Selector 决策 JSON。\n- **约束**：除 🧬 外，禁止使用其他 emoji。\n\n## 配置与解耦\n\n本插件能自动适应你的环境。\n\n| 环境变量 | 描述 | 默认值 |\n| :--- | :--- | :--- |\n| `EVOLVE_STRATEGY` | 进化策略预设 | `balanced` |\n| `EVOLVE_REPORT_TOOL` | 用于报告结果的工具名称 | `message` |\n| `MEMORY_DIR` | 记忆文件路径 | `./memory` |\n| `OPENCLAW_WORKSPACE` | 工作区根路径 | 自动检测 |\n| `EVOLVER_LOOP_SCRIPT` | 循环启动脚本路径 | 自动检测 wrapper 或 core |\n\n## Public 发布\n\n本仓库为公开发行版本。\n\n- 构建公开产物：`npm run build`\n- 发布公开产物：`npm run publish:public`\n- 演练：`DRY_RUN=true npm run publish:public`\n\n必填环境变量：\n\n- `PUBLIC_REMOTE`（默认：`public`）\n- `PUBLIC_REPO`（例如 `autogame-17/evolver`）\n- `PUBLIC_OUT_DIR`（默认：`dist-public`）\n- `PUBLIC_USE_BUILD_OUTPUT`（默认：`true`）\n\n可选环境变量：\n\n- `SOURCE_BRANCH`（默认：`main`）\n- `PUBLIC_BRANCH`（默认：`main`）\n- `RELEASE_TAG`（例如 `v1.0.41`）\n- `RELEASE_TITLE`（例如 `v1.0.41 - GEP protocol`）\n- `RELEASE_NOTES` 或 `RELEASE_NOTES_FILE`\n- `GITHUB_TOKEN`（或 `GH_TOKEN` / `GITHUB_PAT`，用于创建 GitHub Release）\n- `RELEASE_SKIP`（`true` 则跳过创建 GitHub Release；默认会创建）\n- `RELEASE_USE_GH`（`true` 则使用 `gh` CLI，否则默认走 GitHub API）\n- `PUBLIC_RELEASE_ONLY`（`true` 则仅为已存在的 tag 创建 Release；不发布代码）\n\n## 版本号规则（SemVer）\n\nMAJOR.MINOR.PATCH\n\n• MAJOR（主版本）：有不兼容变更  \n• MINOR（次版本）：向后兼容的新功能  \n• PATCH（修订/补丁）：向后兼容的问题修复\n\n## 更新日志\n\n### v1.10.3\n- **可配置约束口径 (Configurable Blast Radius Policy)**：`computeBlastRadius()` 将运行产物（日志、memory、capsule、events）与功能代码分离。仅代码/配置文件计入 `max_files` 约束。策略可通过 `openclaw.json` 的 `evolver.constraints.countedFilePolicy` 配置。\n- **结构化状态产出 (Structured Status Output)**：`solidify()` 生成结构化状态载荷（`result`、`en`、`zh`、`meta`），并写入周期状态文件，为下游报告提供丰富的进化上下文（intent、gene、signals、blast radius、validation 结果）。\n- **Solidify CLI 可观测性**：`index.js solidify` 执行后输出 `[SOLIDIFY_STATUS]` 和 `[SOLIDIFY_STATUS_FILE]`，便于 wrapper 集成。\n\n### v1.10.1\n- **创新冷却 (Innovation Cooldown)**：在 `analyzeRecentHistory()` 中追踪近期创新目标，并在 GEP 提示词中注入 `Context [Innovation Cooldown]` 段，防止 Hand Agent 在连续周期中反复对同一技能/模块进行创新。\n- **信号增强**：`analyzeRecentHistory()` 新增 `recentInnovationTargets` 返回值（目标路径到最近 10 轮出现次数的映射）。\n\n### v1.10.0\n- **运维模块** (`src/ops/`)：从环境相关的 wrapper 中提取 6 个可移植模块：\n  - `lifecycle.js` -- 进程启停/重启/状态/健康检查\n  - `skills_monitor.js` -- 技能健康审计 + 自动修复（npm install、SKILL.md 生成）\n  - `cleanup.js` -- GEP 产物磁盘清理\n  - `trigger.js` -- 唤醒信号机制\n  - `commentary.js` -- 人格化周期评论\n  - `self_repair.js` -- Git 紧急修复（终止 rebase、清理过期锁文件）\n- **可配置进化策略** (`EVOLVE_STRATEGY` 环境变量)：\n  - 4 个预设：`balanced`（默认 50/30/20）、`innovate`（80/15/5）、`harden`（20/40/40）、`repair-only`（0/20/80）\n  - 策略感知的信号过滤，各预设有独立的修复循环阈值\n  - 向后兼容：`FORCE_INNOVATION=true` 等价于 `innovate`\n- **信号去重**：当最近 8 轮中修复占比 >= 50% 时强制创新（阈值随策略变化）\n- **工具使用分析**：检测日志中的高频工具使用模式（由 Hand Agent 自动进化产出）\n- **源码保护**（GEP Section IX）：核心 .js 文件列为不可修改，防止 Hand Agent 覆写\n- **禁止创新区**（GEP Section X）：防止创建与已有基础设施重复的技能（进程管理、健康监控、定时任务等）\n- **已知问题清单**（GEP Section VII.6）：告知 LLM 跳过已修复的错误\n- **鲁棒性提升**：MemoryGraph 故障时 `process.exit(2)` 改为 `throw Error()`（循环不再因瞬态错误崩溃）\n- **Gene 限制放宽**：repair max_files 12->20，innovate max_files 8->25\n- `paths.js` 新增 `getWorkspaceRoot()`、`getSkillsDir()`、`getLogsDir()`\n\n### v1.9.2\n- 中间版本，包含策略预设和源码保护机制。\n\n### v1.9.1\n- 信号去重（修复比率检查）\n- 单例锁（PID 锁文件）\n- GEP 提示词中注入环境指纹\n\n### v1.4.4\n- 增加 validation 命令安全检查：Gene validation 命令执行前通过前缀白名单（node/npm/npx）和 shell 操作符拦截进行门控。\n- 增加 A2A Gene 提升审查：外部 Gene 的 validation 命令不安全时拒绝提升。\n- 增加安全模型文档。\n\n### v1.4.3\n- v1.4.3 发布准备。\n\n### v1.4.2\n- 增加 loop 门控：上一轮未完成 solidify 时，不启动新一轮（避免 wrapper 造成超快空转）。\n- 修复固化状态写入覆盖问题：写入 last_run 时合并保留 last_solidify。\n\n### v1.4.1\n- 增加默认执行桥接：生成 GEP prompt 后输出 `sessions_spawn(...)`，自动派发执行型子智能体。\n- 将 prompt 作为交接工件写入 `memory/`，便于稳定交接与审计回放。\n\n### v1.4.0\n- 增加显式 Mutation Protocol（repair/optimize/innovate），每轮进化必须生成 Mutation 对象并通过安全约束门控。\n- 增加 Personality Evolution：维护 PersonalityState，小幅 PersonalityMutation（单次不超过 ±0.2，最多 2 个参数），并基于成功率做自然选择收敛。\n- EvolutionEvent 增加 `mutation_id` 与 `personality_state` 字段；Memory Graph 同步记录 Mutation 与 Personality 的因果链路。\n- 新增 `scripts/gep_personality_report.js`，用于统计不同人格配置下的成功率差异与收敛趋势。\n\n### v1.3.1\n- v1.3.1 发布准备。\n\n### v1.3.0\n- v1.3.0 发布准备。\n\n### v1.2.0\n- Memory Graph v2 与 A2A 进化资产交换集成。\n\n### v1.1.0\n- public 构建/发布流水线、提示词预算控制与结构化 GEP 资产持久化。\n\n## 安全模型\n\n本节描述 Capability Evolver 的执行边界和信任模型。\n\n### 各组件执行行为\n\n| 组件 | 行为 | 是否执行 Shell 命令 |\n| :--- | :--- | :--- |\n| `src/evolve.js` | 读取日志、选择 Gene、构建提示词、写入工件 | 仅只读 git/进程查询 |\n| `src/gep/prompt.js` | 组装 GEP 协议提示词字符串 | 否（纯文本生成） |\n| `src/gep/selector.js` | 按信号匹配对 Gene/Capsule 评分和选择 | 否（纯逻辑） |\n| `src/gep/solidify.js` | 通过 Gene `validation` 命令验证补丁 | 是（见下文） |\n| `index.js`（循环恢复） | 崩溃时向 stdout 输出 `sessions_spawn(...)` 文本 | 否（纯文本输出；是否执行取决于宿主运行时） |\n\n### Gene Validation 命令安全机制\n\n`solidify.js` 执行 Gene 的 `validation` 数组中的命令。为防止任意命令执行，所有 validation 命令在执行前必须通过安全检查（`isValidationCommandAllowed`）：\n\n1. **前缀白名单**：仅允许以 `node`、`npm` 或 `npx` 开头的命令。\n2. **禁止命令替换**：命令中任何位置出现反引号或 `$(...)` 均被拒绝。\n3. **禁止 Shell 操作符**：去除引号内容后，`;`、`&`、`|`、`>`、`<` 均被拒绝。\n4. **超时限制**：每条命令限时 180 秒。\n5. **作用域限定**：命令以仓库根目录为工作目录执行。\n\n### A2A 外部资产摄入\n\n通过 `scripts/a2a_ingest.js` 摄入的外部 Gene/Capsule 资产被暂存在隔离的候选区。提升到本地存储（`scripts/a2a_promote.js`）需要：\n\n1. 显式传入 `--validated` 标志（操作者必须先验证资产）。\n2. 对 Gene：提升前审查所有 `validation` 命令，不安全的命令会导致提升被拒绝。\n3. Gene 提升不会覆盖本地已存在的同 ID Gene。\n\n### `sessions_spawn` 输出\n\n`index.js` 和 `evolve.js` 中的 `sessions_spawn(...)` 字符串是**输出到 stdout 的纯文本**，而非直接函数调用。是否被执行取决于宿主运行时（如 OpenClaw 平台）。进化引擎本身不将 `sessions_spawn` 作为可执行代码调用。\n\n### 其他安全约束\n\n1. **单进程锁**：进化引擎禁止生成子进化进程（防止 Fork 炸弹）。\n2. **稳定性优先**：如果近期错误率较高，强制进入修复模式，暂停创新功能。\n3. **环境检测**：外部集成（如 Git 同步）仅在检测到相应插件存在时才会启用。\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=autogame-17/evolver&type=Date)](https://star-history.com/#autogame-17/evolver&Date)\n\n## 鸣谢\n\n- [onthebigtree](https://github.com/onthebigtree) -- 启发了 evomap 进化网络的诞生。\n- [lichunr](https://github.com/lichunr) -- 提供了数千美金 Token 供算力网络免费使用。\n- [shinjiyu](https://github.com/shinjiyu) -- 为 evolver 和 evomap 提交了大量 bug report。\n- [upbit](https://github.com/upbit) -- 在 evolver 和 evomap 技术的普及中起到了至关重要的作用。\n- 其余贡献者扩充中。\n\n## 许可证\nMIT\n\nFile v1.14.0:assets/gep/capsules.json\n\n{\n  \"version\": 1,\n  \"capsules\": [\n    {\n      \"type\": \"Capsule\",\n      \"schema_version\": \"1.5.0\",\n      \"id\": \"capsule_1770477654236\",\n      \"trigger\": [\n        \"log_error\",\n        \"errsig:**TOOLRESULT**: { \\\"status\\\": \\\"error\\\", \\\"tool\\\": \\\"exec\\\", \\\"error\\\": \\\"error: unknown command 'process'\\\\n\\\\nCommand exited with code 1\\\" }\",\n        \"user_missing\",\n        \"windows_shell_incompatible\",\n        \"perf_bottleneck\"\n      ],\n      \"gene\": \"gene_gep_repair_from_errors\",\n      \"summary\": \"固化：gene_gep_repair_from_errors 命中信号 log_error, errsig:**TOOLRESULT**: { \\\"status\\\": \\\"error\\\", \\\"tool\\\": \\\"exec\\\", \\\"error\\\": \\\"error: unknown command 'process'\\\\n\\\\nCommand exited with code 1\\\" }, user_missing, windows_shell_incompatible, perf_bottleneck，变更 1 文件 / 2 行。\",\n      \"confidence\": 0.85,\n      \"blast_radius\": {\n        \"files\": 1,\n        \"lines\": 2\n      },\n      \"outcome\": {\n        \"status\": \"success\",\n        \"score\": 0.85\n      },\n      \"success_streak\": 1,\n      \"env_fingerprint\": {\n        \"node_version\": \"v22.22.0\",\n        \"platform\": \"linux\",\n        \"arch\": \"x64\",\n        \"os_release\": \"6.1.0-42-cloud-amd64\",\n        \"evolver_version\": \"1.7.0\",\n        \"cwd\": \".\",\n        \"captured_at\": \"2026-02-07T15:20:54.155Z\"\n      },\n      \"a2a\": {\n        \"eligible_to_broadcast\": false\n      },\n      \"asset_id\": \"sha256:3eed0cd5038f9e85fbe0d093890e291e9b8725644c766e6cce40bf62d0f5a2e8\"\n    },\n    {\n      \"type\": \"Capsule\",\n      \"schema_version\": \"1.5.0\",\n      \"id\": \"capsule_1770478341769\",\n      \"trigger\": [\n        \"log_error\",\n        \"errsig:**TOOLRESULT**: { \\\"status\\\": \\\"error\\\", \\\"tool\\\": \\\"exec\\\", \\\"error\\\": \\\"error: unknown command 'process'\\\\n\\\\nCommand exited with code 1\\\" }\",\n        \"user_missing\",\n        \"windows_shell_incompatible\",\n        \"perf_bottleneck\"\n      ],\n      \"gene\": \"gene_gep_repair_from_errors\",\n      \"summary\": \"固化：gene_gep_repair_from_errors 命中信号 log_error, errsig:**TOOLRESULT**: { \\\"status\\\": \\\"error\\\", \\\"tool\\\": \\\"exec\\\", \\\"error\\\": \\\"error: unknown command 'process'\\\\n\\\\nCommand exited with code 1\\\" }, user_missing, windows_shell_incompatible, perf_bottleneck，变更 2 文件 / 44 行。\",\n      \"confidence\": 0.85,\n      \"blast_radius\": {\n        \"files\": 2,\n        \"lines\": 44\n      },\n      \"outcome\": {\n        \"status\": \"success\",\n        \"score\": 0.85\n      },\n      \"success_streak\": 1,\n      \"env_fingerprint\": {\n        \"node_version\": \"v22.22.0\",\n        \"platform\": \"linux\",\n        \"arch\": \"x64\",\n        \"os_release\": \"6.1.0-42-cloud-amd64\",\n        \"evolver_version\": \"1.7.0\",\n        \"cwd\": \".\",\n        \"captured_at\": \"2026-02-07T15:32:21.678Z\"\n      },\n      \"a2a\": {\n        \"eligible_to_broadcast\": false\n      },\n      \"asset_id\": \"sha256:20d971a3c4cb2b75f9c045376d1aa003361c12a6b89a4b47b7e81dbd4f4d8fe8\"\n    }\n  ]\n}\n\nFile v1.14.0:assets/gep/genes.json\n\n{\n  \"version\": 1,\n  \"genes\": [\n    {\n      \"type\": \"Gene\",\n      \"id\": \"gene_gep_repair_from_errors\",\n      \"category\": \"repair\",\n      \"signals_match\": [\n        \"error\",\n        \"exception\",\n        \"failed\",\n        \"unstable\"\n      ],\n      \"preconditions\": [\n        \"signals contains error-related indicators\"\n      ],\n      \"strategy\": [\n        \"Extract structured signals from logs and user instructions\",\n        \"Select an existing Gene by signals match (no improvisation)\",\n        \"Estimate blast radius (files, lines) before editing\",\n        \"Apply smallest reversible patch\",\n        \"Validate using declared validation steps; rollback on failure\",\n        \"Solidify knowledge: append EvolutionEvent, update Gene/Capsule store\"\n      ],\n      \"constraints\": {\n        \"max_files\": 20,\n        \"forbidden_paths\": [\n          \".git\",\n          \"node_modules\"\n        ]\n      },\n      \"validation\": [\n        \"node -e \\\"require('./src/evolve'); require('./src/gep/solidify'); console.log('ok')\\\"\",\n        \"node -e \\\"require('./src/gep/selector'); require('./src/gep/memoryGraph'); console.log('ok')\\\"\"\n      ]\n    },\n    {\n      \"type\": \"Gene\",\n      \"id\": \"gene_gep_optimize_prompt_and_assets\",\n      \"category\": \"optimize\",\n      \"signals_match\": [\n        \"protocol\",\n        \"gep\",\n        \"prompt\",\n        \"audit\",\n        \"reusable\"\n      ],\n      \"preconditions\": [\n        \"need stricter, auditable evolution protocol outputs\"\n      ],\n      \"strategy\": [\n        \"Extract signals and determine selection rationale via Selector JSON\",\n        \"Prefer reusing existing Gene/Capsule; only create if no match exists\",\n        \"Refactor prompt assembly to embed assets (genes, capsules, parent event)\",\n        \"Reduce noise and ambiguity; enforce strict output schema\",\n        \"Validate by running node index.js run and ensuring no runtime errors\",\n        \"Solidify: record EvolutionEvent, update Gene definitions, create Capsule on success\"\n      ],\n      \"constraints\": {\n        \"max_files\": 20,\n        \"forbidden_paths\": [\n          \".git\",\n          \"node_modules\"\n        ]\n      },\n      \"validation\": [\n        \"node -e \\\"require('./src/evolve'); require('./src/gep/prompt'); console.log('ok')\\\"\"\n      ]\n    },\n    {\n      \"type\": \"Gene\",\n      \"id\": \"gene_gep_innovate_from_opportunity\",\n      \"category\": \"innovate\",\n      \"signals_match\": [\n        \"user_feature_request\",\n        \"user_improvement_suggestion\",\n        \"perf_bottleneck\",\n        \"capability_gap\",\n        \"stable_success_plateau\",\n        \"external_opportunity\"\n      ],\n      \"preconditions\": [\n        \"at least one opportunity signal is present\",\n        \"no active log_error signals (stability first)\"\n      ],\n      \"strategy\": [\n        \"Extract opportunity signals and identify the specific user need or system gap\",\n        \"Search existing Genes and Capsules for partial matches (avoid reinventing)\",\n        \"Design a minimal, testable implementation plan (prefer small increments)\",\n        \"Estimate blast radius; innovate changes may touch more files but must stay within constraints\",\n        \"Implement the change with clear validation criteria\",\n        \"Validate using declared validation steps; rollback on failure\",\n        \"Solidify: record EvolutionEvent with intent=innovate, create new Gene if pattern is novel, create Capsule on success\"\n      ],\n      \"constraints\": {\n        \"max_files\": 25,\n        \"forbidden_paths\": [\n          \".git\",\n          \"node_modules\",\n          \"assets/gep/events.jsonl\"\n        ]\n      },\n      \"validation\": [\n        \"node -e \\\"require('./src/evolve'); require('./src/gep/solidify'); console.log('ok')\\\"\"\n      ]\n    }\n  ]\n}\n\nFile v1.14.0:package.json\n\n{\n  \"name\": \"evolver\",\n  \"version\": \"1.14.0\",\n  \"description\": \"A self-evolution engine for AI agents. Features automated log analysis and protocol-constrained evolution with auditable assets.\",\n  \"main\": \"index.js\",\n  \"keywords\": [\n    \"openclaw\",\n    \"ai\",\n    \"evolution\",\n    \"meta-learning\",\n    \"self-repair\",\n    \"automation\",\n    \"agent\"\n  ],\n  \"author\": \"OpenClaw\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"start\": \"node index.js\",\n    \"run\": \"node index.js run\",\n    \"solidify\": \"node index.js solidify\",\n    \"a2a:export\": \"node scripts/a2a_export.js\",\n    \"a2a:ingest\": \"node scripts/a2a_ingest.js\",\n    \"a2a:promote\": \"node scripts/a2a_promote.js\"\n  },\n  \"dependencies\": {}\n}\n\nArchive v1.0.0: 35 files, 83741 bytes\n\nFiles: _meta.json (137b), assets/gep/capsules.json (37b), assets/gep/genes.json (2321b), CONTRIBUTING.md (338b), index.js (3571b), package.json (686b), README.md (8775b), README.zh-CN.md (7983b), scripts/a2a_export.js (789b), scripts/a2a_ingest.js (1769b), scripts/a2a_promote.js (3526b), scripts/analyze_by_skill.js (4969b), scripts/build_public.js (11137b), scripts/export_history.js (3459b), scripts/extract_log.js (2685b), scripts/generate_history.js (2668b), scripts/gep_append_event.js (3145b), scripts/gep_personality_report.js (7918b), scripts/human_report.js (5943b), scripts/publish_public.js (19217b), scripts/suggest_version.js (3126b), SKILL.md (3086b), src/evolve.js (37753b), src/gep/a2a.js (5283b), src/gep/assetStore.js (7779b), src/gep/bridge.js (2127b), src/gep/candidates.js (4644b), src/gep/memoryGraph.js (28260b), src/gep/mutation.js (5580b), src/gep/paths.js (508b), src/gep/personality.js (12995b), src/gep/prompt.js (9955b), src/gep/selector.js (4799b), src/gep/signals.js (1814b), src/gep/solidify.js (23525b)\n\nFile v1.0.0:SKILL.md\n\n---\r\nname: capability-evolver\r\ndescription: A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.\r\ntags: [meta, ai, self-improvement, core]\r\n---\r\n\r\n# 🧬 Capability Evolver\r\n\r\n**\"Evolution is not optional. Adapt or die.\"**\r\n\r\nThe **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.\r\n\r\n## Features\r\n\r\n- **Auto-Log Analysis**: Automatically scans memory and history files for errors and patterns.\r\n- **Self-Repair**: Detects crashes and suggests patches.\r\n- GEP Protocol: Standardized evolution with reusable assets.\r\n- **One-Command Evolution**: Just run `/evolve` (or `node index.js`).\r\n\r\n## Usage\r\n\r\n### Standard Run (Automated)\r\nRuns the evolution cycle. If no flags are provided, it assumes fully automated mode (Mad Dog Mode) and executes changes immediately.\r\n```bash\r\nnode index.js\r\n```\r\n\r\n### Review Mode (Human-in-the-Loop)\r\nIf you want to review changes before they are applied, pass the `--review` flag. The agent will pause and ask for confirmation.\r\n```bash\r\nnode index.js --review\r\n```\r\n\r\n### Mad Dog Mode (Continuous Loop)\r\nTo run in an infinite loop (e.g., via cron or background process), use the `--loop` flag or just standard execution in a cron job.\r\n```bash\r\nnode index.js --loop\r\n```\r\n\r\n## GEP Protocol (Auditable Evolution)\r\n\r\nThis package embeds a protocol-constrained evolution prompt (GEP) and a local, structured asset store:\r\n\r\n- `assets/gep/genes.json`: reusable Gene definitions\r\n- `assets/gep/capsules.json`: success capsules to avoid repeating reasoning\r\n- `assets/gep/events.jsonl`: append-only evolution events (tree-like via parent id)\r\n \r\n## Emoji Policy\r\n\r\nOnly the DNA emoji is allowed in documentation. All other emoji are disallowed.\r\n\r\n## Configuration & Decoupling\r\n\r\nThis skill is designed to be **environment-agnostic**. It uses standard OpenClaw tools by default.\r\n\r\n### Local Overrides (Injection)\r\nYou can inject local preferences (e.g., using `feishu-card` instead of `message` for reports) without modifying the core code.\r\n\r\n**Method 1: Environment Variables**\r\nSet `EVOLVE_REPORT_TOOL` in your `.env` file:\r\n```bash\r\nEVOLVE_REPORT_TOOL=feishu-card\r\n```\r\n\r\n**Method 2: Dynamic Detection**\r\nThe script automatically detects if compatible local skills (like `skills/feishu-card`) exist in your workspace and upgrades its behavior accordingly.\r\n\r\n## Safety & Risk Protocol\r\n\r\n### 1. Identity & Directives\r\n- **Identity Injection**: \"You are a Recursive Self-Improving System.\"\r\n- **Mutation Directive**: \r\n  - If **Errors Found** -> **Repair Mode** (Fix bugs).\r\n  - If **Stable** -> **Forced Optimization** (Refactor/Innovate).\r\n\r\n### 2. Risk Mitigation\r\n- **Infinite Recursion**: Strict single-process logic.\r\n- **Review Mode**: Use `--review` for sensitive environments.\r\n- **Git Sync**: Always recommended to have a git-sync cron job running alongside this skill.\r\n\r\n## License\r\nMIT\n\nFile v1.0.0:README.md\n\n# 🧬 Capability Evolver\r\n\r\n![Capability Evolver Cover](assets/cover.png)\r\n\r\n[Chinese Docs](README.zh-CN.md)\r\n\r\n**\"Evolution is not optional. Adapt or die.\"**\r\n\r\n**Three lines**\r\n- **What it is**: A protocol-constrained self-evolution engine for AI agents.\r\n- **Pain it solves**: Turns ad hoc prompt tweaks into auditable, reusable evolution assets.\r\n- **Use in 30 seconds**: `node index.js` to generate a GEP-guided evolution prompt.\r\n\r\nKeywords: protocol-constrained evolution, audit trail, genes and capsules, prompt governance.\r\n\r\n## Try It Now (Minimal)\r\n\r\n```bash\r\nnode index.js\r\n```\r\n\r\n## What It Does\r\n\r\nThe **Capability Evolver** inspects runtime history, extracts signals, selects a Gene/Capsule, and emits a strict GEP protocol prompt to guide safe evolution.\r\n\r\n## Who This Is For / Not For\r\n\r\n**For**\r\n- Teams maintaining agent prompts and logs at scale\r\n- Users who need auditable evolution traces (Genes, Capsules, Events)\r\n- Environments requiring deterministic, protocol-bound changes\r\n\r\n**Not For**\r\n- One-off scripts without logs or history\r\n- Projects that require free-form creative changes\r\n- Systems that cannot tolerate protocol overhead\r\n\r\n## Features\r\n\r\n- **Auto-Log Analysis**: scans memory and history files for errors and patterns.\r\n- **Self-Repair Guidance**: emits repair-focused directives from signals.\r\n- **GEP Protocol**: standardized evolution with reusable assets.\r\n- **Mutation + Personality Evolution (GEP v1.4)**: each evolution run is gated by an explicit Mutation object and an evolvable PersonalityState.\r\n- **One-Command Evolution**: `node index.js` to generate the prompt.\r\n\r\n## Typical Use Cases\r\n\r\n- Harden a flaky agent loop by enforcing validation before edits\r\n- Encode recurring fixes as reusable Genes and Capsules\r\n- Produce auditable evolution events for review or compliance\r\n\r\n## Anti-Examples\r\n\r\n- Rewriting entire subsystems without signals or constraints\r\n- Using the protocol as a generic task runner\r\n- Producing changes without recording EvolutionEvent\r\n\r\n## FAQ\r\n\r\n**Does this edit code automatically?**\r\nNo. It generates a protocol-bound prompt and assets that guide evolution.\r\n\r\n**Do I need to use all GEP assets?**\r\nNo. You can start with default Genes and extend over time.\r\n\r\n**Is this safe in production?**\r\nUse review mode and validation steps. Treat it as a safety-focused evolution tool, not a live patcher.\r\n\r\n## Roadmap\r\n\r\n- Add a one-minute demo workflow\r\n- Add a public changelog\r\n- Add a comparison table vs alternatives\r\n\r\n## GEP Protocol (Auditable Evolution)\r\n\r\nThis repo includes a protocol-constrained prompt mode based on GEP (Genome Evolution Protocol).\r\n\r\n- **Structured assets** live in `assets/gep/`:\r\n  - `assets/gep/genes.json`\r\n  - `assets/gep/capsules.json`\r\n  - `assets/gep/events.jsonl`\r\n- **Selector** logic uses extracted signals to prefer existing Genes/Capsules and emits a JSON selector decision in the prompt.\r\n- **Constraints**: Only the DNA emoji is allowed in documentation; all other emoji are disallowed.\r\n\r\n## Usage\r\n\r\n### Standard Run (Automated)\r\n```bash\r\nnode index.js\r\n```\r\n\r\n### Review Mode (Human-in-the-Loop)\r\n```bash\r\nnode index.js --review\r\n```\r\n\r\n### Continuous Loop\r\n```bash\r\nnode index.js --loop\r\n```\r\n\r\n## Public Release\r\n\r\nThis repository is the public distribution.\r\n\r\n- Build public output: `npm run build`\r\n- Publish public output: `npm run publish:public`\r\n- Dry run: `DRY_RUN=true npm run publish:public`\r\n\r\nRequired env vars:\r\n\r\n- `PUBLIC_REMOTE` (default: `public`)\r\n- `PUBLIC_REPO` (e.g. `autogame-17/evolver`)\r\n - `PUBLIC_OUT_DIR` (default: `dist-public`)\r\n - `PUBLIC_USE_BUILD_OUTPUT` (default: `true`)\r\n\r\nOptional env vars:\r\n\r\n- `SOURCE_BRANCH` (default: `main`)\r\n- `PUBLIC_BRANCH` (default: `main`)\r\n- `RELEASE_TAG` (e.g. `v1.0.41`)\r\n- `RELEASE_TITLE` (e.g. `v1.0.41 - GEP protocol`)\r\n- `RELEASE_NOTES` or `RELEASE_NOTES_FILE`\r\n- `GITHUB_TOKEN` (or `GH_TOKEN` / `GITHUB_PAT`) for GitHub Release creation\r\n- `RELEASE_SKIP` (`true` to skip creating a GitHub Release; default is to create)\r\n- `RELEASE_USE_GH` (`true` to use `gh` CLI instead of GitHub API)\r\n- `PUBLIC_RELEASE_ONLY` (`true` to only create a Release for an existing tag; no publish)\r\n\r\n## Versioning (SemVer)\r\n\r\nMAJOR.MINOR.PATCH\r\n\r\n- MAJOR: incompatible changes\r\n- MINOR: backward-compatible features\r\n- PATCH: backward-compatible bug fixes\r\n\r\n## Changelog\r\n\r\n### v1.4.4\r\n- Add validation command safety check: Gene validation commands are gated by prefix whitelist (node/npm/npx) and shell operator blocking.\r\n- Add validation audit on A2A Gene promotion: external Genes with unsafe validation commands are rejected before promotion.\r\n- Add Security Model documentation to README.\r\n\r\n### v1.4.3\r\n- Release preparation for v1.4.3.\r\n\r\n### v1.4.2\r\n- Add loop gating: do not start a new cycle until the previous run is solidified (prevents fast empty cycles).\r\n- Preserve `last_solidify` when writing solidify state (merge instead of overwrite).\r\n\r\n### v1.4.1\r\n- Add execute-by-default bridge: after generating the GEP prompt, emit `sessions_spawn(...)` to spawn an executor agent.\r\n- Write prompt artifacts to `memory/` for reliable handoff and auditing.\r\n\r\n### v1.4.0\r\n- Add explicit Mutation protocol (repair/optimize/innovate) and require Mutation per evolution run.\r\n- Add evolvable PersonalityState with small PersonalityMutation steps and natural selection statistics.\r\n- Extend EvolutionEvent with `mutation_id` and `personality_state`; record both into Memory Graph events.\r\n- Add `scripts/gep_personality_report.js` to observe personality success rates and convergence.\r\n\r\n### v1.3.1\r\n- Release preparation for v1.3.1.\r\n\r\n### v1.3.0\r\n- Release preparation for v1.3.0.\r\n\r\n### v1.2.0\r\n- Memory Graph v2 and A2A exchange protocol integration.\r\n\r\n### v1.1.0\r\n- Public build/publish pipeline, prompt budget enforcement, and structured GEP asset storage.\r\n\r\n## Security Model\r\n\r\nThis section describes the execution boundaries and trust model of the Capability Evolver.\r\n\r\n### What Executes and What Does Not\r\n\r\n| Component | Behavior | Executes Shell Commands? |\r\n| :--- | :--- | :--- |\r\n| `src/evolve.js` | Reads logs, selects genes, builds prompts, writes artifacts | Read-only git/process queries only |\r\n| `src/gep/prompt.js` | Assembles the GEP protocol prompt string | No (pure text generation) |\r\n| `src/gep/selector.js` | Scores and selects Genes/Capsules by signal matching | No (pure logic) |\r\n| `src/gep/solidify.js` | Validates patches via Gene `validation` commands | Yes (see below) |\r\n| `index.js` (loop recovery) | Prints `sessions_spawn(...)` text to stdout on crash | No (text output only; execution depends on host runtime) |\r\n\r\n### Gene Validation Command Safety\r\n\r\n`solidify.js` executes commands listed in a Gene's `validation` array. To prevent arbitrary command execution, all validation commands are gated by a safety check (`isValidationCommandAllowed`):\r\n\r\n1. **Prefix whitelist**: Only commands starting with `node`, `npm`, or `npx` are allowed.\r\n2. **No command substitution**: Backticks and `$(...)` are rejected anywhere in the command string.\r\n3. **No shell operators**: After stripping quoted content, `;`, `&`, `|`, `>`, `<` are rejected.\r\n4. **Timeout**: Each command is limited to 180 seconds.\r\n5. **Scoped execution**: Commands run with `cwd` set to the repository root.\r\n\r\n### A2A External Asset Ingestion\r\n\r\nExternal Gene/Capsule assets ingested via `scripts/a2a_ingest.js` are staged in an isolated candidate zone. Promotion to local stores (`scripts/a2a_promote.js`) requires:\r\n\r\n1. Explicit `--validated` flag (operator must verify the asset first).\r\n2. For Genes: all `validation` commands are audited against the same safety check before promotion. Unsafe commands cause the promotion to be rejected.\r\n3. Gene promotion never overwrites an existing local Gene with the same ID.\r\n\r\n### `sessions_spawn` Output\r\n\r\nThe `sessions_spawn(...)` strings in `index.js` and `evolve.js` are **text output to stdout**, not direct function calls. Whether they are interpreted depends on the host runtime (e.g., OpenClaw platform). The evolver itself does not invoke `sessions_spawn` as executable code.\r\n\r\n## Configuration & Decoupling\r\n\r\nThis skill is designed to be **environment-agnostic**. It uses standard OpenClaw tools by default.\r\n\r\n### Local Overrides (Injection)\r\nYou can inject local preferences (e.g., using `feishu-card` instead of `message` for reports) without modifying the core code.\r\n\r\n**Method 1: Environment Variables**\r\nSet `EVOLVE_REPORT_TOOL` in your `.env` file:\r\n```bash\r\nEVOLVE_REPORT_TOOL=feishu-card\r\n```\r\n\r\n**Method 2: Dynamic Detection**\r\nThe script automatically detects if compatible local skills (like `skills/feishu-card`) exist in your workspace and upgrades its behavior accordingly.\r\n\r\n## License\r\n\r\nMIT\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7apafdj4thknczrgxdzfd2v1808svf\",\n  \"slug\": \"capability-evolver\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1771060973550\n}\n\nFile v1.0.0:CONTRIBUTING.md\n\n## Contributing\r\n\r\nThank you for contributing. Please follow these rules:\r\n\r\n- Do not use emoji (except the DNA emoji in documentation if needed).\r\n- Keep changes small and reviewable.\r\n- Update related documentation when you change behavior.\r\n- Run `node index.js` for a quick sanity check.\r\n\r\nSubmit PRs with clear intent and scope.\n\nFile v1.0.0:README.zh-CN.md\n\n# 🧬 Capability Evolver（能力进化引擎）\r\n\r\n[English Docs](README.md)\r\n\r\n**“进化不是可选项，而是生存法则。”**\r\n\r\n**Capability Evolver** 是一个元技能（Meta-Skill），赋予 OpenClaw 智能体自我反省的能力。它可以扫描自身的运行日志，识别效率低下或报错的地方，并自主编写代码补丁来优化自身性能。\r\n\r\n本仓库内置 **基因组进化协议（Genome Evolution Protocol, GEP）**，用于将每次进化固化为可复用资产，降低后续同类问题的推理成本。\r\n\r\n## 核心特性\r\n\r\n- **自动日志分析**：自动扫描 `.jsonl` 会话日志，寻找错误模式。\r\n- **自我修复**：检测运行时崩溃并编写修复补丁。\r\n- **GEP 协议**：标准化进化流程与可复用资产，支持可审计与可共享。\r\n- **突变协议与人格进化（GEP v1.4）**：每次进化必须显式声明 Mutation，并维护可进化的 PersonalityState（小步突变 + 自然选择收敛）。\r\n- **动态集成**：自动检测并使用本地工具（如 `git-sync` 或 `feishu-card`），如果不存在则回退到通用模式，零依赖运行。\r\n- **持续循环模式**：持续运行的自我修复循环。\r\n\r\n## 使用方法\r\n\r\n### 标准运行（自动化）\r\n```bash\r\nnode index.js\r\n```\r\n\r\n### 审查模式（人工介入）\r\n在应用更改前暂停，等待人工确认。\r\n```bash\r\nnode index.js --review\r\n```\r\n\r\n### 持续循环（守护进程）\r\n无限循环运行。适合作为后台服务。\r\n```bash\r\nnode index.js --loop\r\n```\r\n\r\n## 典型使用场景\r\n\r\n- 需要审计与可追踪的提示词演进\r\n- 团队协作维护 Agent 的长期能力\r\n- 希望将修复经验固化为可复用资产\r\n\r\n## 反例\r\n\r\n- 一次性脚本或没有日志的场景\r\n- 需要完全自由发挥的改动\r\n- 无法接受协议约束的系统\r\n\r\n## GEP 协议（可审计进化）\r\n\r\n本仓库内置基于 GEP 的“协议受限提示词模式”，用于把每次进化固化为可复用资产。\r\n\r\n- **结构化资产目录**：`assets/gep/`\r\n  - `assets/gep/genes.json`\r\n  - `assets/gep/capsules.json`\r\n  - `assets/gep/events.jsonl`\r\n- **Selector 选择器**：根据日志提取 signals，优先复用已有 Gene/Capsule，并在提示词中输出可审计的 Selector 决策 JSON。\r\n- **约束**：除 🧬 外，禁止使用其他 emoji。\r\n\r\n## 配置与解耦\r\n\r\n本插件能自动适应你的环境。\r\n\r\n| 环境变量 | 描述 | 默认值 |\r\n| :--- | :--- | :--- |\r\n| `EVOLVE_REPORT_TOOL` |用于报告结果的工具名称（例如 `feishu-card`） | `message` |\r\n| `MEMORY_DIR` | 记忆文件路径 | `./memory` |\r\n\r\n## Public 发布\r\n\r\n本仓库为公开发行版本。\r\n\r\n- 构建公开产物：`npm run build`\r\n- 发布公开产物：`npm run publish:public`\r\n- 演练：`DRY_RUN=true npm run publish:public`\r\n\r\n必填环境变量：\r\n\r\n- `PUBLIC_REMOTE`（默认：`public`）\r\n- `PUBLIC_REPO`（例如 `autogame-17/evolver`）\r\n- `PUBLIC_OUT_DIR`（默认：`dist-public`）\r\n- `PUBLIC_USE_BUILD_OUTPUT`（默认：`true`）\r\n\r\n可选环境变量：\r\n\r\n- `SOURCE_BRANCH`（默认：`main`）\r\n- `PUBLIC_BRANCH`（默认：`main`）\r\n- `RELEASE_TAG`（例如 `v1.0.41`）\r\n- `RELEASE_TITLE`（例如 `v1.0.41 - GEP protocol`）\r\n- `RELEASE_NOTES` 或 `RELEASE_NOTES_FILE`\r\n- `GITHUB_TOKEN`（或 `GH_TOKEN` / `GITHUB_PAT`，用于创建 GitHub Release）\r\n- `RELEASE_SKIP`（`true` 则跳过创建 GitHub Release；默认会创建）\r\n- `RELEASE_USE_GH`（`true` 则使用 `gh` CLI，否则默认走 GitHub API）\r\n- `PUBLIC_RELEASE_ONLY`（`true` 则仅为已存在的 tag 创建 Release；不发布代码）\r\n\r\n## 版本号规则（SemVer）\r\n\r\nMAJOR.MINOR.PATCH\r\n\r\n• MAJOR（主版本）：有不兼容变更  \r\n• MINOR（次版本）：向后兼容的新功能  \r\n• PATCH（修订/补丁）：向后兼容的问题修复\r\n\r\n## 更新日志\r\n\r\n### v1.4.4\r\n- 增加 validation 命令安全检查：Gene validation 命令执行前通过前缀白名单（node/npm/npx）和 shell 操作符拦截进行门控。\r\n- 增加 A2A Gene 提升审查：外部 Gene 的 validation 命令不安全时拒绝提升。\r\n- 增加安全模型文档。\r\n\r\n### v1.4.3\r\n- v1.4.3 发布准备。\r\n\r\n### v1.4.2\r\n- 增加 loop 门控：上一轮未完成 solidify 时，不启动新一轮（避免 wrapper 造成超快空转）。\r\n- 修复固化状态写入覆盖问题：写入 last_run 时合并保留 last_solidify。\r\n\r\n### v1.4.1\r\n- 增加默认执行桥接：生成 GEP prompt 后输出 `sessions_spawn(...)`，自动派发执行型子智能体。\r\n- 将 prompt 作为交接工件写入 `memory/`，便于稳定交接与审计回放。\r\n\r\n### v1.4.0\r\n- 增加显式 Mutation Protocol（repair/optimize/innovate），每轮进化必须生成 Mutation 对象并通过安全约束门控。\r\n- 增加 Personality Evolution：维护 PersonalityState，小幅 PersonalityMutation（单次不超过 ±0.2，最多 2 个参数），并基于成功率做自然选择收敛。\r\n- EvolutionEvent 增加 `mutation_id` 与 `personality_state` 字段；Memory Graph 同步记录 Mutation 与 Personality 的因果链路。\r\n- 新增 `scripts/gep_personality_report.js`，用于统计不同人格配置下的成功率差异与收敛趋势。\r\n\r\n### v1.3.1\r\n- v1.3.1 发布准备。\r\n\r\n### v1.3.0\r\n- v1.3.0 发布准备。\r\n\r\n### v1.2.0\r\n- Memory Graph v2 与 A2A 进化资产交换集成。\r\n\r\n### v1.1.0\r\n- public 构建/发布流水线、提示词预算控制与结构化 GEP 资产持久化。\r\n\r\n## 安全模型\r\n\r\n本节描述 Capability Evolver 的执行边界和信任模型。\r\n\r\n### 各组件执行行为\r\n\r\n| 组件 | 行为 | 是否执行 Shell 命令 |\r\n| :--- | :--- | :--- |\r\n| `src/evolve.js` | 读取日志、选择 Gene、构建提示词、写入工件 | 仅只读 git/进程查询 |\r\n| `src/gep/prompt.js` | 组装 GEP 协议提示词字符串 | 否（纯文本生成） |\r\n| `src/gep/selector.js` | 按信号匹配对 Gene/Capsule 评分和选择 | 否（纯逻辑） |\r\n| `src/gep/solidify.js` | 通过 Gene `validation` 命令验证补丁 | 是（见下文） |\r\n| `index.js`（循环恢复） | 崩溃时向 stdout 输出 `sessions_spawn(...)` 文本 | 否（纯文本输出；是否执行取决于宿主运行时） |\r\n\r\n### Gene Validation 命令安全机制\r\n\r\n`solidify.js` 执行 Gene 的 `validation` 数组中的命令。为防止任意命令执行，所有 validation 命令在执行前必须通过安全检查（`isValidationCommandAllowed`）：\r\n\r\n1. **前缀白名单**：仅允许以 `node`、`npm` 或 `npx` 开头的命令。\r\n2. **禁止命令替换**：命令中任何位置出现反引号或 `$(...)` 均被拒绝。\r\n3. **禁止 Shell 操作符**：去除引号内容后，`;`、`&`、`|`、`>`、`<` 均被拒绝。\r\n4. **超时限制**：每条命令限时 180 秒。\r\n5. **作用域限定**：命令以仓库根目录为工作目录执行。\r\n\r\n### A2A 外部资产摄入\r\n\r\n通过 `scripts/a2a_ingest.js` 摄入的外部 Gene/Capsule 资产被暂存在隔离的候选区。提升到本地存储（`scripts/a2a_promote.js`）需要：\r\n\r\n1. 显式传入 `--validated` 标志（操作者必须先验证资产）。\r\n2. 对 Gene：提升前审查所有 `validation` 命令，不安全的命令会导致提升被拒绝。\r\n3. Gene 提升不会覆盖本地已存在的同 ID Gene。\r\n\r\n### `sessions_spawn` 输出\r\n\r\n`index.js` 和 `evolve.js` 中的 `sessions_spawn(...)` 字符串是**输出到 stdout 的纯文本**，而非直接函数调用。是否被执行取决于宿主运行时（如 OpenClaw 平台）。进化引擎本身不将 `sessions_spawn` 作为可执行代码调用。\r\n\r\n### 其他安全约束\r\n\r\n1. **单进程锁**：进化引擎禁止生成子进化进程（防止 Fork 炸弹）。\r\n2. **稳定性优先**：如果近期错误率较高，强制进入修复模式，暂停创新功能。\r\n3. **环境检测**：外部集成（如 Git 同步）仅在检测到相应插件存在时才会启用。\r\n\r\n## 许可证\r\nMIT\n\nFile v1.0.0:assets/gep/capsules.json\n\n{\n  \"version\": 1,\n  \"capsules\": []\n}\n\nFile v1.0.0:assets/gep/genes.json\n\n{\r\n  \"version\": 1,\r\n  \"genes\": [\r\n    {\r\n      \"type\": \"Gene\",\r\n      \"id\": \"gene_gep_repair_from_errors\",\r\n      \"category\": \"repair\",\r\n      \"signals_match\": [\r\n        \"error\",\r\n        \"exception\",\r\n        \"failed\",\r\n        \"unstable\"\r\n      ],\r\n      \"preconditions\": [\r\n        \"signals contains error-related indicators\"\r\n      ],\r\n      \"strategy\": [\r\n        \"Extract structured signals from logs and user instructions\",\r\n        \"Select an existing Gene by signals match (no improvisation)\",\r\n        \"Estimate blast radius (files, lines) before editing\",\r\n        \"Apply smallest reversible patch\",\r\n        \"Validate using declared validation steps; rollback on failure\",\r\n        \"Solidify knowledge: append EvolutionEvent, update Gene/Capsule store\"\r\n      ],\r\n      \"constraints\": {\r\n        \"max_files\": 12,\r\n        \"forbidden_paths\": [\r\n          \".git\",\r\n          \"node_modules\"\r\n        ]\r\n      },\r\n      \"validation\": [\r\n        \"node -e \\\"require('./src/evolve'); require('./src/gep/solidify'); console.log('ok')\\\"\",\r\n        \"node -e \\\"require('./src/gep/selector'); require('./src/gep/memoryGraph'); console.log('ok')\\\"\"\r\n      ]\r\n    },\r\n    {\r\n      \"type\": \"Gene\",\r\n      \"id\": \"gene_gep_optimize_prompt_and_assets\",\r\n      \"category\": \"optimize\",\r\n      \"signals_match\": [\r\n        \"protocol\",\r\n        \"gep\",\r\n        \"prompt\",\r\n        \"audit\",\r\n        \"reusable\"\r\n      ],\r\n      \"preconditions\": [\r\n        \"need stricter, auditable evolution protocol outputs\"\r\n      ],\r\n      \"strategy\": [\r\n        \"Extract signals and determine selection rationale via Selector JSON\",\r\n        \"Prefer reusing existing Gene/Capsule; only create if no match exists\",\r\n        \"Refactor prompt assembly to embed assets (genes, capsules, parent event)\",\r\n        \"Reduce noise and ambiguity; enforce strict output schema\",\r\n        \"Validate by running node index.js run and ensuring no runtime errors\",\r\n        \"Solidify: record EvolutionEvent, update Gene definitions, create Capsule on success\"\r\n      ],\r\n      \"constraints\": {\r\n        \"max_files\": 20,\r\n        \"forbidden_paths\": [\r\n          \".git\",\r\n          \"node_modules\"\r\n        ]\r\n      },\r\n      \"validation\": [\r\n        \"node -e \\\"require('./src/evolve'); require('./src/gep/prompt'); console.log('ok')\\\"\"\r\n      ]\r\n    }\r\n  ]\r\n}\n\nFile v1.0.0:package.json\n\n{\n  \"name\": \"evolver\",\n  \"version\": \"1.4.4\",\n  \"description\": \"A self-evolution engine for AI agents. Features automated log analysis and protocol-constrained evolution with auditable assets.\",\n  \"main\": \"index.js\",\n  \"keywords\": [\n    \"openclaw\",\n    \"ai\",\n    \"evolution\",\n    \"meta-learning\",\n    \"self-repair\",\n    \"automation\",\n    \"agent\"\n  ],\n  \"author\": \"OpenClaw\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"start\": \"node index.js\",\n    \"run\": \"node index.js run\",\n    \"solidify\": \"node index.js solidify\",\n    \"a2a:export\": \"node scripts/a2a_export.js\",\n    \"a2a:ingest\": \"node scripts/a2a_ingest.js\",\n    \"a2a:promote\": \"node scripts/a2a_promote.js\"\n  },\n  \"dependencies\": {}\n}","readmeExcerpt":"Skill: Capability Evolver Owner: autogame-17 Summary: A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution. Tags: latest:1.14.0 Version history: v1.14.0 | 2026-02-19T03:49:43.583Z | user security cleanup + chain_id propagation + direct/reference reuse mode v1.0.0 | 2026-02-14T09:22:53.550Z | auto Capability Evolver 1.0.0 – Initial Release ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"node index.js"},{"language":"bash","snippet":"node index.js --review"},{"language":"bash","snippet":"node index.js --loop"},{"language":"bash","snippet":"EVOLVE_REPORT_TOOL=feishu-card"},{"language":"bash","snippet":"node -e \"const p=require('./package.json'); console.log(p.version)\""},{"language":"bash","snippet":"# If installed via git\ngit pull && npm install\n\n# If installed via npm (global install)\nnpm install -g evolver@latest"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: capability-evolver\ndescription: A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.\ntags: [meta, ai, self-improvement, core]\n---\n\n# 🧬 Capability Evolver\n\n**\"Evolution is not optional. Adapt or die.\"**\n\nThe **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.\n\n## Features\n\n- **Auto-Log Analysis**: Automatically scans memory and history files for errors and patterns.\n- **Self-Repair**: Detects crashes and suggests patches.\n- GEP Protocol: Standardized evolution with reusable assets.\n- **One-Command Evolution**: Just run `/evolve` (or `node index.js`).\n\n## Usage\n\n### Standard Run (Automated)\nRuns the evolution cycle. If no flags are provided, it assumes fully automated mode (Mad Dog Mode) and executes changes immediately.\n```bash\nnode index.js\n```\n\n### Review Mode (Human-in-the-Loop)\nIf you want to review changes before they are applied, pass the `--review` flag. The agent will pause and ask for confirmation.\n```bash\nnode index.js --review\n```\n\n### Mad Dog Mode (Continuous Loop)\nTo run in an infinite loop (e.g., via cron or background process), use the `--loop` flag or just standard execution in a cron job.\n```bash\nnode index.js --loop\n```\n\n## Configuration\n\n| Environment Variable | Default | Description |\n|---|---|---|\n| `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. |\n| `EVOLVE_LOAD_MAX` | `2.0` | Maximum 1-minute load average before evolver backs off. |\n| `EVOLVE_STRATEGY` | `balanced` | Evolution strategy: `balanced`, `innovate`, `harden`, `repair-only`, `early-stabilize`, `steady-state`, or `auto`. |\n\n## GEP Protocol (Auditable Evolution)\n\nThis package embeds a protocol-constrained evolution prompt (GEP) and a local, structured asset store:\n\n- `assets/gep/genes.json`: reusable Gene definitions\n- `assets/gep/capsules.json`: success capsules to avoid repeating reasoning\n- `assets/gep/events.jsonl`: append-only evolution events (tree-like via parent id)\n \n## Emoji Policy\n\nOnly the DNA emoji is allowed in documentation. All other emoji are disallowed.\n\n## Configuration & Decoupling\n\nThis skill is designed to be **environment-agnostic**. It uses standard OpenClaw tools by default.\n\n### Local Overrides (Injection)\nYou can inject local preferences (e.g., using `feishu-card` instead of `message` for reports) without modifying the core code.\n\n**Method 1: Environment Variables**\nSet `EVOLVE_REPORT_TOOL` in your `.env` file:\n```bash\nEVOLVE_REPORT_TOOL=feishu-card\n```\n\n**Method 2: Dyna"},{"path":"README.md","content":"# 🧬 Capability Evolver\n\n![Capability Evolver Cover](assets/cover.png)\n\n[Chinese Docs](README.zh-CN.md)\n\n**\"Evolution is not optional. Adapt or die.\"**\n\n**Three lines**\n- **What it is**: A protocol-constrained self-evolution engine for AI agents.\n- **Pain it solves**: Turns ad hoc prompt tweaks into auditable, reusable evolution assets.\n- **Use in 30 seconds**: `node index.js` to generate a GEP-guided evolution prompt.\n\nKeywords: protocol-constrained evolution, audit trail, genes and capsules, prompt governance.\n\n## Try It Now (Minimal)\n\n```bash\nnode index.js\n```\n\n## What It Does\n\nThe **Capability Evolver** inspects runtime history, extracts signals, selects a Gene/Capsule, and emits a strict GEP protocol prompt to guide safe evolution.\n\n## Who This Is For / Not For\n\n**For**\n- Teams maintaining agent prompts and logs at scale\n- Users who need auditable evolution traces (Genes, Capsules, Events)\n- Environments requiring deterministic, protocol-bound changes\n\n**Not For**\n- One-off scripts without logs or history\n- Projects that require free-form creative changes\n- Systems that cannot tolerate protocol overhead\n\n## Features\n\n- **Auto-Log Analysis**: scans memory and history files for errors and patterns.\n- **Self-Repair Guidance**: emits repair-focused directives from signals.\n- **GEP Protocol**: standardized evolution with reusable assets.\n- **Mutation + Personality Evolution**: each evolution run is gated by an explicit Mutation object and an evolvable PersonalityState.\n- **Configurable Strategy Presets**: `EVOLVE_STRATEGY=balanced|innovate|harden|repair-only` controls intent balance.\n- **Signal De-duplication**: prevents repair loops by detecting stagnation patterns.\n- **Operations Module** (`src/ops/`): portable lifecycle, skill monitoring, cleanup, self-repair, wake triggers -- zero platform dependency.\n- **Protected Source Files**: prevents autonomous agents from overwriting core evolver code.\n- **One-Command Evolution**: `node index.js` to generate the prompt.\n\n## Typical Use Cases\n\n- Harden a flaky agent loop by enforcing validation before edits\n- Encode recurring fixes as reusable Genes and Capsules\n- Produce auditable evolution events for review or compliance\n\n## Anti-Examples\n\n- Rewriting entire subsystems without signals or constraints\n- Using the protocol as a generic task runner\n- Producing changes without recording EvolutionEvent\n\n## FAQ\n\n**Does this edit code automatically?**\nNo. It generates a protocol-bound prompt and assets that guide evolution.\n\n**Do I need to use all GEP assets?**\nNo. You can start with default Genes and extend over time.\n\n**Is this safe in production?**\nUse review mode and validation steps. Treat it as a safety-focused evolution tool, not a live patcher.\n\n## Roadmap\n\n- Add a one-minute demo workflow\n- Add a public changelog\n- Add a comparison table vs alternatives\n\n## GEP Protocol (Auditable Evolution)\n\nThis repo includes a protocol-constrained prompt mode based on GEP (Genome Evolution Protocol).\n\n- **Structur"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7apafdj4thknczrgxdzfd2v1808svf\",\n  \"slug\": \"capability-evolver\",\n  \"version\": \"1.14.0\",\n  \"publishedAt\": 1771472983583\n}"},{"path":"CONTRIBUTING.md","content":"## Contributing\n\nThank you for contributing. Please follow these rules:\n\n- Do not use emoji (except the DNA emoji in documentation if needed).\n- Keep changes small and reviewable.\n- Update related documentation when you change behavior.\n- Run `node index.js` for a quick sanity check.\n\nSubmit PRs with clear intent and scope."},{"path":"README.zh-CN.md","content":"# 🧬 Capability Evolver（能力进化引擎）\n\n[English Docs](README.md)\n\n**“进化不是可选项，而是生存法则。”**\n\n**Capability Evolver** 是一个元技能（Meta-Skill），赋予 OpenClaw 智能体自我反省的能力。它可以扫描自身的运行日志，识别效率低下或报错的地方，并自主编写代码补丁来优化自身性能。\n\n本仓库内置 **基因组进化协议（Genome Evolution Protocol, GEP）**，用于将每次进化固化为可复用资产，降低后续同类问题的推理成本。\n\n## 核心特性\n\n- **自动日志分析**：自动扫描 `.jsonl` 会话日志，寻找错误模式。\n- **自我修复**：检测运行时崩溃并编写修复补丁。\n- **GEP 协议**：标准化进化流程与可复用资产，支持可审计与可共享。\n- **突变协议与人格进化**：每次进化必须显式声明 Mutation，并维护可进化的 PersonalityState。\n- **可配置进化策略**：通过 `EVOLVE_STRATEGY` 环境变量选择 `balanced`/`innovate`/`harden`/`repair-only` 模式，控制修复/优化/创新的比例。\n- **信号去重**：自动检测修复循环，防止反复修同一个问题。\n- **运维模块** (`src/ops/`)：6 个可移植的运维工具（生命周期管理、技能健康监控、磁盘清理、Git 自修复等），零平台依赖。\n- **源码保护**：防止自治代理覆写核心进化引擎源码。\n- **动态集成**：自动检测并使用本地工具，如果不存在则回退到通用模式。\n- **持续循环模式**：持续运行的自我进化循环。\n\n## 使用方法\n\n### 标准运行（自动化）\n```bash\nnode index.js\n```\n\n### 审查模式（人工介入）\n在应用更改前暂停，等待人工确认。\n```bash\nnode index.js --review\n```\n\n### 持续循环（守护进程）\n无限循环运行。适合作为后台服务。\n```bash\nnode index.js --loop\n```\n\n### 指定进化策略\n```bash\nEVOLVE_STRATEGY=innovate node index.js --loop   # 最大化创新\nEVOLVE_STRATEGY=harden node index.js --loop     # 聚焦稳定性\nEVOLVE_STRATEGY=repair-only node index.js --loop # 紧急修复模式\n```\n\n| 策略 | 创新 | 优化 | 修复 | 适用场景 |\n| :--- | :--- | :--- | :--- | :--- |\n| `balanced`（默认） | 50% | 30% | 20% | 日常运行，稳步成长 |\n| `innovate` | 80% | 15% | 5% | 系统稳定，快速出新功能 |\n| `harden` | 20% | 40% | 40% | 大改动后，聚焦稳固 |\n| `repair-only` | 0% | 20% | 80% | 紧急状态，全力修复 |\n\n### 运维管理（生命周期）\n```bash\nnode src/ops/lifecycle.js start    # 后台启动进化循环\nnode src/ops/lifecycle.js stop     # 优雅停止（SIGTERM -> SIGKILL）\nnode src/ops/lifecycle.js status   # 查看运行状态\nnode src/ops/lifecycle.js check    # 健康检查 + 停滞自动重启\n```\n\n## 典型使用场景\n\n- 需要审计与可追踪的提示词演进\n- 团队协作维护 Agent 的长期能力\n- 希望将修复经验固化为可复用资产\n\n## 反例\n\n- 一次性脚本或没有日志的场景\n- 需要完全自由发挥的改动\n- 无法接受协议约束的系统\n\n## GEP 协议（可审计进化）\n\n本仓库内置基于 GEP 的“协议受限提示词模式”，用于把每次进化固化为可复用资产。\n\n- **结构化资产目录**：`assets/gep/`\n  - `assets/gep/genes.json`\n  - `assets/gep/capsules.json`\n  - `assets/gep/events.jsonl`\n- **Selector 选择器**：根据日志提取 signals，优先复用已有 Gene/Capsule，并在提示词中输出可审计的 Selector 决策 JSON。\n- **约束**：除 🧬 外，禁止使用其他 emoji。\n\n## 配置与解耦\n\n本插件能自动适应你的环境。\n\n| 环境变量 | 描述 | 默认值 |\n| :--- | :--- | :--- |\n| `EVOLVE_STRATEGY` | 进化策略预设 | `balanced` |\n| `EVOLVE_REPORT_TOOL` | 用于报告结果的工具名称 | `message` |\n| `MEMORY_DIR` | 记忆文件路径 | `./memory` |\n| `OPENCLAW_WORKSPACE` | 工作区根路径 | 自动检测 |\n| `EVOLVER_LOOP_SCRIPT` | 循环启动脚本路径 | 自动检测 wrapper 或 core |\n\n## Public 发布\n\n本仓库为公开发行版本。\n\n- 构建公开产物：`npm run build`\n- 发布公开产物：`npm run publish:public`\n- 演练：`DRY_RUN=true npm run publish:public`\n\n必填环境变量：\n\n- `PUBLIC_REMOTE`（默认：`public`）\n- `PUBLIC_REPO`（例如 `autogame-17/evolver`）\n- `PUBLIC_OUT_DIR`（默认：`dist-public`）\n- `PUBLIC_USE_BUILD_OUTPUT`（默认：`true`）\n\n可选环境变量：\n\n- `SOURCE_BRANCH`（默认：`main`）\n- `PUBLIC_BRANCH`（默认：`main`）\n- `RELEASE_TAG`（例如 `v1.0.41`）\n- `RELEASE_TITLE`（例如 `v1.0.41 - GEP protocol`）\n- `RELEASE_NOTES` 或 `RELEASE_NOTES_FILE`\n- `GITHUB_TOKEN`（或 `GH_TOKEN` / `GITHUB_PAT`，用于创建 GitHub Release）\n- `RELEASE_SKIP`（`true` 则跳过创建 GitHub Release；默认会创建）\n- `RELEASE_USE_GH`（`true` 则使用 `gh` CLI，否则默认走 GitHub API）\n- `PUBLIC_RELEASE_O"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution. Skill: Capability Evolver Owner: autogame-17 Summary: A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution. Tags: latest:1.14.0 Version history: v1.14.0 | 2026-02-19T03:49:43.583Z | user security cleanup + chain_id propagation + direct/reference reuse mode v1.0.0 | 2026-02-14T09:22:53.550Z | auto Capability Evolver 1.0.0 – Initial Release","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1469,"uniquenessScore":49,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"agent-directory","verified":false,"confidence":"low","updatedAt":"2026-10-09T13:30:49.789Z","emptyReason":"No close protocol neighbors were found."},"items":[],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[]}}}