Feedback Learning
/install feedback-learning
Feedback Learning System
A complete pipeline for agents to learn from user feedback without spending tokens on analysis.
Architecture
User feedback → detect-feedback.py → log-event.sh → events.jsonl
↓
weekly-report.py ← analyze-patterns.py
↓
patterns.json
↓ (≥3 occurrences)
genes.json (promoted rules)
Setup
1. Install files
Copy the skill contents to your shared learning directory:
DEST="$HOME/.openclaw/shared/learning"
mkdir -p "$DEST/reports"
cp scripts/* "$DEST/"
chmod +x "$DEST/log-event.sh"
touch "$DEST/events.jsonl"
2. Initialize data files
If they don't exist, create empty JSON stores:
cat > "$DEST/patterns.json" \x3C\x3C 'EOF'
{"version": "2.0", "updated": "", "patterns": []}
EOF
cat > "$DEST/genes.json" \x3C\x3C 'EOF'
{"version": "2.0", "rules": []}
EOF
cat > "$DEST/capsules.json" \x3C\x3C 'EOF'
{"version": "2.0", "capsules": []}
EOF
3. Create LEARNINGS.md for each agent
Add to each agent's workspace:
# LEARNINGS.md
**Last Updated:** YYYY-MM-DD
**Total:** 0
## 🟢 Что работает (положительный фидбек)
(пока пусто)
## 🔴 Что НЕ работает (отрицательный фидбек)
(пока пусто)
## 🧠 Извлечённые правила
(пока пусто)
## 🔁 Повторяющиеся паттерны
(пока пусто)
## 💡 Feature Requests
(пока пусто)
4. Add to AGENTS.md
Add this block to each agent's AGENTS.md boot sequence:
## Feedback Learning
- On positive feedback (👍❤️🔥👏💯 or words like "круто","топ","зашло"):
Run: `bash ~/.openclaw/shared/learning/log-event.sh \x3Cagent> positive user_emoji "\x3Ccontext>" "\x3Csignal>"`
- On negative feedback (👎🤦😤 or words like "фигня","переделай"):
Run: `bash ~/.openclaw/shared/learning/log-event.sh \x3Cagent> correction user_nlp "\x3Ccontext>" "\x3Csignal>" "\x3Chint>"`
- On exec errors:
Run: `bash ~/.openclaw/shared/learning/log-event.sh \x3Cagent> error exec_fail "\x3Ccontext>" "\x3Csignal>" "\x3Chint>"`
5. Set up crons
Pattern analysis (daily):
schedule: cron 30 3 * * * @ \x3Ctimezone>
payload: python3 ~/.openclaw/shared/learning/analyze-patterns.py
Weekly report (Sundays):
schedule: cron 30 4 * * 0 @ \x3Ctimezone>
payload: python3 ~/.openclaw/shared/learning/weekly-report.py
Usage
Log an event manually
bash log-event.sh anton error exec_fail "config update" "trailing comma in JSON" "Validate JSON before writing"
bash log-event.sh anton positive user_emoji "sent report" "🔥"
bash log-event.sh anton correction user_nlp "sent message" "переделай, не тот формат" "Confirm format before sending"
Detect feedback from text (no LLM)
echo "круто, зашло!" | python3 detect-feedback.py
# → {"type": "positive", "source": "user_nlp", "signal": "круто", "confidence": 0.8}
python3 detect-feedback.py "переделай это"
# → {"type": "correction", "source": "user_nlp", "signal": "переделай", "confidence": 0.8}
Run pattern analysis
python3 analyze-patterns.py
Outputs: pattern count, promotion status. Updates patterns.json. Auto-promotes to genes.json when a pattern hits ≥3 occurrences in 30 days.
Generate weekly report
python3 weekly-report.py
Saves to reports/WEEKLY_REPORT_YYYY_WNN.md with stats by agent, source, top patterns, and newly promoted rules.
Data Files
| File | Purpose |
|---|---|
events.jsonl |
Append-only event log (all feedback) |
patterns.json |
Grouped recurring patterns with counts |
genes.json |
Promoted rules (≥3 occurrences → active rule) |
capsules.json |
Successful reasoning paths (avoid re-computation) |
reports/ |
Weekly synthesis reports |
Event Schema
{
"ts": "2026-03-20T12:00:00Z",
"agent": "anton",
"type": "error|correction|positive|pattern|requery",
"source": "exec_fail|user_nlp|user_emoji|requery|auto",
"context": "what agent was doing",
"signal": "the trigger text or emoji",
"hint": "suggested fix or rule",
"heat": 1
}
Promotion Flow
- Events accumulate in
events.jsonl analyze-patterns.pygroups similar events by signal text (≥60% similarity)- Patterns with ≥3 occurrences in 30 days are promoted to
genes.json - Agents read
genes.jsonat boot to apply learned rules weekly-report.pysynthesizes progress for human review
Supported Languages
Feedback detection supports:
- Russian: 20+ negative triggers, 19+ positive triggers, correction patterns
- English: 10 negative, 8 positive triggers
- Emoji: Universal positive/negative reactions
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install feedback-learning - 安装完成后,直接呼叫该 Skill 的名称或使用
/feedback-learning触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Feedback Learning 是什么?
Zero-LLM feedback learning system for OpenClaw agents. Detects user feedback (emoji reactions, text signals like "переделай"/"круто"), logs events, discovers... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 128 次。
如何安装 Feedback Learning?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install feedback-learning」即可一键安装,无需额外配置。
Feedback Learning 是免费的吗?
是的,Feedback Learning 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Feedback Learning 支持哪些平台?
Feedback Learning 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Feedback Learning?
由 Maxim Kravtsov(@surdeddd)开发并维护,当前版本 v1.0.0。