Plan
1 BHK: the smallest working dwelling with its own stair — the engine picks a state (standard → compact → micro → studio) from what the plot can carry, merging and removing in a declared order, and says which one it landed in.
No foyer: the entrance opens straight into the living room and the stair sits off it — anyone heading up takes it directly. Dining in spine: on a tight plot the table moves into the circulation.
Door rule
Clearances are not margins — they are the floor a body stands, sits or bends on. Turn on Body space.
Every leaf swings into the room it serves, hinged in a corner so it folds flat on the return wall. Jamb to return wall: ≤ 100 mm. Circulation never receives a swing. No mid-wall doors.
Only a declared opening — kitchen to dining — may sit mid-wall. It has no leaf and the solver widens it for free movement.