Traditions of War
In 1824, a retired french officer by the name of General Foucquet wrote a short book based on his experience. This book included a section of how war should be prosecuted.
The book proved quite popular and although it was never turned into laws, it is still to this day part of the reading material of many military academy worldwide.
War shall be conducted only between declared ennemies, uniformed and identified as such. Ships and troops may mask their identity as long as the disguise is removed prior to engagement.
All care shall be taken in minising hurt to non-combatants. In occupied lands, non-combatants shall be treated, within reason, as civilians of the home country of the occupier.
These 2 articles taken together mean that non-uniformed resistance fighters and spies would be treated like criminals under the laws of the occupying authorities. It also mean that collective reprisal should not be conducted (taking hostages for example).
A commandant, after riding himself of his weapons, may be taken into custody. These "Prisoner of War" shall be afforting respect due to their ranks and receive treatment, in term of logeing and nutrition no worse than those afforded to the soldiers of the country holding them.