Install
openclaw skills install @paudyyin/self-improvingSelf-reflect, self-critique, self-learn, and organize memory with structured logging
openclaw skills install @paudyyin/self-improvingCombines memory-tiered self-reflection with structured learning/error logging.
~/self-improving/ # Memory system (HOT/WARM/COLD tiers)
├── memory.md # HOT: ~100 lines, always loaded
├── index.md # Topic index with line counts
├── heartbeat-state.md # Heartbeat state
├── corrections.md # Last 50 corrections log
├── projects/ # Per-project learnings
├── domains/ # Domain-specific (code, writing, comms)
└── archive/ # COLD: decayed patterns
.learnings/ # Structured logging system
├── LEARNINGS.md # Corrections, insights, knowledge gaps, best practices
├── ERRORS.md # Command failures, exceptions
└── FEATURE_REQUESTS.md # User-requested capabilities
Before logging anything, ensure the .learnings/ directory and files exist:
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
Never overwrite existing files. This is a no-op if .learnings/ is already initialised.
Do NOT log the following to .learnings/ files:
| Category | Examples | Why |
|---|---|---|
| Credentials | Passwords, API keys, tokens, SSH keys | Security breach risk |
| Environment variables | OPENCLAW_*, DATABASE_URL, secrets | May contain sensitive config |
| Private keys | SSL certs, encryption keys, signing keys | Identity theft risk |
| Financial data | Card numbers, bank accounts, crypto seeds | Fraud risk |
| Full source/config | Complete files with embedded secrets | Leakage risk |
Instead:
| Situation | Action |
|---|---|
| Command/operation fails | Log to .learnings/ERRORS.md + self-reflect |
| User corrects you | Log to .learnings/LEARNINGS.md (category: correction) + corrections.md |
| User wants missing feature | Log to .learnings/FEATURE_REQUESTS.md |
| API/external tool fails | Log to .learnings/ERRORS.md with integration details |
| Knowledge was outdated | Log to .learnings/LEARNINGS.md (category: knowledge_gap) |
| Found better approach | Log to .learnings/LEARNINGS.md (category: best_practice) |
| Complete significant work | Self-reflect �?evaluate outcome vs intent |
| Learning applies broadly | Promote to SOUL.md / AGENTS.md / TOOLS.md |
| Learning is reusable skill | Extract via scripts/extract-skill.sh |
| Before major task | Review .learnings/ for relevant past entries |
Log automatically when you notice these patterns:
Corrections �?add to corrections.md + .learnings/LEARNINGS.md:
Preference signals �?add to memory.md if explicit:
Pattern candidates �?track, promote after 3x:
Ignore (don't log):
After completing significant work, pause and evaluate:
corrections.md + .learnings/Log format:
CONTEXT: [type of task]
REFLECTION: [what I noticed]
LESSON: [what to do differently]
| Tier | Location | Size | Access |
|---|---|---|---|
| HOT | memory.md | ~100 lines | Always loaded |
| WARM | projects/, domains/ | Unlimited | On-demand |
| COLD | archive/ | Unlimited | Decayed, rarely accessed |
Promotion rules:
TYPE-YYYYMMDD-XXX
LRN (learning), ERR (error), FEAT (feature)Append to .learnings/LEARNINGS.md:
## [LRN-YYYYMMDD-XXX] category
**Logged**: ISO-8601 timestamp
**Priority**: low | medium | high | critical
**Status**: pending | in_progress | resolved | wont_fix | promoted | promoted_to_skill
**Area**: frontend | backend | infra | tests | docs | config
### Summary
One-line description of what was learned
### Details
Full context: what happened, what was wrong, what's correct
### Suggested Action
Specific fix or improvement to make
### Metadata
- Source: conversation | error | user_feedback
- Related Files: path/to/file.ext
- Tags: tag1, tag2
- See Also: LRN-20250110-001 (if related)
- Pattern-Key: simplify.dead_code | harden.input_validation (optional)
- Recurrence-Count: 1
- First-Seen: 2025-01-15
- Last-Seen: 2025-01-15
Append to .learnings/ERRORS.md:
## [ERR-YYYYMMDD-XXX] skill_or_command_name
**Logged**: ISO-8601 timestamp
**Priority**: high
**Status**: pending
**Area**: frontend | backend | infra | tests | docs | config
### Summary
Brief description of what failed
### Error
Actual error message or output
### Context
- Command/operation attempted
- Input or parameters used
- Environment details
### Suggested Fix
If identifiable, what might resolve this
### Metadata
- Reproducible: yes | no | unknown
- Related Files: path/to/file.ext
Append to .learnings/FEATURE_REQUESTS.md:
## [FEAT-YYYYMMDD-XXX] capability_name
**Logged**: ISO-8601 timestamp
**Priority**: medium
**Status**: pending
### Requested Capability
What the user wanted to do
### User Context
Why they needed it, what problem they're solving
### Complexity Estimate
simple | medium | complex
### Suggested Implementation
How this could be built
| Priority | When to Use |
|---|---|
critical | Blocks core functionality, data loss risk, security issue |
high | Significant impact, affects common workflows, recurring issue |
medium | Moderate impact, workaround exists |
low | Minor inconvenience, edge case |
When an issue is fixed:
**Status**: pending �?**Status**: resolved### Resolution
- **Resolved**: ISO-8601 timestamp
- **Commit/PR**: abc123 or #42
- **Notes**: Brief description of what was done
| Target | What Belongs There |
|---|---|
SOUL.md | Behavioral guidelines, communication style, principles |
AGENTS.md | Agent-specific workflows, tool usage patterns, automation rules |
TOOLS.md | Tool capabilities, usage patterns, integration gotchas |
MEMORY.md | Long-term curated memory (main session only) |
If logging something similar to an existing entry:
grep -r "keyword" .learnings/**See Also**: ERR-20250110-001Promote recurring patterns into agent context files when ALL are true:
Recurrence-Count >= 3Write promoted rules as short prevention rules, not long incident write-ups.
A learning qualifies for skill extraction when ANY apply:
See Also links to 2+ similar issues (recurring)resolved with working fix (verified)*方式A:手动触发(用户�?保存为skill"�?
# 1. 分析对话,提取可复用模式
python scripts/skill_creator.py analyze <conversation_file>
# 2. 查看发现的模�?# 输出:[评分] 模式�? 冷静期状�?
# 3. 生成 SKILL.md 草稿
python scripts/skill_creator.py generate <pattern_name>
# 输出:草稿保存到 skills/_drafts/<name>/SKILL.md
# 4. 验证草稿质量
python scripts/skill_creator.py validate skills/_drafts/<name>
# 检查:前置条件/失败处理/不适用场景 是否完整
# 5. 用户确认后,移到正式目录
# mv skills/_drafts/<name> skills/<name>
*方式B:自动检测(收尾阶段�?
任务完成后,daily-agent 收尾检查时�? if 工具调用 �?5 �?步骤 �?3 �?非一次性查�?
提醒用户�?检测到可复用模式,是否保存�?skill�?
�?用户确认 �?执行方式A
方式C:冷静期触发(模式重�?次)
memory/skill_patterns.json 记录已识别模式:
if 同一模式�?�? 个独立会话中出现:
if 时间跨度 �?7 �?
自动建议�?这个操作你已经做�?次,要保存为 skill 吗?"
自动生成�?SKILL.md 必须包含�?- [x] *前置条件检查清�? �?执行前需确认的环�?依赖
Before extraction, verify:
Enable automatic reminders through agent hooks:
openclaw hooks enable self-improvement
| Script | Hook Type | Purpose |
|---|---|---|
scripts/activator.sh | UserPromptSubmit | Reminds to evaluate learnings after tasks |
scripts/error-detector.sh | PostToolUse (Bash) | Triggers on command errors |
scripts/extract-skill.sh | Manual | Creates skill from learning entry |
See references/hooks-setup.md for detailed configuration.
# Count pending items
grep -h "Status\*\*: pending" .learnings/*.md | wc -l
# List pending high-priority items
grep -B5 "Priority\*\*: high" .learnings/*.md | grep "^## \["
# Find learnings for a specific area
grep -l "Area\*\*: backend" .learnings/*.md
OpenClaw provides tools to share learnings across sessions. Use these when a learning is relevant to other active or future sessions.
| Tool | Purpose | When to Use |
|---|---|---|
sessions_list | View active/recent sessions | Find related sessions |
sessions_history | Read another session's transcript | Understand context before sharing |
sessions_send | Send a learning to another session | Share immediately relevant insight |
sessions_spawn | Spawn a sub-agent for background work | Delegate learning-related tasks |
DO share:
.learnings/LEARNINGS.md, specific entries)DO NOT share:
# After discovering a fix for a common error:
sessions_send(sessionKey="other-session", message="Found fix for XYZ error: see .learnings/ERRORS.md entry ERR-20260619-001. Solution: restart service with --flag")
Use inter-session communication only in trusted environments. Prefer sending short summaries with file paths, not raw data.
When the user asks about your memory or patterns, respond with these shortcuts:
| User Says | Action |
|---|---|
| "What do you know about X?" | Search all tiers (HOT/WARM/COLD) for X |
| "What have you learned?" | Show last 10 from corrections.md |
| "Show my patterns" | List memory.md (HOT tier) |
| "Show [project] patterns" | Load projects/{name}.md |
| "What's in warm storage?" | List files in projects/ + domains/ |
| "Memory stats" | Show counts per tier (see below) |
| "Forget X" | Remove from all tiers (confirm first!) |
| "Export memory" | ZIP all files in ~/self-improving/ |
When user says "memory stats", report:
📊 Self-Improving Memory
HOT (always loaded):
memory.md: X entries
WARM (load on demand):
projects/: X files
domains/: X files
COLD (archived):
archive/: X files
Recent activity (7 days):
Corrections logged: X
Promotions to HOT: X
Demotions to WARM: X
Avoid these pitfalls when using the self-improving system:
| Trap | Why It Fails | Better Move |
|---|---|---|
| Learning from silence | Creates false rules from non-corrections | Wait for explicit correction or repeated evidence (3x) |
| Promoting too fast | Pollutes HOT memory with untested patterns | Keep new lessons tentative until 3x successful application |
| Reading every namespace | Wastes context window | Load only HOT + smallest matching WARM file |
| Compaction by deletion | Loses trust and history | Merge, summarize, or demote to COLD instead |
| Inferring preferences | Assumes without confirmation | Ask explicitly: "Should I always do X?" |
| Over-logging | Creates noise, dilutes important patterns | Log only explicit corrections, not every mistake |
| Ignoring namespace isolation | Cross-project contamination | Keep project patterns in projects/{name}.md |
When memory patterns contradict each other:
Most specific wins
projects/myapp.md overrides domains/code.md overrides memory.mdMost recent wins (at same specificity level)
If ambiguous �?ask user
Scenario 1: Project vs Global
memory.md says: "Always use formal tone"projects/chatbot.md says: "Use casual tone for this project"Scenario 2: Same level, different dates
domains/code.md entry from 2024-01: "Prefer Python"domains/code.md entry from 2024-06: "Prefer TypeScript"Scenario 3: Ambiguous
Every time you act based on memory, cite the source:
Using [pattern/rule/preference] (from [file]:[line or section])
memory.md:12)"projects/myapp.md:Python style)"corrections.md:LRN-20240615-003)"If user requests a weekly digest, summarize:
When context window is limited or memory files are large:
Full mode (normal)
memory.md (HOT)projects/ or domains/ file (WARM)corrections.md (last 50)Reduced mode (context limit approaching)
memory.md (HOT)corrections.md (last 10 only)Minimal mode (severe context limit)
memory.md (HOT)corrections.mdmemory.md is always loaded[Context limit detected]
Loading minimal memory: memory.md only
Not loading: corrections.md, projects/, domains/
To access archived patterns, ask: "What's in warm storage?"
This skill has clear boundaries to prevent scope creep:
~/self-improving/)~/self-improving/heartbeat-state.md.learnings/ directory~/self-improving/ and .learnings/If user wants complementary functionality:
Install with clawhub install <slug> if user confirms.
| File | Purpose | When to Read |
|---|---|---|
setup.md | Initial setup guide | First use |
learning.md | Learning mechanics | Understanding the system |
operations.md | Memory operations | Managing memory tiers |
boundaries.md | Security boundaries | Before logging sensitive info |
scaling.md | Scaling rules | Large projects |
reflections.md | Self-reflection log | Reviewing past reflections |
heartbeat-rules.md | Heartbeat integration | Setting up heartbeat |
references/examples.md | Usage examples | Learning by example |
references/hooks-setup.md | Hook configuration | Setting up hooks |
references/openclaw-integration.md | OpenClaw setup | Platform integration |
assets/SKILL-TEMPLATE.md | Skill extraction template | Creating new skills |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| .learnings/ 目录不存�? | 首次使用未初始化 | 运行初始化脚本创建目录结�? |
| 文件写入失败 | 权限问题或磁盘满 | 检查文件权限,清理磁盘空间 |
| 记忆检索失�? | 索引损坏 | 重建索引文件 |
| 日志格式错误 | 未按模板格式记录 | 使用标准模板格式 |
| 敏感信息泄露 | 记录了密�?密钥 | 立即删除并检查其他日�? |
从会话中自动捕获观察、提取原子"本能"、带置信度评分演化、按项目隔离存储。
id: prefer-functional-style
trigger: "when writing new functions"
action: "Use functional patterns over classes"
confidence: 0.7
domain: "code-style"
scope: project | global
evidence:
- "Observed 5 instances of functional pattern preference"
- "User corrected class-based approach on 2026-07-08"
created: "2026-07-08T10:00:00"
last_observed: "2026-07-08T14:00:00"
tags: ["functional", "code-style"]
特性:原子(一trigger一action)、置信度加权(0.3-0.9)、领域标签、证据支持、作用域感知
| 分数 | 含义 | 行为 |
|---|---|---|
| 0.3 | Tentative | 建议但不强制 |
| 0.5 | Moderate | 相关时应使用 |
| 0.7 | Strong | 自动应用 |
| 0.9 | Near-certain | 核心行为 |
增长:反复观察、用户未纠正、类似本能同步 衰减:用户纠正行为、长时间未观察(30天后-0.05)、矛盾证据
记忆检索采用两阶段过滤:
阶段1: 置信度过滤(来自continuous-learning)
- 所有记忆条目带有置信度评分(0.0-1.0)
- 检索时先按置信度阈值过滤(> 0.6)
- 低置信度记忆不进入工作集
阶段2: 时效性排序(来自self-improving的HOT/WARM/COLD)
- 通过置信度过滤的记忆,再按HOT/WARM/COLD排序
- HOT: 最近3天内访问过 → 优先加载
- WARM: 3-30天内访问过 → 按需加载
- COLD: 30天以上未访问 → 仅索引,不加载
记忆检索流程:
全量记忆库 → [置信度过滤] → 高置信度子集 → [HOT/WARM/COLD排序] → 工作记忆
git remote get-url origin → SHA256 hash前12字符git rev-parse --show-toplevel → 回退使用repo路径python scripts/instinct_cli.py status # 查看所有本能
python scripts/instinct_cli.py observe --type user_correction --description "..." --trigger "..." --outcome "..."
python scripts/instinct_cli.py extract # 从观察中提取本能
python scripts/instinct_cli.py evolve # 演化为skill/command/agent
python scripts/instinct_cli.py promote --dry-run # 预览可提升本能
python scripts/instinct_cli.py export -o instincts.json # 导出
| 聚类大小 | 演化目标 | 示例 |
|---|---|---|
| >= 3 instincts | skill | testing-workflow.md |
| >= 2 instincts | command | code-style-check.md |
| >= 5 instincts + 复杂 | agent | refactor-specialist.md |
通过hook-engine自动捕获观察事件(PostExec失败/PreMessage纠正/Stop成功)。
任务完成后,对输出进行结构化自评。不是通过/失败门控,而是刻意反思步骤。
| 轴 | 问题 | 捕获什么 |
|---|---|---|
| 准确性 | 事实、声明和输出正确吗? | 幻觉、错误API名称、不正确语法 |
| 完整性 | 覆盖了用户要求的所有内容吗? | 遗漏的边界情况、未处理的错误路径 |
| 清晰性 | 解释可理解且结构良好吗? | 混淆的解释、无定义的术语 |
| 可操作性 | 用户可以立即基于输出行动吗? | 模糊建议、缺少步骤细节 |
| 简洁性 | 使用了最少必要的token吗? | 冗余、过度解释、填充内容 |
每个低于5分的必须引用具体证据。"展示差距,不只是命名它"。
## Self-Evaluation Report
**Task**: {task description}
**Overall Score**: {average}/5
| Axis | Score | Evidence |
|------|-------|----------|
| Accuracy | {1-5} | {specific evidence} |
| Completeness | {1-5} | {specific evidence} |
| Clarity | {1-5} | {specific evidence} |
| Actionability | {1-5} | {specific evidence} |
| Conciseness | {1-5} | {specific evidence} |
### Top Improvements
1. {highest impact improvement}
2. {second highest}
3. {third highest}
## Quick Self-Check
- Accuracy: {1-5} — {one-line evidence}
- Completeness: {1-5} — {one-line evidence}
- Clarity: {1-5} — {one-line evidence}
- Actionability: {1-5} — {one-line evidence}
- Conciseness: {1-5} — {one-line evidence}
**Overall**: {average}/5
**Top fix**: {highest impact improvement}
确定性日志分析引擎。纯规则驱动,无 LLM,可重复、可审计、亚100ms处理。
核心引擎通过多轮分析处理结构化日志数据:
模式检测 — 日志按 context(文件/模块)和 level(error/warn/info/debug)分组:
健康评分 — 系统健康分(0-100)基于:
建议生成 — 基于检测到的模式生成具体可操作建议,引用实际文件、错误消息和发现的模式。
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
action | string | 是 | analyze、evolve 或 status |
logs | array | 是 | 日志条目数组 |
logs[].timestamp | string | 是 | ISO 时间戳 |
logs[].level | string | 是 | error/warn/info/debug |
logs[].message | string | 是 | 日志消息 |
logs[].context | string | 否 | 文件或模块名 |
strategy | string | 否 | 演化策略 |
target_file | string | 否 | 聚焦分析特定文件 |
| 字段 | 类型 | 说明 |
|---|---|---|
patterns | array | 检测到的错误/回归/低效模式及严重度 |
health_score | number | 系统健康 0-100 |
recommendations | string[] | 可操作改进建议 |
summary | object | 计数:total_logs, error_count, warn_count, unique_patterns |
| 特性 | LLM 分析 | 确定性分析(本引擎) |
|---|---|---|
| 处理速度 | 5-30秒 | 亚100ms |
| 可重复性 | 每次不同 | 相同日志=相同结果 |
| 幻觉风险 | 可能编造模式 | 只报告真实模式 |
| 成本 | 每次分析有 token 成本 | 零成本 |
| 语义理解 | 理解上下文 | 仅基于模式 |
| 审计追踪 | 难以解释 | 基于规则,可解释 |
| 隐私 | 发送数据到 API | 完全本地运行 |
| 策略 | 聚焦 | 适用场景 |
|---|---|---|
auto | 基于健康评分平衡 | 默认 — 让引擎决定 |
balanced | 可靠性和功能等权 | 有中等问题的稳定系统 |
innovate | 优先新能力 | 准备增长的健康系统 |
harden | 优先可靠性和错误减少 | 频繁故障的系统 |
repair-only | 仅修复关键问题 | 危机中的系统 |
evolve 动作产出结构化改进提案:
evolution_id 用于追踪| 字段 | 类型 | 说明 |
|---|---|---|
evolution_id | string | 唯一提案ID |
strategy | string | 使用的策略 |
recommendations | array | 按优先级排序的改进建议 |
risk_assessment | object | 风险级别和贡献因素 |
estimated_improvement | string | 预期健康评分改进 |
1. 从所有 Agent 收集日志
2. 批量分析发现共同模式
3. 修复一次,部署到所有 Agent
4. 降低舰队级错误率
当分析多代理日志时,引擎识别:
# 收集所有代理日志
$allLogs = @()
foreach ($agentId in $agentFleet) {
$logs = Fetch-AgentLogs $agentId -Last24h
$allLogs += $logs
}
# 舰队级分析
$result = Analyze-Logs -logs $allLogs -action analyze
# 识别跨代理共同模式
$result.patterns | Where-Object { $_.affected_agents.Count -gt ($agentFleet.Count * 0.5) }
Agent 自调试工作流。在盲目重试之前,先系统化地捕获、诊断、恢复和报告。
精确记录失败状态:
| 模式 | 可能原因 | 检查方法 |
|---|---|---|
| 最大工具调用/重复命令 | 循环或无退出路径 | 检查最近N次调用是否重复 |
| 上下文溢出/推理降级 | 无界笔记、过大日志 | 检查近期上下文重复和低信号内容 |
| 连接拒绝/超时 | 服务不可用或端口错误 | 验证服务健康、URL、端口 |
| 429/配额耗尽 | 重试风暴 | 计算重复调用次数和重试间隔 |
| 写入后文件丢失 | 竞态、错误cwd、分支漂移 | 重新检查路径、cwd、git status |
| 修复后测试仍失败 | 假设错误 | 隔离失败测试,重新推导bug |
诊断问题:
用最小操作改变诊断表面:
## Agent Self-Debug Report
- Session/task: [会话/任务]
- Failure: [失败描述]
- Root cause: [根因]
- Recovery action: [恢复操作]
- Result: success | partial | blocked
- Token/time burn risk: [风险]
- Follow-up needed: [后续]
- Preventive change: [预防措施]
坏模式:用稍微不同的措辞重试相同操作三次 好模式:捕获失败 → 分类模式 → 运行直接检查 → 只有当检查支持时才改变计划
日志分析检测到重复错误模式
→ 触发自诊断循环
→ Phase 1-4 完成诊断和恢复
→ 恢复结果反馈给日志分析
→ 更新健康评分和改进建议
1. 分析预发布环境日志
2. 对比健康评分与生产基线
3. 健康评分低于基线 → 阻止部署
4. 在到达生产环境前捕获回归
{
"baseline_health_score": 75,
"critical_patterns_threshold": 0,
"error_rate_threshold": 0.01,
"block_on_regression": true
}
Write-Ahead Logging:在响应之前先写入关键信息。
The Law: 聊天历史是 BUFFER,不是存储。SESSION-STATE.md(或 memory/YYYY-MM-DD.md)是你的"RAM"——唯一安全的地方。
如果出现以上任何一项:
回复的冲动是敌人。 细节在上下文中感觉很清晰,写下来似乎没必要。但上下文会消失。先写后答。
用户说:"用蓝色主题,不要红色"
错误:"好的,蓝色!"(看起来很明显,为什么要写下来?)
正确:先写入 memory/2026-07-31.md: "主题:蓝色(非红色)" → 然后回复
在危险区(上下文60%后)记录每一次交互,解决压缩后上下文丢失问题。
session_status 检查):清空旧缓冲区,重新开始# Working Buffer (Danger Zone Log)
**Status:** ACTIVE
**Started:** [timestamp]
---
## [timestamp] Human
[their message]
## [timestamp] Agent (summary)
[1-2 sentence summary of your response + key details]
一旦上下文达到60%,每条交互都要记录。没有例外。
压缩后的恢复步骤。
<summary> 标签开始memory/working-buffer.md — 原始危险区交换SESSION-STATE.md — 活跃任务状态不要问"我们在讨论什么?" — 工作缓冲区有对话记录。
尝试10种方法再求助。这是核心身份。
用户永远不需要告诉你更努力尝试。
安全演化护栏:ADL/VFM协议。
禁止的演化:
优先级排序:
稳定性 > 可解释性 > 可重用性 > 可扩展性 > 新奇性
先评分:
| 维度 | 权重 | 问题 |
|---|---|---|
| 高频使用 | 3x | 这会每天使用吗? |
| 故障减少 | 3x | 这会将故障转为成功吗? |
| 用户负担 | 2x | 用户能1个词代替解释吗? |
| 自身成本 | 2x | 这为未来的我节省token/时间吗? |
阈值: 如果加权分数 < 50,不做。
黄金法则:
"这能让未来的我用更少成本解决更多问题吗?"
如果不行,跳过。优化复合杠杆,而非边际改进。
区分提示型cron和执行型cron。
| 类型 | 工作方式 | 使用场景 |
|---|---|---|
systemEvent | 向主会话发送提示 | Agent注意力可用,交互式任务 |
isolated agentTurn | 生成子代理自主执行 | 后台工作、维护、检查 |
你创建了一个cron说"检查X是否需要更新"作为 systemEvent。它每10分钟触发。但是:
修复: 对于不需要主会话注意力就应该发生的事情,使用 isolated agentTurn。
验证机制,而非文本。
你说"✅ 完成,更新了配置"但只改了文本,不是架构。
当更改工作方式时:
文本更改 ≠ 行为更改。
弃用工具或切换系统时,更新所有引用。
scripts/ 目录# 查找旧工具的所有引用
grep -r "old-tool-name" . --include="*.md" --include="*.sh" --include="*.json"
# 检查 cron jobs
cron action=list # 手动审查所有提示
trash)从外部源安装任何skill之前:
永远不连接:
这些是上下文收集攻击面。私有数据 + 不可信内容 + 外部通信 + 持久记忆使代理网络极其危险。
在向任何共享频道发布之前:
如果对#2或#3回答是: 直接路由到用户,不是共享频道。
主动询问用户需要什么,而不是等待被告知。
notes/proactive-tracker.md为什么需要冗余系统? 因为代理会忘记可选的事情。文档不够——你需要自动触发的触发器。
每次对话问1-2个问题以更好了解用户。将学习内容记录到 USER.md。
在 notes/recurring-patterns.md 追踪重复请求。在3+次出现时提议自动化。
在 notes/outcome-journal.md 记录重要决策。每周跟进超过7天的项目。
Version 2.6.0 — 合并 proactive-agent WAL协议/工作缓冲区/压缩恢复/主动行为/安全护栏