It's very much not trivial, though. Given two solutions to a coding problem, how do you objectively determine which one is better? More importantly, how do you objectively tell if either of them is good enough? Or if they're poor?
With maintenance costs I'd probably record as much data as I can and then try to find in a given case what kinds of signals were present. If I see some are repeating and are beneficiary or not, I can have some classifier from them. Also, it could unearth parasitistic relations when certain group of individuals flourishes only because they take advantage of certain individuals with different ethics, but never thrive in other kinds of environments.