Greg, here's a white paper I wrote about how to roll your own AI that avoids the failure modes you mention.
https://energyscholar.github.io/persistent-ai-collaboration
This system now allows me to train my custom AI on specialty domain knowledge. it will retain and apply that knowledge weeks and months later with zero degradation. It could do the same for your team's need for it to understand specialty codebases and associated design patterns.
Bruce