Create an extension providing a macOS „Today Widget“. This widget should show some daily stats and the current task.
Communication between recorder process and widget can be done by a unix socket or a file (macOS FSEvents API).
Clicking on the widget should open a terminal running „ttt s && tttt o && read && exit“.