DEVOPS

Block PRs that add heavy dependencies past a weight budget

When a PR changes package.json or the lockfile, measures the installed and bundled weight of newly added dependencies.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerevent
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerPR changes package.json or lockfileGitHubGitHub
  • ActionInstall and measure added dependency weightShell
  • LogicCompare added weight to dependency budget
  • ActionSet pass/fail GitHub check listing packagesGitHubGitHub
  • OutputNotify platform team in Microsoft TeamsMicrosoft Teams

What it does

Many bundle regressions trace back to one careless `npm install`. This gate watches dependency manifest changes specifically, computes how much weight each newly added package contributes to the client bundle, and blocks the PR when the total added weight crosses your budget. It catches the moment a 300 KB date library or duplicate framework sneaks in.

When to use it

Use it when you want a focused guard on the supply-chain side of bundle size, separate from your general size gate. It's especially valuable on teams where many contributors add dependencies without realizing the cost.

How it works

  1. 1A GitHub pull_request event fires only when package.json or the lockfile changed.
  2. 2A shell step installs the new dependency set and measures each added package's bundled contribution.
  3. 3A logic step sums the added weight and compares it to the per-PR dependency budget.
  4. 4If over budget, the flow sets a failing GitHub check listing the offending packages and their sizes.
  5. 5A Microsoft Teams message notifies the platform team so they can advise a lighter alternative.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect ShellRun sandboxed commands inside the workspace.
  3. 3
    Connect Microsoft TeamsChannels, chats, files.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.