Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Log learnings and errors to markdown files for continuous improvement. Coding ag
| Workflow improvements | Promote to `AGENTS.md` (OpenClaw workspace) |
| Tool gotchas | Promote to `TOOLS.md` (OpenClaw workspace) |
| Behavioral patterns | Promote to `SOUL.md` (OpenClaw workspace) |
| User asks for cross-agent persistence | Use `scope: global` workflow below and write to shared path + broadcast summary |

## OpenClaw Setup (Recommended)

Expand Down Expand Up @@ -82,6 +83,20 @@ When learnings prove broadly applicable, promote them to workspace files:
| Workflow improvements | `AGENTS.md` | "Spawn sub-agents for long tasks" |
| Tool gotchas | `TOOLS.md` | "Git push needs auth configured first" |

### Visibility Scope (OpenClaw)

Use explicit scope when logging a learning:

- `scope: session` — applies to the current thread/session only.
- `scope: agent` (default) — write to current workspace (`.learnings/*`, `AGENTS.md`, `TOOLS.md`, `SOUL.md`).
- `scope: global` — make it visible across agents by writing to a shared path and syncing references.

When user says phrases like **"all agents"**, **"global"**, **"全局"**, **"所有会话可见"**:

1. Write canonical entry to a shared file (example: `~/.openclaw/skills/self-improving-agent/references/global-learnings.md`).
2. Add/refresh a short pointer block in each agent's `AGENTS.md` (or equivalent workspace prompt file) that references the canonical global entry.
3. Announce completion and affected agents.

### Inter-Session Communication

OpenClaw provides tools to share learnings across sessions:
Expand Down Expand Up @@ -398,6 +413,12 @@ Automatically log when you notice:
- "You're wrong about..."
- "That's outdated..."

**Global persistence requests** (→ use `scope: global` workflow):
- "Make this global"
- "Apply to all agents/sessions"
- "全局记住这条规则"
- "所有agent都要生效"

**Feature Requests** (→ feature request):
- "Can you also..."
- "I wish you could..."
Expand Down
30 changes: 30 additions & 0 deletions references/global-learnings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Global Learnings (Cross-Agent)

Use this file as the canonical registry for learnings that must apply across agents/sessions.

## Entry Template

```markdown
## [GLRN-YYYYMMDD-XXX] title

**Logged**: ISO-8601 timestamp
**Scope**: global
**Priority**: low | medium | high | critical
**Status**: active | superseded

### Rule
Concise, imperative rule that all agents should follow.

### Why
One paragraph with context and risk of not following.

### Applies To
- agents: main, codingMaster, gretutor, ...
- sessions: all new sessions (and existing sessions after refresh)

### Source
- Origin: user_feedback | incident | postmortem
- Related: LRN-..., ERR-...
```

---