There are Tiny House Communities being approved in the Commonwealth. One would really need to locate property that you may be interested in and researching the legalities. Rural is more friendly.
City of Philadelphia:
he City of Philadelphia specifies no minimum house size. However, houses must meet IRC 2009 (see below) and so must have at least one room of 120 square feet or more. In addition, the city requires that row houses (zone RSA5) align with neighboring houses along the front face.
IRC International Building Code 2009
SECTION R304 MINIMUM ROOM AREAS
R304.1 Minimum area. Every dwelling unit shall have at least one habitable room that shall have not less than 120 square feet (11 m2) of gross floor area.
R304.2 Other rooms. Other habitable rooms shall have a floor area of not less than 70 square feet (6.5 m2).
R304.3 Minimum dimensions. Habitable rooms shall not be less than 7 feet (2134 mm) in any horizontal dimension.
R304.4 Height effect on room area. Portions of a room with a sloping ceiling measuring less than 5 feet (1524 mm) or a furred ceiling measuring less than 7 feet (2134 mm) from the finished floor to the finished ceiling shall not be considered as contributing to the minimum required habitable area for that room.
If you would like to review regulations for another state, click here