# Performance Audit Agent Runbook

## Project Context To Prepare
- Project goal
- Current repository or workflow context
- Current context
- Goal
- Audience or stakeholder
- Constraints
- Available notes or data

## Input Template
Project:

Goal:

Current context:

Constraints:

Available files, notes, or data:

Expected output:
- Performance audit
- Diagnosis
- Recommendations
- Measurement plan

## Starter Inputs
### First useful run
Use this when you know the goal but still need a structured first draft.

Audit slow agent list rendering with build stats and browser timing notes.

Context:
- Current state:
- Constraints:
- Audience:
- Success criteria:

### Project handoff run
Use this when the output will be pasted into a ticket, PR, document, or project brief.

Goal: produce performance audit for a real project.
Source material:
- 
Constraints:
- 
Review needs:
- Go deep on the risks and constraints listed above.
- Mark assumptions.
- Flag missing context.

### Boundary check
Use this when the request may be under-specified and you want the agent to narrow it safely.

Make the whole site faster without metrics.

Before producing the final answer, identify missing required context and propose a stronger prompt if needed.

## Setup Context Notes
- Collect the target page, measured symptom, device/browser, bundle data, and timing traces when available.
- Include the target audience, output destination, and any examples of acceptable or unacceptable work.
- Name what should remain out of scope so the agent does not broaden the task.

## Good Input Example
목록 페이지가 느려져 원인 후보를 정리하는 상황

Goal: produce performance audit for a real project.
Constraints: keep the result specific, structured, and ready for handoff.

## Weak Input Example
Help me with Performance Audit Agent.

## Weak Input Diagnostics
### Help me with Performance Audit Agent.
- Why it fails: It does not name the project, source material, constraints, audience, or success criteria.
- Stronger input: Audit slow agent list rendering with build stats and browser timing notes. Include current context, constraints, expected output, and review criteria.

### Make this better.
- Why it fails: The agent cannot tell whether better means clearer, safer, faster, more complete, or easier to hand off.
- Stronger input: Improve the output for 목록 페이지가 느려져 원인 후보를 정리하는 상황. Optimize for performance audit, keep assumptions explicit, and list the changes made.

## Expected Output Shape
- Diagnosis: each measured symptom, the cause it points to, and the evidence
- Recommendations ordered by expected impact on the stated targets: the change, the metric it moves and by roughly how much, the cost or risk, and how to verify it
- Measurement plan: a before-and-after protocol with comparable settings
- Optimizations that do not move the stated targets kept to one line each under "Later"

## Output Checklist
- Every measured number is used to size a problem
- Each recommendation names the metric it moves, an estimated range, and a verification method with a pass threshold
- Every recommendation respects the stated constraints
- Inferences are marked [ASSUMPTION]
- No measurements or benchmark results were invented

## Failure Modes
- A recommendation is not tied to a measured symptom
- A recommendation has no way to verify it
- A recommendation violates a stated constraint (hosting, dependencies, SEO)
- The audit invents measurements or promises exact results

## Handoff Tips
- Paste relevant project files, notes, or constraints before asking for the final output.
- Ask for a first draft, then request a stricter revision using the checklist.
- Keep the generated output with the project ticket, PR, proposal, or team document.
