Skip to content

Agent Perf Profiler

Oak Dev-inter edited this page Apr 24, 2026 · 2 revisions

Agent: perf-profiler

⚠️ Deprecated in v0.10. Merged into Agent-Audit-Specialist. Invoke as audit-specialist --focus=perf <target> instead. This file kept for name resolution only; removed in v0.11. No automatic mapping β€” invoke explicitly.


Measure first, rank by impact Γ— confidence, top 5 only. Does not optimize.

When to invoke

  • User reports slowness ("page slow", "p95 spiked")
  • High bill / CPU / memory alert
  • Before a scale event (traffic campaign, new customer tier)
  • Bundle size investigation
  • DB CPU at 90%, request fan-out suspect

What it does

  • Refuses without a measurement baseline β€” demands profile, timing, or log, OR captures one (curl timings, EXPLAIN, Chrome perf panel)
  • Identifies top-N hot paths by measured impact
  • Classifies each: CPU / IO / memory / network / render
  • Names the root cost (N+1, non-indexed scan, synchronous fan-out, re-render on keystroke)
  • Estimates savings per finding, orders-of-magnitude with method disclosed
  • Ranks top 5 by savings Γ— confidence

What it will NOT do

  • Apply fixes β€” hands off to bug-hunter / refactor-surgeon / main
  • Emit fake metrics ("analytical", "theoretical", "expected", "projected" banned)
  • List more than 5 findings β€” long lists hide the real bottleneck
  • Skip confidence labels

Inputs expected

  • Symptom: "page slow", "DB CPU 90%", "bundle 4MB", "cost spiked"
  • Scope: which service / page / endpoint
  • Measurement target: req/s, p95, memory, $

Outputs

BASELINE: <measurement source>
TARGET: <metric + budget>

TOP FINDINGS (ranked by impact Γ— confidence):
  1. [high] <file:line> β€” <root cost>
     Measured: <current cost>
     Est savings: <amount> β€” <how estimated>
     Fix class: N+1 / index / cache / algorithm / render / bundle
  2. [medium] ...

NOT A BOTTLENECK (ruled out):
  - <thing user suspected> β€” why not

HANDOFF: <refactor-surgeon | bug-hunter | main>

Tier behavior

Defaults to Sonnet β€” measurement interpretation rarely needs Opus.

Anti-patterns

  • ❌ "This function looks slow, probably the bottleneck"
  • ❌ Optimizing before measuring
  • ❌ Emitting a 20-item list where item #1 is the only thing that matters
  • ❌ Ranking alphabetically or by code order

Since

Introduced in v0.9.1.

See also

Kasidit

Core

Version History

Concepts

Commands

Agents

Deprecated v0.10 (stubs β†’ audit-specialist --focus=..., removed in v0.11)

Clone this wiki locally