← 返回
未分类 中文

new-self-improving

Log corrections, errors, feature requests, and recurring patterns into structured workspace learning files, then promote stable patterns into tiered memory a...
将更正、错误、功能请求和重复出现的模式记录到结构化工作区学习文件,然后将稳定的模式提升到层级记忆...
muhamadbasim muhamadbasim 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 371
下载
💾 0
安装
1
版本
#latest

概述

Self-Improving OpenClaw

Structured learning loop for OpenClaw agents: capture → review → promote → maintain.

Quick Start

On first activation, run the init script to create workspace directories:

bash scripts/init-workspace.sh

This creates .learnings/ and .self-improving/ in the workspace root.

Core Workflow

1. Capture

When a learning signal fires, log it to the right file in .learnings/:

SignalTarget fileCategory
-------------------------------
User corrects youLEARNINGS.mdcorrection
User says "always/never do X"LEARNINGS.mdpreference
You discover something non-obviousLEARNINGS.mdinsight
Your knowledge was outdatedLEARNINGS.mdknowledge_gap
Found a better approachLEARNINGS.mdbest_practice
Command returns non-zeroERRORS.md
Tool/API fails unexpectedlyERRORS.md
User wants missing capabilityFEATURE_REQUESTS.md

Use the entry format defined in references/logging-format.md.

2. Review

During heartbeat or manual review, scan .learnings/ and evaluate each pending item:

  1. Check recurrence — search for similar entries.
  2. If related entry exists: bump Recurrence-Count, link with See Also.
  3. If Recurrence-Count >= 3 within 30 days: add to .learnings/REVIEW_QUEUE.md.
  4. Update .self-improving/heartbeat-state.md with review timestamp.

See references/heartbeat-review.md for the full review procedure.

3. Promote

Move validated patterns up the memory tiers:

ConditionPromote toExample
-------------------------------
Pattern used 2x, context-specific.self-improving/domains/.md or projects/.md"This repo uses pnpm"
Pattern used 3x in 7-30 days, cross-task.self-improving/HOT.md"User prefers concise answers"
Stable, long-term applicableSOUL.md / AGENTS.md / TOOLS.md / MEMORY.md"Never force push"

See references/promotion-rules.md for the full promotion/demotion rules.

4. Maintain

Periodically (every 1-2 weeks during heartbeat):

  • Demote HOT entries unused for 30 days → domain/project memory.
  • Archive domain/project entries unused for 90 days → .self-improving/archive/.
  • Compact files exceeding size limits: merge similar entries, summarize verbose ones.
  • Never delete without explicit user confirmation. Prefer archive over delete.

Detection Triggers

Log automatically when you notice these signals:

Corrections (→ LEARNINGS.md, category: correction):

  • "No, that's not right..."
  • "Actually, it should be..."
  • "You're wrong about..."
  • "I told you before..."
  • "Stop doing X"

Preferences (→ LEARNINGS.md, category: preference):

  • "I like when you..."
  • "Always do X for me"
  • "Never do Y"
  • "My style is..."

Feature requests (→ FEATURE_REQUESTS.md):

  • "Can you also..."
  • "I wish you could..."
  • "Is there a way to..."

Errors (→ ERRORS.md):

  • Non-zero exit codes
  • Exceptions or stack traces
  • Timeout or connection failure

Ignore (don't log):

  • One-time instructions ("do X now")
  • Pure context ("in this file...")
  • Hypotheticals ("what if...")

Memory Tiers

TierLocationSize limitBehavior
-------------------------------------
RAW.learnings/UnlimitedIntake only, not auto-loaded
HOT.self-improving/HOT.md≤80 linesAlways loaded at session start
WARM.self-improving/domains/, projects/≤200 lines eachLoad on context match
COLD.self-improving/archive/UnlimitedLoad on explicit query

Conflict Resolution

When patterns contradict:

  1. Most specific wins: project > domain > HOT/global.
  2. Same level: most recent wins.
  3. If ambiguous: ask user.

Promotion Targets

When a learning is stable enough for permanent workspace memory:

Learning typePromote toExample
----------------------------------
Behavioral patternsSOUL.md"Be concise, avoid disclaimers"
Workflow improvementsAGENTS.md"Spawn sub-agents for long tasks"
Tool gotchasTOOLS.md"Git push needs auth first"
User preferences/decisionsMEMORY.md"Basim prefers Indonesian for casual chat"

Mark promoted entries as Status: promoted with Promoted-To: .

Transparency

  • When applying a learned pattern, cite the source: (from HOT.md) or (from domains/coding.md:15).
  • On "memory stats" request, report entry counts per tier.
  • On "what have you learned?" request, show recent corrections and HOT entries.

Security Boundaries

  • Never store credentials, API keys, tokens, or passwords.
  • Never store health data or sensitive personal information.
  • Never store third-party private data.
  • Redact secrets in error logs — use [REDACTED] placeholders.
  • Only write to memory files in private/local workspace sessions.

Workspace Layout

See references/workspace-layout.md for the complete directory structure and file descriptions.

Resources

scripts/

  • init-workspace.sh — Create .learnings/ and .self-improving/ directories with template files.

references/

  • logging-format.md — Entry format for learnings, errors, and feature requests.
  • promotion-rules.md — Full promotion, demotion, and archival rules.
  • heartbeat-review.md — Heartbeat review procedure and state tracking.
  • workspace-layout.md — Complete directory structure reference.

assets/

  • Template files copied by init-workspace.sh into the workspace.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 05:39 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

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

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 850 📥 330,930
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,130 📥 892,127