A 12-Line Conventions File Fixed Every Claude Coding Failure in My Experiment

https://hackernoon.imgix.net/images/R4wsbPS5sLRmPKPzOZLOzxdFQOA2-l3b3bmb.png

I gave Claude Sonnet the same one-line coding task five times. And five times it filled the gaps with the same guesses: Decimal for money, ValueError for bad input, plus status and created_at fields I never asked for.

Then I gave it my real Order class and the input format. Not my team's conventions, just the data model. Five runs out of five, it stored $12.50 as 12.5 cents.

The fix? A 12-line conventions file and the helper files it points to. With those, every run passed all 8 of my hidden tests. I even buried them in 62,000 tokens of unrelated code, and all 5 runs still passed. The only thing that changed was the bill: about 6 times bigger, and that's with caching.

As an ML developer, I look at every prompt like a dataset with missing values. In this article I'll show you why, walk you...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more