One of the Final Fantasies (I forget which one, 10 was the last one I personally played, so I only ever saw my sister play it) had a concept of actions you could program into your off-hand characters. You had only a basic number of slots to define command to begin with, but as you progressed in level, more slots opened up and you could program more complex behaviors.
I believe you are talking about ff xii with its gambit system. It's sort of a simplified programming tool to program your AI companions behavior without having to directly micromanage them. For example, a companion can be programmed to heal ally if their HP is less than 50% hp, cast specific spell if there 3 enemies or more, attack nearest enemy in that priority order. I wish more games have this system.