It is all relative. There can be no defense without offense, and no offense without defense. They are inseperable.
Battles are very fluid. There are constant changes taking place from moment to moment. Makes no difference if these changes are realized at a troop or command level or not. They are taking place.
Some of these changes could be so minor as to be insignificant, and others could be major changes on the battlefield in terms of troop numbers, armament, equipment, and position.
The key is being able to recognize and discern which changes illicit a response or reaction. Not always easy to do, cosidering that some of the most experienced generals on a battlefield have lost battles either by not recognizing these changes, or by issuing orders that resulted in an incorrect response to those changes.
Next it comes down to how well trained and fluid your own forces are. Remember the saying the key to a good offense is a good defense? Well the same holds true for defense. The key to a good defense is a good offense, and preferably, in this case, one that is swift, powerful, and completely unexpected.
The question then is: At what point does this change take place? When does the defensive battle become more of an offensive battle, and to what degree(s)? It is all very much yin and yang.
How defensive do you want to be? Are your troops so defensive that they will not deal with any threat until the first shot is fired? Or is there enough autonomy to handle actual and percieved threats as those threats are forming and taking shape before the repercussions of those threats are introduced into the battle?
As stated earlier, position is a key element. Does this current defensive position also offer the opportunity to fluidly go into offensive maneuvers when the time arises?
That pretty much is the key. Being able to fluidly switch from one to the other, and knowing when to do so.
Of course this goes full circle to offense and defense are inseperable. They are really one and the same. It is how and when the strategies and tactics of each (for the purposes of this discussion) are used in a battle, and to what degree.