What it is, and who made it
The idea has three honest parents. The mechanism is BJ Fogg's: his Tiny Habits method, developed at Stanford, anchors a tiny new behaviour to an existing routine (“after I brush my teeth, I will floss one tooth”), on the argument that existing habits are the most reliable cues a person owns. The term is S.J. Scott's, from his 2014 book Habit Stacking. The popularity is James Clear's, whose Atomic Habits (2018) gave it the canonical formula, “after [current habit], I will [new habit]”, and who credits both predecessors. Underneath all three sits the research pair this library covers elsewhere: implementation intentions (the when-then plan, with the when set to an existing behaviour) and Wendy Wood's work on context-cued habits, which finds roughly forty percent of daily behaviour runs on situational cues rather than decisions.