Systematically extract maximum value from existing code — identify what's golden (high-value, well-designed), what's lead (resource-heavy, poorly optimized), and what's dross (dead weight). Then amplify the gold, transmute the lead, and remove the dross.
Expected: Every significant element classified with evidence. Gold elements are identified for protection during optimization. Lead elements are prioritized by impact.
On failure: If profiling tools aren't available, use static analysis: function complexity (cyclomatic), dependency count, and code size as proxies. If the codebase is too large, focus on the critical path first.
Extract maximum value from existing code — performance optimization, API surface refinement, and dead weight elimination. The art of turning base code into gold through systematic identification and amplification of value-bearing patterns. Use when optimizing a working but sluggish codebase, refining an API surface that has accumulated cruft, reducing bundle size or memory footprint, or preparing code for open-source release — when code works correctly but doesn't shine and needs polish rather than a full rewrite. Source: pjt222/development-guides.