Task boundary
The first lines define one outcome and the environment in which it must be achieved.
The interactive tools could not load. Reload this page; the guides and source links are still available.
Performance / Original task brief
Define a measurable budget, capture a baseline, isolate the dominant cost, and validate one change without trading away correctness.
A page, build, query, or service feels slow but the dominant bottleneck has not been measured.
Task
Improve {{slow_task}} in {{target_environment}} toward this budget: {{performance_budget}}.
Method
1. Define the user-visible metric and reproduce it with a stable input, environment, and sample count.
2. Capture a baseline distribution, not a single lucky run. Record CPU, I/O, network, memory, bundle, query, and render evidence as applicable.
3. Identify the dominant cost and form one falsifiable bottleneck hypothesis.
4. Add a benchmark or budget check where the repository can run it reliably.
5. Make the smallest optimization, then compare the same workload and verify correctness tests.
Evidence to return
- Baseline method and measurements.
- Profile, trace, query plan, bundle report, or timing evidence locating the bottleneck.
- Before/after measurements using the same protocol.
- Correctness and regression results, plus any resource trade-off.
Stop conditions
Do not optimize from intuition, hide work behind asynchronous timing, reduce result quality, or claim a percentage improvement from incomparable environments. Stop if the metric cannot be reproduced consistently enough to evaluate the change.Variables
{{slow_task}}{{target_environment}}{{performance_budget}}Keep unknowns explicit. Remove a section only when it truly does not apply; do not replace evidence requirements with a request for confidence.
Why this prompt is structured this way
The first lines define one outcome and the environment in which it must be achieved.
The method asks the coding agent to inspect and execute rather than jump directly to a plausible patch.
The result must include paths, commands, measurements, or browser observations that another person can check.
The agent is told when not to guess, broaden scope, weaken a guard, or overstate completion.
Related prompts
Inspect the actual diff in repository context and report only actionable defects with severity, evidence, and a concrete failure scenario.
Use when: A branch or working tree is ready for an independent correctness, security, and maintainability review.
Open promptExercise a real user flow with semantic, focus, state, contrast, target-size, and responsive evidence rather than a static checklist alone.
Use when: A web interface has a form, dialog, menu, custom control, upload, or task flow that must work beyond pointer input.
Open prompt