A code agent-agnostic agentic scaffold for automated code performance optimization that enables the system to autonomously execute the entire pipeline: project-level runtime analysis, hotspot identification and benchmark extraction, Abstract Syntax Tree (AST)-precise code localization, candidate patch generation, functional verification, performance measurement, and version rollback.