Trigger-Action Planning (TAP), sometimes Trigger-Action Patterns, and formerly Implementation Intentions are techniques for getting oneself to successfully enact desired actions (or inactions) by training something like a “stimulus-response” pair. The technique was spread by CFAR which initially drew upon the psychology literature of Implementation Intentions.
After it was clear that TAPs should be heavily applied to cognitive motions/thought patterns, some decided that the ‘P’ should stand for ‘Pattern’ rather than ‘Plan’.
The CFAR Participant Handbook  contains a chapter on TAPs.
Brienne Yudkowsky’s writings on the topic of Noticing, found mostly at her blog , are particularly good material related to training TAPs.