As best I understand it so far, you want nudging notes up & down to stay with the current harmony at the moment rather than just the key signature (and perhaps previous accidentals in the bar). This immediately prompts the question: How shall the harmony be determined? By chord symbols? They can so easily be ambiguous, even if entered carefully (which few composers do). I would like to see a sample of how you’d map scales to chords, and I wonder how many musicians would agree with you.
Also, jazz musicians are notoriously unconcerned with enharmonics, but music notation cannot be. Your sample progression is sensible to the ear but has misspellings: the roots of the diminished 7th chords are leading tones to the next chord, so they need to be sharps, not flats. This may sound like fussy academic nonsense to most jazz players, but software has to “understand” all of it in order to handle the kind of feature you’re talking about.