Performance / Original task brief

Locate a performance bottleneck before optimizing

Define a measurable budget, capture a baseline, isolate the dominant cost, and validate one change without trading away correctness.

Use when

A page, build, query, or service feels slow but the dominant bottleneck has not been measured.

Ready to adapt
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.

Replace these fields before you run it.

{{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.

Task boundary

The first lines define one outcome and the environment in which it must be achieved.

Method

The method asks the coding agent to inspect and execute rather than jump directly to a plausible patch.

Evidence to return

The result must include paths, commands, measurements, or browser observations that another person can check.

Stop conditions

The agent is told when not to guess, broaden scope, weaken a guard, or overstate completion.

Continue from the next engineering decision.

ReviewOriginal brief

Review a change set before merge

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 prompt
ReviewOriginal brief

Audit a web task for keyboard and screen-reader access

Exercise 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