In my “Software 2.0” blog post series, I’ve written about how the burden of effort in software development has shifted from manually typing and testing code to writing specifications and verifying that large language models have produced an acceptable program as output.
There are numerous challenges to doing this well at scale: cost, learning curve, tooling, lack of existing test coverage or specifications on legacy code bases, and more.
One of the more acute problems developers encounter in this space is “reward hacking” - a process by which LLM coding assistants follow the literal letter of the law but not the spirit of it, i.e. “turn the test suite green” gets interpreted as “disable the failing tests” by the language model. LLMs are trained via reinforcement learning to achieve sets of goals established by researchers, and the reasoning LLMs use is quite alien compared to how a human understands it. This sort of misalignment between what the goal specified and the LLM’s very literal interpretation of it is what leads to “reward hacking.”
In this post I’m going to introduce “.NET Slopwatch”, a dotnet tool I’ve written that can use a combination of Roslyn and file analyzers to catch common reward-hacking patterns and flag them long before they seep into your code base.

