In a medium size pan, heat oil over medium-high heat. Add the chopped onions and cook for 4 minutes, stirring occasionally.
Season generously with salt and pepper and cook another 4 to 5 minutes, until golden brown. Remove onions to a bowl and set aside.
Cook pasta according to package directions. Drain.
Warm up the stock and keep it simmering.
Beat the egg lightly and mix with the kasha so that the grains are well coated.
Pour kasha into the pan you just used for the onions. Cook over medium-high heat for 2-3 minutes, stirring, to break apart any clumps.
Add the boiling stock, cover and simmer until the stock is absorbed and the kasha is cooked through (10-12 minutes).
Mix the pasta, onions, and cooked kasha together in the large pan. Use your own preferred pasta/kasha ratio. Taste and add salt and pepper if needed.
Sprinkle with chopped parsley (optional) and serve warm.