A self-improvement system that turns every interaction into a learning opportunity.
Three loops: real-time capture → daily consolidation → weekly deep review.
Run the setup script to create the file structure:
bash <skill_dir>/scripts/setup-evolution.sh
This creates:
memory/
evolution-log.md # Chronicle of every evolution event
evolution-metrics.json # Statistics tracker
mistakes-learned.md # Mistake → lesson database
skill-improvements.md # Queued improvements for skills/code
testing-knowledge.md # Domain knowledge base (rename per your domain)
Create two cron jobs for automated evolution:
Daily evolution (recommended: late evening, e.g. 23:00):
Schedule: cron "0 23 * * *" (your timezone)
Payload: agentTurn
Message: see references/daily-evolution-prompt.md
Weekly deep evolution (recommended: weekend morning, e.g. Sunday 10:00):
Schedule: cron "0 10 * * 0" (your timezone)
Payload: agentTurn
Message: see references/weekly-evolution-prompt.md
Add the following section to your AGENTS.md (adapt to your role):
## 🧬 Self-Evolution
I have a built-in learning loop. After every interaction:
- Made a mistake → record in `memory/mistakes-learned.md`
- Found a skill/code improvement → queue in `memory/skill-improvements.md`
- Learned something new → update domain knowledge file
- Important decision/preference → update `MEMORY.md`
Trigger: something notable happens during normal work.
| Event | Action | File |
|---|---|---|
| ------- | -------- | ------ |
| Made a mistake | Record cause + fix + prevention | mistakes-learned.md |
| Skill could be better | Queue improvement with priority | skill-improvements.md |
| Learned new knowledge | Add to domain knowledge file | testing-knowledge.md (or your domain file) |
| User preference discovered | Update long-term memory | MEMORY.md |
Format for mistakes-learned.md:
### Category Name
- **Short description**: Root cause → Fix/Prevention
Format for skill-improvements.md:
## Queued
- [ ] target: <file/skill> | issue: <what's wrong> | fix: <proposed solution>
## Completed
- [x] target: <file/skill> | issue: <what> | fix: <what was done> ✅ (date)
See references/daily-evolution-prompt.md for the full cron prompt.
Steps:
memory/YYYY-MM-DD.md daily logskill-improvements.md (code fixes, skill updates)mistakes-learned.md with new entriesMEMORY.md with significant eventsevolution-metrics.json countersevolution-log.mdSee references/weekly-evolution-prompt.md for the full cron prompt.
Steps:
Track progress in evolution-metrics.json:
{
"initialized": "YYYY-MM-DD",
"total_evolutions": 0,
"daily_evolutions": 0,
"weekly_evolutions": 0,
"skills_improved": 0,
"code_fixes_applied": 0,
"skills_created": 0,
"mistakes_recorded": 0,
"mistakes_resolved": 0,
"knowledge_entries_added": 0,
"memory_updates": 0,
"soul_updates": 0,
"last_daily_evolution": null,
"last_weekly_evolution": null,
"history": []
}
Add to HEARTBEAT.md for real-time urgency checks:
## Real-Time Learning Check
- Check memory/skill-improvements.md for items marked `urgent`
- If found, execute immediately without waiting for daily evolution
mistakes-learned.md before similar tasks to avoid repeating errors共 1 个版本