> I once started working on something similar, but the goal was to suggest a list of ingredients for me to buy for the week so that I had a good total nutritional values. I don't work on it anymore though.
Cronometer has a feature that does this – it checks to see where you aren't hitting your daily targets for macro/micronutrients and then suggests foods that would allow you to hit those targets. Quite nifty.