But then he ran into San Francisco’s strict rules governing window-replacement projects.