one option Ive liked for entering flow state for this is running a small 3b param model and using it as an alternative to stackoverflow or websearch while I code.
I don't often do this, mostly bc I don't care too much about most of the code I write and just want it to work, and then I skip over it and see what's missing and tell the LLM to fix it