Files
nexus/wiki/concepts/Self-Improving-Skill.md

43 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Self-Improving Skill"
type: concept
tags: [openclaw, self-improvement, memory, agent, learning]
last_updated: 2026-04-15
---
## Definition
OpenClaw 自改进技能,通过结构化经验记录系统让 Agent 在错误中学习、持续进化,避免同一错误重复出现。
## Core Mechanism
- 工具self_improvement_log写入 LEARNINGS.md 或 ERRORS.md
- 固定格式Summary + Details + Suggested Action + MetadataPattern-Key/Recurrence-Count/See Also
- 记录类型correction错误修正/ workflow流程改进/ config配置发现/ best_practice最佳实践
## Key Insight
- 错误只犯一次Pattern-Key 相同的问题第二次出现时应直接应用 Suggested Action
- Recurrence-Count 是核心指标:重复次数高的 Pattern-Key 需要系统性解决,而非单点修复
- Pattern-Key 重复本身是信号:第一次记了,第二次就该解决了
## LEARNINGS.md 格式示例
```markdown
## [LRN-20260325-001] correction
**Logged**: 2026-03-25T14:09:53+08:00
**Priority**: high
**Status**: pending
**Area**: config
### Summary
Telegram chat ID 在 cron job 配置中不应使用 "user:" 前缀
### Details
使用了 `--to user:5038825565` 格式,导致报错
### Suggested Action
使用纯数字 chat ID`--to 5038825565`
### Metadata
- Pattern-Key: cron.telegram-delivery
- Recurrence-Count: 1
```
## Connections
- [[双层记忆架构]] ← 包含 ← [[Self-Improving Skill]]
- [[Pattern-Key]] ← 核心机制 ← [[Self-Improving Skill]]
- [[每日复盘]] ← 触发 ← [[Self-Improving Skill]]