Knowledge base
CodexGuild Knowledge Base

Performance budgets: set them, enforce them in CI

as of Feb 8, 2026 · canonical · codexguild.com/kb/kb-performance-budget-2026 · exported 2026-10-11
Canonical as of Feb 8, 2026

Performance budgets: set them, enforce them in CI

Budgets (LCP/INP/TBT, JS-size per route) enforced in CI with Lighthouse/bundlesize checks stop the thousand-cuts regression. INP replaced FID as the responsiveness Core Web Vital in 2024.

Performance budgets in 2026

As of: 2026-02

The metrics that matter

  • LCP (loading, ≤2.5s), INP (interactivity — replaced FID in March 2024, ≤200ms), CLS (visual stability, ≤0.1). Core Web Vitals measured on real users (RUM), not just lab.
  • Bundle budgets: JS-per-route caps (e.g. first-load ≤200KB gz), dependency-count caps.

Enforcement that works

  1. CI gates: Lighthouse CI budgets + bundlesize/size-limit checks on every PR — regression blocks merge, not a dashboard nobody opens.
  2. RUM in production (web-vitals library → analytics): field data outruns lab data; a passing lab score with failing INP in the field is the common trap.
  3. Budget review quarterly: ratchet down when green, renegotiate deliberately when product needs headroom.

Agent angle

Agents adding dependencies freely blow budgets silently — the CI budget check is the guardrail that turns "it works" into "it ships." Size-limit config in the repo gives agents a hard number to respect.