See the Chrysler Comprehensive Compensation fiasco: https://en.wikipedia.org/wiki/Chrysler_Comprehensive_Compens...
These kinds of systems are all about the exceptions and how you enable humans to deal with those, not the rules and how the computer deals with those.
The problem is that the system first needs a comprehensive test suite written. THEN you could actually think about rewriting pieces.