How to safely ship AI-generated production code with permissions, testing, security gates, and review.