The Satipatthana refrain includes three qualities- ardency, alertness and mindfulness, and they encompass memory, focus on the present, and effort. Thanissaro points out that experience can be made purposeful, and explains how the raw material of present experience can be shaped to escape from the round of samsara. This is achieved by applying memory of dhamma to events in the present for future benefit. These three are integrated in the process of mindfulness.
“ it (mindfulness) remembers lessons drawn from right view in the past—both lessons from reading and listening to the Dhamma, as well as lessons from reading the results of your own actions—that can be used to shape this activity in a more skillful direction: to act as the path to the end of suffering,”—“ Right Mindfulness”, Thanissaro.
“Dwelling thus mindfully, he discriminates that Dhamma with wisdom, examines it, makes an investigation of it. Whenever, bhikkhus, a bhikkhu dwelling thus mindfully discriminates that Dhamma with wisdom, examines it, makes an investigation of it, on that occasion the enlightenment factor of discrimination of states is aroused by the bhikkhu; on that occasion the bhikkhu develops the enlightenment factor of discrimination of states; on that occasion the enlightenment factor of discrimination of states comes to fulfilment by development in the bhikkhu.”— SN 46.3 SC
“Makes an investigation of it” means applying dhamma principles to events in everyday life, in particular impermanence. This may occur at the time in cases of well developed mindfulness, or it may be a later assessment of the event and putting it into a dhamma framework. This latter contemplation strengthens the threefold process of mindfulness. When the event is successfully interpreted in terms of dhamma, then the joy of insight arises.