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.