It's probably the same thing that happens in most pre-modern armies.
The state/monarch appoints a certain general to lead the army. Of course, the general can't be expected to handle everything himself, so the state also makes provision for the general to assemble a temporary staff around him to advise on military matters, but leaves the picking of the staff to the general. If the general feels inadequate in his military knowledge, he may decide to choose a strategist to be on his staff and advise him on certain matters - and he might well give him authority to issue orders on his behalf. The general can pick any person he wants for his staff, so it really doesn't matter if the strategist is a civilian, a family relation, whatever.
What goes for generals also goes for monarchs. So Liu Bei, for example, will also have his own 'staff' to co-ordinate the movements of various armies and strategy at headquarters. He also gets to pick who gets to be on his 'staff' - including a strategist, regardless of position in society. This strategist may well be authorized to give orders on his behalf. Zhuge Liang held this position - but whatever orders he gave were Liu Bei's orders, not his own. This was made rather clear in the (fictional) battle of Bowang in the ROTK where, despite giving the commanding seal to Zhuge Liang, it is Liu Bei's order to Guan Yu/Zhang Fei that silences their objections.
So no, it's wrong to think of a strategist as a 'second-in-command' of the army. In actual terms, he's probably more like a mere advisor + conveyer of his commander's authority and will. Any independent moves on his part can only be made because of the implicit knowledge that what he says, will also be what his commander agrees with.
An example of a real second-in-command would have been the actual Battle of Bowang, where Cao Cao expressly gave the task of destroying Liu Bei to Xiahou Dun with Li Dian and Yue Jin. So here Xiahou Dun would be the primary wielder of authority in this army, deriving from Cao Cao's orders, but Li Dian and Yue Jin would also have their own authority independent of Xiahou Dun, again deriving from Cao Cao's orders.
The structure of power in battle gets a bit complicated for Imperial China, because its large bureaucracy allows for monarchs to nominally 'be in command' even if they are thousands of miles away in another country. At the Battle of Hefei in 214, for example, the titular commander would be Cao Cao (who was in the other side of China at the time), exercising his authority through his civilian representative Xue Ti, who would have been the actual commander who then, in line with Cao Cao's wishes, delegates authority for the task to the military generals: Zhang Liao, Li Dian, and Yue Jin; they would then order their subordinates - for example, Hao Zhao - into positions.
This picture doesn't even considering the possible overlapping jurisdictions between the fortress commanders (Zhang Liao et al) and the regional field army commander (Xiahou Dun), though since Cao Cao's authority was expressedly conveyed through Xue Ti, it's quite likely that he'd be able to (nominally) command Xiahou Dun's army as well.