Ideal Coffee Grind for dough-like recipes
If you're putting the actual ground-up beans in the dough rather than brewing/extracting, I suggest one of two extremes, depending on the effect you're aiming for:


A very fine grind so it's evenly incorporated and not easily detected by feel (think of nut flour for the texture you'd be aiming for). As you're replacing some flour with coffee in your recipe this might be your best option.
Very coarse, more like cracked beans than actually ground.  Then you get the pleasant* crunch of the beans, and the burst of flavour. If you were just adding coffee to a normal chocolate chip cookie recipe this would be better (IMO).  This is what I'd do, but I rarely bake for coffee-lovers.


Anything in between could easily lead to an unpleasant graininess, while there's no advantage in terms of flavour over a fine grind. 

* Pleasant to those of us that enjoy eating chocolate-coated coffee beans and similar things.