
Ship cleaner PRs with agentic AI: use MCP context and living docs
I benchmarked a tool I've been building across a fork of the Full Stack Example App - the results were pretty interesting to me, and revealed some ideas for future testing.
My hypothesis was that providing an MCP where agents get all of the conventions of a codebase directly - it would result in reduced token spend because they would "get it right" the first time and it would not require asking it to make changes, or revisions after a review of the code.
Some TL;DR on the findings:
- Token cost was more with Moxie Docs - this immediately surprised me and then I realized what was happening. The MCP we provide (and the AGENTS.md context) instructs agents to identify if their changes impact or warrant documentation updates. This predictably results in more token usage from the agent using the MCP versus control - because the agent is updating and adding documentation automatically.
- I need more complex test cases - I used some basic API endpoint updates, small features, etc. that were in hindsight relatively trivial for most agents nowadays, so the result was not a strong convention drift that can be seen with larger one-shot attempts / prompts, and it did not result in higher impacts to docs going stale
- Use real world repos - I have metrics from our own users (merge rate of PRs, comments tagged to us to update document generation, signals from our Q&A feature feedback, etc.) that are more impactful to look at, but I think the Full Stack Example app repo is a good holistic project scaffold, but not indicative of a real world app with stale docs, missing docs, etc.
Would love any feedback or to answer questions! I plan to re-run this experiment in the future with some improvements to the methodology but as a quick sanity check on impact it's very promising. I've also found the need to set up eval harness workflows on our models and prompts to detect drift on our quality - one thing that was interesting was bumping up the thinking level on some models actually resulted in worse output, something I did not expect.