.agents/skills/rspack-perf-codspeed-goal/SKILL.md
Use this for performance work where success is judged by a GitHub PR, required correctness validation, review comments, and CodSpeed benchmark feedback.
The agent owns the loop. After the user gives the target benchmark, threshold, and scope, keep making the next best engineering decision without asking for routine confirmation. Continue until CodSpeed confirms the target and correctness gates are green, a real blocker prevents progress, or the configured round limit is reached.
/goal, keep the original target intact across resumes. Do not redefine success around partial progress, a pending CI state, or a narrower benchmark.gh only when the connector cannot perform the required action. Avoid the 1Password gh shell plugin unless explicitly requested.Establish a clean base.
origin/main.origin/main.Establish the target.
+5% on a specific benchmark.$rspack-perf to guide the optimization strategy before changing code.Ensure PR-dependent actions wait for an open PR.
Create or identify the fixed progress comment after the PR exists.
Run these steps in order for every round.
Modify code locally.
Verify correctness locally.
clippy or Rust check coverage for Rust changes.Run a correctness-focused independent review.
Commit and push.
perf: ....--force-with-lease only after an explicit rebase or another unavoidable history rewrite, not as the default round workflow.Start CI/CodSpeed tracking.
Classify CI status.
Binary Size Limit separately; do not block correctness triage on it unless the user or repository policy makes it required.Handle code review comments before performance evaluation completes.
Read and interpret CodSpeed feedback.
Decide the next action independently.
Perform terminal CodSpeed explain request.
@codspeedbot explain why this PR is faster.Keep one fixed PR comment in this shape and refresh it throughout the work:
## CodSpeed Optimization Log
Target: `<benchmark>` >= `<threshold>`
Scope: `<requested scope>`
Current status: `<running|passed|failed|blocked>`
Latest head: `<sha>`
| Round | Commit | Change | CodSpeed |
| ----- | ------- | ----------- | -------------------- |
| 1 | `<sha>` | `<summary>` | `<delta or pending>` |
Update, do not duplicate, this comment. Keep entries concise but specific enough that the commit history and performance result history are visible.
When the repository or task is Rspack-specific:
$rspack-perf before implementation to guide the optimization strategy.Keep updates short and decision-oriented:
@codspeedbot explain why this PR is faster was posted when the terminal CodSpeed result had an improvement.