In addition to the grass effect, counter triggers can be used to modify development. For instance, you could give them different properties depending on whether they matured above or below ground. If we're going with the pet-larva-to-adult route, GROUNDED_ANIMAL_ANGER could let them develop differently depending on whether or not they were crowded together in their larval phase - perhaps making them better diggers since there clearly isn't enough room for all of them. COMBATHARDNESS is also a fun one - perhaps adults with high combat hardness can gain an ability that lets them trigger larvae to develop into soldiers. If they are alcoholic, the lack of alcohol could also be used as a trigger.
To use counter triggers, you simply give them a self-targeting interaction that inflicts a syndrome with an effect (any single effect will do, including CE_CAN_DO_INTERACTION, plus the CDI tags), and then put a COUNTER_TRIGGER tag after the effect. (You need a separate COUNTER_TRIGGER tag for each new effect). For example:
[INTERACTION:DEVELOP_LARVA_INSECT]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Trigger larvae to develop into soldiers]
[CDI:INTERACTION:DEVELOP_SOLDIER_INSECT]
[CDI:USAGE_HINT:GREETING]
[CDI:TARGET:A:TOUCHABLE]
[CDI:TARGET_RANGE:A:1]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:WAIT_PERIOD:1200]
[CE:COUNTER_TRIGGER:COMBATHARDNESS:100:100:REQUIRED]
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Trigger larvae to develop into deep form]
[CDI:INTERACTION:DEVELOP_DEEP_INSECT]
[CDI:USAGE_HINT:GREETING]
[CDI:TARGET:A:TOUCHABLE]
[CDI:TARGET_RANGE:A:1]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:WAIT_PERIOD:1200]
[CE:COUNTER_TRIGGER:CAVE_ADAPT:604800:NONE:REQUIRED]
The above code will allow an insect to develop a larva into a soldier, but only if it has maximum combat hardness, or develop a larva into some kind of 'deep' form if it has spent a very long time underground. Different castes could be given modified versions of this, so, for instance, a soldier might be able to develop larvae into an even stronger form if it becomes combat hardened. You can have different evolutionary 'paths' occurring over multiple generations which could be modified based on the parent's lifestyles, food, etc.
If you're willing to use interaction-based AI, you can have some more interesting adaptations.