How AI Drafts Clustering Code Safely