GitHub

/ Foundations — 05

Bytes are a feature.

Every component subpath has a brotli budget. CI fails if a PR drifts over. Adjusting a budget upward requires a new ADR with measurement evidence — never a casual increment.

The numbers

SubpathBrotli
@kumiki/primitives/<each>500 B
@kumiki/runtime1 KB
@kumiki/machines/toggle800 B
@kumiki/machines/combobox3 KB
@kumiki/components/toggle1.5 KB
@kumiki/components/dialog3.5 KB
@kumiki/components/combobox4.5 KB
@kumiki/locale/<lang>1 KB

The full table — every subpath, every reasoning — lives at docs/design/09-bundle-budget.md. The current measured numbers are visible at /sizes; competitor comparisons live at /sizes/compare.

How budgets are enforced

  1. size-limit measures every subpath on every CI run.
  2. If a measurement exceeds the limit, the build fails. No --ignore.
  3. agadoo verifies tree-shaking — every package declares sideEffects: false and is checked.
  4. publint + arethetypeswrong verify the published shape matches the declared exports.

Why this is in the docs

Because reviewers should know. A pull request that bumps Combobox from 4.5 KB to 4.8 KB is not a small change — it's a decision that requires a corresponding ADR. The number is visible to consumers; the discipline must be visible too.