I actually have a suggestion for how this might work. Workers can be upgraded to level 3 but each of the levels can correspond to a caste.
so basically,
level 1 worker= minor(does almost nothing but foraging)
level 2 worker = media ( forages but a bit faster )
level 3 worker= maxims (forages...