This software all started with the ability to detect intervals.
Start here:
Otherwise this search summary might help: https://forum.intervals.icu/search?q=detect%20%40david