Loading...
Loading...
Compare original and translation side by side
.learnings/mkdir -p .learnings
[ -f .learnings/LEARNINGS.md ] || printf "# Learnings\n\nCorrections, insights, and knowledge gaps captured during development.\n\n**Categories**: correction | insight | knowledge_gap | best_practice\n\n---\n" > .learnings/LEARNINGS.md
[ -f .learnings/ERRORS.md ] || printf "# Errors\n\nCommand failures and integration errors.\n\n---\n" > .learnings/ERRORS.md
[ -f .learnings/FEATURE_REQUESTS.md ] || printf "# Feature Requests\n\nCapabilities requested by the user.\n\n---\n" > .learnings/FEATURE_REQUESTS.md.learnings/.learnings/mkdir -p .learnings
[ -f .learnings/LEARNINGS.md ] || printf "# Learnings\n\nCorrections, insights, and knowledge gaps captured during development.\n\n**Categories**: correction | insight | knowledge_gap | best_practice\n\n---\n" > .learnings/LEARNINGS.md
[ -f .learnings/ERRORS.md ] || printf "# Errors\n\nCommand failures and integration errors.\n\n---\n" > .learnings/ERRORS.md
[ -f .learnings/FEATURE_REQUESTS.md ] || printf "# Feature Requests\n\nCapabilities requested by the user.\n\n---\n" > .learnings/FEATURE_REQUESTS.md.learnings/| Situation | Action |
|---|---|
| Command/operation fails | Log to |
| User corrects you | Log to |
| User wants missing feature | Log to |
| API/external tool fails | Log to |
| Knowledge was outdated | Log to |
| Found better approach | Log to |
| Simplify/Harden recurring patterns | Log/update |
| Similar to existing entry | Search by |
| Reusing or promoting saved knowledge | Review relevant/due claims using Maintenance below, including one-off/unpromoted entries |
| Source, decision, dependency, or task changes | Revalidate affected claims; do not expire them by age |
| Workflow improvements | Promote to |
| Tool gotchas | Promote to |
| Behavioral patterns | Promote to |
| 情况 | 操作 |
|---|---|
| 命令/操作失败 | 记录到 |
| 用户纠正你的假设 | 记录到 |
| 用户需要缺失的功能 | 记录到 |
| API/外部工具失败 | 记录到 |
| 知识已过时 | 记录到 |
| 找到更好的方法 | 记录到 |
| 简化/强化重复出现的模式 | 记录/更新 |
| 与现有条目相似 | 按 |
| 复用或提升已保存知识 | 使用下方 Maintenance 审查相关/到期声明,包括一次性/未提升的条目 |
| 来源、决策、依赖项或任务发生变化 | 重新验证受影响的声明;不要因时间久远而使其失效 |
| 工作流改进 | 提升至 workspace 的 |
| 工具使用陷阱 | 提升至 workspace 的 |
| 行为模式 | 提升至 workspace 的 |
openclaw skills install @pskoett/self-improving-agentnpm i -g clawhub./skillsclawhub install @pskoett/self-improving-agentself-improving-agent/git clone https://github.com/pskoett/self-improving-agent.git /tmp/self-improving-agent-repo
cp -r /tmp/self-improving-agent-repo/self-improving-agent ~/.openclaw/skills/self-improving-agentopenclaw skills install @pskoett/self-improving-agentnpm i -g clawhub./skillsclawhub install @pskoett/self-improving-agentself-improving-agent/git clone https://github.com/pskoett/self-improving-agent.git /tmp/self-improving-agent-repo
cp -r /tmp/self-improving-agent-repo/self-improving-agent ~/.openclaw/skills/self-improving-agent~/.openclaw/workspace/
├── AGENTS.md # Multi-agent workflows, delegation patterns
├── SOUL.md # Behavioral guidelines, personality, principles
├── TOOLS.md # Tool capabilities, integration gotchas
├── MEMORY.md # Long-term memory (main session only)
├── memory/ # Daily memory files
│ └── YYYY-MM-DD.md
└── .learnings/ # This skill's log files
├── LEARNINGS.md
├── ERRORS.md
└── FEATURE_REQUESTS.md~/.openclaw/workspace/
├── AGENTS.md # Multi-agent workflows, delegation patterns
├── SOUL.md # Behavioral guidelines, personality, principles
├── TOOLS.md # Tool capabilities, integration gotchas
├── MEMORY.md # Long-term memory (main session only)
├── memory/ # Daily memory files
│ └── YYYY-MM-DD.md
└── .learnings/ # This skill's log files
├── LEARNINGS.md
├── ERRORS.md
└── FEATURE_REQUESTS.mdmkdir -p ~/.openclaw/workspace/.learningsassets/LEARNINGS.mdERRORS.mdFEATURE_REQUESTS.mdmkdir -p ~/.openclaw/workspace/.learningsassets/LEARNINGS.mdERRORS.mdFEATURE_REQUESTS.md| Learning Type | Promote To | Example |
|---|---|---|
| Behavioral patterns | | "Be concise, avoid disclaimers" |
| Workflow improvements | | "Spawn sub-agents for long tasks" |
| Tool gotchas | | "Git push needs auth configured first" |
| 经验类型 | 提升目标 | 示例 |
|---|---|---|
| 行为模式 | | “要简洁,避免免责声明” |
| 工作流改进 | | “为长任务创建 sub-agent” |
| 工具使用陷阱 | | “Git push 需要先配置认证” |
openclaw hooks enable self-improvementagent:bootstrapcommand:newcommand:reset<workspace>/.learnings/ERRORS.md.learnings/HOOK.mdafter_tool_callopenclaw hooks enable self-improvementagent:bootstrapcommand:newcommand:reset<workspace>/.learnings/ERRORS.md.learnings/HOOK.mdafter_tool_callClaim: unknown — needs triageClaim: unknown — needs triage.learnings/.learnings/| Type | Check |
|---|---|
| Read the current authoritative source or inspect the current environment for the scoped fact. |
| Find an authoritative, applicable superseding decision; confirm its scope and effective state. Age or a different team's choice does not supersede it. |
| Establish the relevant version/configuration, then perform representative behavioral verification in that environment. An upgrade triggers a check, not automatic retirement. |
| Assess applicability and usefulness for the current task/project. Disuse does not prove falsehood. |
unknownPattern-Key| 类型 | 检查方式 |
|---|---|
| 阅读当前权威来源,或在限定范围内检查当前环境,以确认事实。 |
| 查找权威且适用的替代决策;确认其范围和生效状态。时间久远或另一团队的选择不会使其失效。 |
| 确定相关版本/配置,然后在相应环境中执行有代表性的行为验证。升级会触发检查,而不是自动退役。 |
| 评估其对当前任务/项目的适用性和有用性。不再使用并不能证明其为假。 |
unknownPattern-Keyfastmediumslowdurableunknowndurablefastmediumslowdurableunknowndurableundefinedundefined
Start with `Validation: pending`, `Evidence: none yet`, and `Disposition: retain — provisional, not validated` unless actual evidence supports more. An attempted review is not validation: unavailable or conflicting evidence stays `unresolved`, with the attempt date, blocker, and next check; do not advance a successful validation date. Keep past evidence dated and scoped when appending later results. `Status` tracks issue resolution/promotion, `Validation` tracks support for the claim, and `Disposition` tracks active guidance; none implies the others.
初始时使用 `Validation: pending`、`Evidence: none yet` 和 `Disposition: retain — provisional, not validated`,除非实际证据支持更进一步的结论。尝试审查不等于验证:证据不可用或存在冲突时保持 `unresolved`,并记录尝试日期、阻碍因素和下次检查时间;不要推进成功的验证日期。追加后续结果时,保留过去证据的日期和范围。`Status` 跟踪问题解决/提升状态,`Validation` 跟踪声明的支持情况,`Disposition` 跟踪当前有效指导;三者互不蕴含。retainreviseexternalizeretireRecurrence-CountLast-SeenretainreviseexternalizeretireRecurrence-CountLast-SeenTYPE-YYYYMMDD-XXXLRNERRFEAT001A7BLRN-20250115-001ERR-20250115-A3FFEAT-20250115-002TYPE-YYYYMMDD-XXXLRNERRFEAT001A7BLRN-20250115-001ERR-20250115-A3FFEAT-20250115-002**Status**: pending**Status**: resolvedundefined**Status**: pending**Status**: resolvedundefined
Other status values:
- `in_progress` - Actively being worked on
- `wont_fix` - Decided not to address (add reason in Resolution notes)
- `promoted` - Elevated to a workspace file (`SOUL.md`, `TOOLS.md`, `AGENTS.md`)
Keep the Resolution block when promoting. A working fix establishes what happened in that incident; validate any reusable rule separately through Maintenance.
其他 status 值:
- `in_progress`——正在处理
- `wont_fix`——已决定不处理(在 Resolution 说明中注明原因)
- `promoted`——已提升到 workspace 文件(`SOUL.md`、`TOOLS.md`、`AGENTS.md`)
提升时保留 Resolution 块。有效的修复可以确定该次事件中发生了什么;任何可复用规则需通过 Maintenance 单独验证。| Target | What Belongs There |
|---|---|
| Behavioral guidelines, communication style, principles |
| Tool capabilities, usage patterns, integration gotchas |
| Workflows, delegation patterns, automation rules |
AGENTS.md| 目标 | 适用内容 |
|---|---|
| 行为指导、沟通风格、原则 |
| 工具能力、使用模式、集成陷阱 |
| 工作流、委派模式、自动化规则 |
AGENTS.mdSource: .learnings/<file>.md#<entry-ID>**Status**: promotedGuidanceSource: .learnings/<file>.md#<entry-ID>**Status**: promotedGuidanceProject uses pnpm workspaces. Attemptedbut failed. Lock file isnpm install. Must usepnpm-lock.yaml.pnpm install
undefined项目使用 pnpm workspaces。尝试但失败。 锁文件为npm install。必须使用pnpm-lock.yaml。pnpm install
undefinedpackage.jsonpackageManager
**Learning** (verbose):
> When modifying API endpoints, must regenerate TypeScript client.
> Forgetting this causes type mismatches at runtime.
**In AGENTS.md** (actionable):
```markdownpackage.jsonpackageManager
**经验**(冗长):
> 修改 API endpoints 时,必须重新生成 TypeScript client。
> 忘记执行此操作会导致运行时出现类型不匹配。
**在 AGENTS.md 中**(可执行):
```markdownpnpm run generate:apipnpm tsc --noEmitundefinedpnpm run generate:apipnpm tsc --noEmitundefinedPattern-KeyRecurrence-Countarea.symptomdeps.module-not-found| Area | Scope | Example Keys |
|---|---|---|
| External API/service behavior | |
| Credentials, tokens, scopes | |
| Compilation, bundling, CI | |
| Config files, env vars, settings | |
| Package managers, dependencies | |
| Filesystem | |
| Network connectivity | |
| Language/runtime errors not covered above | |
| Shell/CLI mechanics | |
| Git and other version control | |
| Code-quality patterns from the simplify-and-harden feed | |
grep -rh "Pattern-Key:" .learnings/ | sort -uruntime.errorruntime.failurePattern-KeyRecurrence-Countarea.symptomdeps.module-not-found| 领域 | 范围 | 示例键 |
|---|---|---|
| 外部 API/服务行为 | |
| 凭据、tokens、scopes | |
| 编译、打包、CI | |
| 配置文件、环境变量、设置 | |
| 包管理器、依赖项 | |
| 文件系统 | |
| 网络连接 | |
| 未被上述类别覆盖的语言/运行时错误 | |
| Shell/CLI 机制 | |
| Git 和其他版本控制系统 | |
| 来自 simplify-and-harden feed 的代码质量模式 | |
grep -rh "Pattern-Key:" .learnings/ | sort -uruntime.errorruntime.failuregrep -n "Pattern-Key: area.symptom" .learnings/*.mdgrep -ri "keyword" .learnings/Recurrence-CountLast-SeenTOOLS.mdSOUL.mdAGENTS.mdgrep -n "Pattern-Key: area.symptom" .learnings/*.mdgrep -ri "keyword" .learnings/Recurrence-CountLast-SeenTOOLS.mdSOUL.mdAGENTS.mdsimplify_and_harden.learning_loop.candidatespattern_key.learnings/LEARNINGS.mdgrep -n "Pattern-Key: <pattern_key>" .learnings/LEARNINGS.mdRecurrence-CountLast-SeenSee AlsoLRN-...Source: simplify-and-hardenPattern-KeyRecurrence-Count: 1First-SeenLast-Seensimplify_and_harden.learning_loop.candidatespattern_key.learnings/LEARNINGS.mdgrep -n "Pattern-Key: <pattern_key>" .learnings/LEARNINGS.mdRecurrence-CountLast-SeenSee AlsoLRN-...Source: simplify-and-hardenPattern-KeyRecurrence-Count: 1First-SeenLast-SeenRecurrence-Count >= 3SOUL.mdTOOLS.mdAGENTS.mdRecurrence-Count >= 3SOUL.mdTOOLS.mdAGENTS.mdundefinedundefinedundefinedundefinedcorrectionknowledge_gapcorrectionknowledge_gap| Priority | When to Use |
|---|---|
| Blocks core functionality, data loss risk, security issue |
| Significant impact, affects common workflows, recurring issue |
| Moderate impact, workaround exists |
| Minor inconvenience, edge case, nice-to-have |
| Priority | 使用场景 |
|---|---|
| 阻碍核心功能、存在数据丢失风险或安全问题 |
| 影响显著、影响常用工作流、问题重复出现 |
| 影响中等、存在 workaround |
| 轻微不便、边缘情况、可选改进 |
| Area | Scope |
|---|---|
| UI, components, client-side code |
| API, services, server-side code |
| CI/CD, deployment, Docker, cloud |
| Test files, testing utilities, coverage |
| Documentation, comments, READMEs |
| Configuration files, environment, settings |
| 领域 | 范围 |
|---|---|
| UI、组件、客户端代码 |
| API、服务、服务器端代码 |
| CI/CD、部署、Docker、cloud |
| 测试文件、测试工具、覆盖率 |
| 文档、注释、README |
| 配置文件、环境、设置 |
.learnings/.learnings/*.md
!.learnings/.gitkeep.learnings/.learnings/*.md
!.learnings/.gitkeepCHANGELOG.mdreferences/uninstall.md.learnings/CHANGELOG.md.learnings/