Victoria Beltrano has a good study in On Site 23: small things on the interface between the private building and the public world. This interface happens at doorways and windows where the street wall of downtown buildings inflect slightly. She shows one back alley behind a shopping centre appropriated by street traders who use tiny hooks and wires on the otherwise blank wall to hang their stuff on. Another example is the four-inch ledge on a Shopper's DrugMart window lined with small steel points to keep people from appropriating the ledge to sit on. The third example is a doorway and attached vestibule in Chinatown with a step at the sidewalk that is used as an informal shelter, bus stop waiting area, a place to warm up in the winter.
The point of the article is the degree of humanity allowed in the urban environment by how the surfaces of buildings at the street level are designed. Hostile to indifferent to welcoming, much it seems has to do with propriety, possessiveness and sheer good nature. or not.
I think we all know how to design a good doorway, or a generous and welcoming window: it isn't our incapacity to make a city beloved; rather it is the citizens themselves who make decisions about children in the city, or the accommodation of the infirm, or buskers, or nomadic marketeers. Some cities are intolerant. Some are more easy-going, allowing informal life to happen in all sorts of nooks and crannies, in all sorts of unplanned ways.
How would we put it to City Hall: we want planning departments and police forces to lighten up? We want to legislate generosity? We want a law to make everyone kind? Yes, sure.