To make this easier, I created retro, an open-source active context curator for your AI agents. It’s written in Rust with a local SQLite backend and uses git hooks to run at the right times, periodically analyzing your conversations with your agents, their behavior, extracting patterns from it and creating PRs for editing your context. You can look at it as a personal assistant that helps you do the heavy lifting when it comes to context curation. You stay in control, as you get to review the changes it wants to make. It tries to deduplicate patterns and it has an audit feature you can use to periodically audit all the context in your project, to make sure it doesn’t become AI slop.
It’s currently targeting Claude Code, as that is my daily driver, but I am planning on expanding support to other coding agents. I’ve been using and tweaking it myself. Let me know what you think, any feedback is appreciated :)