Thanks for the replies everyone, and thanks for the extra detail, Vynd. I probably should've read the manual more carefully before posting there is a detailed description of this topic in sect 6.4.7, but I appreciate the extra info anyhow
One thing that's still tricky for me to figure out - I had my Lvl 2 Nature mage (carrying 4 nature gems) scripted for 2 castings of summon sprites (costing 1 gem each) and then later casting relief (costing 0, but requiring >=1 for level increase). Much as you said Vynd, the Relief spell did not go off, since she had use all her gems earlier for the summons (or maybe other spells).
So, what I'm wondering is: are veteran players able to calculate to a nicety how many gems to giver their commanders in order to have a high probability that the most important spells actually do fire?
In the early/mid-game I'm reluctant to give lots of gems to commanders, since they seem to plow through them so fast, and they're also so crucial for summons/forging. OTOH, the Relief spell is a good example of a spell I'd really like to have access to as early as possible, and is tricky to script reliably (another gem using spell I like to use early (if I'm fighting Abysia), is Rain but that's easy to script reliably, since I'll always cast round 1).
Any insights on this newbie's conundrum are much appreciated!