Performance playbook
Bundle Size Guard
Builds the PR branch and base branch, compares bundle sizes, and attributes growth to specific imports or missing dynamic imports.
On pull requests that touch frontend source, build the PR branch and the base branch, compare total and per-route bundle sizes, and post a delta table as a deduplicated PR comment. Growth beyond the configured threshold is attributed to imports, new dependencies, duplicate libraries, or lost dynamic imports; exceeding a hard limit fails the check.
- Identifier
bundle-size-guard- Version
- 1.0.0
- Steps
- 4
- Triggers
- 2
- bundle
- performance
- frontend
- webpack
- nextjs
When it runs
pull_request.opened- Settle delay
- 15s after the event
Only when all hold
- pullRequest.isDraft not equals true
- actor.username not in dependabot, dependabot[bot], renovate, renovate[bot], github-actions, github-actions[bot]
- actor.username not contains [bot]
pull_request.synchronize- Settle delay
- 15s after the event
Only when all hold
- pullRequest.isDraft not equals true
- actor.username not in dependabot, dependabot[bot], renovate, renovate[bot], github-actions, github-actions[bot]
- actor.username not contains [bot]
The pipeline
The graph below is the one the workflow opens with in the builder, same steps, same layout, drawn on the same canvas. The run playing through it is a simulation; the branches and conditions are real.
- 01PR Opened / Synchronized
triggerThe event that starts the run.
- 02Clone Repository
git.cloneShallow-clones the repository at the right ref.
- 03Measure Bundle Delta
agent.runOne agent works the task with its toolkit.
- 04Publish Bundle Report
report.publishPosts or updates a deduplicated report comment.
The agent
Bundle Size Guard
- Base type
- Senior Developer
- Temperature
- 0.2
- Max iterations
- 40
- Tools
- 5
Filesystem · 2
read_fileRead File · readlist_dirList Directory · read
Terminal · 1
run_terminal_cmdRun Terminal Command · write
Code search · 1
code_searchCode Search · read
Status · 1
update_statusUpdate Status · write