A comprehensive model for B implantation,diffusion and clustering is presented. The model, implemented in a Monte Carlo atomistic simulator, successfully explains and predicts the behavior of B under a wide variety of implantation and annealing conditions by invoking the formation of immobile precursors of B clusters, prior to the onset of transient enhanced diffusion. The model also includes the usual mechanisms of Si self-interstitial diffusion and B kick-out. The immobile B cluster precursors, such as BI2 (a B atom with two Si self-interstitials) form during implantation or in the very early stages of the annealing, when the Si interstitial supersaturation is very high. They then act as nucleation centers for the formation of B-rich clusters during annealing. The B-rich clusters constitute the electrically inactive B component, so that the clustering process greatly affects both junction depth and doping level in high-dose implants.