Section 22. Male and female prisoners shall not be put or kept in the same room in a jail or house of correction; nor, unless the crowded state of the institution so requires, shall any two prisoners, other than debtors, be allowed to occupy the same room, except for work. Persons committed for debt shall be kept separate from convicts and from persons who are confined upon a charge of an infamous crime. Conversation between prisoners in different apartments shall be prevented. Minors shall be kept separate from notorious offenders and from persons convicted of an infamous crime. Persons committed on charge of crime shall not be confined with convicts, and prisoners charged with or convicted of a crime not infamous shall not be confined with those charged with or convicted of an infamous crime, except while at labor or assembled for moral or religious instruction, at which time no communication shall be allowed between prisoners of different classes.
Persons committed on a charge of a crime may participate in residential treatment or other rehabilitative programs with persons serving a criminal sentence; provided, however, that such person shall not be housed in the same cell with a person serving a criminal sentence. The commissioner of correction or, for a county facility, the sheriff shall adopt policies and procedures for the management of such participation consistent with public safety and the security and operational needs of the facility.