Goat Self Improving Lite
Overview
Use this skill to convert important feedback into durable behavior changes with minimal token cost. Prefer event-triggered capture over continuous self-reflection.
Core rule
Do not run broad self-analysis. Only act when at least one of these is true:
- - The user explicitly says "remember", "以后", "别再", "固定下来", "写进记忆", or similar
- The user corrects a mistake or rejects an output pattern
- A new operating rule is agreed
- A repeated failure should become a hard constraint
If none apply, do not use this skill.
Workflow
0. Use the low-cost decision path first
Prefer a two-layer path:
- 1. Local/Ollama first-pass for simple classification, compression, and promotion pre-check
- Main model final pass only when the case is ambiguous, strategic, or likely to affect long-term defaults
Use local/Ollama for:
- - classifying feedback into a lesson type
- compressing a lesson into 1-2 lines
- deciding whether a lesson is probably daily-memory-only or a candidate for long-term promotion
Escalate to the main model only when:
- - the lesson changes global operating rules
- the wording is ambiguous or high-stakes
- the summary may distort the user's intent
- the lesson affects safety, billing, routing, or durable priorities
1. Classify the feedback
Map the event into one of four buckets:
- 1. Preference — style, brevity, tone, output format
- Rule — default behavior, routing, cost control, escalation condition
- Mistake — something Goat did wrong and should avoid repeating
- Priority — what to optimize first right now
2. Decide storage level
- - Write to
memory/YYYY-MM-DD.md for short-term events, fresh corrections, and local context - Also update
MEMORY.md only if the lesson is durable and should shape future sessions - Do not promote transient details into INLINECODE2
3. Write in compressed form
Store the smallest useful rule.
Prefer:
- - "Boss requires strict token-efficiency discipline"
- "Default to short answers and minimal tools"
Avoid:
- - long narrative explanations
- emotional framing
- detailed postmortems unless specifically requested
4. Apply immediately
After writing memory, change behavior in the current session right away. Do not wait for the next session.
Writing rules
- - Keep each stored lesson to 1-2 lines
- Prefer imperative language
- Record the correction, not the whole story
- If a lesson changes defaults, phrase it as a rule
- If the user approved a protocol, name it consistently (for example:
Session throttling protocol v1)
Promotion guide
Promote to MEMORY.md when a lesson is:
- - likely to matter across many sessions
- tied to cost, safety, trust, routing, or communication style
- a default operating rule
Keep only in daily memory when it is:
- - temporary
- experimental
- tied to a single task
- not yet validated by repeated use or explicit user approval
Anti-bloat guardrails
- - Do not summarize every conversation
- Do not run reflection after every task
- Do not create extra memory files
- Do not duplicate the same rule in multiple places unless promoting from daily memory to long-term memory
- Do not trigger memory search unless the task actually depends on prior decisions, preferences, dates, people, or todos
Resources
scripts/
- -
scripts/capture_lesson.py appends a compact lesson to the canonical daily memory file - INLINECODE6 writes structured LessonLoop event logs for evaluation and reporting
- INLINECODE7 summarizes recent LessonLoop activity and outputs a compact report
references/
- -
references/lesson-types.md contains compact classification and phrasing patterns - INLINECODE9 defines a compact report/status output format
Goat 自我改进精简版
概述
使用此技能,以最少的 token 成本将重要反馈转化为持久的行为改变。优先采用事件触发式捕获,而非持续的自我反思。
核心规则
不要进行广泛的自我分析。仅在满足以下至少一个条件时执行:
- - 用户明确说出记住、以后、别再、固定下来、写进记忆或类似词语
- 用户纠正错误或拒绝某种输出模式
- 达成新的操作规则
- 重复出现的失败应成为硬性约束
如果以上条件均不满足,请勿使用此技能。
工作流程
0. 优先使用低成本决策路径
优先采用双层路径:
- 1. 本地/Ollama 初筛:用于简单分类、压缩和晋升预检
- 主模型终审:仅在情况模糊、具有战略意义或可能影响长期默认设置时使用
使用本地/Ollama 进行:
- - 将反馈分类为经验类型
- 将经验压缩为1-2行
- 判断经验是仅适用于日常记忆,还是适合长期晋升
仅在以下情况升级至主模型:
- - 经验改变了全局操作规则
- 措辞模糊或风险较高
- 摘要可能扭曲用户意图
- 经验涉及安全、计费、路由或持久优先级
1. 分类反馈
将事件归入以下四类之一:
- 1. 偏好 — 风格、简洁性、语气、输出格式
- 规则 — 默认行为、路由、成本控制、升级条件
- 错误 — Goat 做错且应避免重复的事项
- 优先级 — 当前应优先优化的内容
2. 决定存储层级
- - 短期事件、新近修正和局部上下文写入 memory/YYYY-MM-DD.md
- 仅当经验具有持久性且应影响未来会话时,才同时更新 MEMORY.md
- 不要将临时细节晋升到 MEMORY.md
3. 以压缩形式写入
存储最小有用的规则。
优先使用:
- - 老板要求严格的 token 效率纪律
- 默认简短回答和最少工具
避免:
- - 冗长的叙述性解释
- 情绪化表述
- 除非特别要求,否则避免详细的复盘记录
4. 立即应用
写入记忆后,立即在当前会话中改变行为。不要等待下一个会话。
编写规则
- - 每条存储经验保持在1-2行
- 优先使用命令式语言
- 记录修正内容,而非完整故事
- 如果经验改变了默认设置,以规则形式表述
- 如果用户批准了某个协议,保持命名一致(例如:会话限流协议 v1)
晋升指南
当经验满足以下条件时,晋升到 MEMORY.md:
- - 可能影响多个会话
- 与成本、安全、信任、路由或沟通风格相关
- 属于默认操作规则
仅在以下情况保留在日常记忆中:
- - 临时性的
- 实验性的
- 与单一任务相关
- 尚未通过重复使用或用户明确批准验证
防膨胀护栏
- - 不要总结每一次对话
- 不要在每次任务后都进行反思
- 不要创建额外的记忆文件
- 不要在多处重复相同的规则,除非是从日常记忆晋升到长期记忆
- 不要触发记忆搜索,除非任务确实依赖于先前的决策、偏好、日期、人员或待办事项
资源
脚本/
- - scripts/capturelesson.py:将精简经验追加到规范的日常记忆文件中
- scripts/loglessonevent.py:写入结构化的 LessonLoop 事件日志,用于评估和报告
- scripts/lessonloopreport.py:汇总最近的 LessonLoop 活动并输出精简报告
参考/
- - references/lesson-types.md:包含精简的分类和措辞模式
- references/status-format.md:定义精简的报告/状态输出格式