Ignatius Loyola summarized his approach to discernment of spirits in two sets of Rules for Discernment, which he included in the Spiritual Exercises. The rules deal with ways to interpret the states of consolation (joy, peace, gratitude, and the like) and desolation (depression, anxiety, fear) that people typically experience in the course of cultivating a spiritual life.
The first set is 14 rules (Spiritual Exercises, 313–327) that give practical spiritual advice about dealing with desolation—those times when the heart feels far from God and spiritual vigor wanes. They are intended to be used by an experienced spiritual director who is helping people understand the nature and meaning of the emotions they are experiencing in prayer. They are especially intended for people embarking on a serious spiritual life. They assist people in identifying the spiritual forces involved in these emotions: the Good Spirit (God, the Holy Spirit) and what Ignatius called “the enemy of our human nature” (the world, the flesh, the devil).