Log learnings and errors to markdown files for continuous improvement. Coding agents can later process these into fixes, and important learnings get promoted to project memory.
| Command/operation fails | Log to .learnings/ERRORS.md | | User corrects you | Log to .learnings/LEARNINGS.md with category correction | | User wants missing feature | Log to .learnings/FEATUREREQUESTS.md | | API/external tool fails | Log to .learnings/ERRORS.md with integration details |
| Knowledge was outdated | Log to .learnings/LEARNINGS.md with category knowledgegap | | Found better approach | Log to .learnings/LEARNINGS.md with category bestpractice | | Similar to existing entry | Link with See Also, consider priority bump | | Broadly applicable learning | Promote to CLAUDE.md, AGENTS.md, and/or .github/copilot-instructions.md |
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks. Source: pskoett/self-improving-agent.