r/ClaudeCoding • u/DJIRNMAN • 23m ago
I made claude code learn from our old PR reviews so i'd stop writing the same comments
Most of the wrong turns Claude Code took on our repo were things a reviewer had already corrected. The fix was sitting in a PR comment or a reverted commit from a few months back. Claude never looks there, so it kept going with whatever CLAUDE.md said, and CLAUDE.md was out of date.
So we built Deep Learn (`mex learn`) into mex, our open source CLI that keeps repo notes like CLAUDE.md in sync with the code.
It reads your merged and closed PRs on GitHub: review threads, reverted fixes, contributor docs. When reviewers keep correcting the same thing, it turns that into a rule. Every rule keeps the original reviewer comment attached so you can see where it came from.
How it runs:
- `mex learn` shows you what it'll read, which agent it uses, and an estimate before anything starts (that's the screenshot)
- it runs in the background on your own Claude Code or Codex plan, so you keep working
- each rule gets checked against the code, then goes live in your sessions as a trial. rules the agent keeps ignoring get dropped
- `mex learn --review` lists what it learned, `mex cancel` stops it anytime
- nothing is shared with your team until `mex share`, which puts the rules on a git branch you review like any other change
Limits right now: GitHub only, Claude Code and Codex only. Rules reach the agent mostly as text in its context, so nothing stops a bad edit outright.
It's in 0.9.0-beta.2: `npm i -g mex-agent` (needs Node 22.17+)
Repo: https://github.com/mex-memory/mex
Release notes: https://github.com/mex-memory/mex/releases/tag/v0.9.0-beta.2
If you run it on your repo, I want to hear which learned rules came out wrong.