Add a new entry to the appropriate section of tasks/lessons.md.
Instructions
- •
Read the current
tasks/lessons.mdto understand the existing format and entries. - •
Determine which section the entry belongs in:
Mistakes & Corrections — Something went wrong, capture the preventive rule:
codePattern: [short description] Tags: [tag1, tag2] Mistake: [what went wrong] Rule: [preventive instruction — negative, clear] Added: [YYYY-MM-DD]
What Works (Positive Patterns) — Something worked well, capture what to repeat:
codePattern: [short description] Tags: [tag1, tag2] Context: [when/where this was effective] Why: [why it works] Added: [YYYY-MM-DD]
Troubleshooting — A recurring issue with a known fix:
codeSymptom: [what you observe] Tags: [tag1, tag2] Cause: [root cause] Solution: [how to fix it] Added: [YYYY-MM-DD]
Project Insights — A discovery about the project's architecture or domain:
codeInsight: [what was discovered] Tags: [tag1, tag2] Impact: [how this affects decisions] Added: [YYYY-MM-DD]
- •
If
$ARGUMENTSis provided, use it as context for the entry. - •
If
$ARGUMENTSis empty, ask what happened and determine the right category.
Rules
- •Write rules that ruthlessly prevent recurrence (for mistakes).
- •Be specific enough that a future session can understand and apply the entry without additional context.
- •Tags should be short, lowercase, and match the tag reference table.
- •Don't duplicate — check if a similar entry already exists before adding.
- •Positive patterns are just as valuable as mistakes. Capture what works.