I agree that good relationships of all kinds depend on clear boundaries.
I wouldn't say mine change at any moment. There's a pattern to it.
Let's say I meet someone at uni. The conversation will start by being general, probably about our shared interests in a subject. But chance remarks will reveal new traits and we might discover that there are shared values, experiences and understandings. This is the kind of person I welcome as a friend, so I would offer tidbits of more private details of my life ask gentle questions to invite him or her to confide. I'd return like with like. In this way, the boundary is slowly shifting further in.
Let's says it goes the other way. I discover that the person is high neurotic and prone to anger towards authority, lapses in others following her rules, apt to put the worst spin on the intentions of others. Such a person I would unobtrusively distance myself from. My boundary would be avoidance of any close contact.