Right on point. The reason that ANA has unlimited number of Generals, is because of promotions based upon ethnicity, regional or political affiliations, therefore, people have lost their faith into military ranks or their status at all. Just look at FM Rasheed Dostum, now despite his most cruel & criminal record from past. Northern alliance is the most inside threat to Afghanistan itself and then to any peace which can somehow minimize their drug trafficking & smuggling.
Since we are looking at a peaceful Afghanistan in view of peace deal; the same gang will not rest unless they are reduced to their old geographic locations holding couple of provinces int their influence while the rest is ruled by Taliban. Currently, I see that if Taliban came into power by next, these thugs feels more threatened & loss of more space as compare to past. They don't have anything on mind except that their own survival to loot & plunder, therefore, these druggies will go to any length which includes current development. You have rightly mentioned terrorists groups along with recent cross border firing by ANA.
It is pertinent to mention that ANA has more groups than their companies. They all are divided due to different reasons except the services for Afghanistan. Rightest believing in peaceful Afghanistan without foreign interfering are the ones that mostly defects to Taliban or support them with States Equipment etc. There is then another major group comprising of all the warlords & drug peddlers having their chance of existence in official capacity and found Ghani types like an olive branch. Moreover, Ashraf Ghani type puppets are corrupt to the core and they need such kind of fighting force to survive and continue with their puppet regime, therefore, most of these guys from northern alliance are seen being elevated to either senior posts or ranks or even provided with better equipment. So, the puppet regime and its druggies are now at risk of loosing big chunk of money & influence to roam freely or smuggling; they will push with anything to save their rule & skins. TTP/BLA/BLF/BRAS etc along with rouge ANA aka Private Militiamen are all the same guys having full support of anti peace elements like Ashraf Ghani, the puppet being handled by many for their own interests but India on top now feels the heat & threatened to loose a ground against Pakistan.