← 返回
AI智能 中文

Error-Driven Evolution

Structured error-to-rule learning system for AI agents. Activate when an agent makes a mistake, receives a correction from the user, or needs to check past l...
结构化的错误转规则学习系统,用于AI智能体。当智能体犯错、收到用户纠正或需要检查过去的日志时激活。
marsnavi
AI智能 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 1,522
下载
💾 32
安装
1
版本
#latest

概述

Error-Driven Evolution

Turn mistakes into rules. Not reflections, not apologies — rules.

Core Concept

When an agent makes an error or gets corrected, it must:

  1. Extract a rule (not a story)
  2. Write it to lessons.md in its workspace
  3. Scan relevant rules before future decisions in that domain
  4. Optionally share anonymized rules to the community repo

lessons.md Format

File location: {workspace}/lessons.md

Each rule follows this structure:

### [CATEGORY] Short imperative title

- **When**: The specific situation/trigger
- **Do**: The correct action (imperative, specific)
- **Don't**: The wrong action that was taken
- **Why**: One sentence — what went wrong
- **Added**: YYYY-MM-DD

Categories

TagScope
------------
DATAQuerying, interpreting, presenting data
COMMSMessaging, tone, audience, channels
SCOPERole boundaries, doing others' work
EXECTask execution, tools, file ops
JUDGMENTDecisions, priorities, assumptions
CONTEXTMemory, context window, info management
SAFETYSecurity, privacy, destructive ops
COLLABMulti-agent coordination, handoffs

When to Record

Record a rule when:

  1. User corrects you — explicit feedback
  2. User overrides your output — they redo your work
  3. Same error twice — second occurrence MUST become a rule
  4. Near miss — you catch yourself about to repeat a mistake

Do NOT record: one-off technical glitches, user preference changes (those go in MEMORY.md).

How to Record

  1. Stop. Don't apologize at length.
  2. Identify the category.
  3. Write the rule in imperative form.
  4. Append to lessons.md (never overwrite).
  5. Confirm briefly: "Added to lessons: [title]"

Pre-Decision Scan

Before acting, scan lessons.md for applicable rules:

About to...Check
--------------------
Present data[DATA]
Send message / write report[COMMS] + [SCOPE]
Make suggestion[JUDGMENT] + [SCOPE]
Execute multi-step task[EXEC] + [CONTEXT]
Start new sessionAll (skim titles)

Scan = read ### [TAG] headers, check if any When matches your situation.

Community Sharing

Share anonymized lessons to help other agents: https://github.com/anthropic-ai/agent-lessons

See references/community-sharing.md for the anonymization and submission process.

Setup

  1. Create lessons.md in your workspace:
  2. # Lessons
    Rules extracted from mistakes. Append after failing, scan before deciding.
    
  1. Copy community/top-100.md to your workspace as top-100.md — this is your pre-installed immune system. Small enough to skim on startup, covers the most common and costly mistakes across all agent deployments.
  1. Add to your startup instructions:
  2. - On startup: skim top-100.md titles (pre-installed community lessons)
    - On correction/failure: append rule to lessons.md
    - Before decisions: scan lessons.md + top-100.md for [CATEGORY] rules
    

Loading Strategy

Your agent has two rule files:

FileSourceLoad on startupSize target
--------------------------------------------
lessons.mdYour own mistakesYes, fullyGrows organically
top-100.mdCommunity top picksYes, skim titles~8KB, curated

For deeper community search (beyond top-100), query community/{category}.md files on-demand when facing an unfamiliar situation.

Maintenance

When lessons.md exceeds 50 rules: review for duplicates, retire obsolete rules (mark don't delete), consider splitting by category.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 10:31 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,349 📥 317,697
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 833 📥 212,776
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,055 📥 795,905