Actually the Defiant, the ship that used human-built cloaking tech, was at first a private vessal and I believe that once the Federation discovered the vessel they determined that the entirely experimental and new method of cloaking was not in violation of the treaties. Also, this is further expressed in the Defiant being the prototype of the entire class of starships called the Defiant Class where they all are patterened from that original and have the new cloaking tech. The Klingons and Romulans used one method and it was that method that was restricted in the treaty. The method devised by Cisco was a new box of kittens and the Klingons were like "kittens?! NOO!!! But everybody likes kittens so ok."