My main writing rule is to not drive a car or walk on a busy street after writing.
i was still so immersed in a scene once that after i left my office and headed to my parking garage i was almost hit by a bus!