Install
openclaw skills install self-improving-openclawLog corrections, errors, feature requests, and recurring patterns into structured workspace learning files, then promote stable patterns into tiered memory a...
openclaw skills install self-improving-openclawStructured learning loop for OpenClaw agents: capture → review → promote → maintain.
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.
When a learning signal fires, log it to the right file in .learnings/:
| Signal | Target file | Category |
|---|---|---|
| User corrects you | LEARNINGS.md | correction |
| User says "always/never do X" | LEARNINGS.md | preference |
| You discover something non-obvious | LEARNINGS.md | insight |
| Your knowledge was outdated | LEARNINGS.md | knowledge_gap |
| Found a better approach | LEARNINGS.md | best_practice |
| Command returns non-zero | ERRORS.md | — |
| Tool/API fails unexpectedly | ERRORS.md | — |
| User wants missing capability | FEATURE_REQUESTS.md | — |
Use the entry format defined in references/logging-format.md.
During heartbeat or manual review, scan .learnings/ and evaluate each pending item:
Recurrence-Count, link with See Also.Recurrence-Count >= 3 within 30 days: add to .learnings/REVIEW_QUEUE.md..self-improving/heartbeat-state.md with review timestamp.See references/heartbeat-review.md for the full review procedure.
Move validated patterns up the memory tiers:
| Condition | Promote to | Example |
|---|---|---|
| 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 applicable | SOUL.md / AGENTS.md / TOOLS.md / MEMORY.md | "Never force push" |
See references/promotion-rules.md for the full promotion/demotion rules.
Periodically (every 1-2 weeks during heartbeat):
.self-improving/archive/.Log automatically when you notice these signals:
Corrections (→ LEARNINGS.md, category: correction):
Preferences (→ LEARNINGS.md, category: preference):
Feature requests (→ FEATURE_REQUESTS.md):
Errors (→ ERRORS.md):
Ignore (don't log):
| Tier | Location | Size limit | Behavior |
|---|---|---|---|
| RAW | .learnings/ | Unlimited | Intake only, not auto-loaded |
| HOT | .self-improving/HOT.md | ≤80 lines | Always loaded at session start |
| WARM | .self-improving/domains/, projects/ | ≤200 lines each | Load on context match |
| COLD | .self-improving/archive/ | Unlimited | Load on explicit query |
When patterns contradict:
When a learning is stable enough for permanent workspace memory:
| Learning type | Promote to | Example |
|---|---|---|
| Behavioral patterns | SOUL.md | "Be concise, avoid disclaimers" |
| Workflow improvements | AGENTS.md | "Spawn sub-agents for long tasks" |
| Tool gotchas | TOOLS.md | "Git push needs auth first" |
| User preferences/decisions | MEMORY.md | "Basim prefers Indonesian for casual chat" |
Mark promoted entries as Status: promoted with Promoted-To: <file>.
(from HOT.md) or (from domains/coding.md:15).[REDACTED] placeholders.See references/workspace-layout.md for the complete directory structure and file descriptions.
init-workspace.sh — Create .learnings/ and .self-improving/ directories with template files.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.init-workspace.sh into the workspace.