Totem: AI Agent Persistent Memory & Code Quality Enforcement