Self-learning memory for AI coding agents — pattern detection, confidence scoring, auto-promotion via MCP