I'm new at cycling but this is my experience in track & field sprint events:
We have to eat enough carbohydrates, fat, protein and fibre. But at the same time we have to help our digestive system.
How? By eating easy-to-digest foods such as Quinoa, red lentils, chicken..
For example, pork and beef cause a little putrefaction and a consequent extra effort for our digestive system(we need that effort during our sprints).
Something similar happens with gluten, it causes a little inflammation in our stomach.
We can eat them but not on competition or high intensity train days.
During the competition period I made a diet based on all kind of foods but avoiding red meat, gluten and some legume/vegetables and the results were great.
Legumes/vegetables that I avoided: Beans and chickpeas(hard digestions). Tomatoes and all kind of peppers(acid vegetables). Normal Rice and Pasta(too much carbs and gluten).
Solutions to keep eating carbs and proteins: (gluten free)
Quinoa: 45% carbs and 15% proteins
Red lentils pasta: 50% carbs, 25% proteins 9% fibre.
Red Rice: 77% carbs and 9% proteins.
Our problem in track & field was that we never took nothing as protein shakes and that kind of supplements.
Now in cycling I'm taking shakes and they are great for recoveries.