We propose to develop and transition CodeSurgeon: an adaptable, AI-guided, full-stack debloating system. CodeSurgeon is innovative and unique in the field because it produces high-quality debloated programs with improved security posture that are safe, reliable, and sound. Following the lessons learned from a broad comparative evaluation of debloating tools conducted by the PI , CodeSurgeon will integrate best-in-class technologies to create a general-purpose, high-assurance system for soundly and effectively debloating high-complexity NCS software that can be operated with minimal technical expertise. To demonstrate CodeSurgeons feasibility on NCS software, we will show through analysis and modeling in Phase I that our manually integrated prototype tool can safely and effectively debloat the nginx web server and the PX4 open-source drone autopilot software and libraries.