I understand, and I didn't quite want to come out with a comprehensive solution to all war and aggression in two small paragraphs. Just an overal idea and sentiment as you say. It definitely is something that we have to approach, and quite quickly.
Fantastic idea, but you speak about "an aggressor" as if he/she was easy to identify, nations go to war, not individuals. It's really hard to sort out the good guys from the bad in this situation. Their is no single aggressor in any war, their is only a tangled web of politics and agendas of the nations involved and a load of soldiers from both sides either paid to fight or deluded/damaged/desperate enough to resort to wholesale violence as a way to solve problems.
I guess it does require a bit of a specific and clearly defined solution in order to not be unambigous. Start with the person that authorized the act of aggression. As things are currently, that is a 'solution' because the slaughter of a nation's soldiers doesn't quite convince the populace of that nation to prosecute their own leaders. If anything, in each state they are usually behind a veil that prevents them from being accountable for the decisions they made during power. Hence why the "external" solution to the problem.
Also the only way to make your "law" meaningful would be to enforce it and to do so would require you to have a standing army that you could bring to war should the need arise.
I guess that depends on your definition of "enforce". Perhaps I'm naive, but I think that there are other ways of punishing individuals and states for not conforming to what we as a society have collectively deemed as acceptable. Ostracism and trade embargoes come to mind first. Having states at all, where power and resources can be consolidated and concentrated means that a military will eventually form, even if it is just to defend. Which they might eventually use to bully, attack or intimidate. I'm not entirely sure how we can approach this problem just yet, short of getting rid of states entirely and thereby not allowing power to concentrate.
I think this attitude makes you an aggressor (to use your own phrase). You are advocating wholesale genocide of an enemy nation because their leaders are warmongering retards? You have masterfully over-simplified and compartmentalized the complexity of why nations go to war into the classical good vs bad scenario except, you have defined your own rules about why the bad guy is bad.
There are but a handful of very specific scenarios where the soldiers of a warring state are not complicit in the actual war. If you have a choice, you shouldn't opt to kill/murder. No matter how poor, desperate or indoctrinated you are. You make it seem like there is a huge grey area of motivations for participating as a soldier in a war, as if that can excuse their actions. Off the top of my head, the scenarios mentioned above: Threat of direct violence against family. Mentally challenged, and thus tricked. Brainwashed/lied into thinking the other enemy is an aggressor, so you think you're actually defending. In a digital, and increasingly connected society, a lot of the options for tricking/forcing people into doing things is quickly diminishing. The moral line needs to be drawn at the choice each individual soldier makes.
"There are times, sir, when... men of good conscience cannot blindly follow orders." Jean-Luc Picard (ST:TNG)