Some people add it all beforehand, some add it in phases - half at the start, half at the end or partway through, etc, and I've heard at least a few people add it afterwards. Pretty good bit of flexibility. A mature tank can stand a bit of chlorine - it's not toxic enough to nuke your biofilter in one swoop, indeed the same types of bacteria that live in tanks have regularly been found in chlorinated water systems.