In thorough bass (where the bass line is written first) there are simple "rules" for ascending and descending scales with different inversions and other rules in "partimenti". They are all based on the view from the bassline. I am looking for something similar from the point of view of the melody (to use when harmonizing melody).