Claw Self Improving Plus
Build a conservative learning pipeline. Optimize for signal, not clutter.
Core stance
Do not auto-rewrite long-term memory or behavior files by default.
Use this flow:
- 1. Capture raw learning candidates.
- Normalize them into a structured schema.
- Score each item for promotion value.
- Detect duplicates or merge candidates.
- Consolidate repeated learnings into stronger records.
- Build a prioritized learning backlog.
- Draft anchored candidate patches.
- Review patches with human approval.
- Apply only approved patches.
Learning types
Use these types:
- -
mistake: the agent did something wrong - INLINECODE1 : the user corrected a wrong assumption or behavior
- INLINECODE2 : a useful fact about environment, tools, preferences, or workflow
- INLINECODE3 : a durable preference, policy, or chosen design
- INLINECODE4 : a known failure mode that should not recur
Minimal record schema
Store each learning candidate as JSON with these fields:
- -
id: stable slug or timestamped id - INLINECODE6
- INLINECODE7
- INLINECODE8
- INLINECODE9
- INLINECODE10
- INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
Default enums:
- -
confidence: INLINECODE19 - INLINECODE20 : INLINECODE21
- INLINECODE22 : INLINECODE23
- INLINECODE24 : INLINECODE25
Routing rules
Promote by destination, not vibes:
- -
SOUL.md: durable style, personality, voice rules - INLINECODE27 : operating rules, workflows, safety/process lessons
- INLINECODE28 : environment-specific commands, paths, model/tool preferences
- INLINECODE29 : important long-term facts about user, projects, decisions, history
- daily/raw store only: low-confidence or highly local observations
If a learning does not clearly deserve promotion, keep it in the raw log.
Scoring heuristic
Score each record on five dimensions:
- 1.
reuse_value: will this help again? - INLINECODE31 : how well supported is it?
- INLINECODE32 : how broadly does it matter?
- INLINECODE33 : should it become a lasting rule or memory?
- INLINECODE34 : where should it go if promoted?
Use this practical rubric:
- - High promotion priority: repeated mistake, explicit user preference, environment fact that breaks tasks, regression with real cost
- Medium priority: useful workflow pattern seen more than once
- Low priority: one-off trivia, speculative interpretation, emotional noise, temporary state
Anchored patch generation
Prefer anchored insertion or exact replacement over blind append.
Each patch may contain:
- - INLINECODE35
- INLINECODE36
- INLINECODE37
- INLINECODE38
- INLINECODE39
- INLINECODE40
- INLINECODE41
- INLINECODE42
Use exact replacement when the old text is known.
Use anchored insertion when the destination section is known.
Use append only as fallback.
Learning store layout
Use a stable .learnings/ structure. See references/learning-store-layout.md.
Recommended files:
- - INLINECODE45
- INLINECODE46
- INLINECODE47
- INLINECODE48
- INLINECODE49
- INLINECODE50
Default workflow
1. Capture
Append raw learnings into .learnings/inbox.jsonl.
Use scripts/capture_learning.py to create normalized records.
2. Score
Run scripts/score_learnings.py on the inbox or a batch export.
3. Review duplicates
Run scripts/merge_candidates.py to group likely duplicates.
4. Draft patches
Run scripts/draft_patches.py to produce anchored reviewable patch candidates.
5. Review
Use scripts/review_patches.py to list, approve, reject, or skip candidates.
Examples:
CODEBLOCK0
6. Apply only after approval
Run scripts/apply_approved_patches.py.
This script only applies entries explicitly approved.
It validates allowed targets, supports --dry-run, skips duplicate entries already present, and prefers exact replacement, then anchored insertion, then append fallback.
Output style
When reporting results, use this structure:
- -
new_candidates: count - INLINECODE60 : count
- INLINECODE61 : count
- INLINECODE62 : short bullet list
- INLINECODE63 : yes
Resources
References
- - Scoring rubric: see INLINECODE64
- Patch target guide: see INLINECODE65
- Learning store layout: see INLINECODE66
Scripts
- - INLINECODE67
- INLINECODE68
- INLINECODE69
- INLINECODE70
- INLINECODE71
- INLINECODE72
- INLINECODE73
- INLINECODE74
- INLINECODE75
- INLINECODE76
- INLINECODE77
- INLINECODE78
- INLINECODE79
- INLINECODE80
- INLINECODE81
技能名称: claw-self-improving-plus
详细描述:
爪式自我改进增强版
构建一个保守的学习流水线。优化信号,而非杂乱信息。
核心立场
默认情况下,不要自动重写长期记忆或行为文件。
使用以下流程:
- 1. 捕获原始学习候选。
- 将其规范化到结构化模式中。
- 对每个条目进行推广价值评分。
- 检测重复项或合并候选。
- 将重复学习内容整合为更强的记录。
- 构建优先级学习积压清单。
- 起草锚定候选补丁。
- 经人工审批后审查补丁。
- 仅应用已批准的补丁。
学习类型
使用以下类型:
- - mistake:智能体做错了某事
- correction:用户纠正了错误的假设或行为
- discovery:关于环境、工具、偏好或工作流的有用事实
- decision:持久的偏好、策略或选定的设计
- regression:不应再次发生的已知失败模式
最小记录模式
将每个学习候选存储为JSON,包含以下字段:
- - id:稳定的短标识符或带时间戳的ID
- timestamp
- source
- type
- summary
- details
- evidence
- confidence
- reusevalue
- impactscope
- promotiontargetcandidates
- status
- related_ids
默认枚举值:
- - confidence:low|medium|high
- reusevalue:low|medium|high
- impactscope:single-task|project|workspace|cross-session
- status:captured|scored|merged|promoted|rejected
路由规则
按目标推广,而非凭感觉:
- - SOUL.md:持久的风格、个性、语音规则
- AGENTS.md:操作规则、工作流、安全/流程经验
- TOOLS.md:环境特定命令、路径、模型/工具偏好
- MEMORY.md:关于用户、项目、决策、历史的重要长期事实
- 仅限每日/原始存储:低置信度或高度局部的观察
如果某个学习内容明显不值得推广,则保留在原始日志中。
评分启发式方法
在五个维度上对每条记录评分:
- 1. reusevalue:将来是否会再次有用?
- confidence:支持程度如何?
- impactscope:影响范围有多广?
- promotionworthiness:是否应成为持久的规则或记忆?
- promotiontarget_candidates:如果推广,应放在哪里?
使用以下实用评分标准:
- - 高推广优先级:重复错误、明确的用户偏好、破坏任务的环境事实、具有实际成本的回归
- 中等优先级:出现超过一次的有用工作流模式
- 低优先级:一次性琐事、推测性解释、情绪噪音、临时状态
锚定补丁生成
优先使用锚定插入或精确替换,而非盲目追加。
每个补丁可能包含:
- - targetfile
- anchor
- insertmode
- oldtext
- newtext
- suggestedentry
- approved
- reviewstatus
当旧文本已知时,使用精确替换。
当目标部分已知时,使用锚定插入。
仅将追加作为后备方案。
学习存储布局
使用稳定的.learnings/结构。参见references/learning-store-layout.md。
推荐文件:
- - .learnings/inbox.jsonl
- .learnings/scored.jsonl
- .learnings/merge.json
- .learnings/patches.json
- .learnings/apply-report.json
- .learnings/archive/
默认工作流
1. 捕获
将原始学习内容追加到.learnings/inbox.jsonl。
使用scripts/capture_learning.py创建规范化记录。
2. 评分
对收件箱或批量导出运行scripts/score_learnings.py。
3. 审查重复项
运行scripts/merge_candidates.py对可能的重复项进行分组。
4. 起草补丁
运行scripts/draft_patches.py生成可审查的锚定补丁候选。
5. 审查
使用scripts/review_patches.py列出、批准、拒绝或跳过候选。
示例:
bash
python scripts/review_patches.py .learnings/patches.json list
python scripts/review_patches.py .learnings/patches.json act --index 1 --action approve
python scripts/review_patches.py .learnings/patches.json act --index 2 --action reject --note too vague
6. 仅在批准后应用
运行scripts/applyapprovedpatches.py。
此脚本仅应用明确批准的条目。
它验证允许的目标,支持--dry-run,跳过已存在的重复条目,并优先使用精确替换,然后是锚定插入,最后是追加后备。
输出风格
报告结果时,使用以下结构:
- - newcandidates:计数
- highpriority:计数
- mergegroups:计数
- patchcandidates:简短项目符号列表
- needshumanreview:是
资源
参考
- - 评分标准:参见references/scoring-rubric.md
- 补丁目标指南:参见references/promotion-targets.md
- 学习存储布局:参见references/learning-store-layout.md
脚本
- - scripts/capturelearning.py
- scripts/scorelearnings.py
- scripts/mergecandidates.py
- scripts/draftpatches.py
- scripts/detectpatchconflicts.py
- scripts/consolidatelearnings.py
- scripts/buildbacklog.py
- scripts/agebacklog.py
- scripts/reviewbacklog.py
- scripts/checkexistingpromotions.py
- scripts/reviewpatches.py
- scripts/renderreview.py
- scripts/applyapprovedpatches.py
- scripts/archivebatch.py
- scripts/runpipeline.py