Regarding diplo ships being limited in weaponry: I strongly disagree.
Almost all ambassadorial ships in history and the current world are armed to some degree or another. The Ming treasure fleet, HMS Victory, Perry's expedition to Japan, SMS Panther, SMS Goeben, and all modern aircraft carriers, just off the top of my head. I'd go so far as to say that an implication of the ability to project force is part and parcel of diplomacy, though I don't really expect that to be reflected in the diplomatic code because that would be super-complex.
Rather, I'd go the other way, even, and argue that any ship with a flag bridge should also be able to act as a diplomatic ship, albeit probably at a reduced ability compared to one with a diplomatic module attached; it wouldn't be the first time in history an ambassador has commandeered CIC for diplomacy.
Rather, I have a simpler proposal for limiting the possibility of people sneaking in warships under cover of diplomacy to get away with surprise attacks. If you have an active diplomatic ship in system or have had an active diplomatic ship in system recently (perhaps within a year?) and you begin hostilities, you take an extreme relationship hit with the NPR in question and with all others who witness or hear about the event (all NPRs with assets in system as well as all NPRs with whom they have established communications).
Could you still use a diplomatic mission to sneak ships in under the flag of peace for a dastardly bombardment? Yes. Is that necessarily a good idea if your galaxy has a web of diplomatic contacts in place already? Probably not.