--- name: Overlap — perf-audit-hunter vs perf-optimizer description: Two performance agents with significant trigger overlap, differentiated by scheduled vs reactive intent type: project --- # Overlap: perf-audit-hunter vs perf-optimizer Both agents perform full-stack performance audits covering the same domains: N+1 queries, indexes, caching, Sidekiq jobs, frontend assets, ActionCable, pgvector. ## Distinctions - **perf-audit-hunter** (8 Apr): Reactive — triggered by a performance complaint or user asking for a sweep. Produces a prioritized remediation plan. Standalone. - **perf-optimizer** (14 Apr): Scheduled — invoked every 3 days (or post-deploy). Includes a 10% improvement target per cycle. Explicitly delegates fixes to the bug-hunting agent. More autonomous / orchestrator-aware. ## Overlap estimate: ~70% Both read the same files, scan the same code paths, produce similar findings. The main structural difference is: - perf-optimizer has a cycle-based protocol with baseline → audit → delegate → measure loop - perf-audit-hunter produces a plan and hands it back to the user ## Recommendation (not yet approved) Keep both for now — the triggering conditions don't conflict in practice (scheduled cycle vs. ad-hoc complaint). However, perf-audit-hunter's system prompt should be updated to reference perf-optimizer for scheduled runs, so users aren't confused about which to invoke when. If perf-optimizer proves more useful over the next 2–3 runs, propose retiring perf-audit-hunter and absorbing its reactive use case into perf-optimizer (mode flag: "targeted audit" vs "full cycle"). Why: two agents scanning the same code paths will produce duplicate findings and waste context. How to apply: Surface as a Medium-impact proposal at next review. Watch perf-optimizer memory for signs of active use.