MACO-AI: Multi-agent Code Optimization via Annotations and Intrinsics
Abstract
Repository-scale code optimization demands broad diagnosis, but unconstrained agent edits impede review and attribution. We present MACO-AI, a reusable multi-agent optimization skill that restricts source changes to annotations and intrinsics. Before delegation, initialization freezes the source state and measurement contract, profiles an immutable baseline, audits method eligibility, and records the plan. Five evidence specialties inspect eight semantic optimization spaces without editing; separate planning, construction, and review roles exchange persisted artifacts, while validation remains centralized. In a preliminary single-iteration evaluation with DeepSeek V4 Pro Preview, all five benchmarks improved over their baselines with 95% confidence intervals excluding 1.0×; speedups ranged from 1.0048× to 2.5290×. These results establish the feasibility of bounded, auditable agentic optimization, while controlled comparisons remain necessary to isolate the contributions of individual design choices.