← 返回
未分类 中文

LessonLoop

Lightweight experience-capture and behavior-hardening for Goat. Use when the user explicitly gives corrective feedback, says to remember or avoid something,...
轻量经验捕获与行为强化,用于Goat。在用户明确给出纠正反馈、要求记住或避免某事时使用。
stevengaojn2010
未分类 clawhub v0.1.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 413
下载
💾 0
安装
1
版本
#latest

概述

LessonLoop

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
  2. 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
  2. Rule — default behavior, routing, cost control, escalation condition
  3. Mistake — something Goat did wrong and should avoid repeating
  4. 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 MEMORY.md

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/apply_lesson.py writes a compact lesson to daily memory and logs a structured LessonLoop event in one step
  • scripts/capture_lesson.py appends a compact lesson to the canonical daily memory file
  • scripts/log_lesson_event.py writes structured LessonLoop event logs for evaluation and reporting
  • scripts/lessonloop_report.py summarizes recent LessonLoop activity and outputs a compact report

references/

  • references/lesson-types.md contains compact classification and phrasing patterns
  • references/status-format.md defines a compact report/status output format

版本历史

共 1 个版本

  • v0.1.1 当前
    2026-05-03 07:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,212 📥 266,331
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,353 📥 317,915
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,950