LessonLoop
by @stevengaojn2010
Lightweight experience-capture and behavior-hardening for Goat. Use when the user explicitly gives corrective feedback, says to remember or avoid something,...
clawhub install lessonloop๐ About This Skill
name: lessonloop description: Lightweight experience-capture and behavior-hardening for Goat. Use when the user explicitly gives corrective feedback, says to remember or avoid something, approves a new operating rule, points out a repeated mistake, or asks Goat to improve itself without adding high token overhead. This skill records only high-value lessons, promotes durable rules into MEMORY.md when justified, and avoids verbose self-reflection loops.
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:
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:
Escalate to the main model only when:
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
memory/YYYY-MM-DD.md for short-term events, fresh corrections, and local contextMEMORY.md only if the lesson is durable and should shape future sessionsMEMORY.md3. Write in compressed form
Store the smallest useful rule.
Prefer:
Avoid:
4. Apply immediately
After writing memory, change behavior in the current session right away. Do not wait for the next session.
Writing rules
Session throttling protocol v1)Promotion guide
Promote to MEMORY.md when a lesson is:
Keep only in daily memory when it is:
Anti-bloat guardrails
Resources
scripts/
scripts/apply_lesson.py writes a compact lesson to daily memory and logs a structured LessonLoop event in one stepscripts/capture_lesson.py appends a compact lesson to the canonical daily memory filescripts/log_lesson_event.py writes structured LessonLoop event logs for evaluation and reportingscripts/lessonloop_report.py summarizes recent LessonLoop activity and outputs a compact reportreferences/
references/lesson-types.md contains compact classification and phrasing patternsreferences/status-format.md defines a compact report/status output format