Currently having a little trouble with the overall tone of his backstory, but I have a pretty solid idea of what he's been through. Alan Enfys was born in 1225 in a trading caravan, to a Skelliger guardsman and his wife from Vizima. When he was 7, he got left behind by them in Vizima and ended up turning to theft and robbery with two other urchins, whom he eventually joined a gang known as the Riverdogs with. After one raid that came a little too close to getting him killed, he took a more active role in planning the jobs they did, incorporating guerilla tactics and strategy he'd been learning about from the history books he was buying with his share of the coin. The Riverdogs went from being two-bit brigands to being a serious threat to even the larger caravans, and their ambition grew with it.
In 1245 the gang is basically cornered by a platoon of Temerian professional soldiers, captured, and most of them are probably executed. The more distinguished members of the gang, the ones who have potentially valuable skills, are given the option of conscription for the brewing Northern War (a reflection of the annexation of Ebbing) rather than execution. Some choose to die, most choose to live and are put into the infantry. It's at this point that Alan comes to the attention of the Blue Stripes, as the success of the gang - functionally a guerilla unit themselves - has been attributed equally to the gang's former leader (who chose death) and Alan. When Alan excels during training, but fails to conform to the rank-and-file fighting style of the infantry, he is reassigned along with some others to the Blue Stripes for further training. Although initially irreverent and greedy, the commandos are enough like brothers - and are treated well enough at home - that he's eventually in a place where he can actually consider ideology, whereupon he quickly adopts the fervent nationalism impressed upon the Blue Stripes by Vernon Roche. He remains more complicated than most of them, more flexible and less self sacrificing, but it's without a doubt that he would happily die for Temeria, or for his new brothers - since they're the first family he's ever had who haven't stolen from him.
They see action, doing unofficial shit and so on in the run up to the full scale military action of the first war, preparing the way for the main army and sabotaging Nilfgaardian logistics and supply lines where they could. Alan's squad were responsible for delaying and destroying Nilfgaardian reinforcements and siege equipment during the conquest of Cintra - for what little good it ultimately did - and were present in a limited capacity at the Slaughter of Cintra itself (again, wreaking havoc behind the Nilfgaardian lines). Once again, Nilfgaard's sheer numbers essentially meant that their impact was limited, and the power wielded by the mages meant that there was nothing they could do to get directly involved in the fighting.
It was at this point that most of his squad is killed in a counterambush by Nilfgaard. He and a couple of others make it out and try to take further action but are stifled by the enemy's numbers. The next few months involve trying to do what damage they can, and regroup with friendlies whilst avoiding Nilfgaard's direct attention - this is where Alan earned a reputation for sabotage and stealth in particular, and where he started picking up the skills to work Intelligence. When he makes it back to Temeria, rather than being promoted to squad leader like he was expected to be, he is abruptly shifted into Temerian Intelligence. Our story starts a few years later.