They are in service of the ruling Shogunate in the world of Gintama. Though their main tasks do involve going after groups/individuals in anti-government or terrorist activities, they do perform regular police duties such as going on street patrols. In Episode 172 they were also tasked with interrogation of dangerous criminals when other departments are unable to make any headway.
Because they serve under the government, they have been given various negative labels, such as:
(幕府の犬) Bakufu no ken, aka The dogs of Bakufu by the Jouishishi,
(税金泥棒) Zeikindorobou, aka Tax revenue robbers by Sakata Gintoki.
In the original Shinsengumi (新選組), the character for 'Shin' (新) literally means new.
In the Gintama version, the character for 'Shin' (真) literally means 'real' or 'true'. There is a possibility of the manga author's pun here as there are many other characters that can be read as 'shin', which the author did not choose.
Main Regulations
In the original Shinsengumi's Kyokuchuu Hatto (局中法度), there were 5 main regulations, namely:
Do not betray the bushido creed (士道ニ背キ間敷事 )
Do not desert the troop (局ヲ脱スルヲ不許)
Do not wilfully obtain funds (勝手ニ金策致不可)
Do not wilfully get involved in disputes (勝手ニ訴訟取扱不可)
Do not engage in personal fights (私ノ闘争ヲ不許)
Personnel in breach of the afore-mentioned conditions will be ordered to undergo seppukku (右条々相背候者切腹申付ベク候也)
In Gintama, the Demonic Vice-Commander (「鬼の副長」) Hijikata Toushirou formulated the Kyokuchuu Hatto , the 45 Regulations that form the disciplinary framework for Shinsengumi members.
Kondou stipulated a new Regulation 46 to treat Shinpachi well in the Pen-pal chapter as reported by Okita (ep.127)
Regulation 1:
Regulation 2:
Regulation 3:
Regulation 4:
Regulation 4:
Regulation X:
Regulation X:
Regulation X:
Regulation 10:
Regulation 12: No comics other than that in Magazine are allowed to be read within the confines of the station (recited by Hijikata in Episode 105
Regulation 17: Switch off handphones during meetings and important ceremonies (recited by Hijikata in Episode 105)
Regulation 20:
Regulation 21: Personnel conspiring with the enemy shall be punished (recited by Okita in Episode 103)
Regulation 25:
Regulation 25 (Supplementary Regulation): All personnel must consume 5 bottles of mayonnaise each everyday (recited by Hijikata in Episode 185)
Regulation X:
Regulation 45: All warriors following the path of bushido must achieve enlightenment upon death and are forbidden to turn into ghosts (recited by Hijikata in Episode 105)
Regulation 46: Yorozuya is to be hated, but treat Shinpachi well (recited by Okita)
For more details on the historical precedent Shinsengumi 新選組, refer to Historical Precedents.