Capture knowledge and experience from work sessions. Turn mistakes into system improvements through structured reflection and self-annealing.
Every learning opportunity follows this cycle:
text
Explore → Attempt → Observe Result → Reflect → Record → Anneal
Record the actions taken, in order:
Analyze results honestly:
Write each lesson in this format:
markdown
## [Topic]: [One-line summary]
**Context:** What we were doing when we learned this.
**What happened:** The specific event or error.
**Root cause:** Why it happened (not just what happened).
**Fix/Solution:** What we did to resolve it.
**Lesson:** The reusable knowledge (applicable beyond this specific case).
**Prevention:** What mechanism prevents this from happening again.
The most important step. A lesson that only lives in notes will be forgotten. Annealing means embedding the lesson into the system itself:
text
Error occurred
→ Fix the immediate problem
→ Update the tool/script that failed
→ Test the updated tool
→ Update the directive/documentation
→ System is now stronger against this class of error
Annealing targets (in order of durability):
TargetDurabilityExampleCode/ScriptHighestAdd validation, fix the bug, add error handlingAutomated checkHighAdd to pre-push script, CI check, linter ruleDirective/PlaybookMediumUpdate the SOP with new step or warningMemory/NotesLowestSave as memory for future conversations
Always aim for the highest durability target. A lesson embedded in code cannot be forgotten.
When the user asks to reflect or record lessons, follow this exact process:
Step 1: Inventory List everything that happened in the session — actions, errors, fixes, discoveries.
Step 2: Classify For each event, ask: Is this a fact, inference, or assumption?
TypeDefinitionExampleFactVerified by output, test, or tool"API returns 404 when token is expired"InferenceLikely based on evidence, but not directly tested"The rate limit is probably per-IP based on the error pattern"AssumptionBelieved but not verified"This endpoint probably supports pagination"
Step 3: Extract Lessons For each non-trivial event, write the structured lesson (Context → What happened → Root cause → Fix → Lesson → Prevention).
Step 4: Anneal For each lesson, identify the highest-durability target and implement the prevention mechanism.
Step 5: Verify Read back the recorded lessons. Ask:
Weak annealing (just a note):
"Remember to check CI after pushing."
Strong annealing (embedded in tooling):
Added
gh pr checkscall topre_push_check.py. Script now blocks if CI hasn't been checked. The lesson cannot be forgotten because the tool enforces it.
Weak annealing:
"Don't use
\sin grep character classes."
Strong annealing:
Added shell script linter rule that flags
\sinside[...]. Also added to the shell script checklist in the directive. Two layers of prevention.
Attention drift is real. You start with Plan A, get pulled into a side task, and forget what you originally set out to do. The Plan Log solves this.
Every time a plan is created or a non-trivial task begins, save a timestamped snapshot:
text
PlanLog/
├── 202604111430_apify-skills-collection.md
├── 202604111600_clawhub-distribution.md
├── 202604111730_clawhub-deep-dive.md
└── 202604111800_learn-skill-update.md
markdown
# Plan: [Title]
**Created:** YYYY-MM-DD HH:mm
**Status:** in-progress | completed | paused | abandoned
**Original goal:** [What we set out to do]
## Tasks
- [x] Completed task
- [ ] Pending task
- [ ] Task that got deferred
## Outcome
[What actually happened — filled in at the end]
## Drift Log
[If attention shifted, record when and why]
- HH:mm — Shifted to X because Y
- HH:mm — Returned to original plan / Decided to continue with X instead
Knowledge typeWhere to saveTechnical fact (reusable)Directive or knowledge base fileProject-specific contextMemory system or project notesTool bug or limitationComment in the tool's source codeProcess improvementUpdate the relevant SOP/playbookOne-time contextDon't save — it's ephemeral